Beispiel #1
0
 public function __construct()
 {
     parent::__construct();
     if ($this->config['SYS_MEMBER']) {
         $this->adminMsg('系统禁止了会员功能');
     }
 }
 function __construct($that)
 {
     parent::__construct();
     $this->that = $that;
     $this->SetupSomeStuff();
     $this->AskAndYeShallBeRewarded();
 }
Beispiel #3
0
 /**
  * __construct
  */
 public function __construct()
 {
     parent::__construct();
     if ($this->my_login->checkLogin($this->arrCommon, URL_ADMIN_LOGIN)) {
         $this->access();
     }
 }
Beispiel #4
0
 public function __construct()
 {
     parent::__construct();
     $this->load('cache');
     $this->load('logging');
     $this->dbh = new Database('slave');
 }
 function __construct()
 {
     error_reporting(0);
     parent::__construct();
     $this->load->helper('sql_game', 'sql_player');
     $this->load->library(array('facebook'));
 }
 public function __construct()
 {
     parent::__construct();
     if (!in_array($this->action, array('ajaxswfupload', 'ueditor_upload')) && (!$this->session->is_set('user_id') && !get_cookie('member_id'))) {
         $this->attMsg(lang('att-13'));
     }
     $this->dir = 'uploadfiles/';
 }
 public function __construct($params = array())
 {
     parent::__construct($params);
     $this->setTitle($params['title']);
     $this->setSubTitle($params['subTitle']);
     $this->setTickerText($params['tickerText']);
     $this->setVibrate($params['vibrate']);
 }
Beispiel #8
0
 public function __construct($name, $logger = null)
 {
     parent::__construct($logger);
     $this->mockName = $name;
     $this->expects = array();
     $this->stubs = array();
     $this->prefixError = "mock [{$name}]: ";
     self::$mocks[] = $this;
 }
Beispiel #9
0
 /**
  * 构造函数
  */
 public function __construct()
 {
     parent::__construct();
     $file = FCPATH . 'config/weixin.php';
     $this->wx = is_file($file) ? string2array(file_get_contents($file)) : array();
     define("TOKEN", $this->wx['token']);
     define('WECHAT_THEME', SITE_PATH . basename(VIEW_DIR) . '/weixin/');
     $this->cache->cache_dir = APP_ROOT . 'cache/weixin/';
 }
 function __construct(&$DB = false, $id = null, $fieldName = null)
 {
     if ($DB && is_object($DB)) {
         self::$DB =& $DB;
     }
     if ($id) {
         parent::__construct($id, $fieldName);
     }
 }
Beispiel #11
0
 protected function __construct($conf_nm = '')
 {
     //なぜかprivateにしたら怒られるためprotectedに設定
     parent::__construct($conf_nm);
     //シングルトンパターンを採用し、1回しかこの場所を通らないことを前提。
     define('TWITTER_CONSUMER_KEY', $this->config['api_key']);
     define('TWITTER_CONSUMER_SECRET', $this->config['api_secret']);
     define('OAUTH_TOKEN', $this->config['access_token']);
     define('OAUTH_SECRET', $this->config['access_token_secret']);
 }
Beispiel #12
0
 public function __construct($mockName, $methodName, $logger = null)
 {
     parent::__construct($logger);
     $this->mockName = $mockName;
     $this->methodName = $methodName;
     $this->args = null;
     $this->hash = null;
     $this->valueToReturn = null;
     $this->exceptionToRaise = null;
     $this->prefixError = "Stub [{$methodName}]: ";
 }
 function __construct()
 {
     parent::__construct();
     if (!isset($_GET['gid']) or empty($_GET['gid'])) {
         exit("Invalid");
     } else {
         $this->gid = $_GET['gid'];
     }
     $this->load->helper('sql_game', 'sql_player');
     $this->load->library(array('facebook'));
 }
 function __construct()
 {
     //error_reporting(0);
     parent::__construct();
     $this->load->helper(array('sql_player', 'sql_game', 'sql_suit'));
     if (isset($_GET['id'])) {
         $this->id = $_GET['id'];
     } else {
         exit('Please Specify a valid card');
     }
 }
Beispiel #15
0
 public function __construct($model)
 {
     parent::__construct();
     $this->model = $model;
     $this->smarty = new Smarty();
     $this->smarty->template_dir = __BASEDIR__ . "app/" . __APP__ . "/view/templates/";
     $this->smarty->compile_dir = __BASEDIR__ . "app/" . __APP__ . "/view/templates_c/";
     $this->smarty->config_dir = __BASEDIR__ . "app/" . __APP__ . "/view/config/";
     $this->smarty->cache_dir = __BASEDIR__ . "app/" . __APP__ . "/view/cache/";
     $this->smarty->assign("ticket", md5(__APP__));
 }
Beispiel #16
0
 public function __construct()
 {
     parent::__construct();
     $this->user = $this->model('user');
     $this->isAdminLogin();
     if (!auth::check($this->roleid, $this->controller . '-' . $this->action, $this->namespace)) {
         $this->adminMsg(lang('a-com-0', array('1' => $this->controller, '2' => $this->action)));
     }
     $sites = App::get_site();
     $this->site_url = 'http://' . $sites[$this->siteid]['DOMAIN'];
     $this->view->assign(array('userinfo' => $this->userinfo, 'site_url' => $this->site_url));
     $this->adminLog();
 }
Beispiel #17
0
 public function __construct()
 {
     parent::__construct();
     $this->plugin = $this->model("plugin");
     $this->data = $this->plugin->where("dir=?", $this->namespace)->select(false);
     if (empty($this->data)) {
         $this->adminMsg('插件尚未安装', url('admin/plugin'));
     }
     if ($this->data['disable']) {
         $this->adminMsg('插件尚未开启', url('admin/plugin'));
     }
     $this->link = $this->model("link");
     $this->assign(array("admin_path" => SITE_PATH . basename(VIEW_DIR) . "/admin/", "extension_path" => SITE_PATH . EXTENSION_PATH . "/"));
 }
Beispiel #18
0
 /**
  * __construct
  *
  * @param string  $classPrefix Prefix for generated class names
  * @param string  $phpClass 
  *
  * @return void
  */
 public function __construct($classPrefix, $phpClass = null)
 {
     parent::__construct($classPrefix);
     if ($phpClass != null) {
         $this->phpClass = $phpClass;
     }
     // @todo implement logger injection
     if (class_exists('\\Zend_Registry')) {
         // this does not work due to PHP bug @see http://bugs.php.net/bug.php?id=46813
         $this->logger = \Zend_Registry::get('logger');
     } else {
         $this->logger = new NullLogger();
     }
     $this->buildXml();
 }
Beispiel #19
0
 public function __construct()
 {
     parent::__construct();
     $model = $this->get_model('form');
     $modelid = (int) $this->get('modelid');
     if (empty($modelid)) {
         $this->msg(lang('for-0'));
     }
     $this->model = $model[$modelid];
     if (empty($this->model)) {
         $this->msg(lang('for-1', array('1' => $modelid)));
     }
     $this->form = $this->model($this->model['tablename']);
     $this->modelid = $modelid;
     $this->view->assign(array('table' => $this->model['tablename'], 'modelid' => $this->modelid, 'form_name' => $this->model['modelname']));
 }
 function __construct()
 {
     error_reporting(0);
     header("Cache-Control: no-cache, must-revalidate");
     // HTTP/1.1
     header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
     // Date in the past
     parent::__construct();
     $this->load->helper('sql_player', 'sql_game', 'graph');
     $this->load->library(array('facebook'));
     if (isset($_GET['id']) && !empty($_GET['id'])) {
         $this->fid = $_GET['id'];
     } else {
         $this->fid = $this->session->userdata('fid');
     }
     $config = array('appId' => $this->config->item('fb_appid'), 'secret' => $this->config->item('fb_appsecret'), 'cookie' => $this->config->item('fb_cookie'), 'domain' => $this->config->item('fb_domain'));
     $this->facebook->init($config);
 }
Beispiel #21
0
 /** 
  * コンストラクタ
  * @access public
  * @param String $db_name 接続データベース名
  * @param String $host    接続先ホスト名
  * @param String $user    接続ユーザー名
  * @param String $pass    接続ユーザーのパスワード
  * @return 
  */
 public function __construct($db_name = null, $host = null, $user = null, $pass = null)
 {
     parent::__construct();
     if (is_null($db_name)) {
         $db_name = $this->conf["db"][__MODE__]["dbname"];
     }
     if (is_null($host)) {
         $host = $this->conf["db"][__MODE__]["host"];
     }
     if (is_null($user)) {
         $user = $this->conf["db"][__MODE__]["user"];
     }
     if (is_null($pass)) {
         $pass = $this->conf["db"][__MODE__]["password"];
     }
     $this->db_encode = $this->conf["db"]["encode"];
     $this->sys_encode = $this->conf["encode"]["sys_encode"];
     $this->connect($db_name, $host, $user, $pass);
 }
Beispiel #22
0
 public function __construct()
 {
     parent::__construct();
     define('IS_FC_ADMIN', intval(SYS_MODE));
     if (SYS_MODE == 1) {
         // 中级
     } elseif (SYS_MODE == 2) {
         // 高级
     } else {
         // 初级
     }
     $this->user = $this->model('user');
     $this->isAdminLogin();
     if (!auth::check($this->roleid, $this->controller . '-' . $this->action, $this->namespace)) {
         $this->adminMsg(lang('a-com-0', array('1' => $this->controller, '2' => $this->action)));
     }
     $sites = App::get_site();
     $this->site_url = 'http://' . $sites[$this->siteid]['DOMAIN'];
     $this->view->assign(array('userinfo' => $this->userinfo, 'site_url' => $this->site_url));
     //print_r($this->site_url);
     //exit;
     $this->adminLog();
 }
Beispiel #23
0
 public function __construct()
 {
     if (!defined('URL')) {
         if (isset($_SERVER['HTTP_HOST'])) {
             $base_url = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http';
             $base_url .= '://' . $_SERVER['HTTP_HOST'];
             $base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
         } else {
             $base_url = 'http://localhost/';
         }
         define('URL', $base_url);
     }
     $server = 'http://' . $_SERVER['SERVER_NAME'] . '/';
     $endereco = $_SERVER['REQUEST_URI'];
     $endereco = rtrim($endereco, '/');
     //remove as barras do final da string
     $endereco = ltrim($endereco, '/');
     //remove as barras do começo da string
     $url = $server . $endereco . '/';
     //endereço completo
     $this->currentUrl = $url;
     $url = str_replace(URL, '', $url);
     //remove o endereço original e fica apenas o caminho
     $url = explode('/', $url);
     $url = array_filter($url);
     //remove todos os índices vazios
     $newArr = array();
     foreach ($url as $value) {
         //para ordenar o array pelo índice
         $newArr[] = $value;
     }
     $this->url = $newArr;
     unset($url);
     unset($newArr);
     parent::__construct();
 }
Beispiel #24
0
 function __construct()
 {
     parent::__construct();
     $this->num = 10;
 }
Beispiel #25
0
 public function __construct()
 {
     parent::__construct();
     $this->setRequest();
     $this->dataAccess = new DataAccess();
 }
Beispiel #26
0
 public function __construct()
 {
     parent::__construct();
 }
 /**
  * __construct
  *
  * @param string  $classPrefix Prefix for generated class names
  *
  * @return void
  */
 public function __construct($classPrefix = '')
 {
     parent::__construct($classPrefix);
 }
Beispiel #28
0
 function __construct()
 {
     parent::__construct(false, 'a');
     $this->load->library('pagination');
 }
Beispiel #29
0
 public function __construct()
 {
     parent::__construct();
     $this->collection = $this->collection();
 }
Beispiel #30
0
 public function __construct()
 {
     parent::__construct();
     $this->dbh = new Database('slave');
 }