Event Information'; $wh = getparam('what', false); if (nuem($wh)) $wh = ''; $pg = '
'.makeForm('events')." What:   "; if ($wh == 'settings') { $ans = eventCmd($user, array('action' => 'settings')); $other = array('event_limits_hash_lifetime', 'ovent_limits_ipc_factor'); $pg .= "

\n"; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= "\n"; if ($ans['STATUS'] == 'ok') { $pg .= ''; $i = 0; foreach ($other as $name) { if (($i % 2) == 0) $row = 'even'; else $row = 'odd'; $i++; $pg .= ""; $pg .= ""; $pg .= ""; $pg .= ''; $pg .= "\n"; } $pg .= ''; } $pg .= "
#NameValue
$i$name'.$ans[$name].'
\n"; $flds = array('enabled' => 'Ena', 'user_low_time' => 'UserLo', 'user_low_time_limit' => 'UserLoLim', 'user_hi_time' => 'UserHi', 'user_hi_time_limit' => 'UserHiLim', 'ip_low_time' => 'IPLo', 'ip_low_time_limit' => 'IPLoLim', 'ip_hi_time' => 'IPHi', 'ip_hi_time_limit' => 'IPHiLim', 'lifetime' => 'Life'); $pg .= "

\n"; $pg .= ''; $pg .= ''; $pg .= ''; foreach ($flds as $row => $nam) $pg .= ""; $pg .= "\n"; if ($ans['STATUS'] == 'ok') { $pg .= ''; $names = array(); foreach ($ans as $name => $value) { $ex = explode('_', $name, 2); if (count($ex) == 2 && isset($flds[$ex[1]])) $names[$ex[0]] = 1; } $i = 0; foreach ($names as $name => $one) { if (($i % 2) == 0) $row = 'even'; else $row = 'odd'; $i++; $pg .= ""; $pg .= ""; $pg .= ""; foreach ($flds as $fld => $nam) $pg .= ''; $pg .= "\n"; } $pg .= ''; } $pg .= "
#Name$nam
$i$name'.$ans[$name.'_'.$fld].'
\n"; } if ($wh == 'all' || $wh == 'user' || $wh == 'ip' || $wh == 'ipc' || $wh == 'hash') { $ans = eventCmd($user, array('action' => 'events', 'list' => $wh)); $pg .= "

\n"; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= "\n"; if ($ans['STATUS'] == 'ok') { $pg .= ''; $count = $ans['rows']; for ($i = 0; $i < $count; $i++) { if (($i % 2) == 0) $row = 'even'; else $row = 'odd'; $j = $i+1; $pg .= ""; $pg .= ""; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= "\n"; } $pg .= ''; } $pg .= "
#ListIDIDNameUserIPIPcHashUTC
$j'.$ans['list:'.$i].''.$ans['id:'.$i].''.$ans['idname:'.$i].''.$ans['user:'.$i].''.isans($ans, 'ip:'.$i).''.isans($ans, 'ipc:'.$i).''.isans($ans, 'hash:'.$i).''.gmdate('j/M H:i:s',$ans['createdate:'.$i]).'
\n"; } if ($wh == 'ovents') { $ans = eventCmd($user, array('action' => 'ovents')); $pg .= "

\n"; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= "\n"; if ($ans['STATUS'] == 'ok') { $pg .= ''; $count = $ans['rows']; for ($i = 0; $i < $count; $i++) { if (($i % 2) == 0) $row = 'even'; else $row = 'odd'; $j = $i+1; $pg .= ""; $pg .= ""; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $co = ''; for ($k = 0; $k < 60; $k++) { if ($k < 10) $min = '0' . $k; else $min = $k; if (isset($ans["min$min:$i"])) { if ($co != '') $co .= ' '; $co .= "$min=".$ans["min$min:$i"]; } } $pg .= ""; $pg .= "\n"; } $pg .= ''; } $pg .= "
#KeyIDIDNameHour UTCCount
$j'.$ans['key:'.$i].''.$ans['id:'.$i].''.$ans['idname:'.$i].''.gmdate('j/M H:i:s',$ans['hour:'.$i]*3600).'$co
\n"; } return $pg; } # function show_events($info, $page, $menu, $name, $user) { gopage($info, NULL, 'doevents', $page, $menu, $name, $user); } # ?>