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-10-18 14:41:19 +00:00
|
|
|
|
|
|
|
$pagetitle[] = "Delete service";
|
|
|
|
|
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>
|
2014-01-13 10:05:19 +00:00
|
|
|
<form id='addsrv' name='addsrv' method='post' action='' class='form-horizontal' role='form'>
|
2007-04-03 18:46:56 +00:00
|
|
|
<input type=hidden name='delsrv' value='yes'>
|
2014-01-13 10:05:19 +00:00
|
|
|
<div class='well well-lg'>
|
|
|
|
<div class='form-group'>
|
|
|
|
<label for='service' class='col-sm-2 control-label'>Device - Service</label>
|
|
|
|
<div class='col-sm-5'>
|
|
|
|
<select name='service' id='service' class='form-control input-sm'>
|
2007-04-03 18:46:56 +00:00
|
|
|
$servicesform
|
2011-03-17 00:09:20 +00:00
|
|
|
</select>
|
2014-01-13 10:05:19 +00:00
|
|
|
</div>
|
|
|
|
<div class='col-sm-5'>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<button type='submit' name='Submit' class='btn btn-default input-sm'>Delete</button>
|
|
|
|
</div>
|
2007-04-03 18:46:56 +00:00
|
|
|
</form>");
|
|
|
|
|
|
|
|
}
|
2011-03-17 00:09:20 +00:00
|
|
|
|
2011-05-15 14:42:30 +00:00
|
|
|
?>
|