summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-05-01 16:01:40 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-05-01 16:01:40 +0000
commitba3fc7f6fabf0fa79fa48bf8039515244ee62a68 (patch)
tree081f2993cb0606d51d919458ccf3083c30994f9d /frontends/php/include
parent53dc3617b87ee0e05a7e9b14a37437f96fedf275 (diff)
downloadzabbix-ba3fc7f6fabf0fa79fa48bf8039515244ee62a68.tar.gz
zabbix-ba3fc7f6fabf0fa79fa48bf8039515244ee62a68.tar.xz
zabbix-ba3fc7f6fabf0fa79fa48bf8039515244ee62a68.zip
Warnings elimination in PHP frontend.
git-svn-id: svn://svn.zabbix.com/trunk@61 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/config.inc37
-rw-r--r--frontends/php/include/db.inc8
2 files changed, 27 insertions, 18 deletions
diff --git a/frontends/php/include/config.inc b/frontends/php/include/config.inc
index 5ad8e461..c6f3c7cb 100644
--- a/frontends/php/include/config.inc
+++ b/frontends/php/include/config.inc
@@ -1102,7 +1102,7 @@
}
- if ($From>0) // 12h FORWARD
+ if (isset($From) && ($From>0))
{
$tmp=$from-12;
echo("[<A HREF=\"history.html?action=showhistory&itemid=$itemid&from=$tmp&period=$period\">");
@@ -1113,7 +1113,7 @@
echo("[12h forward]");
}
- if ($From>0) // WEEK Forward
+ if (isset($From) && ($From>0))
{
$tmp=$from-12*14;
echo("[<A HREF=\"history.html?action=showhistory&itemid=$itemid&from=$tmp&period=$period\">");
@@ -1207,20 +1207,14 @@
$history=DBget_field($result,0,5);
$status=DBget_field($result,0,6);
}
- if( !isset($port) )
+ else
{
+ $description="";
+ $key="";
+ $host="";
$port=10000;
- }
- if( !isset($delay) )
- {
$delay=30;
- }
- if( !isset($history) )
- {
$history=30*24*3600;
- }
- if( !isset($status) )
- {
$status=0;
}
@@ -1317,7 +1311,6 @@
{
if(isset($userid))
{
- echo $userid,"<br>";
$result=DBselect("select u.alias,u.name,u.surname,u.passwd,g.groupid from users u,groups g where u.groupid=g.groupid and u.userid=$userid");
$alias=DBget_field($result,0,0);
@@ -1326,6 +1319,14 @@
$password=DBget_field($result,0,3);
$groupid_=DBget_field($result,0,4);
}
+ else
+ {
+ $alias="";
+ $name="";
+ $surname="";
+ $password="";
+ $groupid_=0;
+ }
show_table2_header_begin();
echo "New user";
@@ -1404,7 +1405,15 @@
$description=DBget_field($result,0,1);
$priority=DBget_field($result,0,2);
$istrue=DBget_field($result,0,3);
- $comments=DBget_field($result,0,6);
+ $comments=DBget_field($result,0,4);
+ }
+ else
+ {
+ $expression="";
+ $description="";
+ $priority=0;
+ $istrue=0;
+ $comments="";
}
echo "<br>";
diff --git a/frontends/php/include/db.inc b/frontends/php/include/db.inc
index 59eafbdf..b954e648 100644
--- a/frontends/php/include/db.inc
+++ b/frontends/php/include/db.inc
@@ -1,11 +1,11 @@
<?
-// $DB_TYPE ="POSTGRESQL";
- $DB_TYPE ="MYSQL";
+ $DB_TYPE ="POSTGRESQL";
+// $DB_TYPE ="MYSQL";
$DB_SERVER ="localhost";
$DB_DATABASE ="zabbix";
-// $DB_USER ="zabbix";
- $DB_USER ="root";
+ $DB_USER ="zabbix";
+// $DB_USER ="root";
$DB_PASSWORD ="";
$USER_DETAILS ="";