- Added $vars to ajax_forms

- replaced all instances of $_POST with $vars
This commit is contained in:
Aaron Daniels
2016-03-16 08:37:15 +10:00
parent 0d6cfec589
commit 3e1d40fd7c
6 changed files with 16 additions and 15 deletions

View File

@@ -15,15 +15,15 @@ if (is_admin() === false) {
$status = array('status' =>1, 'message' => 'ERROR: You need to be admin to delete services');
}
else {
if (!is_numeric($_POST['service_id'])) {
if (!is_numeric($vars['service_id'])) {
$status = array('status' =>1, 'message' => 'No Service has been selected');
}
else {
if (service_delete($_POST['service_id'])) {
$status = array('status' =>0, 'message' => 'Service: <i>'.$_POST['service_id'].', has been deleted.</i>');
if (service_delete($vars['service_id'])) {
$status = array('status' =>0, 'message' => 'Service: <i>'.$vars['service_id'].', has been deleted.</i>');
}
else {
$status = array('status' =>1, 'message' => 'Service: <i>'.$_POST['service_id'].', has NOT been deleted.</i>');
$status = array('status' =>1, 'message' => 'Service: <i>'.$vars['service_id'].', has NOT been deleted.</i>');
}
}
}