<?php
include_once("c_events_opo_card_db.php");
class c_page_cab_events_opo_card_db_status_info extends c_page_cab_events_opo_card_db
{
  public $h1='Описание статусов участия в мероприятии' ;
  function block_main()
  { $this->page_title() ;

      ?><h3>Статусы мероприятия</h3><?
      damp_array($this->obj_event->arr_status,1,-1);

      ?><h3>Статистика по статусам</h3><?
      $status_info=execSQL('select status,enabled,count(pkey) as cnt from obj_site_events_pass where event_id='.$this->rec_event['pkey'].' group by status,enabled desc',0,1) ;
      $arr2=[] ;
      foreach($status_info as $rec) $arr2[$rec['status']][$rec['enabled']]=$rec['cnt'] ;
      //damp_array($arr2);
        ?><table class="basic fz_small auto"><tr><th>Статус</th><th>Активно</th><th>Удаленных</th></tr><?
        foreach($arr2 as $status=>$arr_status)
        { ?>
             <tr>
                 <td><?echo (isset(EVENT_OPO()->arr_status[$status]))? EVENT_OPO()->arr_status[$status].' ['.$status.']':$status?></td>
                 <td><?echo ($arr_status[1])? $arr_status[1]:'-'?></td>
                 <td><?echo ($arr_status[0])? $arr_status[0]:'-'?></td>
             </tr>
         <?}?>

          </table><?

      //print_2x_arr($arr2);
      ?><h3>EVENTS()->get_event_personals_status</h3><?
      $arr_cnt=EVENTS()->get_event_personals_status($this->rec_event['pkey']) ;
      damp_array($arr_cnt,1,-1);
  }


}



?>
