Browse Source

php - add the ovents list to page_events

master
kanoi 9 years ago
parent
commit
060e4c15ef
  1. 53
      pool/page_events.php

53
pool/page_events.php

@ -142,6 +142,59 @@ What: <input type=text name=what size=10 value='$wh'>
} }
} }
if ($wh == 'ovents')
{
$ans = eventCmd($user, array('action' => 'ovents'));
$pg .= "<br><br><table callpadding=0 cellspacing=0 border=0>\n";
$pg .= '<thead><tr class=title>';
$pg .= '<td class=dr>#</td>';
$pg .= '<td class=dl>Key</td>';
$pg .= '<td class=dr>ID</td>';
$pg .= '<td class=dr>IDName</td>';
$pg .= '<td class=dr>Hour UTC</td>';
$pg .= '<td class=dl>Count</td>';
$pg .= "</tr></thead>\n";
if ($ans['STATUS'] == 'ok')
{
$pg .= '<tbody>';
$count = $ans['rows'];
for ($i = 0; $i < $count; $i++)
{
if (($i % 2) == 0)
$row = 'even';
else
$row = 'odd';
$j = $i+1;
$pg .= "<tr class=$row>";
$pg .= "<td class=dr>$j</td>";
$pg .= '<td class=dl>'.$ans['key:'.$i].'</td>';
$pg .= '<td class=dr>'.$ans['id:'.$i].'</td>';
$pg .= '<td class=dr>'.$ans['idname:'.$i].'</td>';
$pg .= '<td class=dr>'.gmdate('j/M H:i:s',$ans['hour:'.$i]*3600).'</td>';
$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 .= "<td class=dl>$co</td>";
$pg .= "</tr>\n";
}
$pg .= '</tbody>';
}
}
return $pg; return $pg;
} }
# #

Loading…
Cancel
Save