inc.php plx

git-svn-id: http://www.observium.org/svn/observer/trunk@1336 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-07-10 12:52:04 +00:00
parent c1cba35f0f
commit 1a1750b0c3
35 changed files with 0 additions and 211 deletions

41
html/pages/delsrv.inc.php Normal file
View File

@@ -0,0 +1,41 @@
<?php
if($_SESSION['userlevel'] < '5') {
print_error("Insufficient Privileges");
} else {
if($_POST['delsrv']) {
if($_SESSION['userlevel'] > "5") {
include("includes/service-delete.inc.php");
}
}
$query = mysql_query("SELECT * FROM `services` AS S, `devices` AS D WHERE S.device_id = D.device_id ORDER BY hostname");
while($device = mysql_fetch_array($query)) {
$servicesform .= "<option value='" . $device[service_id] . "'>" . $device['service_id'] . "." . $device['hostname'] . " - " . $device['service_type'] . "</option>";
}
if($updated) { print_message("Service Deleted!"); }
echo("
<h4>Delete Service</h4>
<form id='addsrv' name='addsrv' method='post' action=''>
<input type=hidden name='delsrv' value='yes'>
<table width='300' border='0'>
<tr>
<td>
Device
</td>
<td>
<select name='service'>
$servicesform
</select>
</td>
</tr>
</table>
<input type='submit' name='Submit' value='Delete' />
</form>");
}
?>