diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-04-16 17:45:23 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-04-16 17:45:23 +0000 |
| commit | a2f46eff39e547e40d042ce97851805b9f9efea4 (patch) | |
| tree | 674ce1bfe3af9dd6ca058b44d5d0fdf9e7b4ba29 /frontends/php/hosts.html | |
| parent | a23282b7b988f6bbe5e7f98170c88e0dfe24fc3b (diff) | |
Added PostgreSQL support for PHP frontend. Added database abstraction layer in frontend/php/include/db.inc.
git-svn-id: svn://svn.zabbix.com/trunk@42 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/hosts.html')
| -rw-r--r-- | frontends/php/hosts.html | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/frontends/php/hosts.html b/frontends/php/hosts.html index e90c3a1e..90488bbf 100644 --- a/frontends/php/hosts.html +++ b/frontends/php/hosts.html @@ -35,9 +35,9 @@ echo "<TD WIDTH=\"10%\" NOSAVE><B>Actions</B></TD>"; echo "</TR>"; - $result=mysql_query("select h.hostid,p.platform,h.host,h.port,h.status from hosts h,platforms p where p.platformid=h.platformid order by p.platform,h.host",$mysql); + $result=DBselect("select h.hostid,p.platform,h.host,h.port,h.status from hosts h,platforms p where p.platformid=h.platformid order by p.platform,h.host"); echo "<CENTER>"; - while($row=mysql_fetch_row($result)) + for($i=0;$i<DBnum_rows($result);$i++) { if($col==1) { @@ -49,11 +49,11 @@ $col=1; } - $hostid=$row[0]; - $platform=$row[1]; - $host=$row[2]; - $port=$row[3]; - $status=$row[4]; + $hostid=DBget_field($result,$i,0); + $platform=DBget_field($result,$i,1); + $host=DBget_field($result,$i,2); + $port=DBget_field($result,$i,3); + $status=DBget_field($result,$i,4); echo "<TD>$platform</TD>"; echo "<TD><a href=\"items.html?hostid=$hostid\">$host</a></TD>"; echo "<TD>$port</TD>"; @@ -81,11 +81,11 @@ echo "Platform"; show_table2_h_delimiter(); echo "<select name=\"platformid\">"; - $result=mysql_query("select platformid,platform from platforms order by platform",$mysql); - while($row=mysql_fetch_row($result)) + $result=DBselect("select platformid,platform from platforms order by platform"); + for($i=0;$i<DBnum_rows($result);$i++) { - $platformid=$row[0]; - $platform=$row[1]; + $platformid=DBget_field($result,$i,0); + $platform=DBget_field($result,$i,1); echo "<option value=\"$platformid\">$platform"; } echo "</select>"; |
