summaryrefslogtreecommitdiffstats
path: root/frontends/php/helpdesk.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-08-11 16:16:22 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-08-11 16:16:22 +0000
commitcbb3323a0ad2ae65d0134e01b807faf8df99a2d2 (patch)
treead55125fb7f264d94d07d873e00f45c19097f4f6 /frontends/php/helpdesk.php
parent150ed6cf4a06893d5ab64eb31c7efc06c4e05744 (diff)
- added housekeeping procedure for table sessions (Alexei)
- changed width=\"X%\" to width=X% in *.php (Alexei) - Status of a trigger will blink if it was changes during last 60 seconds (Alexei) - Zabbix daemons to update triggers.lastchange when triggers.values is changed (Alexei) - added misc/init.d/debian/zabbix-[suckerd|trapperd] (Alexei) - removed misc/init.d/debian/zabbix-server (Alexei) - send_email() will timeout after 10 seconds (Alexei) - DBadd_alarm() renamed to add_alarm() (Alexei) - support for SCO OpenServer (Alexei). Thanks to Alexender Kirhenstein. - ./configure will correctly define socklen_t (Alexei) - <center> changed to <div align=center> (Alexei) - reason of problem in screen IT Services (Alexei) - added frontends.php/helpdesk.php (Alexei) - added tables: problems, problems_comments,categories (Alexei) - added "...#form" to button Change in form Configuration of Users (Alexei) - "Just for information" changed to "Information" (Alexei) - fixed ./configure to correctly find zlib (Alexei) - housekeeping to delete no more than HousekeepingFrequency*3600 records from table history and history_str at once (MySQL only) (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@450 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/helpdesk.php')
-rw-r--r--frontends/php/helpdesk.php150
1 files changed, 150 insertions, 0 deletions
diff --git a/frontends/php/helpdesk.php b/frontends/php/helpdesk.php
new file mode 100644
index 00000000..f068eae9
--- /dev/null
+++ b/frontends/php/helpdesk.php
@@ -0,0 +1,150 @@
+<?
+ include "include/config.inc.php";
+ $page["title"] = "Helpdesk";
+ $page["file"] = "helpdesk.php";
+ show_header($page["title"],0,0);
+?>
+
+<?
+ show_table_header_begin();
+ echo "IT HELPDESK";
+
+ show_table_v_delimiter();
+?>
+
+<?
+ if(isset($start)&&($start<=0))
+ {
+ unset($start);
+ }
+ if(isset($start))
+ {
+ echo "[<A HREF=\"alerts.php?start=".($start-100)."\">";
+ echo "Show previous 100</A>] ";
+ echo "[<A HREF=\"alerts.php?start=".($start+100)."\">";
+ echo "Show next 100</A>]";
+ }
+ else
+ {
+ echo "[<A HREF=\"alerts.php?start=100\">";
+ echo "Show next 100</A>]";
+ }
+
+ show_table_header_end();
+ echo "<br>";
+
+ show_table_header("PROBLEMS");
+?>
+
+
+<FONT COLOR="#000000">
+<?
+ if(!isset($start))
+ {
+ $sql="select problemid,clock,status,description,priority,userid,triggerid,lastupdate,categoryid from problems where status=0 order by clock,priority limit 1000";
+ }
+ else
+ {
+ $sql="select a.alertid,a.clock,a.type,a.sendto,a.subject,a.message,ac.triggerid,a.status,a.retries from alerts a,actions ac where a.actionid=ac.actionid order by a.clock desc limit ".($start+1000);
+ }
+ $result=DBselect($sql);
+
+ echo "<TABLE WIDTH=100% BORDER=0 align=center BGCOLOR=\"#CCCCCC\" cellspacing=1 cellpadding=3>";
+ echo "<TR>";
+ echo "<TD WIDTH=10%><b>Registered at</b></TD>";
+ echo "<TD WIDTH=10%><b>Priority</b></TD>";
+ echo "<TD WIDTH=10%><b>Category</b></TD>";
+ echo "<TD WIDTH=10%><b>Description</b></TD>";
+ echo "<TD WIDTH=5%><b>Status</b></TD>";
+ echo "<TD><b>History</b></TD>";
+ echo "</TR>";
+ $col=0;
+ $zzz=0;
+ while($row=DBfetch($result))
+ {
+ $zzz++;
+ if(isset($start)&&($zzz<$start))
+ {
+ continue;
+ }
+// if(!check_right_on_trigger("R",$row["triggerid"]))
+ // {
+// continue;
+// }
+
+ if($col++%2==0) { echo "<tr bgcolor=#DDDDDD valign=top>"; }
+ else { echo "<tr bgcolor=#EEEEEE valign=top>"; }
+
+ if($col>100) break;
+
+ echo "<TD><pre>".date("Y.M.d H:i:s",$row["clock"])."</pre></TD>";
+ if($row["priority"]==0) echo "<TD ALIGN=CENTER><pre>Not classified</pre></TD>";
+ elseif($row["priority"]==1) echo "<TD ALIGN=CENTER><pre>Information</pre></TD>";
+ elseif($row["priority"]==2) echo "<TD ALIGN=CENTER><pre>Warning</pre></TD>";
+ elseif($row["priority"]==3) echo "<TD ALIGN=CENTER BGCOLOR=#DDAAAA><pre>Average</pre></TD>";
+ elseif($row["priority"]==4) echo "<TD ALIGN=CENTER BGCOLOR=#FF8888><pre>High</pre></TD>";
+ elseif($row["priority"]==5) echo "<TD ALIGN=CENTER BGCOLOR=RED><pre>Disaster !!!</pre></TD>";
+ else echo "<TD ALIGN=CENTER><pre><B>".$row["priority"]."</B></pre></TD>";
+ if(isset($row["categoryid"]))
+ {
+ echo "<TD align=center><pre>".$row["categoryid"]."</pre></TD>";
+ }
+ else
+ {
+ echo "<TD align=center><pre>-</pre></TD>";
+ }
+ echo "<TD><pre>".$row["description"]."</pre></TD>";
+ if($row["status"]==0)
+ {
+ echo "<TD><pre>Active</pre></TD>";
+ }
+ else
+ {
+ echo "<TD><pre>Closed</pre></TD>";
+ }
+ echo "<TD>";
+
+ $sql="select commentid,problemid,clock,status_before,status_after,comment from problems_comments where problemid=".$row["problemid"]." order by clock";
+ $result2=DBselect($sql);
+ while($row2=DBfetch($result2))
+ {
+ echo "<table WIDTH=100% BORDER=1 BGCOLOR=\"#EEEEEE\" cellspacing=0 cellpadding=1>";
+ echo "<tr>";
+ echo "<td><b>Registered at:</b></td>";
+ echo "<td>".date("Y.M.d H:i:s",$row2["clock"])."</td>";
+ echo "</tr>";
+ echo "<tr>";
+ echo "<td><b>Commented by:</b></td>";
+ if(isset($row2["userid"]))
+ {
+ $user=get_user_by_userid($row2["userid"]);
+ echo "<td>".$user["name"]." ".$user["surname"]."</td>";
+ }
+ else
+ {
+ echo "<td>Zabbix</td>";
+ }
+ echo "</tr>";
+ echo "<tr>";
+ echo "<td><pre>".$row2["comment"]."</pre></td>";
+ echo "<td><pre>".$row2["comment"]."</pre></td>";
+ echo "</tr>";
+ echo "<tr>";
+ echo "</tr>";
+ echo "</table>";
+ echo "<hr>";
+ }
+ echo "[<a href=\"helpdesk.php?action=add_comment&problemid=".$row["problemid"]."\">Add comment</a>]";
+ echo " [<a href=\"helpdesk.php?action=change_problem&problemid=".$row["problemid"]."\">Change problem</a>]";
+ }
+ echo "</TABLE>";
+?>
+
+<?
+ echo "<a name=\"form\"></a>";
+ insert_problem_form($problemid);
+?>
+
+<?
+ show_footer();
+?>