mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	git-svn-id: http://www.observium.org/svn/observer/trunk@245 61d68cd4-352d-0410-923a-c4978735b2b8
		
			
				
	
	
		
			37 lines
		
	
	
		
			668 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			668 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| if($_SESSION['userlevel'] < 10) {
 | |
|   echo("<span class='alert'>You are not permitted to perform this function</span>");
 | |
|   exit;
 | |
| }
 | |
| 
 | |
| if($_POST['id']) {
 | |
|   delHost(mres($_POST['id']));
 | |
| } elseif (mres($_GET['id'])) {
 | |
|   delHost(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" name="Submit" value="Delete Host">
 | |
| </p>
 | |
| </form>
 | |
| 
 |