<?php
include_once('c_rmt.php') ;
class c_page_cab_rmt_check_s extends c_page_cab_rmt
{
  public $h1='Чтение QR-кода' ;
  var $rec_personal ;
  var $rec_car ;
  var $rec_mo ;
  var $rec_to ;
  var $step ;
  //var $page_type='window' ;

    function body_work()
    {
        ?>
        <body class="<?echo $this->color_set ?> body_work <?echo $this->body_class ?>">
        <div class="body" style="margin:0 7px 20px 7px;">
            <aside>
                <?
                $this->panel_second_menu();
                ?>
                <table id="block_center">
                    <tr>
                        <td id="center_left"><? $this->panel_block_main(); ?></td>
                        <td id="center_right"><?
                            $this->panel_block_right(); ?></td>
                    </tr>
                </table>
            </aside>
        </div>
        <div id="div_print"></div>
        </body>
        <?
    }

 function set_head_tags()
 { parent::set_head_tags() ;
   $this->HEAD['css'][]=_PATH_TO_EXT.'/aspmo_rmt/style.css' ;

 }
    
 function select_obj_info()
 {  if (_CUR_ID)
    { $this->rec_to=CAR_TO()->get_TO_by_id(_CUR_ID,array('only_start'=>1)) ;
      if ($this->rec_to['pkey'])
      {  $this->rec_personal=PERSONAL()->get_personal_by_id($this->rec_to['personal_id']) ;
         $this->rec_car=PERSONAL()->get_car_by_id($this->rec_to['car_id']) ;
         $this->rec_mo=ESMO()->get_mo_by_id($this->rec_to['mo_id']) ;
      }
    }
 }

 function block_main()
 {
     $this->page_title() ;
 }






 function panel_nomer()
 { ?><div id="panel_nomer">
      <?echo $this->rec_personal['_ext_info']['CarDetails']['Marka'].' '.$this->rec_personal['_ext_info']['CarDetails']['Model'].' '.$this->rec_personal['_ext_info']['CarDetails']['CarNumber']?>
     </div>
   <?
 }

 function panel_TO()
 { include_once('panel_driver_info.php');
   include_once('panel_car_info.php');
   include_once('panel_check_car.php');
   include_once('panel_MO_info.php');

   $time_mo=getdate(time()) ;
   $time_from=mktime($time_mo['hours']-8,$time_mo['minutes'],$time_mo['seconds'],$time_mo['mon'],$time_mo['mday'],$time_mo['year']);
   $rec_mo=ESMO()->get_last_mo_rec_to_personal($this->rec_personal['pkey'],array('only_model'=>'all','time_from'=>$time_from)) ;
   ?><div id="panel_TO"><form><div id="panel_image_preview"></div>
           <?$this->panel_img_mo_view();?>
           <table class="col2x">
             <tr><td class="info"><? panel_MO_info($rec_mo) ;
                                     panel_driver_info($this->rec_personal);
                                     panel_car_info($this->rec_car);
                                 ?></td>
                 <td class="krit"><? panel_check_car($this->rec_personal,$this->rec_car,$rec_mo) ; ?></td>
             </tr>
           </table>
     </form></div>
     <div class="buttons"><button class="close_window">Закрыть</button></div>
   <?
 }







}

?>