Merge pull request #3432 from pblasquez/ajax_headers_1

Ajax headers for alert forms
This commit is contained in:
Neil Lathwood
2016-04-30 00:37:54 +01:00
11 changed files with 14 additions and 0 deletions
+1
View File
@@ -11,6 +11,7 @@
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
header('Content-type: text/plain');
$alert_id = mres($_POST['alert_id']);
$state = mres($_POST['state']);
@@ -21,6 +21,7 @@
* @package LibreNMS
* @subpackage Alerts
*/
header('Content-type: text/plain');
if(is_admin() === false) {
die('ERROR: You need to be admin');
@@ -11,6 +11,7 @@
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
header('Content-type: text/plain');
if (is_admin() === false) {
die('ERROR: You need to be admin');
@@ -11,6 +11,7 @@
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
header('Content-type: text/plain');
if (is_admin() === false) {
die('ERROR: You need to be admin');
@@ -11,6 +11,7 @@
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
header('Content-type: text/plain');
if (is_admin() === false) {
die('ERROR: You need to be admin');
@@ -13,6 +13,7 @@
*/
if (is_admin() === false) {
header('Content-type: text/plain');
die('ERROR: You need to be admin');
}
@@ -31,5 +32,6 @@ if (is_numeric($map_id) && $map_id > 0) {
'rule' => $map['name'],
'target' => $map['target'],
);
header('Content-type: application/json');
echo _json_encode($output);
}
@@ -13,6 +13,7 @@
*/
if (is_admin() === false) {
header('Content-type: text/plain');
die('ERROR: You need to be admin');
}
@@ -29,5 +30,6 @@ if (is_numeric($alert_id) && $alert_id > 0) {
'name' => $rule['name'],
'rules' => $rule_split,
);
header('Content-type: application/json');
echo _json_encode($output);
}
@@ -13,6 +13,7 @@
*/
if (is_admin() === false) {
header('Content-type: text/plain');
die('ERROR: You need to be admin');
}
@@ -26,5 +27,6 @@ if (is_numeric($template_id) && $template_id > 0) {
'title' => $template['title'],
'title_rec' => $template['title_rec'],
);
header('Content-type: application/json');
echo _json_encode($output);
}
@@ -11,6 +11,7 @@
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
header('Content-type: text/plain');
// FUA
@@ -11,6 +11,7 @@
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
header('Content-type: text/plain');
// FUA
@@ -11,6 +11,7 @@
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
header('Content-type: text/plain');
if (is_admin() === false) {
die('ERROR: You need to be admin');