top.window.location = '../../index.php'"; exit; } require_once __DIR__ . "/" . "../../includes/include_basics_only.php"; require_once __DIR__ . "/" . "../../includes/classes/ConnectPDO.php"; use includes\classes\ConnectPDO; $conn = ConnectPDO::getInstance(); $auth = new AuthNew($_SESSION['s_logado'], $_SESSION['s_nivel'], 2, 2); $post = $_POST; $config = getConfig($conn); // $rowLogado = getUserInfo($conn, $_SESSION['s_uid']); $exception = ""; $screenNotification = ""; $data = []; $data['success'] = true; $data['message'] = ""; $data['cod'] = (isset($post['cod']) ? intval($post['cod']) : ""); // $data['action'] = $post['action']; $data['field_id'] = ""; $data['type'] = (isset($post['type']) ? noHtml($post['type']) : ""); $data['department'] = (isset($post['department']) ? noHtml($post['department']) : ""); /* Checagem de preenchimento dos campos obrigatórios*/ if ($data['department'] == "") { $data['success'] = false; $data['field_id'] = "department"; } if ($data['success'] == false) { $data['message'] = message('warning', '', TRANS('MSG_EMPTY_DATA'), ''); echo json_encode($data); return false; } echo json_encode($data); return true;