function CCSecurityRedirect($GroupsAccess, $URL) { global $_SERVER; $ReturnPage = isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : ""; if (!strlen($ReturnPage)) { $ReturnPage = isset($_SERVER["SCRIPT_NAME"]) ? $_SERVER["SCRIPT_NAME"] : ""; $QueryString = CCGetQueryString("QueryString", ""); if ($QueryString !== "") { $ReturnPage .= "?" . $QueryString; } } $ErrorType = CCSecurityAccessCheck($GroupsAccess); if ($ErrorType != "success") { if (!strlen($URL)) { $Link = ServerURL . "login.php"; } else { $Link = $URL; } header("Location: " . $Link . "?ret_link=" . urlencode($ReturnPage) . "&type=" . $ErrorType); exit; } }
function CCSecurityRedirect($GroupsAccess, $URL, $ReturnPage, $QueryString) { $ErrorType = CCSecurityAccessCheck($GroupsAccess); if ($ErrorType != "success") { if (!strlen($URL)) { $Link = "Login.php"; } else { $Link = $URL; } if (strlen($QueryString)) { $ReturnPage .= "?" . $QueryString; } header("Location: " . $Link . "?ret_link=" . urlencode($ReturnPage) . "&type=" . $ErrorType); exit; } }
function clsproducts_suite_list($RelativePath, $ComponentName, &$Parent) { global $CCSLocales; global $DefaultDateFormat; $this->ComponentName = $ComponentName; $this->RelativePath = $RelativePath; $this->Visible = true; $this->Parent =& $Parent; $this->Visible = CCSecurityAccessCheck("2;3;4") == "success"; $this->FileName = "products_suite_list.php"; $this->Redirect = ""; $this->TemplateFileName = "products_suite_list.html"; $this->BlockToParse = "main"; $this->TemplateEncoding = "UTF-8"; $this->ContentType = "text/html"; }
function clsRecordemails1() { global $FileName; $this->Visible = true; $this->Errors = new clsErrors(); $this->ds = new clsemails1DataSource(); $this->ReadAllowed = false; $this->InsertAllowed = false; $this->UpdateAllowed = false; $this->DeleteAllowed = false; $this->Visible = CCSecurityAccessCheck("1;2") == "success"; if ($this->Visible) { $this->ReadAllowed = CCUserInGroups(CCGetGroupID(), "1;2"); $this->InsertAllowed = CCUserInGroups(CCGetGroupID(), "1;2"); $this->ComponentName = "emails1"; $this->HTMLFormAction = $FileName . "?" . CCAddParam(CCGetQueryString("QueryString", ""), "ccsForm", $this->ComponentName); $CCSForm = CCGetFromGet("ccsForm", ""); $this->FormSubmitted = $CCSForm == $this->ComponentName; $Method = $this->FormSubmitted ? ccsPost : ccsGet; $this->subject = new clsControl(ccsTextBox, "subject", "Amount", ccsText, "", CCGetRequestParam("subject", $Method)); $this->subject->Required = true; $this->message = new clsControl(ccsTextArea, "message", "Message", ccsMemo, "", CCGetRequestParam("message", $Method)); $this->Insert = new clsButton("Insert"); $this->item_id = new clsControl(ccsHidden, "item_id", "Item Id", ccsInteger, "", CCGetRequestParam("item_id", $Method)); $this->to_user_id = new clsControl(ccsHidden, "to_user_id", "To User Id", ccsInteger, "", CCGetRequestParam("to_user_id", $Method)); $this->from_user_id = new clsControl(ccsHidden, "from_user_id", "From User Id", ccsInteger, "", CCGetRequestParam("from_user_id", $Method)); $this->emaildate = new clsControl(ccsHidden, "emaildate", "date", ccsInteger, "", CCGetRequestParam("emaildate", $Method)); if (!$this->FormSubmitted) { if (!strlen($this->subject->GetValue())) { $this->subject->SetValue(0.0); } } } }