2007-04-03 14:10:23 +00:00
|
|
|
<?php
|
|
|
|
|
2007-06-24 14:56:47 +00:00
|
|
|
if($_SESSION['userlevel'] < 10) {
|
|
|
|
echo("<span class='alert'>You are not permitted to perform this function</span>");
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2007-11-21 14:26:24 +00:00
|
|
|
if($_POST['id']) {
|
|
|
|
delHost($id);
|
2007-04-03 14:10:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
<form name="form1" method="post" action="/?page=delhost">
|
|
|
|
<h1>Delete Host</h1>
|
|
|
|
<br />
|
|
|
|
<p><select name="id">
|
|
|
|
<?php
|
|
|
|
|
2007-11-21 14:26:24 +00:00
|
|
|
$query = mysql_query("SELECT * FROM `devices` ORDER BY `hostname`");
|
2007-04-03 14:10:23 +00:00
|
|
|
|
|
|
|
while($data = mysql_fetch_array($query)) {
|
|
|
|
|
2007-11-21 14:26:24 +00:00
|
|
|
echo("<option value='".$data['device_id']."'>".$data['hostname']."</option>");
|
2007-04-03 14:10:23 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<input type="submit" name="Submit" value="Delete Host">
|
|
|
|
</p>
|
|
|
|
</form>
|
|
|
|
|