<?php
include_once("c_setting.php");
class c_page_cab_setting_org extends c_page_cab_setting
{
  public $h1='Организация персонала' ;

 function select_obj_info()
 { global $rec_org;
   if (_CUR_PAGE_NAME)
   { $rec_org=PERSONAL()->get_personal_section_by_URL(_CUR_PAGE_NAME) ;
     if ($rec_org['pkey'])
     { $this->tabs['/setting/org/'.$rec_org['pkey'].'.html']=$rec_org['obj_name'] ;
       $this->h1='Редактирование организации "'.$rec_org['obj_name'].'"' ;
     }
     else $this->result=404 ;
   }
 }

 function block_main()
 { global $rec_org ;
   $this->page_title() ;

   if ($rec_org['pkey']) print_template($rec_org,'aspmo_setting/panel_org_edit') ;
   else
   { ?><div id="panel_org_list"><?
       $list_org=PERSONAL()->get_list_personal_section() ;
       print_template($list_org,'aspmo/list_org') ;
     ?><form><input type="text" class="big" name="new_org_name" placeholder="Новая организация"> <input type="submit" class="v2" cmd="aspmo/create_new_org" value="Создать"></form><?
     ?></div><?
     $this->panel_cards_to_print() ;
   }
 }

 function panel_cards_to_print()
 {
   ?><br><br><div id="panel_cards_to_print"><h2>Печать карточек сотрудников</h2><form>От <input type="text" name="from" value="1"> до <input type="text" name="to" value="10"><input type="submit" value="Подготовить к печати" class="v2" cmd=aspmo/prepare_cards_print validate="form"></form></div><?
 }

}



?>