<?php
include_once("c_term.php");
class c_page_term_whois extends c_page_term
{
  public $h1='Тест WHOIS' ;



  function block_main()
  {   $this->page_title() ;
      ?> <div id="panel_message">
            <h2>Укажите номер ВУ и номер автомобиля</h2>
            <div><form><input type="text" placeholder="Номер ВУ" name="driving" data-required>
                        <input type="text" placeholder="Госномер авто" name="numer_auto">
                    <input id=submit type="submit" class="v2" cmd="aspmo_term/send_WHOIS" validate="form" terminal_id=<?echo $this->terminal_id?> value="Отправить данные"></form></div>
        </div>
        <? /*
           ?><br>Дубликаты водителей:<br><?
           $recs=execSQL('select driving,count(pkey) as cnt from obj_site_personals where clss=211 and driving!="" group by driving having cnt>1') ;
           ?><table class="basic fz_small"><tr><th>Номер ВУ</th><th>ФИО</th><th>ID</th><th>Организация</th><th>Автопарк</th><th>Случайное авто</th><th></th></tr><?
           if (_sizeof($recs)) foreach($recs as $rec)
           { $ids=execSQL_line('select pkey from obj_site_personals where driving="'.$rec['driving'].'"') ;
             $i=0 ;
             foreach($ids as $id)
             {  $rec_personal=PERSONAL()->get_personal_by_id($id) ;
                $car_num=execSQL_value('select obj_name from obj_site_personals_cars where clss=361 and enabled=1 and parent="'.$rec_personal['_org_id'].'"') ;
                ?><tr><?
                if (!$i)
                { ?><td rowspan="<?echo _sizeof($rec)?>"><?echo $rec_personal['driving']?></td><?
                  ?><td rowspan="<?echo _sizeof($rec)?>"><?echo $rec_personal['obj_name']?></td><?
                }
                ?><td><?echo $rec_personal['pkey']?></td><?
                ?><td><?echo $rec_personal['_org_name']?></td><?
                ?><td><?echo $rec_personal['_otdel_name']?></td><?
                ?><td><?echo $car_num?></td><?
                ?><td><button class="v2" cmd="aspmo_term/send_WHOIS" driving="<?echo $rec_personal['driving']?>" numer_auto="<?echo $car_num?>"  terminal_id=<?echo $this->terminal_id?>>Отправить данные</button></td><?
                ?></tr><?
                $i++ ;
             }

           }
           ?></table><? */
      /*
      include_once(_DIR_EXT.'/aspmo_client/i_client.php') ;
           $client=new c_client() ;
           $rec_member=$client->get_personal_id_by_number('М924НК199#5016107044') ;
      damp_array($rec_member,1,-1) ;
        */
        ?>
        <br><div id="result_exec_cmd"></div>
      <?
  }

}



?>
