summaryrefslogtreecommitdiffstats
path: root/frontends/php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-01-06 19:16:08 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-01-06 19:16:08 +0000
commit75b5ebc9193ee465c12e8bcd4d9a802c2e0a443b (patch)
treea379d8e15aa0c23c771d13a15260e81a89049322 /frontends/php
parentbe897f0d7f1d53d6f447646d89abdcfe397723d8 (diff)
- added frontends/image.php (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1583 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
-rw-r--r--frontends/php/config.php100
-rw-r--r--frontends/php/include/local_en.inc.php7
-rw-r--r--frontends/php/triggers.php6
-rw-r--r--frontends/php/users.php4
4 files changed, 105 insertions, 12 deletions
diff --git a/frontends/php/config.php b/frontends/php/config.php
index 319adf0b..083f3009 100644
--- a/frontends/php/config.php
+++ b/frontends/php/config.php
@@ -96,6 +96,7 @@
$h2=$h2."<option value=\"0\" ".iif(isset($_GET["config"])&&$_GET["config"]==0,"selected","").">".S_HOUSEKEEPER;
$h2=$h2."<option value=\"1\" ".iif(isset($_GET["config"])&&$_GET["config"]==1,"selected","").">".S_MEDIA_TYPES;
$h2=$h2."<option value=\"2\" ".iif(isset($_GET["config"])&&$_GET["config"]==2,"selected","").">".S_ESCALATION_RULES;
+ $h2=$h2."<option value=\"3\" ".iif(isset($_GET["config"])&&$_GET["config"]==3,"selected","").">".S_IMAGES;
$h2=$h2."</select>";
show_header2($h1, $h2, "<form name=\"selection\" method=\"get\" action=\"config.php\">", "</form>");
@@ -105,12 +106,10 @@
?>
<?php
- $config=select_config();
-?>
-
-<?php
if($_GET["config"]==0)
{
+ $config=select_config();
+
$col=0;
show_form_begin("config");
echo S_HOUSEKEEPER;
@@ -134,10 +133,100 @@
?>
<?php
+ if($_GET["config"]==3)
+ {
+ echo "<br>";
+ show_table_header(S_IMAGES_BIG);
+
+ table_begin();
+ table_header(array(S_ID,S_TYPE,S_NAME,S_ACTIONS));
+
+ $result=DBselect("select imageid,imagetype,name,image from images order by name");
+ $col=0;
+ while($row=DBfetch($result))
+ {
+ if($row["imagetype"]==1)
+ {
+ $imagetype=S_ICON;
+ }
+ else if($row["imagetype"]==2)
+ {
+ $imagetype=S_BACKGROUND;
+ }
+ else
+ {
+ $imagetype=S_UNKNOWN;
+ }
+ $actions="<a href=\"image.php?imageid=".$row["imageid"]."\">".S_SHOW."</a>";
+ $actions=$actions." :: <a href=\"config.php?config=3&register=change&imageid=".$row["imageid"]."\">".S_CHANGE."</a>";
+ table_row(array(
+ $row["imageid"],
+ $imagetype,
+ $row["name"],
+// "<img src=\"image.php?imageid=".$row["imageid"]."\">",
+ $actions),$col++);
+ }
+ if(DBnum_rows($result)==0)
+ {
+ echo "<TR BGCOLOR=#EEEEEE>";
+ echo "<TD COLSPAN=4 ALIGN=CENTER>".S_NO_IMAGES_DEFINED."</TD>";
+ echo "<TR>";
+ }
+ table_end();
+
+ if(!isset($_GET["imageid"]))
+ {
+ $name="";
+ $type=1;
+ }
+ else
+ {
+ $result=DBselect("select imageid,imagetype,name,image from images where imageid=".$_GET["imageid"]);
+ $row=DBfetch($result);
+ $name=$row["name"];
+ $type=$row["type"];
+ }
+
+ $col=0;
+ show_form_begin("config");
+ echo S_IMAGE;
+
+ show_table2_v_delimiter($col++);
+ echo "<form method=\"get\" action=\"config.php\">";
+ echo "<input class=\"biginput\" name=\"config\" type=\"hidden\" value=\"3\" size=8>";
+ echo nbsp(S_NAME);
+ show_table2_h_delimiter();
+ echo "<input class=\"biginput\" name=\"name\" value=\"".$name."\" size=8>";
+
+ show_table2_v_delimiter($col++);
+ echo S_TYPE;
+ show_table2_h_delimiter();
+ echo "<select class=\"biginput\" name=\"imagetype\" size=\"1\">";
+ if($imagetype==1)
+ {
+ echo "<option value=\"1\" selected>".S_ICON;
+ echo "<option value=\"2\">".S_BACKGROUND;
+ }
+ else
+ {
+ echo "<option value=\"1\">".S_ICON;
+ echo "<option value=\"2\" selected>".S_BACKGROUND;
+ }
+ echo "</select>";
+
+
+ show_table2_v_delimiter2();
+ echo "<input class=\"button\" type=\"submit\" name=\"register\" value=\"update\">";
+
+ show_table2_header_end();
+ }
+?>
+
+<?php
if($_GET["config"]==1)
{
echo "<br>";
- show_table_header(S_AVAILABLE_MEDIA_TYPES);
+ show_table_header(S_MEDIA_TYPES_BIG);
table_begin();
table_header(array(S_ID,S_TYPE,S_DESCRIPTION_SMALL,S_ACTIONS));
@@ -217,7 +306,6 @@
show_table2_v_delimiter($col++);
echo S_TYPE;
show_table2_h_delimiter();
-// echo "<select class=\"biginput\" name=\"type\" size=\"1\" onChange=\"doSelect(this,'sel_dmk')\">";
echo "<select class=\"biginput\" name=\"type\" size=\"1\" onChange=\"submit()\">";
if($type==0)
{
diff --git a/frontends/php/include/local_en.inc.php b/frontends/php/include/local_en.inc.php
index 5b896fc0..43552c96 100644
--- a/frontends/php/include/local_en.inc.php
+++ b/frontends/php/include/local_en.inc.php
@@ -150,7 +150,7 @@
define("S_CONFIGURATION", "Configuration");
define("S_DO_NOT_KEEP_ALERTS_OLDER_THAN", "Do not keep alerts older than (in days)");
define("S_DO_NOT_KEEP_ALARMS_OLDER_THAN", "Do not keep alarms older than (in days)");
- define("S_AVAILABLE_MEDIA_TYPES", "AVAILABLE MEDIA TYPES");
+ define("S_MEDIA_TYPES_BIG", "MEDIA TYPES");
define("S_NO_MEDIA_TYPES_DEFINED", "No media types defined");
define("S_SMTP_SERVER", "SMTP server");
define("S_SMTP_HELO", "SMTP helo");
@@ -165,6 +165,11 @@
define("S_NO_ESCALATION_DETAILS", "No escalation details");
define("S_ESCALATION_DETAILS_BIG", "ESCALATION DETAILS");
define("S_STEP", "Step");
+ define("S_IMAGES", "Images");
+ define("S_IMAGE", "Image");
+ define("S_IMAGES_BIG", "IMAGES");
+ define("S_NO_IMAGES_DEFINED", "No images defined");
+ define("S_BACKGROUND", "Background");
// Latest values
define("S_LATEST_VALUES", "Latest values");
diff --git a/frontends/php/triggers.php b/frontends/php/triggers.php
index 5b93591f..7f398da9 100644
--- a/frontends/php/triggers.php
+++ b/frontends/php/triggers.php
@@ -265,13 +265,13 @@
if(isset($_GET["hostid"]))
{
- $actions="<A HREF=\"triggers.php?triggerid=".$row["triggerid"]."&hostid=".$row["hostid"]."#form\">".S_CHANGE."</A> ";
+ $actions="<A HREF=\"triggers.php?triggerid=".$row["triggerid"]."&hostid=".$row["hostid"]."#form\">".S_CHANGE."</A>";
}
else
{
- $actions="<A HREF=\"triggers.php?triggerid=".$row["triggerid"]."#form\">".S_CHANGE."</A> ";
+ $actions="<A HREF=\"triggers.php?triggerid=".$row["triggerid"]."#form\">".S_CHANGE."</A>";
}
- $actions=$actions."-";
+ $actions=$actions." :: ";
if(get_action_count_by_triggerid($row["triggerid"])>0)
{
$actions=$actions."<A HREF=\"actions.php?triggerid=".$row["triggerid"]."\"><b>A</b>ctions</A>";
diff --git a/frontends/php/users.php b/frontends/php/users.php
index ff67ea19..3c7e9d2b 100644
--- a/frontends/php/users.php
+++ b/frontends/php/users.php
@@ -222,11 +222,11 @@
{
if(get_media_count_by_userid($row["userid"])>0)
{
- $actions="<A HREF=\"users.php?register=change&config=".$_GET["config"]."&userid=".$row["userid"]."#form\">".S_CHANGE."</A> - <A HREF=\"media.php?userid=".$row["userid"]."\"><b>M</b>edia</A>";
+ $actions="<A HREF=\"users.php?register=change&config=".$_GET["config"]."&userid=".$row["userid"]."#form\">".S_CHANGE."</A> :: <A HREF=\"media.php?userid=".$row["userid"]."\"><b>M</b>edia</A>";
}
else
{
- $actions="<A HREF=\"users.php?register=change&config=".$_GET["config"]."&userid=".$row["userid"]."#form\">".S_CHANGE."</A> - <A HREF=\"media.php?userid=".$row["userid"]."\">".S_MEDIA."</A>";
+ $actions="<A HREF=\"users.php?register=change&config=".$_GET["config"]."&userid=".$row["userid"]."#form\">".S_CHANGE."</A> :: <A HREF=\"media.php?userid=".$row["userid"]."\">".S_MEDIA."</A>";
}
}
else