cvs: php-hosts-web / showinfo.php
| From: | jim winstead | Date: | Sun, 21 Apr 2002 22:15:19 +0000 |
| Subject: | cvs: php-hosts-web / showinfo.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-9728@lists.php.net to get a copy of this message | ||
jimw Sun Apr 21 18:15:19 2002 EDT
Modified files:
/php-hosts-web showinfo.php
Log:
display free field contents from value table instead of filesystem
Index: php-hosts-web/showinfo.php
diff -u php-hosts-web/showinfo.php:1.1.1.1 php-hosts-web/showinfo.php:1.2
--- php-hosts-web/showinfo.php:1.1.1.1 Thu Feb 7 11:38:32 2002
+++ php-hosts-web/showinfo.php Sun Apr 21 18:15:19 2002
@@ -3,6 +3,9 @@
$NA = "<I>info not available</I>";
+$hostid = (int)$hostid;
+if (!$hostid) { header("Location: /"); exit; }
+
$query = "select * from $HOSTS_TABLE where HostID=".$hostid;
$q1 = mysql_db_query($DBASE,$query) or die ("\"$query\" is a bad query.");
$host = mysql_fetch_array($q1);
@@ -135,8 +138,7 @@
echo $value[0]["Value"] . "<BR>\n";
break;
case "free":
- $file = $DESC_DIR . "/h" . $hostid . "s" . $sid;
- showfile($file,"<BR>");
+ echo nl2br(mysql_get_one("SELECT content FROM host_value WHERE HostId = $hostid AND
ServiceId = $sid"));
break;
}
} else {