diff --git a/html/css/styles.css b/html/css/styles.css index 80d53766ec..d68b1fa1fe 100644 --- a/html/css/styles.css +++ b/html/css/styles.css @@ -63,7 +63,7 @@ ul ul ul { list-style: square outside; } } .submit { - background-image: url('/images/submitbg.png'); + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAATCAIAAAA4QDsKAAAABGdBTUEAALGPC/xhBQAAAEZJREFUeJyVjMEJACEQA2dlSxD7r2/xcdhAfNwJig/PfJIhISaJocQk/9ccwTDAEYAQ4K99sylfXm+gtbFl1p4WNUouUaMDPUI2q6SigUIAAAAASUVORK5CYII='); background-position: 0 100%; border-color: #B2B2B2 #525252 #525252 #B2B2B2; } diff --git a/html/includes/authenticate.inc.php b/html/includes/authenticate.inc.php index 316fcde5c5..f1f5087d2e 100644 --- a/html/includes/authenticate.inc.php +++ b/html/includes/authenticate.inc.php @@ -33,7 +33,7 @@ if ($vars['page'] == 'logout' && $_SESSION['authenticated']) { setcookie('auth', '', (time() - 60 * 60 * 24 * $config['auth_remember']), '/'); session_destroy(); $auth_message = 'Logged Out'; - header('Location: /'); + header('Location: ' . $config['base_url']); exit; } diff --git a/html/includes/common/alerts.inc.php b/html/includes/common/alerts.inc.php index 0dabec69df..b135ee48ff 100644 --- a/html/includes/common/alerts.inc.php +++ b/html/includes/common/alerts.inc.php @@ -31,7 +31,7 @@ var alerts_grid = $("#alerts").bootgrid({ device_id: \'' . $device['device_id'] .'\' }; }, - url: "/ajax_table.php", + url: "ajax_table.php", formatters: { "status": function(column,row) { return "

" + row.msg + "

"; @@ -70,7 +70,7 @@ var alerts_grid = $("#alerts").bootgrid({ var state = $(this).data("state"); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: { type: "ack-alert", alert_id: alert_id, state: state }, success: function(msg){ $("#message").html(\'
\'+msg+\'
\'); diff --git a/html/includes/common/eventlog.inc.php b/html/includes/common/eventlog.inc.php index 8640559e8b..7ce1590c01 100644 --- a/html/includes/common/eventlog.inc.php +++ b/html/includes/common/eventlog.inc.php @@ -24,7 +24,7 @@ var eventlog_grid = $("#eventlog").bootgrid({ type: "' .mres($vars['type']) .'", }; }, - url: "/ajax_table.php" + url: "ajax_table.php" }); diff --git a/html/includes/modal/alert_schedule.inc.php b/html/includes/modal/alert_schedule.inc.php index b726a219f6..01474b7c9d 100644 --- a/html/includes/modal/alert_schedule.inc.php +++ b/html/includes/modal/alert_schedule.inc.php @@ -102,7 +102,7 @@ $('#schedule-maintenance').on('show.bs.modal', function (event) { if (schedule_id > 0) { $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: { type: "schedule-maintenance", sub_type: "parse-maintenance", schedule_id: schedule_id }, dataType: "json", success: function(output) { @@ -124,7 +124,7 @@ $('#sched-submit').click('', function(e) { e.preventDefault(); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: $('form.schedule-maintenance-form').serialize(), dataType: "json", success: function(data){ diff --git a/html/includes/modal/alert_template.inc.php b/html/includes/modal/alert_template.inc.php index bd034952e6..71574ba6f7 100644 --- a/html/includes/modal/alert_template.inc.php +++ b/html/includes/modal/alert_template.inc.php @@ -107,7 +107,7 @@ $('#alert-template').on('show.bs.modal', function (event) { $('#template_id').val(template_id); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: { type: "parse-alert-template", template_id: template_id }, dataType: "json", success: function(output) { @@ -125,7 +125,7 @@ $('#create-template').click('', function(e) { var name = $("#name").val(); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: { type: "alert-templates", template: template , name: name, template_id: template_id}, dataType: "html", success: function(msg){ diff --git a/html/includes/modal/attach_alert_template.inc.php b/html/includes/modal/attach_alert_template.inc.php index 3e16014cc7..409c6405c7 100644 --- a/html/includes/modal/attach_alert_template.inc.php +++ b/html/includes/modal/attach_alert_template.inc.php @@ -60,7 +60,7 @@ $('#attach-alert-template').on('show.bs.modal', function(e) { $("#template_id").val(template_id); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: { type: "parse-template-rules", template_id: template_id }, dataType: "json", success: function(output) { @@ -88,7 +88,7 @@ $('#alert-template-attach').click('', function(event) { var rules = items.join(','); $.ajax({ type: 'POST', - url: '/ajax_form.php', + url: 'ajax_form.php', data: { type: "attach-alert-template", template_id: template_id, rule_id: rules }, dataType: "html", success: function(msg) { diff --git a/html/includes/modal/delete_alert_map.inc.php b/html/includes/modal/delete_alert_map.inc.php index 930e1b7f85..ee0d0fd130 100644 --- a/html/includes/modal/delete_alert_map.inc.php +++ b/html/includes/modal/delete_alert_map.inc.php @@ -50,7 +50,7 @@ $('#alert-map-removal').click('', function(event) { var map_id = $("#map_id").val(); $.ajax({ type: 'POST', - url: '/ajax_form.php', + url: 'ajax_form.php', data: { type: "delete-alert-map", map_id: map_id }, dataType: "html", success: function(msg) { diff --git a/html/includes/modal/delete_alert_rule.inc.php b/html/includes/modal/delete_alert_rule.inc.php index fdbe700777..fa5951b5b8 100644 --- a/html/includes/modal/delete_alert_rule.inc.php +++ b/html/includes/modal/delete_alert_rule.inc.php @@ -50,7 +50,7 @@ $('#alert-rule-removal').click('', function(event) { var alert_id = $("#alert_id").val(); $.ajax({ type: 'POST', - url: '/ajax_form.php', + url: 'ajax_form.php', data: { type: "delete-alert-rule", alert_id: alert_id }, dataType: "html", success: function(msg) { diff --git a/html/includes/modal/delete_alert_template.inc.php b/html/includes/modal/delete_alert_template.inc.php index 5161ea5bef..41413a1b91 100644 --- a/html/includes/modal/delete_alert_template.inc.php +++ b/html/includes/modal/delete_alert_template.inc.php @@ -50,7 +50,7 @@ $('#alert-template-removal').click('', function(event) { var template_id = $("#template_id").val(); $.ajax({ type: 'POST', - url: '/ajax_form.php', + url: 'ajax_form.php', data: { type: "delete-alert-template", template_id: template_id }, dataType: "html", success: function(msg) { diff --git a/html/includes/modal/delete_device_group.inc.php b/html/includes/modal/delete_device_group.inc.php index 42e504cd97..77c0e70e8b 100644 --- a/html/includes/modal/delete_device_group.inc.php +++ b/html/includes/modal/delete_device_group.inc.php @@ -50,7 +50,7 @@ $('#device-group-removal').click('', function(event) { var group_id = $("#group_id").val(); $.ajax({ type: 'POST', - url: '/ajax_form.php', + url: 'ajax_form.php', data: { type: "delete-device-group", group_id: group_id }, dataType: "html", success: function(msg) { diff --git a/html/includes/modal/new_alert_map.inc.php b/html/includes/modal/new_alert_map.inc.php index b414d730db..c9ec494d4a 100644 --- a/html/includes/modal/new_alert_map.inc.php +++ b/html/includes/modal/new_alert_map.inc.php @@ -57,7 +57,7 @@ $('#create-map').on('show.bs.modal', function (event) { $('#map_id').val(map_id); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: { type: "parse-alert-map", map_id: map_id }, dataType: "json", success: function(output) { @@ -166,7 +166,7 @@ $('#map-submit').click('', function(e) { e.preventDefault(); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: $('form.maps-form').serialize(), success: function(msg){ $("#message").html('
'+msg+'
'); diff --git a/html/includes/modal/new_alert_rule.inc.php b/html/includes/modal/new_alert_rule.inc.php index 5d4ff60765..7868a0b00c 100644 --- a/html/includes/modal/new_alert_rule.inc.php +++ b/html/includes/modal/new_alert_rule.inc.php @@ -184,7 +184,7 @@ $('#create-alert').on('show.bs.modal', function (event) { } $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: { type: "parse-alert-rule", alert_id: alert_id }, dataType: "json", success: function(output) { @@ -347,7 +347,7 @@ $('#rule-submit').click('', function(e) { e.preventDefault(); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: $('form.alerts-form').serialize(), success: function(msg){ if(msg.indexOf("ERROR:") <= -1) { diff --git a/html/includes/modal/new_device_group.inc.php b/html/includes/modal/new_device_group.inc.php index d1dc5d6f4d..79fee676df 100644 --- a/html/includes/modal/new_device_group.inc.php +++ b/html/includes/modal/new_device_group.inc.php @@ -119,7 +119,7 @@ $('#create-group').on('show.bs.modal', function (event) { }); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: { type: "parse-device-group", group_id: group_id }, dataType: "json", success: function(output) { @@ -192,7 +192,7 @@ $('#group-submit').click('', function(e) { e.preventDefault(); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: $('form.group-form').serialize(), success: function(msg){ if(msg.indexOf("ERROR:") <= -1) { diff --git a/html/includes/modal/poller_groups.inc.php b/html/includes/modal/poller_groups.inc.php index ccbfe22458..9482c99940 100644 --- a/html/includes/modal/poller_groups.inc.php +++ b/html/includes/modal/poller_groups.inc.php @@ -93,7 +93,7 @@ $('#group-removal').click('', function(e) { group_id = $("#group_id").val(); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: $('form.remove_group_form').serialize() , success: function(msg) { $("#thanks").html('
'+msg+'
'); @@ -115,7 +115,7 @@ $('#poller-groups').on('show.bs.modal', function (event) { $('#group_id').val(group_id); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: { type: "parse-poller-groups", group_id: group_id }, dataType: "json", success: function(output) { @@ -133,7 +133,7 @@ $('#create-group').click('', function(e) { var group_id = $('#group_id').val(); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: { type: "poller-groups", group_name: group_name, descr: descr, group_id: group_id }, dataType: "html", success: function(msg){ diff --git a/html/includes/modal/remove_alert_schedule.inc.php b/html/includes/modal/remove_alert_schedule.inc.php index 0e168ae77a..f95464db9a 100644 --- a/html/includes/modal/remove_alert_schedule.inc.php +++ b/html/includes/modal/remove_alert_schedule.inc.php @@ -52,7 +52,7 @@ $('#sched-maintenance-removal').click('', function(e) { e.preventDefault(); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: $('form.schedule-maintenance-del').serialize(), dataType: "json", success: function(data){ diff --git a/html/includes/print-alert-rules.php b/html/includes/print-alert-rules.php index f6296b3ebb..670a578150 100644 --- a/html/includes/print-alert-rules.php +++ b/html/includes/print-alert-rules.php @@ -268,7 +268,7 @@ $('#ack-alert').click('', function(e) { var alert_id = $(this).data("alert_id"); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: { type: "ack-alert", alert_id: alert_id }, success: function(msg){ $("#message").html('
'+msg+'
'); @@ -294,7 +294,7 @@ $('input[name="alert-rule"]').on('switchChange.bootstrapSwitch', function(event var orig_class = $(this).data("orig_class"); $.ajax({ type: 'POST', - url: '/ajax_form.php', + url: 'ajax_form.php', data: { type: "update-alert-rule", alert_id: alert_id, state: state }, dataType: "html", success: function(msg) { diff --git a/html/includes/print-interface.inc.php b/html/includes/print-interface.inc.php index 26f33fb509..bfb5d1bd73 100644 --- a/html/includes/print-interface.inc.php +++ b/html/includes/print-interface.inc.php @@ -30,7 +30,7 @@ else { } if (dbFetchCell('SELECT COUNT(*) FROM `mac_accounting` WHERE `port_id` = ?', array($port['port_id']))) { - $mac = " 'macaccounting'))."'>"; + $mac = " 'macaccounting'))."'>"; } else { $mac = ''; diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index 54b51213f8..c436d5b7d0 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -489,12 +489,12 @@ if ($_SESSION['userlevel'] >= '10') {
  • - + '.$tab['name'].'
  • '; diff --git a/html/pages/ports.inc.php b/html/pages/ports.inc.php index edeea9fbef..9a310ea276 100644 --- a/html/pages/ports.inc.php +++ b/html/pages/ports.inc.php @@ -55,7 +55,7 @@ foreach ($menu_options as $option => $text) { echo('
    '); ?> - Export CSV | + Export CSV | Update URL | Error: How did you even get here?!
    '; + echo '
    Error: How did you even get here?!
    '; } else { $twofactor = json_decode($twofactor['twofactor'], true); @@ -94,13 +94,13 @@ else { } else { session_destroy(); - echo '
    Error: Supplied TwoFactor Token is wrong, you\'ve been logged out.
    '; + echo '
    Error: Supplied TwoFactor Token is wrong, you\'ve been logged out.
    '; } }//end if } else { $twofactor = dbFetchRow('SELECT twofactor FROM users WHERE username = ?', array($_SESSION['username'])); - echo ''; + echo ''; echo '

    Two-Factor Authentication

    '; if (!empty($twofactor['twofactor'])) { $twofactor = json_decode($twofactor['twofactor'], true); @@ -154,7 +154,7 @@ else { echo '
    Error inserting TwoFactor details. Please try again later and contact Administrator if error persists.
    '; } else { - echo '
    Added TwoFactor credentials. Please reload page.
    '; + echo '
    Added TwoFactor credentials. Please reload page.
    '; } } else { diff --git a/html/pages/search/arp.inc.php b/html/pages/search/arp.inc.php index 45cd6888a9..9f2ed062fa 100644 --- a/html/pages/search/arp.inc.php +++ b/html/pages/search/arp.inc.php @@ -91,7 +91,7 @@ echo '"'.$_POST['address'].'"+'; address: '' }; }, - url: "/ajax_table.php" + url: "ajax_table.php" }); diff --git a/html/pages/search/ipv4.inc.php b/html/pages/search/ipv4.inc.php index 843acbd1bc..3d4393ff8d 100644 --- a/html/pages/search/ipv4.inc.php +++ b/html/pages/search/ipv4.inc.php @@ -86,7 +86,7 @@ if ($_POST['interface'] == 'Vlan%') { address: '' }; }, - url: "/ajax_table.php" + url: "ajax_table.php" }); diff --git a/html/pages/search/ipv6.inc.php b/html/pages/search/ipv6.inc.php index 2b9115013d..2ce8900b29 100644 --- a/html/pages/search/ipv6.inc.php +++ b/html/pages/search/ipv6.inc.php @@ -87,7 +87,7 @@ if ($_POST['interface'] == 'Vlan%') { address: '' }; }, - url: "/ajax_table.php" + url: "ajax_table.php" }); diff --git a/html/pages/search/mac.inc.php b/html/pages/search/mac.inc.php index f606e4436a..a73e132b46 100644 --- a/html/pages/search/mac.inc.php +++ b/html/pages/search/mac.inc.php @@ -88,7 +88,7 @@ echo '"'.$_POST['address'].'"+'; address: '' }; }, - url: "/ajax_table.php" + url: "ajax_table.php" }); diff --git a/html/pages/search/packages.inc.php b/html/pages/search/packages.inc.php index e1ef1675d3..0848fc3724 100644 --- a/html/pages/search/packages.inc.php +++ b/html/pages/search/packages.inc.php @@ -158,7 +158,7 @@ foreach( $ordered as $name=>$entry ) { if( sizeof($arch) > 0 && sizeof($vers) > 0 ) { ?> - + ',$vers); ?> ',$arch); ?> ',$devs); ?> diff --git a/html/pages/settings/alerting.inc.php b/html/pages/settings/alerting.inc.php index 9282284eea..fbe28993af 100644 --- a/html/pages/settings/alerting.inc.php +++ b/html/pages/settings/alerting.inc.php @@ -823,7 +823,7 @@ echo '
    var config_value = $('#new_conf_value').val(); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: {type: "config-item", config_group: "alerting", config_sub_group: "transports", config_name: config_name, config_value: config_value}, dataType: "json", success: function(data){ @@ -859,7 +859,7 @@ echo '
    var config_extra = $('#slack_extra').val(); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: {type: "config-item", action: 'add-slack', config_group: "alerting", config_sub_group: "transports", config_extra: config_extra, config_value: config_value}, dataType: "json", success: function(data){ @@ -897,7 +897,7 @@ echo '
    var config_from = $('#new_from').val(); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: {type: "config-item", action: 'add-hipchat', config_group: "alerting", config_sub_group: "transports", config_extra: config_extra, config_value: config_value, config_room_id: config_room_id, config_from: config_from}, dataType: "json", success: function(data){ @@ -936,7 +936,7 @@ echo '
    var config_userkey = $('#new_userkey').val(); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: {type: "config-item", action: 'add-pushover', config_group: "alerting", config_sub_group: "transports", config_extra: config_extra, config_value: config_value, config_userkey: config_userkey}, dataType: "json", success: function(data){ @@ -974,7 +974,7 @@ echo '
    var config_extra = $('#boxcar_extra').val(); $.ajax({ type: "POST", - url: "/ajax_form.php", + url: "ajax_form.php", data: {type: "config-item", action: 'add-boxcar', config_group: "alerting", config_sub_group: "transports", config_extra: config_extra, config_value: config_value}, dataType: "json", success: function(data){ @@ -1008,7 +1008,7 @@ echo '
    var config_id = $(this).data('config_id'); $.ajax({ type: 'POST', - url: '/ajax_form.php', + url: 'ajax_form.php', data: {type: "config-item", action: 'remove', config_id: config_id}, dataType: "json", success: function (data) { @@ -1029,7 +1029,7 @@ echo '
    var config_id = $(this).data('config_id'); $.ajax({ type: 'POST', - url: '/ajax_form.php', + url: 'ajax_form.php', data: {type: "config-item", action: 'remove-slack', config_id: config_id}, dataType: "json", success: function (data) { @@ -1050,7 +1050,7 @@ echo '
    var config_id = $(this).data('config_id'); $.ajax({ type: 'POST', - url: '/ajax_form.php', + url: 'ajax_form.php', data: {type: "config-item", action: 'remove-hipchat', config_id: config_id}, dataType: "json", success: function (data) { @@ -1071,7 +1071,7 @@ echo '
    var config_id = $(this).data('config_id'); $.ajax({ type: 'POST', - url: '/ajax_form.php', + url: 'ajax_form.php', data: {type: "config-item", action: 'remove-pushover', config_id: config_id}, dataType: "json", success: function (data) { @@ -1092,7 +1092,7 @@ echo '
    var config_id = $(this).data('config_id'); $.ajax({ type: 'POST', - url: '/ajax_form.php', + url: 'ajax_form.php', data: {type: "config-item", action: 'remove-boxcar', config_id: config_id}, dataType: "json", success: function (data) { @@ -1114,7 +1114,7 @@ echo '
    var config_id = $(this).data("config_id"); $.ajax({ type: 'POST', - url: '/ajax_form.php', + url: 'ajax_form.php', data: {type: "update-config-item", config_id: config_id, config_value: state}, dataType: "json", success: function (data) { @@ -1135,7 +1135,7 @@ echo '
    var config_value = $this.val(); $.ajax({ type: 'POST', - url: '/ajax_form.php', + url: 'ajax_form.php', data: {type: "update-config-item", config_id: config_id, config_value: config_value}, dataType: "json", success: function (data) { @@ -1167,7 +1167,7 @@ echo '
    var config_value = $this.val(); $.ajax({ type: 'POST', - url: '/ajax_form.php', + url: 'ajax_form.php', data: {type: "update-config-item", config_id: config_id, config_value: config_value}, dataType: "json", success: function (data) { @@ -1200,7 +1200,7 @@ echo '
    var config_type = $this.data("type"); $.ajax({ type: 'POST', - url: '/ajax_form.php', + url: 'ajax_form.php', data: {type: "update-config-item", action: 'update-textarea', config_type: config_type, config_id: config_id, config_value: config_value}, dataType: "json", success: function (data) { diff --git a/html/pages/syslog.inc.php b/html/pages/syslog.inc.php index 0fa66c6654..bd708c175e 100644 --- a/html/pages/syslog.inc.php +++ b/html/pages/syslog.inc.php @@ -87,7 +87,7 @@ var grid = $("#syslog").bootgrid({ from: '', }; }, - url: "/ajax_table.php" + url: "ajax_table.php" }); $(function () { diff --git a/includes/common.php b/includes/common.php index d5ba05fb02..0749fe9bb1 100644 --- a/includes/common.php +++ b/includes/common.php @@ -76,7 +76,7 @@ function print_error($text) { print $console_color->convert("%r".$text."%n\n", false); } else { - echo('
    '.$text.'
    '); + echo('
    '.$text.'
    '); } } @@ -85,7 +85,7 @@ function print_message($text) { print Console_Color2::convert("%g".$text."%n\n", false); } else { - echo('
    '.$text.'
    '); + echo('
    '.$text.'
    '); } }