Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.3 KiB
PHP
Raw Permalink Normal View History

2007-04-03 14:10:23 +00:00
<?php
$no_refresh = true;
if (! Auth::user()->hasGlobalAdmin()) {
2019-04-11 23:26:42 -05:00
include 'includes/html/error-no-perm.inc.php';
2016-08-18 20:28:22 -05:00
} else {
2016-03-16 08:37:15 +10:00
if ($vars['addsrv']) {
if (Auth::user()->hasGlobalAdmin()) {
2012-05-06 23:02:18 +00:00
$updated = '1';
2015-07-13 20:10:26 +02:00
2022-02-13 20:23:07 +01:00
$service_id = add_service($vars['device'], $vars['type'], strip_tags($vars['descr']), $vars['ip'], $vars['params'], $vars['ignore'], $vars['disabled'], 0, strip_tags($vars['name']));
2012-05-06 23:02:18 +00:00
if ($service_id) {
$message .= $message_break . 'Service added (' . $service_id . ')!';
$message_break .= '<br />';
2015-07-13 20:10:26 +02:00
}
2012-05-06 23:02:18 +00:00
}
}
foreach (list_available_services() as $current_service) {
$servicesform .= "<option value='$current_service'>$current_service</option>";
2015-07-13 20:10:26 +02:00
}
2011-10-18 14:41:19 +00:00
2015-05-19 17:18:39 +01:00
foreach (dbFetchRows('SELECT * FROM `devices` ORDER BY `hostname`') as $device) {
$devicesform .= "<option value='" . $device['device_id'] . "'>" . format_hostname($device) . '</option>';
2015-07-13 20:10:26 +02:00
}
2015-05-19 17:18:39 +01:00
2015-07-13 20:10:26 +02:00
if ($updated) {
2015-05-19 17:18:39 +01:00
print_message('Device Settings Saved');
2015-07-13 20:10:26 +02:00
}
2015-05-19 17:18:39 +01:00
$pagetitle[] = 'Add service';
echo "<div class='row'>
2021-02-02 06:40:11 +00:00
<div class='col-sm-3'>
</div>
2015-05-19 17:18:39 +01:00
<div class='col-sm-6'>";
2007-04-03 14:10:23 +00:00
2019-04-11 23:26:42 -05:00
include_once 'includes/html/print-service-add.inc.php';
2007-04-03 14:10:23 +00:00
2011-05-13 13:52:01 +00:00
echo '</div>
2015-07-13 20:10:26 +02:00
</div>';
}//end if