| 
									
										
										
										
											2007-04-03 18:46:56 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-17 00:09:20 +00:00
										 |  |  | if ($_SESSION['userlevel'] < '5') | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2011-03-28 10:39:55 +00:00
										 |  |  |   include("includes/error-no-perm.inc.php"); | 
					
						
							| 
									
										
										
										
											2007-04-03 18:46:56 +00:00
										 |  |  | } else { | 
					
						
							| 
									
										
										
										
											2011-03-28 10:39:55 +00:00
										 |  |  |   if ($_POST['delsrv']) | 
					
						
							|  |  |  |   { | 
					
						
							|  |  |  |     if ($_SESSION['userlevel'] > "5") | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |       include("includes/service-delete.inc.php"); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2007-04-03 18:46:56 +00:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-05-15 14:42:30 +00:00
										 |  |  |   foreach (dbFetchRows("SELECT * FROM `services` AS S, `devices` AS D WHERE S.device_id = D.device_id ORDER BY hostname") as $device) | 
					
						
							| 
									
										
										
										
											2011-03-28 10:39:55 +00:00
										 |  |  |   { | 
					
						
							|  |  |  |     $servicesform .= "<option value='" . $device['service_id'] . "'>" . $device['service_id'] .  "." . $device['hostname'] . " - " . $device['service_type'] .  "</option>"; | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2007-04-03 18:46:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-28 10:39:55 +00:00
										 |  |  |   if ($updated) { print_message("Service Deleted!"); } | 
					
						
							| 
									
										
										
										
											2007-04-03 18:46:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-28 10:39:55 +00:00
										 |  |  |   echo("
 | 
					
						
							| 
									
										
										
										
											2007-04-03 18:46:56 +00:00
										 |  |  | <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 | 
					
						
							| 
									
										
										
										
											2011-03-17 00:09:20 +00:00
										 |  |  |         </select> | 
					
						
							| 
									
										
										
										
											2007-04-03 18:46:56 +00:00
										 |  |  |       </td> | 
					
						
							|  |  |  |     </tr> | 
					
						
							|  |  |  |   </table> | 
					
						
							|  |  |  | <input type='submit' name='Submit' value='Delete' /> | 
					
						
							|  |  |  | </form>");
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2011-03-17 00:09:20 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-05-15 14:42:30 +00:00
										 |  |  | ?>
 |