<?php
include_once('c_mo.php') ;
class c_page_cab_mo_pp extends c_page_cab_mo
{ var $rec_PP ;
 public $h1='Пупиллометрия' ;

 function set_head_tags()
 {  parent::set_head_tags() ;
    $this->HEAD['css'][]='/'._CLASS_.'/ext/aspmo_pp/style.css' ;
    $this->HEAD['js'][]='/'._CLASS_.'/ext/aspmo_pp/script.js' ;
 }

 function get_cur_page_meta_tags()
 {
   //if ($this->rec_personal['pkey']) $this->h1='Исходные данные при проверке сотрудника '.$this->rec_personal['obj_name'] ;
 }

 function select_obj_info()
 { parent::select_obj_info() ;
   if ($this->rec_mo['_pp_id'])
    { $this->rec_PP=PP()->get_PP_by_id($this->rec_mo['_pp_id']) ;
      if ($this->rec_PP['pkey'])
      { $this->rec_personal=PERSONAL()->get_personal_by_id($this->rec_PP['personal_id']) ;
        $this->h1='Расчет результата пупиллометрии '.$this->rec_personal['obj_name'].' '.$this->rec_personal['propusk'] ;
        //$this->page_type='window' ;
      }
      //else $this->result=404 ;
    }
 }

 function block_main()
 {
     $this->page_title() ;
     if ($this->rec_PP['pkey']) {
         include_once(_DIR_EXT . '/aspmo_pp/report_pp_result.php');
         $report_obj = new report_pp_result();
         $report_obj->rec_PP = $this->rec_PP;
         $report_obj->filter=$this->filter;
         $report_obj->dir_PP = '/cab/mo/'.$this->rec_PP['id_mo'].'/pp/';
         $report_obj->title='Расчет результата пупиллометрии '.$this->rec_personal['obj_name'].' '.$this->rec_personal['propusk'].'<br>Время осмотра: '.date('d.m.Y H:i',$this->rec_PP['c_data']) ;
         $report_obj->setting();
         $report_obj->view();
     }


 }
}

?>