<?php
include_once("c_esmo_magnit_instruction_card.php");
class c_page_cab_esmo_magnit_instruction_card_edit_step1 extends c_page_cab_esmo_magnit_instruction_card
{
  public $h1='Редактирование параметров инструктажа' ;
  var $after_save_url ;

  function block_main()
  { $this->page_title() ;
    $this->obj_event->panel_params_edit() ;   // вызываем панель настроек из класса
  }

  function CMD_save_event()
  { //damp_array($_POST) ;
    EVENTS()->save_events($this->rec_event['pkey'],$_POST['filter']) ;
    if (!$this->rec_event['enabled']) redirect_301_to($this->rec_event['__href'].'edit/step2/') ;
    else $this->select_obj_info() ;

      //$this->rec_event=EVENTS()->get_event_by_id($this->rec_event['pkey']) ;
  }

  function second_menu_config()
  {  if ($this->rec_event['pkey'])
       { $this->second_menu['/window/esmo_magnit_instruction/card/'.$this->rec_event['pkey'].'/edit/step1/']='Параметры инструктажа' ;
         if ($this->rec_event['_ext_info']['select_personals']<=1) $this->second_menu['/window/esmo_magnit_instruction/card/'.$this->rec_event['pkey'].'/edit/step2/']='Выбор участников' ;
         $this->second_menu['/window/esmo_magnit_instruction/card/'.$this->rec_event['pkey'].'/edit/personals/']='Участники мероприятия' ;
         $this->second_menu['/window/esmo_magnit_instruction/card/'.$this->rec_event['pkey'].'/edit/step3/']='Темы занятий' ;
         $this->second_menu['/window/esmo_magnit_instruction/card/'.$this->rec_event['pkey'].'/edit/upload_status_from_xls/']='Внешний инструктаж' ;
         if ($this->rec_event['_ext_info']['select_personals']==2) $this->second_menu['/window/esmo_magnit_instruction/card/'.$this->rec_event['pkey'].'/edit/upload_personals_from_xls/']='Загрузка из XLS' ;
	     if ($this->rec_event['ext']=='esmo_magnit_instruction/i_event_instruction2') $this->second_menu['/window/esmo_magnit_instruction/card/'.$this->rec_event['pkey'].'/edit/step4/']='Сроки по организациям' ;
         if ($this->rec_theme['pkey']) $this->second_menu['/window/esmo_magnit_instruction/card/'.$this->rec_event['pkey'].'/edit/step3/[theme_id='.$this->rec_theme['pkey'].']/']='Тема: '.$this->rec_theme['obj_name'] ;
       }
  }

}



?>
