<?php
// специальный отчет для добавления сотрудников в группы
include_once(_DIR_EXT.'/events/report_personals_in_event_dyn.php');
class report_events_media_personals extends report_personals_in_event_dyn
{
 var $title='Участники мероприятия' ;
 var $view_by_space_filter=1 ;
 var $allow_org_ids=1 ;
 var $usl_select_org='' ;
 var $rec_event=array() ;
 var $event_group_id=0 ;
 var $event_id=0 ;
 var $group_id=0 ;
 var $personal_id=0 ;
 var $ids=0 ;
 var $status=0 ;

// шаблон - вывод ссылками без разделитея
  function print_template_HTML($list_recs,$options=array())
  { $id=($options['id'])? 'id='.$options['id']:'' ;
    $event_obj=EVENTS()->get_event_obj_by_id($this->event_id) ;
    //print_2x_arr($list_recs);

    ?><table class="basic fz_small full auto"<?echo $id?>>
        <tr>
            <th>ID</th>
            <th>ФИО, дата рождения, Возраст</th>
            <th>Организация, подразделение</th>
            <th>Статус доведения контента</th>
            <th>Дата доведения</th>
        </tr>
        <?
        if (_sizeof($list_recs)) foreach($list_recs as $rec_personal)
        {   if (!$rec_personal['event_pass_status']) $rec_personal['event_pass_status']=0 ;
            ?><tr class=item>
                <td><?if ($rec_personal['event_pass_id']){?><a href="/window/events/event_pass/<?echo $rec_personal['event_pass_id']?>/" class="new_window"><?echo $rec_personal['event_pass_id']?></a><?} else echo '-'?></td>
                <td class="left"><a href="<?echo $rec_personal['__href_window']?>" class="new_window" target="_blank" title="win_second"><?echo $rec_personal['obj_name']?></a>
                    <?  /*if ($rec['uid']) echo '<br><span class="nowrap small">'.$rec['uid'].'</span>' ;*/
                        if (!$rec_personal['enabled'])echo '<br><br><span class="red bold">УВОЛЕН</span> ('.date('d.m.Y H:i',$rec_personal['fired_data']).')' ;
                        if ($rec_personal['dr'])echo '<br>'.$rec_personal['dr'] ;
                    ?>
                </td>
                <td class="left"><?echo '<strong>'.$rec_personal['_org_name'].'</strong><br><div class="small">'.$rec_personal['_otdel_name'].'</div>'._IL('IL_works')->recs[$rec_personal['working']]['obj_name']?></td>
                <td><? echo $event_obj->arr_status[$rec_personal['event_pass_status']]?></td>
                <td><?if ($rec_personal['data_event_pass_status_change']) echo date('d.m.Y H:i',$rec_personal['data_event_pass_status_change'])?></td>
            </tr><?
        }
      ?></table><?
  }


}

?>
