<?php
include_once("c_esmo_magnit_instruction_card.php");
class c_page_cab_esmo_magnit_instruction_card_new_lession extends c_page_cab_esmo_magnit_instruction_card
{
  public $h1='Инструктаж - новый урок' ;
  function block_main()
  { $this->page_title() ;
    //damp_array($this->rec_event,1,-1) ;
    $this->select_theme() ;


  }

function menu_config()
 { if ($this->rec_event['pkey'])
      { $this->menu[$this->rec_event['__href'].'new_lession/']=array('title'=>'Новое занятие','id'=>'show_window_monitor') ;
        $this->page_type='window' ;
      }
   else parent::menu_config() ;
 }

 function second_menu_config() {}

  function select_theme($options=array())
  {   if (!is_array($options['disabled_filter'])) $options['disabled_filter']=array() ;
      $recs_themes=EVENTS()->get_themes_of_events($this->rec_event['pkey']);
      ?><div id="panel_filter">
              <form id="sky-form" class="sky-form">
                  <h2>Темы занятия:</h2>
                  <table class="basic fz_small"><tr><th>Выбор</th><th>Название темы</th><th>Продолжительность занятия</th></tr>
                  <?if (_sizeof($recs_themes)) foreach($recs_themes as $rec)
                  {?><tr><td><input type="checkbox" name="theme_ids[]" value="<?echo $rec['pkey']?>"></td>
                         <td class="left" style="width:500px;"><?echo $rec['obj_name']?></td>
                         <td class="left"><?echo $rec['length']?> мин.</td>
                      </tr><?}?>
                  </table><br><br>
                  <button class="button v2" event_id="<?echo $this->rec_event['pkey']?>"  cmd="esmo_magnit_instruction/lession_create" style="margin:0;float:none;">Перейти к регистрации слушателей</button>
               </form>
        </div><br>
      <?
  }




}



?>
