summaryrefslogtreecommitdiffstats
path: root/frontends/php/screenconf.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-07 20:17:19 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-01-07 20:17:19 +0000
commit4006dfcc50c45e3e39232c9074f5535c916cbe38 (patch)
tree9139a60803b0ee6f78985f4023c2c034f54fe125 /frontends/php/screenconf.php
parentb5c3d2422dfbc2e115d0d7c7e7fcf72b6a2e1adf (diff)
downloadzabbix-4006dfcc50c45e3e39232c9074f5535c916cbe38.tar.gz
zabbix-4006dfcc50c45e3e39232c9074f5535c916cbe38.tar.xz
zabbix-4006dfcc50c45e3e39232c9074f5535c916cbe38.zip
Frontend improvements.
git-svn-id: svn://svn.zabbix.com/trunk@2498 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/screenconf.php')
-rw-r--r--frontends/php/screenconf.php97
1 files changed, 27 insertions, 70 deletions
diff --git a/frontends/php/screenconf.php b/frontends/php/screenconf.php
index 2513a775..399e4056 100644
--- a/frontends/php/screenconf.php
+++ b/frontends/php/screenconf.php
@@ -20,6 +20,8 @@
?>
<?php
include "include/config.inc.php";
+ include "include/forms.inc.php";
+
$page["title"] = "S_SCREENS";
$page["file"] = "screenconf.php";
show_header($page["title"],0,0);
@@ -27,11 +29,6 @@
?>
<?php
- show_table_header(S_CONFIGURATION_OF_SCREENS_BIG);
- echo "<br>";
-?>
-
-<?php
if(!check_right("Screen","U",0))
{
// show_table_header("<font color=\"AA0000\">No permissions !</font>");
@@ -41,6 +38,7 @@
update_profile("web.menu.config.last",$page["file"]);
?>
+
<?php
if(isset($_REQUEST["register"]))
{
@@ -64,79 +62,38 @@
?>
<?php
- show_table_header("SCREENS");
- $table = new Ctable(S_NO_SCREENS_DEFINED);
- $table->setHeader(array(S_ID,S_NAME,S_COLUMNS,S_ROWS,S_ACTIONS));
-
- $result=DBselect("select screenid,name,cols,rows from screens order by name");
- while($row=DBfetch($result))
+ if(!isset($_REQUEST["form"]))
{
- if(!check_right("Screen","R",$row["screenid"]))
- {
- continue;
- }
- $table->addRow(array(
- $row["screenid"],
- "<a href=\"screenedit.php?screenid=".$row["screenid"]."\">".$row["name"]."</a>",
- $row["cols"],
- $row["rows"],
- "<A HREF=\"screenconf.php?screenid=".$row["screenid"]."#form\">".S_CHANGE."</A>"
- ));
- }
- $table->show();
-?>
+ $h1=S_CONFIGURATION_OF_SCREENS_BIG;
-<?php
- echo "<a name=\"form\"></a>";
+ $h2="<input class=\"button\" type=\"submit\" name=\"form\" value=\"".S_CREATE_SCREEN."\">";
- if(isset($_REQUEST["screenid"]))
- {
- $result=DBselect("select screenid,name,cols,rows from screens g where screenid=".$_REQUEST["screenid"]);
- $row=DBfetch($result);
- $name=$row["name"];
- $cols=$row["cols"];
- $rows=$row["rows"];
- }
- else
- {
- $name="";
- $cols=1;
- $rows=1;
- }
+ show_header2($h1, $h2, "<form name=\"selection\" method=\"get\" action=\"screenconf.php\">", "</form>");
- show_form_begin("screenconf.screen");
- echo S_SCREEN;
- $col=0;
+ $table = new Ctable(S_NO_SCREENS_DEFINED);
+ $table->setHeader(array(S_ID,S_NAME,S_COLUMNS,S_ROWS,S_ACTIONS));
- show_table2_v_delimiter($col++);
- echo "<form method=\"get\" action=\"screenconf.php\">";
- if(isset($_REQUEST["screenid"]))
- {
- echo "<input class=\"biginput\" name=\"screenid\" type=\"hidden\" value=".$_REQUEST["screenid"].">";
+ $result=DBselect("select screenid,name,cols,rows from screens order by name");
+ while($row=DBfetch($result))
+ {
+ if(!check_right("Screen","R",$row["screenid"]))
+ {
+ continue;
+ }
+ $table->addRow(array(
+ $row["screenid"],
+ "<a href=\"screenedit.php?screenid=".$row["screenid"]."\">".$row["name"]."</a>",
+ $row["cols"],
+ $row["rows"],
+ "<A HREF=\"screenconf.php?screenid=".$row["screenid"]."&form=0\">".S_CHANGE."</A>"
+ ));
+ }
+ $table->show();
}
- echo S_NAME;
- show_table2_h_delimiter();
- echo "<input class=\"biginput\" name=\"name\" value=\"$name\" size=32>";
-
- show_table2_v_delimiter($col++);
- echo S_COLUMNS;
- show_table2_h_delimiter();
- echo "<input class=\"biginput\" name=\"cols\" size=5 value=\"$cols\">";
-
- show_table2_v_delimiter($col++);
- echo S_ROWS;
- show_table2_h_delimiter();
- echo "<input class=\"biginput\" name=\"rows\" size=5 value=\"$rows\">";
-
- show_table2_v_delimiter2();
- echo "<input class=\"button\" type=\"submit\" name=\"register\" value=\"add\">";
- if(isset($_REQUEST["screenid"]))
+ else
{
- echo "<input class=\"button\" type=\"submit\" name=\"register\" value=\"update\">";
- echo "<input class=\"button\" type=\"submit\" name=\"register\" value=\"delete\" onClick=\"return Confirm('".S_DELETE_SCREEN_Q."');\">";
+ insert_screen_form();
}
-
- show_table2_header_end();
?>
<?php