当前位置: 首页>>代码示例>>PHP>>正文


PHP integrate::__construct方法代码示例

本文整理汇总了PHP中integrate::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP integrate::__construct方法的具体用法?PHP integrate::__construct怎么用?PHP integrate::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在integrate的用法示例。


在下文中一共展示了integrate::__construct方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

 /**
  *
  *
  * @access  public
  * @param
  *
  * @return void
  */
 function __construct($cfg)
 {
     parent::__construct($cfg);
     if ($this->error) {
         /* 数据库连接出错 */
         return false;
     }
     $this->cookie_salt = $cfg['cookie_salt'];
     $this->field_id = 'userid';
     $this->field_name = 'username';
     $this->field_email = 'email';
     $this->field_gender = 'NULL';
     $this->field_bday = 'birthday';
     $this->field_pass = 'password';
     $this->field_reg_date = 'joindate';
     $this->user_table = 'user';
     /* 检查数据表是否存在 */
     $sql = "SHOW TABLES LIKE '" . $this->prefix . "%'";
     $exist_tables = $this->db->getCol($sql);
     if (empty($exist_tables) || !in_array($this->prefix . $this->user_table, $exist_tables)) {
         $this->error = 2;
         /* 缺少数据表 */
         return false;
     }
 }
开发者ID:run100,项目名称:ecshop,代码行数:33,代码来源:vbb.php

示例2:

 /**
  *  插件类初始化函数
  *
  * @access  public
  * @param
  *
  * @return void
  */
 function __construct($cfg)
 {
     parent::__construct($cfg);
     if ($this->error) {
         /* 数据库连接出错 */
         return false;
     }
     $this->field_id = 'uid';
     $this->field_name = 'username';
     $this->field_email = 'email';
     $this->field_gender = 'gender';
     $this->field_safecv = 'safecv';
     $this->field_bday = 'bday';
     $this->field_pass = 'password';
     $this->field_reg_date = 'regdate';
     $this->user_table = 'members';
     /* 检查数据表是否存在 */
     $sql = "SHOW TABLES LIKE '" . $this->prefix . "%'";
     $exist_tables = $this->db->getCol($sql);
     if (empty($exist_tables) || !in_array($this->prefix . $this->user_table, $exist_tables) || !in_array($this->prefix . 'config', $exist_tables)) {
         $this->error = 2;
         /* 缺少数据表 */
         return false;
     }
     /* 设置论坛的加密密钥 */
     $this->db_hash = $this->db->GetOne("SELECT `db_value` FROM " . $this->table('config') . " WHERE `db_name` = 'db_hash'");
     $this->db_sitehash = $this->db->GetOne("SELECT `db_value` FROM " . $this->table('config') . " WHERE `db_name` = 'db_sitehash'");
 }
开发者ID:run100,项目名称:ecshop,代码行数:36,代码来源:phpwind6.php

示例3:

 /**
  *
  *
  * @access  public
  * @param
  *
  * @return void
  */
 function __construct($cfg)
 {
     parent::__construct($cfg);
     if ($this->error) {
         /* 数据库连接出错 */
         return false;
     }
     $this->cookie_prefix = $cfg['cookie_prefix'];
     $this->field_id = 'uid';
     $this->field_name = 'username';
     $this->field_email = 'email';
     $this->field_gender = 'gender';
     $this->field_bday = 'bday';
     $this->field_pass = 'password';
     $this->field_reg_date = 'regdate';
     $this->user_table = 'members';
     /* 检查数据表是否存在 */
     $sql = "SHOW TABLES LIKE '" . $this->prefix . "%'";
     $exist_tables = $this->db->getCol($sql);
     if (empty($exist_tables) || !in_array($this->prefix . $this->user_table, $exist_tables) || !in_array($this->prefix . 'settings', $exist_tables)) {
         $this->error = 2;
         /* 缺少数据表 */
         return false;
     }
     $key = $this->db->GetOne('SELECT value FROM ' . $this->table('settings') . " WHERE variable = 'authkey'");
     if (empty($_SERVER['HTTP_USER_AGENT'])) {
         $this->authkey = md5($key);
     } else {
         $this->authkey = md5($key . $_SERVER['HTTP_USER_AGENT']);
     }
 }
开发者ID:run100,项目名称:ecshop,代码行数:39,代码来源:discuz55.php

示例4:

 /**
  *
  *
  * @access  public
  * @param
  *
  * @return void
  */
 function __construct($cfg)
 {
     parent::__construct($cfg);
     if ($this->error) {
         /* 数据库连接出错 */
         return false;
     }
     //$this->cookie_prefix = $cfg['cookie_prefix'];
     $this->field_id = 'user_id';
     $this->field_name = 'username';
     $this->field_email = 'user_email';
     $this->field_gender = 'NULL';
     $this->field_bday = 'NULL';
     $this->field_pass = 'user_password';
     $this->field_reg_date = 'user_regdate';
     $this->user_table = 'users';
     /* 检查数据表是否存在 */
     $sql = "SHOW TABLES LIKE '" . $this->prefix . "%'";
     $exist_tables = $this->db->getCol($sql);
     if (empty($exist_tables) || !in_array($this->prefix . $this->user_table, $exist_tables) || !in_array($this->prefix . 'config', $exist_tables)) {
         $this->error = 2;
         /* 缺少数据表 */
         return false;
     }
     $this->cookie_prefix = $this->db->getOne("SELECT config_value FROM " . $this->table('config') . " WHERE config_name='cookie_name'");
 }
开发者ID:run100,项目名称:ecshop,代码行数:34,代码来源:phpbb.php

示例5:

 /**
  *
  *
  * @access  public
  * @param
  *
  * @return void
  */
 function __construct($cfg)
 {
     parent::__construct(array());
     $this->user_table = 'users';
     $this->field_id = 'user_id';
     $this->ec_salt = 'ec_salt';
     $this->field_name = 'user_name';
     $this->field_pass = 'password';
     $this->field_email = 'email';
     $this->field_gender = 'sex';
     $this->field_bday = 'birthday';
     $this->field_reg_date = 'reg_time';
     $this->need_sync = false;
     $this->is_ecshop = 1;
 }
开发者ID:run100,项目名称:ecshop,代码行数:23,代码来源:ecshop.php

示例6: define

 /**
  * 构造函数
  *
  * @param unknown $cfg            
  */
 function __construct($cfg)
 {
     /* 使用默认数据库连接 */
     parent::__construct(array());
     $this->user_table = 'users';
     $this->field_id = 'user_id';
     $this->field_name = 'user_name';
     $this->field_pass = 'password';
     $this->field_email = 'email';
     $this->field_gender = 'sex';
     $this->field_bday = 'birthday';
     $this->field_reg_date = 'reg_time';
     $this->need_sync = false;
     $this->is_ecshop = 1;
     /* 初始化UC需要常量 */
     if (!defined('UC_CONNECT') && isset($cfg['uc_id']) && isset($cfg['db_host']) && isset($cfg['db_user']) && isset($cfg['db_name'])) {
         if (strpos($cfg['db_pre'], '`' . $cfg['db_name'] . '`') === 0) {
             $db_pre = $cfg['db_pre'];
         } else {
             $db_pre = '`' . $cfg['db_name'] . '`.' . $cfg['db_pre'];
         }
         define('UC_CONNECT', isset($cfg['uc_connect']) ? $cfg['uc_connect'] : '');
         define('UC_DBHOST', isset($cfg['db_host']) ? $cfg['db_host'] : '');
         define('UC_DBUSER', isset($cfg['db_user']) ? $cfg['db_user'] : '');
         define('UC_DBPW', isset($cfg['db_pass']) ? $cfg['db_pass'] : '');
         define('UC_DBNAME', isset($cfg['db_name']) ? $cfg['db_name'] : '');
         define('UC_DBCHARSET', isset($cfg['db_charset']) ? $cfg['db_charset'] : '');
         define('UC_DBTABLEPRE', $db_pre);
         define('UC_DBCONNECT', '0');
         define('UC_KEY', isset($cfg['uc_key']) ? $cfg['uc_key'] : '');
         define('UC_API', isset($cfg['uc_url']) ? $cfg['uc_url'] : '');
         define('UC_CHARSET', isset($cfg['uc_charset']) ? $cfg['uc_charset'] : '');
         define('UC_IP', isset($cfg['uc_ip']) ? $cfg['uc_ip'] : '');
         define('UC_APPID', isset($cfg['uc_id']) ? $cfg['uc_id'] : '');
         define('UC_PPP', '20');
     }
 }
开发者ID:m7720647,项目名称:demo,代码行数:42,代码来源:ucenter.php


注:本文中的integrate::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。