mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
DEL. HOST. DOT. INC. DOT. PEE. AICH. PEE.
git-svn-id: http://www.observium.org/svn/observer/trunk@1340 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
36
html/pages/delhost.inc.php
Normal file
36
html/pages/delhost.inc.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
if($_SESSION['userlevel'] < 10) {
|
||||
echo("<span class='alert'>You are not permitted to perform this function</span>");
|
||||
exit;
|
||||
}
|
||||
|
||||
if($_POST['id']) {
|
||||
echo delete_device(mres($_POST['id']));
|
||||
} elseif ($_GET['id']) {
|
||||
echo delete_device(mres($_GET['id']));
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<form name="form1" method="post" action="?page=delhost">
|
||||
<h1>Delete Host</h1>
|
||||
<br />
|
||||
<p><select name="id">
|
||||
<?php
|
||||
|
||||
$query = mysql_query("SELECT * FROM `devices` ORDER BY `hostname`");
|
||||
|
||||
while($data = mysql_fetch_array($query)) {
|
||||
|
||||
echo("<option value='".$data['device_id']."'>".$data['hostname']."</option>");
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
</select>
|
||||
|
||||
<input type="submit" class="submit" name="Submit" value="Delete Host">
|
||||
</p>
|
||||
</form>
|
||||
|
Reference in New Issue
Block a user