function ajax_submit()
{
$_arr_appSubmit = $this->mdl_app->input_submit();
if ($_arr_appSubmit["alert"] != "ok") {
$this->obj_ajax->halt_alert($_arr_appSubmit["alert"]);
}
if ($_arr_appSubmit["app_id"] > 0) {
if (!isset($this->adminLogged["admin_allow"]["app"]["edit"]) && !$this->is_super) {
$this->obj_ajax->halt_alert("x050303");
}
} else {
if (!isset($this->adminLogged["admin_allow"]["app"]["add"]) && !$this->is_super) {
$this->obj_ajax->halt_alert("x050302");
}
}
$_arr_appRow = $this->mdl_app->mdl_submit();
if ($_arr_appRow["alert"] == "y050101" || $_arr_appRow["alert"] == "y050103") {
$_arr_targets[] = array("app_id" => $_arr_appRow["app_id"]);
$_str_targets = json_encode($_arr_targets);
if ($_arr_appRow["alert"] == "y050101") {
$_type = "add";
} else {
$_type = "edit";
}
$_str_appRow = json_encode($_arr_appRow);
$_arr_logData = array("log_targets" => $_str_targets, "log_target_type" => "app", "log_title" => $this->log["app"][$_type], "log_result" => $_str_appRow, "log_type" => "admin");
$this->mdl_log->mdl_submit($_arr_logData, $this->adminLogged["admin_id"]);
}
$this->obj_ajax->halt_alert($_arr_appRow["alert"]);
}