• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP integrate类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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


示例2: 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


示例3: __construct

 /**
  * 构造函数
  *
  * @param unknown $cfg 
  */
 public 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_mobile = 'mobile_phone';
     $this->field_gender = 'sex';
     $this->field_bday = 'birthday';
     $this->field_reg_date = 'reg_time';
     $this->field_passwd_question = 'passwd_question';
     $this->need_sync = false;
     $this->is_ecshop = 1;
 }
开发者ID:m7720647,项目名称:demo,代码行数:22,代码来源:ecshop.php


示例4: time

 /**
  *  设置论坛cookie
  *
  * @access  public
  * @param
  *
  * @return void
  */
 function set_cookie($username = "")
 {
     parent::set_cookie($username);
     if (empty($username)) {
         $time = time() - 3600;
         setcookie($this->cookie_prefix . '_data', '', $time, $this->cookie_path, $this->cookie_domain);
         setcookie($this->cookie_prefix . '_sid', '', $time, $this->cookie_path, $this->cookie_domain);
     } else {
         if ($this->charset != 'UTF8') {
             $username = ecs_iconv('UTF8', $this->charset, $username);
         }
         $sql = "SELECT " . $this->field_id . " AS user_id, " . $this->field_name . " AS user_name, " . $this->field_email . " AS email " . " FROM " . $this->table($this->user_table) . " WHERE " . $this->field_name . " = '{$username}'";
         $row = $this->db->getRow($sql);
         $auto_login_key = md5($this->dss_rand() . $this->dss_rand());
         /* 向整合对象的数据表里写入cookie值 */
         $this->db->query("INSERT INTO " . $this->table('sessions_keys') . " (key_id, user_id, last_login) " . "VALUES ('" . $auto_login_key . "', '{$row['user_id']}', '" . time() . "')");
         $client_ip = !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : (!empty($HTTP_ENV_VARS['REMOTE_ADDR']) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : getenv('REMOTE_ADDR'));
         $sql = "INSERT INTO " . $this->table('sessions') . " (session_id, session_user_id, session_start, session_time, session_ip, session_logged_in, session_admin) VALUES('{$auto_login_key}', '" . $row[$this->field_id] . "','" . time() . "','" . time() . "','" . $this->encode_ip($client_ip) . "',1, 0)";
         $this->db->query($sql);
         $sessiondata = array('autologinid' => $auto_login_key, 'userid' => $row['user_id']);
         setcookie($this->cookie_prefix . '_data', serialize($sessiondata), time() + 31536000, $this->cookie_path, $this->cookie_domain);
         setcookie($this->cookie_prefix . '_sid', $auto_login_key, time() + 31536000, $this->cookie_path, $this->cookie_domain);
     }
 }
开发者ID:jiusanzhou,项目名称:ecapi,代码行数:32,代码来源:phpbb.php


示例5:

 /**
  * 添加新用户的函数
  *
  * @access      public
  * @param       string      username    用户名
  * @param       string      password    登录密码
  * @param       string      email       邮件地址
  * @param       string      bday        生日
  * @param       string      gender      性别
  * @return      int         返回最新的ID
  */
 function add_user($username, $password, $email, $gender = -1, $bday = 0, $reg_date = 0, $md5password = '')
 {
     $result = parent::add_user($username, $password, $email, $gender, $bday, $reg_date, $md5password);
     if (!$result) {
         return false;
     }
     /* 更新memberdata表 */
     $sql = 'INSERT INTO ' . $this->table('memberdata') . ' (' . $this->field_id . ") " . " SELECT " . $this->field_id . " FROM " . $this->table($this->user_table) . " WHERE " . $this->field_name . "='{$username}'";
     $this->db->query($sql);
     return true;
 }
开发者ID:firsteam,项目名称:falcons,代码行数:22,代码来源:phpwind6.php


示例6: addslashes

 /**
  * 添加新用户的函数
  *
  * @access      public
  * @param       string      username    用户名
  * @param       string      password    登录密码
  * @param       string      email       邮件地址
  * @param       string      bday        生日
  * @param       string      gender      性别
  * @return      int         返回最新的ID
  */
 function add_user($username, $password, $email, $gender = -1, $bday = 0, $reg_date = 0, $md5password = '')
 {
     $result = parent::add_user($username, $password, $email, $gender, $bday, $reg_date, $md5password);
     if (!$result) {
         return false;
     }
     $user_title = $this->db->GetOne("SELECT title FROM " . $this->table('usertitle') . " ORDER BY minposts LIMIT 1");
     if ($this->charset != 'UTF8') {
         $username = ecs_iconv('UTF8', $this->charset, $username);
     }
     /* 编译密码 */
     $salt = addslashes($this->fetch_user_salt());
     /* 更新数据 */
     $sql = "UPDATE " . $this->table($this->user_table) . " SET " . $this->field_pass . " = '" . $this->compile_password(array('type' => PWD_SUF_SALT, 'password' => $password, 'salt' => $salt)) . "', " . " salt = '{$salt}', " . " ipaddress = '" . real_ip() . "', " . " usergroupid = 2, " . " usertitle = '{$user_title}' " . " WHERE " . $this->field_name . "='{$username}'";
     $this->db->query($sql);
     $sql = 'INSERT INTO ' . $this->table('userfield') . ' (' . $this->field_id . ") " . " SELECT " . $this->field_id . " FROM " . $this->table($this->user_table) . " WHERE " . $this->field_name . "='{$username}'";
     $this->db->query($sql);
     $sql = 'INSERT INTO ' . $this->table('usertextfield') . ' (' . $this->field_id . ") " . " SELECT " . $this->field_id . " FROM " . $this->table($this->user_table) . " WHERE " . $this->field_name . "='{$username}'";
     $this->db->query($sql);
     return true;
 }
开发者ID:a494008974,项目名称:bzbshop,代码行数:32,代码来源:vbb.php


示例7: time

 /**
  * 添加新用户的函数
  *
  * @access      public
  * @param       string      username    用户名
  * @param       string      password    登录密码
  * @param       string      email       邮件地址
  * @param       string      bday        生日
  * @param       string      gender      性别
  * @return      int         返回最新的ID
  */
 function add_user($username, $password, $email, $gender = -1, $bday = 0, $reg_date = 0, $md5password = '')
 {
     $result = parent::add_user($username, $password, $email, $gender, $bday, $reg_date, $md5password);
     if (!$result) {
         return false;
     }
     /* 获得默认的用户组 */
     $sql = 'SELECT groupid FROM ' . $this->table('usergroups') . ' WHERE creditshigher <= 0 AND creditslower > 0';
     $grp = $this->db->getOne($sql);
     if ($this->charset != 'UTF8') {
         $username = ecs_iconv('UTF8', $this->charset, $username);
     }
     /* 更新组id */
     $sql = "UPDATE " . $this->table($this->user_table) . " SET groupid= '{$grp}', " . " regip = '" . real_ip() . "'," . " regdate = '" . time() . "'" . " WHERE " . $this->field_name . "='{$username}'";
     $this->db->query($sql);
     /* 更新memberfields表 */
     $sql = 'INSERT INTO ' . $this->table('memberfields') . ' (' . $this->field_id . ") " . " SELECT " . $this->field_id . " FROM " . $this->table($this->user_table) . " WHERE " . $this->field_name . "='{$username}'";
     $this->db->query($sql);
     return true;
 }
开发者ID:a494008974,项目名称:bzbshop,代码行数:31,代码来源:discuz.php


示例8: time

 /**
  *  设置论坛cookie
  *
  * @access  public
  * @param
  *
  * @return void
  */
 function set_cookie($username = "")
 {
     parent::set_cookie($username);
     if (empty($username)) {
         $time = time() - 3600;
         setcookie($this->cookie_prefix . 'userid', '', $time, $this->cookie_path, $this->cookie_domain);
         setcookie($this->cookie_prefix . 'username', '', $time, $this->cookie_path, $this->cookie_domain);
         setcookie($this->cookie_prefix . 'password', '', $time, $this->cookie_path, $this->cookie_domain);
         setcookie($this->cookie_prefix . 'userhidden', '', $time, $this->cookie_path, $this->cookie_domain);
         setcookie($this->cookie_prefix . 'onlinecachetime', '', $time, $this->cookie_path, $this->cookie_domain);
     } else {
         if ($this->charset != 'UTF8') {
             $username = ecs_iconv('UTF8', $this->charset, $username);
         }
         $sql = "SELECT " . $this->field_id . " AS user_id, truepassword, userhidden " . " FROM " . $this->table($this->user_table) . " WHERE " . $this->field_name . "='{$username}'";
         $row = $this->db->getRow($sql);
         setcookie($this->cookie_prefix . 'userid', $row['user_id'], time() + 3600 * 24 * 30, $this->cookie_path, $this->cookie_domain);
         setcookie($this->cookie_prefix . 'username', $username, time() + 3600 * 24 * 30, $this->cookie_path, $this->cookie_domain);
         setcookie($this->cookie_prefix . 'password', $row['truepassword'], time() + 3600 * 24 * 30, $this->cookie_path, $this->cookie_domain);
         setcookie($this->cookie_prefix . 'userhidden', $row['userhidden'], time() + 3600 * 24 * 30, $this->cookie_path, $this->cookie_domain);
     }
 }
开发者ID:firsteam,项目名称:falcons,代码行数:30,代码来源:dvbbs.php


示例9: time

 /**
  *  设置论坛cookie
  *
  * @access  public
  * @param
  *
  * @return void
  */
 function set_cookie($username = "")
 {
     parent::set_cookie($username);
     if (empty($username)) {
         $time = time() - 3600 * 24;
         setcookie($this->cookie_prefix . 'sessionid', '', $time, $this->cookie_path, $this->cookie_domain);
         setcookie($this->cookie_prefix . 'userid', '', $time, $this->cookie_path, $this->cookie_domain);
         setcookie($this->cookie_prefix . 'password', '', $time, $this->cookie_path, $this->cookie_domain);
     } else {
         if ($this->charset != 'UTF8') {
             $username = ecs_iconv('UTF8', $this->charset, $username);
         }
         $sql = "SELECT " . $this->field_id . " AS user_id, salt, " . $this->field_pass . " As password " . " FROM " . $this->table($this->user_table) . " WHERE " . $this->field_name . "='{$username}'";
         $row = $this->db->getRow($sql);
         $time = time() + 3600 * 24 * 30;
         setcookie($this->cookie_prefix . 'sessionid', '', time() - 3600 * 24, $this->cookie_path, $this->cookie_domain);
         setcookie($this->cookie_prefix . 'userid', $row['user_id'], time() + 3600 * 24 * 30, $this->cookie_path, $this->cookie_domain);
         setcookie($this->cookie_prefix . 'password', $row['password'], time() + 3600 * 24 * 30, $this->cookie_path, $this->cookie_domain);
     }
 }
开发者ID:Ryan007,项目名称:mybb,代码行数:28,代码来源:molyx.php


示例10: time

 /**
  *  设置论坛cookie
  *
  * @access  public
  * @param
  *
  * @return void
  */
 function set_cookie($username = "")
 {
     parent::set_cookie($username);
     if (empty($username)) {
         $time = time() - 3600;
         setcookie('session_id', '', $time, $this->cookie_path, $this->cookie_domain);
         setcookie('member_id', '', $time, $this->cookie_path, $this->cookie_domain);
         setcookie('pass_hash', '', $time, $this->cookie_path, $this->cookie_domain);
     } else {
         $time = time() + 3600 * 24 * 30;
         if ($this->charset != 'UTF8') {
             $username = ecs_iconv('UTF8', $this->charset, $username);
         }
         $sql = "SELECT " . $this->field_id . " AS user_id, member_login_key " . " FROM " . $this->table($this->user_table) . " WHERE " . $this->field_name . "='{$username}'";
         $row = $this->db->getRow($sql);
         if ($row) {
             setcookie('member_id', $row['user_id'], $time, $this->cookie_path, $this->cookie_domain);
             setcookie('pass_hash', $row['member_login_key'], $time, $this->cookie_path, $this->cookie_domain);
         }
     }
 }
开发者ID:will0306,项目名称:bianli100,代码行数:29,代码来源:ipb.php


示例11: VALUES

 /**
  *
  *
  * @access  public
  * @param
  *
  * @return void
  */
 function add_user($username, $password, $email, $gender = -1, $bday = 0, $reg_date = 0, $md5password = '')
 {
     $result = parent::add_user($username, $password, $email, $gender, $bday, $reg_date, $md5password);
     if (!$result) {
         return false;
     }
     $user_id = $this->check_user($username);
     if ($user_id > 0) {
         $sql = "REPLACE INTO " . $this->table('memberdata') . " (" . $this->field_id . ") VALUES ('{$user_id}')";
         $this->db->query($sql);
     }
     return true;
 }
开发者ID:a494008974,项目名称:bzbshop,代码行数:21,代码来源:phpwind.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP interPool类代码示例发布时间:2022-05-23
下一篇:
PHP input类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap