<?php
include_once("c_setting_update.php");
class c_page_cab_setting_locals extends c_page_cab_setting_update
{
  public $h1='Локализация ЭСМО' ;



 function block_main()
 { $this->page_title() ;
   ?><form class="basic">
        <input type="text" class="big" name="new_local_name" data-required placeholder="Новая локализация" >&nbsp;
        <input type="submit" class="v2 fa fa-plus" value="Создать" cmd=aspmo_setting/local_create validate=form>
        <button class="v2" cmd="aspmo_setting/local_delete">Удалить выбранные локализации</button>
   <?
     $this->panel_list_edit() ;
   ?></form><?



 }
    
 function panel_list_edit()
{ $recs_locals=execSQL('select * from obj_site_locals where clss in (1) and enabled=1 and parent>0') ;
  $stats=execSQL_row('select parent,count(pkey) from obj_site_locals where clss in (275) and enabled=1 group by parent') ;
  ?><form>
    <table class="basic fz_small"><tr><th>Выбор</th><th>ID</th><th>Наименование</th><th>Число фраз</th><th>Карточка группы</th></tr>
     <?if ($recs_locals) foreach($recs_locals as $rec)
       {  ?><tr>
               <td><input type="checkbox" name="_check[]" value="<?echo $rec['pkey']?>"></td>
               <td class="center"><?echo $rec['pkey']?></td>
               <td class="center"><?echo htmlspecialchars($rec['obj_name'])?></td>
               <td class="center"><?echo $stats[$rec['pkey']]?></td>
               <td><a href="/window/setting/local/<?echo $rec['pkey']?>/" class="new_window">Карточка локализации</td>
          </tr><?
       }?>
   </table>
   </form>
    <?

}

    
}



?>