>")) { if(isset($_GET["start"])) { $_GET["start"]+=100; } else { $_GET["start"]=100; } } if(isset($_GET["start"])&&($_GET["start"]<=0)) { unset($_GET["start"]); } ?> "; $h2=$h2.""; } else { $h2=$h2.""; } $h2=$h2.">\">"; show_header2($h1,$h2,"
"); ?> 0,$row["max"],0); if(!isset($_GET["start"])) { $sql="select a.alertid,a.clock,mt.description,a.sendto,a.subject,a.message,ac.triggerid,a.status,a.retries,ac.scope,a.error from alerts a,actions ac,media_type mt where a.actionid=ac.actionid and mt.mediatypeid=a.mediatypeid and a.alertid>$maxalertid-200 order by a.clock desc limit 200"; } else { $sql="select a.alertid,a.clock,mt.description,a.sendto,a.subject,a.message,ac.triggerid,a.status,a.retries,ac.scope,a.error from alerts a,actions ac,media_type mt where a.actionid=ac.actionid and mt.mediatypeid=a.mediatypeid and a.alertid>$maxalertid-200-".$_GET["start"]." order by a.clock desc limit ".($_GET["start"]+500); } $result=DBselect($sql); table_begin(); table_header(array(S_TIME, S_TYPE, S_STATUS, S_RECIPIENTS, S_SUBJECT, S_MESSAGE, S_ERROR)); $col=0; $zzz=0; while($row=DBfetch($result)) { $zzz++; if(isset($_GET["start"])&&($zzz<$_GET["start"])) { continue; } if(($row["scope"]==0)&&!check_right_on_trigger("R",$row["triggerid"])) { continue; } if(($row["scope"]==1)&&!check_right("Host","R",$row["triggerid"])) { continue; } if(($row["scope"]==2)&&!check_anyright("Default permission","R")) { continue; } if($col>100) break; if($row["scope"]==0) { $time="".date("Y.M.d H:i:s",$row["clock"]).""; } else { $time=date("Y.M.d H:i:s",$row["clock"]); } if($row["status"] == 1) { $status=array("value"=>S_SENT,"class"=>"off"); } else { $status=array("value"=>S_NOT_SENT,"class"=>"on"); } $sendto=htmlspecialchars($row["sendto"]); $subject="".htmlspecialchars($row["subject"]).""; $message="
".htmlspecialchars($row["message"]).""; if($row["error"] == "") { $error=array("value"=>" ","class"=>"off"); } else { $error=array("value"=>$row["error"],"class"=>"on"); } table_row(array( $time, $row["description"], $status, $sendto, $subject, $message, $error), $col++); } if(DBnum_rows($result)==0) { echo "