當前位置: 首頁>>代碼示例>>PHP>>正文


PHP integrate::integrate方法代碼示例

本文整理匯總了PHP中integrate::integrate方法的典型用法代碼示例。如果您正苦於以下問題:PHP integrate::integrate方法的具體用法?PHP integrate::integrate怎麽用?PHP integrate::integrate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在integrate的用法示例。


在下文中一共展示了integrate::integrate方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

 /**
  *  插件類初始化函數
  *
  * @access  public
  * @param
  *
  * @return void
  */
 function phpwind6($cfg)
 {
     parent::integrate($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:firsteam,項目名稱:falcons,代碼行數:36,代碼來源:phpwind6.php

示例2: vbb

 /**
  *
  *
  * @access  public
  * @param
  *
  * @return void
  */
 function vbb($cfg)
 {
     parent::integrate($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:a494008974,項目名稱:bzbshop,代碼行數:33,代碼來源:vbb.php

示例3: phpbb

 /**
  *
  *
  * @access  public
  * @param
  *
  * @return void
  */
 function phpbb($cfg)
 {
     parent::integrate($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:jzx0802,項目名稱:ec,代碼行數:34,代碼來源:phpbb.php

示例4: discuz

 /**
  * 會員數據整合插件類的構造函數
  *
  * @access      public
  * @param       string  $db_host    數據庫主機
  * @param       string  $db_name    數據庫名
  * @param       string  $db_user    數據庫用戶名
  * @param       string  $db_pass    數據庫密碼
  * @return      void
  */
 function discuz($cfg)
 {
     parent::integrate($cfg);
     if ($this->error) {
         /* 數據庫連接出錯 */
         return false;
     }
     $this->cookie_prefix = isset($cfg['prefix']) ? $cfg['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'");
     $this->authkey = md5($key . $_SERVER['HTTP_USER_AGENT']);
 }
開發者ID:a494008974,項目名稱:bzbshop,代碼行數:37,代碼來源:discuz.php

示例5: molyx

 /**
  *  初始化函數
  *
  * @access  public
  * @param
  *
  * @return void
  */
 function molyx($cfg)
 {
     parent::integrate($cfg);
     if ($this->error) {
         /* 數據庫連接出錯 */
         return false;
     }
     $this->field_id = 'id';
     $this->field_name = 'name';
     $this->field_email = 'email';
     $this->field_gender = 'gender';
     $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) || !in_array($this->prefix . 'setting', $exist_tables)) {
         $this->error = 2;
         /* 缺少數據表 */
         return false;
     }
     $cookie_prefix = $this->db->getOne("SELECT value FROM " . $this->table('setting') . " WHERE varname='cookieprefix'");
 }
開發者ID:Ryan007,項目名稱:mybb,代碼行數:33,代碼來源:molyx.php

示例6: bmforum

 /**
  *
  *
  * @access  public
  * @param
  *
  * @return void
  */
 function bmforum($cfg)
 {
     parent::integrate($cfg);
     if ($this->error) {
         /* 數據庫連接出錯 */
         return false;
     }
     //$this->cookie_prefix = $cfg['cookie_prefix'];
     $this->field_id = 'userid';
     $this->field_name = 'username';
     $this->field_email = 'mailadd';
     $this->field_gender = 'sex';
     $this->field_bday = 'birthday';
     $this->field_pass = 'pwd';
     $this->field_reg_date = 'regdate';
     $this->user_table = 'userlist';
     /* 檢查數據表是否存在 */
     $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:Ryan007,項目名稱:mybb,代碼行數:33,代碼來源:bmforum.php

示例7: ecshop

 /**
  *
  *
  * @access  public
  * @param
  *
  * @return void
  */
 function ecshop($cfg)
 {
     parent::integrate(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;
 }
開發者ID:BGCX261,項目名稱:zishashop-svn-to-git,代碼行數:22,代碼來源:ecshop.php

示例8: ucenter

    /**
     * 構造函數
     *
     * @access  public
     * @param
     *
     * @return void
     */
    function ucenter($cfg)
    {
        parent::integrate(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:xiaoxiaowu007,項目名稱:jicai,代碼行數:50,代碼來源:ucenter.php


注:本文中的integrate::integrate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。