allow editing of community on device tab, fix yellow border on bgp page

git-svn-id: http://www.observium.org/svn/observer/trunk@639 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-01-09 17:37:51 +00:00
parent 47dec92177
commit acce06e54e
3 changed files with 26 additions and 29 deletions
+5 -1
View File
@@ -4,8 +4,12 @@
$ignore = $_POST['ignore'];
$type = $_POST['type'];
$disabled = $_POST['disabled'];
$community = $_POST['community'];
$snmpver = $_POST['snmpver'];
$sql = "UPDATE `devices` SET `purpose` = '$descr', `type` = '$type', `ignore` = '$ignore', `disabled` = '$disabled' WHERE `device_id` = '$_GET[id]'";
#FIXME needs more sanity checking!
$sql = "UPDATE `devices` SET `purpose` = '" . mysql_escape_string($descr) . "', `community` = '" . mysql_escape_string($community) . "', `type` = '$type'";
$sql .= ", `snmpver` = '" . mysql_escape_string($snmpver) . "', `ignore` = '$ignore', `disabled` = '$disabled' WHERE `device_id` = '$_GET[id]'";
$query = mysql_query($sql);
$rows_updated = mysql_affected_rows();