<?
  // шаблон - вывод ссылками без разделитея
  function list_logs_events(&$list_recs,$options=array())
  { $id=($options['id'])? 'id='.$options['id']:'' ;
	 $recs_account=execSQL('select pkey,obj_name,rol from obj_site_account') ;
    ?><link rel="stylesheet" type="text/css" href="<?echo _PATH_TO_EXT?>/jquery.tableScroll/jquery.tablescroll.css"/>
	  <script type="text/javascript" src="<?echo _PATH_TO_EXT?>/jquery.tableScroll/jquery.tablescroll.js"></script>
      <script type="text/javascript" src="<?echo _PATH_TO_EXT?>/jquery.tableScroll/jquery.tablescroll.js"></script>
      <table id=thetable2 class="list_logs list_logs_events" <?echo $id?>>
        <colgroup><col id=c1><col id=c2><col id=c3><col id=c3><col id=c4><col id=c5><col id=c6><col id=c7><col id=c8></colgroup>
        <thead>
			<tr><th>Дата, время</th><th>Терминал id</th><th>Терминал ip</th><th>Сессия МО</th><th>Оператор</th><th>Сотрудник</th><th>Операция</th><th>Результат</th><th>Данные операции</th><th>Время<br>выполения</th></tr>
		</thead>
	    <tbody>

        <?
        if (_sizeof($list_recs)) foreach($list_recs as $rec)
    	{   if (isset($rec['user_id']) and isset($recs_account[$rec['user_id']]) and !$rec['member_id'])
				{ $rec['member_id']=$rec['user_id'] ; $rec['user_id']='' ;

				}
			?><tr>
    	      <td class=data><? echo date('d.m.Y H:i:s',$rec['c_data']) ;?></td>
    	      <td class=name><? echo $rec['terminal_id'] ?></td>
    	      <td class=name><? echo $rec['terminal_ip'] ?></td>
    	      <td class=name><? echo $rec['mo_id'] ?></td>
    	      <td class=name><? echo $recs_account[$rec['member_id']]['obj_name'].'<br>'.$_SESSION['ARR_roll'][$rec['rol']]['obj_name'] ?></td>
    	      <td class=name><? echo $rec['user_id'] ?></td>
    	      <td class=name><? echo $rec['obj_name'] ?></td>
    	      <td class=comment><? echo $rec['comment'] ?></td>
    	      <td class=data><? if ($rec['data']) damp_array(unserialize($rec['data']),1,-1) ?></td>
    	      <td class=time><? if ($rec['time_exec']) echo round($rec['time_exec'],5) ?></td>
    	   </tr><?
    	}
    ?></tbody></table>
	  <script>
	  /*<![CDATA[*/

	  jQuery(document).ready(function($)
	  {
	  	$j('#thetable2').tableScroll({height:500});

	  	//$j('#thetable2').tableScroll();
	  });

	  /*]]>*/
	  </script>
	  <?
  }

?>
