header("Location: " . $Redirect); $header_outofbound->Class_Terminate(); unset($header_outofbound); $footer->Class_Terminate(); unset($footer); unset($Tpl); exit; } //End Go to destination page //Show Page @1-65A57857 $header_outofbound->Show(); $footer->Show(); $Tpl->block_path = ""; $Tpl->Parse($BlockToParse, false); if (!isset($main_block)) { $main_block = $Tpl->GetVar($BlockToParse); } $main_block = CCConvertEncoding($main_block, $FileEncoding, $TemplateEncoding); $CCSEventResult = CCGetEvent($CCSEvents, "BeforeOutput", $MainPage); if ($CCSEventResult) { echo $main_block; } //End Show Page //Unload Page @1-1F225DEA $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage); $header_outofbound->Class_Terminate(); unset($header_outofbound); $footer->Class_Terminate(); unset($footer); unset($Tpl); //End Unload Page
unset($header_access_denied); unset($NewRecord1); unset($Tpl); exit; } //End Go to destination page //Show Page @1-D9D87144 $footer->Show(); $header_access_denied->Show(); $NewRecord1->Show(); $Label1->Show(); $Tpl->block_path = ""; $Tpl->Parse($BlockToParse, false); if (!isset($main_block)) { $main_block = $Tpl->GetVar($BlockToParse); } $main_block = CCConvertEncoding($main_block, $FileEncoding, $CCSLocales->GetFormatInfo("Encoding")); $CCSEventResult = CCGetEvent($CCSEvents, "BeforeOutput", $MainPage); if ($CCSEventResult) { echo $main_block; } //End Show Page //Unload Page @1-17E15AFF $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage); $footer->Class_Terminate(); unset($footer); $header_access_denied->Class_Terminate(); unset($header_access_denied); unset($NewRecord1); unset($Tpl); //End Unload Page
function CCConvertEncodingArray($array, $from = "", $to = "") { if (strlen($from) && strlen($to) && strcasecmp($from, $to)) { foreach ($array as $key => $value) { $array[$key] = is_array($value) ? CCConvertEncodingArray($value, $from, $to) : CCConvertEncoding($value, $from, $to); } } return $array; }
function globalparse($block_name, $accumulate = true, $parse_to = "", $output = false, $reverse = false) { $block_name = $this->getname($block_name, true); if ($parse_to == "") { $parse_to = $block_name; } else { $parse_to = $this->getname($parse_to, true); } $block_value = ""; if (isset($this->blocks[$block_name]) && is_array($this->blocks[$block_name])) { $block_array = $this->blocks[$block_name]; $globals = $this->globals; $array_size = $block_array[0]; for ($i = 1; $i <= $array_size; $i++) { $block_value .= isset($globals[$block_array[$i]]) ? $globals[$block_array[$i]] : ""; #echo $globals[$block_array[$i]]."\n"; } $left_value = $reverse ? $block_value : ""; $right_value = $reverse ? "" : $block_value; $this->globals[$parse_to] = $accumulate && isset($this->globals[$parse_to]) ? $left_value . $this->globals[$parse_to] . $right_value : $block_value; } if ($output) { $value = isset($this->globals[$block_name]) ? $this->globals[$block_name] : ""; $value = CCConvertEncoding($value, $this->internal_encoding, $this->out_encoding); echo $value; } }
function GetMessage($originalId, $parent = "") { global $CCSLocales; global $FileEncoding; $id = strtolower($originalId); if ($id == "ccs_localeid") { return $this->Name; } if ($id == "ccs_languageid") { return $this->LocaleInfo->GetInfo("Language"); } if ($id == "ccs_formatinfo") { return $this->LocaleInfo->GetCCSFormatInfo(); } if (!$this->IsLoaded) { $this->LoadTranslation(); } if (array_key_exists($id, $this->Messages)) { return $FileEncoding != $this->InternalEncoding && $id != "ccs_formatinfo" ? CCConvertEncoding($this->Messages[$id], $this->InternalEncoding, $FileEncoding) : $this->Messages[$id]; } else { if (strtolower($parent) == strtolower($CCSLocales->DefaultLocale)) { return $originalId; } else { if ($this->ParentLocale) { return $this->ParentLocale->GetMessage($id, $this->Name); } elseif ($this->ParentLocaleName && array_key_exists($this->ParentLocaleName, $CCSLocales->Locales)) { $this->ParentLocale =& $CCSLocales->Locales[$this->ParentLocaleName]; return $this->ParentLocale->GetMessage($id, $this->Name); } elseif (strtolower($CCSLocales->DefaultLocale) != strtolower($this->Name)) { $DefaultLocale = $CCSLocales->Locales[$CCSLocales->DefaultLocale]; return $DefaultLocale->GetMessage($id, $this->Name); } else { return $originalId; } } } }