$window->windowsetting = $_POST['windowsetting']; $window->mid = $_POST['mid']; $window->seqno = $_POST['seqno']; $window->parentwindows_id = $_POST['parentwindows_id']; $window->description = $_POST['description']; $window->helpurl = str_replace("%26", "&", $_POST['helpurl']); $window->windowsetting = $_POST['windowsetting']; $window->jrxml = $_POST['jrxml']; if (get_magic_quotes_gpc()) { $window->windowsetting = stripslashes($window->windowsetting); $window->jrxml = stripslashes($window->jrxml); } if ($window->window_id > 0) { $window->updateWindow(); } else { $window->insertWindow(); } break; case "ajaxselectwindows": $window->mid = $_GET['mid']; $window->window_id = $_GET['window_id']; if ($window->window_id == "") { $window->window_id = 0; } echo $window->getSelectWindows($window->window_id, $window->mid, "Y"); break; default: if (file_exists("../simantz/")) { include "menu.php"; $window->modulectrl = $ctrl->getSelectModule($findmodule_id, "Y"); } else {
$isactive = $_POST['isactive']; $o->seqno = $_POST['seqno']; $o->createdby = $xoopsUser->getVar('uid'); $o->updatedby = $xoopsUser->getVar('uid'); if ($isactive == "Y" or $isactive == "on") { $o->isactive = 'Y'; } else { $o->isactive = 'N'; } switch ($action) { //When user submit new organization case "create": // if the token is exist and not yet expired $log->showLog(4, "Accessing create record event, with window name={$o->window_name}"); if ($s->check(false, $token, "CREATE_WDW")) { if ($o->insertWindow()) { $latest_id = $o->getLatestWindowID(); redirect_header("window.php?action=edit&window_id={$latest_id}", $pausetime, "Your data is saved, the new id={$latest_id}"); } else { $token = $s->createToken($tokenlife, "CREATE_WDW"); $o->getInputForm("new", -1, $token); $o->showWindowTable(); } } else { // if the token is not valid or the token is expired, it back to previous form with previous inputed data $token = $s->createToken($tokenlife, "CREATE_WDW"); $o->getInputForm("new", -1, $token); $o->showWindowTable(); } break; //when user request to edit particular organization