function prevent_flood() { list($hash, $time) = explode('-', $_GET['code']); $check = Core_Helper_Encrypt::hash(Core_Framework_Singleton::config()->ini['web_shop']['secret'] . '-' . $time); if ($check == $hash) { if (time() - $time > 20) { Core_Helper_Utils::redirect("/system/intact/expired.html"); } } else { Core_Helper_Utils::redirect("/system/intact/reject.html"); } }
/** * Try find a CMS page because the action wasn't found. * @param Core_Framework_Action $action * @return boolean */ public static function get_cms_page($action) { $pages = Core_Framework_Cache::cachedReturn('system/tree_array', 'system'); if ($page = $pages[$action->page]) { $page_cms = new Core_Table_CMS($page); if ($page_cms->Type == 'Link') { Core_Helper_Utils::redirect($page_cms->Text); } $cms_action = new Core_Framework_CMSAction($page); $cms_action->CMS = $page_cms; $cms_action->page_dir = $page_cms->Template; return $cms_action; } return false; }
public function getVars() { $keys = Core_Helper_Utils::getPublicObjectVars($this); $this->keys = $keys; return $keys; }