예제 #1
0
 function clsRecordMasterPageDXX($RelativePath, &$Parent)
 {
     global $FileName;
     global $CCSLocales;
     global $DefaultDateFormat;
     $this->Visible = true;
     $this->Parent =& $Parent;
     $this->RelativePath = $RelativePath;
     $this->Errors = new clsErrors();
     $this->ErrorBlock = "Record DXX/Error";
     $this->ReadAllowed = true;
     if ($this->Visible) {
         $this->ComponentName = "DXX";
         $this->Attributes = new clsAttributes($this->ComponentName . ":");
         $CCSForm = explode(":", CCGetFromGet("ccsForm", ""), 2);
         if (sizeof($CCSForm) == 1) {
             $CCSForm[1] = "";
         }
         list($FormName, $FormMethod) = $CCSForm;
         $this->FormEnctype = "application/x-www-form-urlencoded";
         $this->FormSubmitted = $FormName == $this->ComponentName;
         $Method = $this->FormSubmitted ? ccsPost : ccsGet;
         $this->design = new clsControl(ccsListBox, "design", "design", ccsText, "", CCGetRequestParam("design", $Method, NULL), $this);
         $this->design->DSType = dsListOfValues;
         $this->design->Values = array(array("d01", "multicolor"), array("d02", "gray"), array("d03", "blue"), array("d04", "green"), array("d05", "orange"));
         $this->Button_DoSearch = new clsButton("Button_DoSearch", $Method, $this);
         if (!$this->FormSubmitted) {
             if (!is_array($this->design->Value) && !strlen($this->design->Value) && $this->design->Value !== false) {
                 $this->design->SetText(CCGetCookie("design"));
             }
         }
     }
 }
예제 #2
0
function CCParseALCookie($cookieName)
{
    $cookieValue = CCGetCookie($cookieName);
    $decryptedCookieValue = strlen($cookieValue) ? CCDecryptString($cookieValue, CCS_ENCRYPTION_KEY_FOR_COOKIE) : "";
    $pos = strpos($decryptedCookieValue, ':');
    $parts = array();
    if ($pos) {
        $parts = explode(":", $decryptedCookieValue);
        $parts[0] = CCDecryptString($parts[0], CCS_ENCRYPTION_KEY_FOR_COOKIE);
        $parts[1] = CCDecryptString($parts[1], CCS_ENCRYPTION_KEY_FOR_COOKIE);
    }
    return $parts;
}