<?php
include_once("c_esmo_magnit_instruction_card.php");
class c_page_cab_esmo_magnit_instruction_card_personal extends c_page_cab_esmo_magnit_instruction_card
{
  public $h1='Журнал обучения по сотруднику' ;
  public $rec_personal=array();

  function menu_config() {}
  function second_menu_config()
  { //$this->second_menu[$this->rec_event['__href'].'lessions/']=array('title'=>'Занятия') ;
    //$this->second_menu[$this->rec_event['__href'].'new_lession/']=array('title'=>'Новое занятие','id'=>'show_window_monitor') ;
  }

 function select_obj_info()
 { parent::select_obj_info() ;
   if ($GLOBALS['URL_PARAMS']['personal'])
   { $this->rec_personal=PERSONAL()->get_personal_by_id($GLOBALS['URL_PARAMS']['personal']) ;
     if ($this->rec_personal['pkey'])
     {
       $this->h1=$this->rec_event['obj_name'].', журнал обучения по сотруднику "'.$this->rec_personal['obj_name'].'"' ;
     }
     if (!$this->rec_personal['pkey']) $this->result=404 ;
   } else $this->result=404 ;

 }

  function block_main()
  { $this->page_title() ;
    include_once(_DIR_EXT.'/esmo_magnit_instruction/report_person_training.php') ;
    $report_obj=new report_person_training() ;
    $report_obj->no_view_title=1;
    $report_obj->event_id=$this->rec_event['pkey'];
    $report_obj->personal_id=$this->rec_personal['pkey'];
    $report_obj->init();
    //$report_obj->panel_buttons();
    //$report_obj->group_id=MEMBER()->cur_group_id;  // показываем занятия только из своей и дочерних групп
    //$report_obj->panel_info_filter() ;
    //$report_obj->filter['order']='pkey desc';
    $report_obj->view_as_HTML(array('_template_name'=>'print_template_HTML_small')) ;
  }


}



?>