public function init_module() { $this->sql = WebCore::get_module("SQLModule"); }
<?php /** * Created by creatorfromhell. * Date: 12/19/15 * Time: 8:34 AM * Version: Beta 2 */ include_once 'WebCoreLoader.php'; WebCore::get_module("SQLModule"); $captcha = WebCore::get_module("CaptchaModule"); if ($captcha instanceof CaptchaModule) { $captcha->get_captcha("l33t", false); } WebCore::get_module("CaptchaModule")->get_captcha("testing", false);
require_once getCacheFilePath('templatevars.php', $_cachelangid); //是否启用gzip if ($cache_settings['isgzip'] == '1' && function_exists('ob_gzhandler')) { ob_start('ob_gzhandler'); } ob_start("_vars_"); ob_start("_clear_"); //是否关闭网站 if ($cache_settings['isoff'] == '1' && !stristr($_SERVER['PHP_SELF'], '/' . ADMIN_DIR . '/')) { exit('<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>' . $cache_settings['webname'] . '</title></head><body>' . $cache_settings['offdetails'] . '</body></html>'); } //初始化 $timer_begin = getmicrotime(); $db = new db(); $db->connect($_DB); $webcore = new WebCore(); //管理员登录信息 $lg['userid'] = intval(rSESSION('userid')); $lg['isadmin'] = intval(rSESSION('isadmin')); //会员登录信息 $lg['memberid'] = intval(rSESSION('memberid')); $lg['groupid'] = intval(rSESSION('groupid')); $lg['isadmin'] = intval(rSESSION('isadmin')); $lg['membername'] = strFilter(rSESSION('membername')); $lg['displayname'] = htmlFilter(rSESSION('membername')); $lg['memberpass'] = strFilter(rSESSION('memberpass')); $lg['memberauth'] = strFilter(rSESSION('memberauth')); $lg['expire'] = intval(getCookies('expire')); $islogin = isLogin(); if (empty($lg['membername']) || empty($lg['memberpass'])) { $lg['memberid'] = 0;
/** * @param int $length * @return string */ public function generate_session_id($length = 35) { return substr(md5($this->generate_salt(30) . WebCore::get_module("UtilityModule")->generate_uuid()), 0, $length); }
public static function instance() { return WebCore::get_module("PermissionsModule"); }
public function preDispatch() { self::getDb()->query("SET time_zone = '+4:00'"); $locale = 'ru'; $translate = self::getBootstrap()->getResource('translate'); if ($translate) { $locales = $translate->getList(); if (in_array($this->_p('locale'), $locales)) { $translate->setLocale($this->_p('locale')); $locale = $this->_p('locale'); } } if ($this->_p('disableLayout')) { $this->disableLayout(); } if (Zend_Auth::getInstance()->hasIdentity()) { $identity = Zend_Auth::getInstance()->getIdentity(); if (isset($identity->internalUserId)) { self::$_user = (object) User::getInstance()->getUserById($identity->internalUserId); $this->view->user = self::$_user; } } $this->view->headTitle()->setSeparator(' / '); $this->view->headTitle()->setDefaultAttachOrder(Zend_View_Helper_Placeholder_Container_Abstract::PREPEND); $this->view->assign('p', $this->_p()); }