<?php
include_once("c_kt_setting_zone.php");
class c_page_cab_kt_setting_zone_terminals extends c_page_cab_kt_setting_zone
{
    public $h1='Зона доступа - Терминалы' ;

    function block_main()
    {
         $this->page_title() ;
         $this->panel_group_edit() ;
    }

    function panel_group_edit()
    {
        $recs=DEVICE()->get_devices_by_parent($this->rec_zone['pkey']) ; ?>
        <table class="basic fz_small auto">
            <tr><th rowspan="2">ID</th><th rowspan="2">Наименование</th><th rowspan="2">IP</th><th rowspan="2">Версия ПО</th><th rowspan="2">Состояние</th><th colspan="2">Исправность оборудования</th><th rowspan="2">Карточка терминала</th></tr>
            <tr><th>Видео</th><th>Алкотестер</th></tr>
            <? if (_sizeof($recs)) foreach($recs as $rec) {?>
                <tr>
                    <td><?echo $rec['id']?></td>
                    <td class="left"><?echo addslashes($rec['obj_name'])?></td>
                    <td class="left"><?echo $rec['ip']?></td>
                    <td class="center"><?echo $rec['vers']?></td>
                    <td class="status"><?echo $_SESSION['ARR_terminal_status_color'][$rec['status']]?></td>
                    <td class="status"><img src="/images/status_<?echo $rec['video']?>.png"></td>
                    <td class="status"><img src="/images/status_<?echo $rec['alcotester']?>.png"></td>
                    <td class="center"><a href="/window/kt/setting/terminal/<?echo $rec['pkey']?>/" class="new_window">Карточка</a></td>
                </tr>
            <?}?>
        </table><?
    }

}



?>
