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


PHP kekezu::randomkeys方法代码示例

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


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

示例1: user_register

 static function user_register($username, $password, $email)
 {
     global $kekezu;
     $member_obj = new Keke_witkey_member_class();
     $space_obj = new Keke_witkey_space_class();
     $slt = kekezu::randomkeys(6);
     $pwd = self::get_password($password, $slt);
     if ($kekezu->_sys_config['user_intergration'] == 2) {
         require_once S_ROOT . '/uc_client/client.php';
         $reg_uid = uc_user_register($username, $password, $email);
     }
     die;
     if ($reg_uid > 0 || $kekezu->_sys_config['user_intergration'] == '1') {
         $reg_uid and $member_obj->setUid($reg_uid);
         $member_obj->setEmail($email);
         $member_obj->setUsername($username);
         $member_obj->setPassword($pwd);
         $member_obj->setRand_code($slt);
         $reg_uid = $member_obj->create_keke_witkey_member();
         $space_obj->setUid($reg_uid);
         $kekezu->_sys_config[allow_reg_action] == 1 and $space_obj->setStatus(2) or $space_obj->setStatus(1);
         $space_obj->setUsername($username);
         $space_obj->setPassword($pwd);
         $space_obj->setSec_code($pwd);
         $space_obj->setEmail($email);
         $space_obj->setReg_time(time());
         $space_obj->setReg_ip(kekezu::get_ip());
         $space_obj->create_keke_witkey_space();
         $info = array('uid' => $reg_uid, 'username' => $username, 'email' => $email);
         $kekezu->_sys_config[allow_reg_action] == 1 and self::send_email_action_user($info);
         return $info;
     } else {
         return false;
     }
 }
开发者ID:xupnge1314,项目名称:project,代码行数:35,代码来源:keke_user_class.php

示例2: newfilename

 public function newfilename($file)
 {
     $ext = strtolower(trim(substr(strrchr($file, '.'), 1)));
     $rand = kekezu::randomkeys(8);
     $time = microtime();
     $str = $file . $time . $rand;
     if (function_exists('sha1')) {
         return sha1($str) . '.' . $ext;
     }
     return md5($str) . '.' . $ext;
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:11,代码来源:QiniuClass.php

示例3: reset_set_password

function reset_set_password($user_info)
{
    $code = kekezu::randomkeys(6);
    $user_code = md5($code);
    $slt = kekezu::randomkeys(6);
    $user_seccode = keke_user_class::get_password($code, $slt);
    $sql = "update %switkey_member set password = '%s' , rand_code = '%s' where uid=%d";
    $sql = sprintf($sql, TABLEPRE, $user_code, $slt, $user_info['uid']);
    $res = db_factory::execute($sql);
    $sql = "update %switkey_space set  password = '%s' , sec_code = '%s' where uid=%d";
    $sql = sprintf($sql, TABLEPRE, $user_code, $user_seccode, $user_info['uid']);
    db_factory::execute($sql);
    $pass_info['code'] = $pass_info['sec_code'] = $code;
    keke_user_class::user_edit($user_info['username'], '', $code, '', 1);
    return $pass_info;
}
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:16,代码来源:retrieve.bak.php

示例4: add_auth

 public function add_auth($data, $file_name = '')
 {
     global $kekezu, $user_info, $_lang;
     $moblie_obj = new Keke_witkey_auth_mobile_class();
     $fdata = $this->format_auth_apply($data);
     $valid_code = kekezu::randomkeys(4);
     $fdata['valid_code'] = $valid_code;
     $fdata[auth_time] = time();
     $msg_obj = new keke_msg_class();
     $content = $_lang['dear'] . $user_info['username'] . $_lang['hello'] . $_lang['mobile_auth_code'] . " {$fdata['valid_code']}   " . $_lang['from'] . "[{$kekezu->_sys_config[website_url]}]";
     $msg_res = $msg_obj->send_phone_sms($fdata['mobile'], $content);
     if ($msg_res == "操作成功") {
         $auth_info = db_factory::get_one(sprintf("select * from %switkey_auth_mobile where uid='%d'", TABLEPRE, $user_info['uid']));
         if ($auth_info) {
             $moblie_obj->setWhere('uid=' . $fdata['uid']);
             $moblie_obj->setMobile($fdata[mobile]);
             $moblie_obj->setValid_code($fdata['valid_code']);
             $moblie_obj->setAuth_status(0);
             $moblie_obj->edit_keke_witkey_auth_mobile();
         } else {
             $moblie_obj->setUid($fdata[uid]);
             $moblie_obj->setMobile($fdata[mobile]);
             $moblie_obj->setValid_code($fdata['valid_code']);
             $moblie_obj->setUsername($fdata[username]);
             $moblie_obj->setCash($fdata[cash]);
             $moblie_obj->setAuth_time($fdata[auth_time]);
             $moblie_obj->setAuth_status(0);
             $moblie_obj->create_keke_witkey_auth_mobile();
         }
         $fdata['start_time'] == $fdata['end_time'] and $end_time = $fdata['end_time'] or $end_time = 0;
         $res = $this->add_auth_record($fdata['uid'], $fdata['username'], $this->_auth_code, $end_time, 0);
         parse_str($_SERVER['QUERY_STRING'], $arr);
         $arr[auth_step] = "step2";
         unset($arr['inajax']);
         return true;
     }
     return false;
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:38,代码来源:keke_auth_mobile_class.php

示例5: save_userinfo

 function save_userinfo($reg_username, $reg_email, $reg_uid = null, $user_type, $reg_user_type_xf)
 {
     global $_K;
     $reg_username = kekezu::escape($reg_username);
     $slt = kekezu::randomkeys(6);
     $pwd = keke_user_class::get_password($this->_reg_pwd, $slt);
     $this->_member_obj->setUid($reg_uid);
     $this->_member_obj->setEmail($reg_email);
     $this->_member_obj->setUsername($reg_username);
     $this->_member_obj->setPassword($this->_reg_pwd);
     $this->_member_obj->setRand_code($slt);
     $this->_member_obj->setUser_type($user_type);
     //增加user_type
     $reg_member_uid = $this->_member_obj->create_keke_witkey_member();
     $this->_oltime_obj->setUid($reg_member_uid);
     $this->_oltime_obj->setUsername($reg_username);
     $this->_oltime_obj->setLast_op_time(time());
     $this->_oltime_obj->setOnline_total_time(0);
     $this->_oltime_obj->create_keke_witkey_member_oltime();
     if ($reg_member_uid) {
         $buyer_level = keke_user_mark_class::get_mark_level(0, '2');
         $seller_level = keke_user_mark_class::get_mark_level('0', '1');
         $this->_shop_obj->setShop_type(1);
         $this->_shop_obj->setUid($reg_member_uid);
         $this->_shop_obj->setUsername($reg_username);
         $this->_shop_obj->setShop_name($reg_username);
         $this->_shop_obj->setShop_status($_K['autoshop'] == '1' ? '1' : '3');
         $res_shop_id = $this->_shop_obj->create_keke_witkey_shop();
         $this->_space_obj->setUid($reg_member_uid);
         $this->_space_obj->setUsername($reg_username);
         $this->_space_obj->setPassword($this->_reg_pwd);
         $this->_space_obj->setSec_code($pwd);
         $this->_space_obj->setEmail($reg_email);
         $this->_space_obj->setReg_time(time());
         $this->_space_obj->setReg_ip(keke_glob_class::checkipaddres($this->_reg_ip) ? $this->_reg_ip : '0.0.0.0');
         $this->_space_obj->setBuyer_level(serialize($buyer_level));
         $this->_space_obj->setSeller_level(serialize($seller_level));
         $this->_space_obj->setAutoshop($_K['autoshop']);
         $this->_space_obj->setUser_type($reg_user_type_xf);
         //修改用户实名认证类型
         $space_id = $this->_space_obj->create_keke_witkey_space();
     }
     $info = array('uid' => $reg_member_uid, 'username' => $reg_username, 'email' => $reg_email);
     $this->_sys_config['allow_reg_action'] == 1 and keke_user_class::send_email_action_user($info);
     return $reg_member_uid;
 }
开发者ID:xupnge1314,项目名称:project,代码行数:46,代码来源:keke_register_class.php

示例6: keke_register_class

kekezu::admin_check_role(11);
$basic_config = $kekezu->_sys_config;
$reg_obj = new keke_register_class();
$member_class = new keke_table_class('witkey_member');
$space_class = new keke_table_class('witkey_space');
$arrTopIndustrys = $kekezu->_indus_p_arr;
$arrAllIndustrys = $kekezu->_indus_arr;
if ($edituid) {
    $member_arr = kekezu::get_user_info($edituid);
    $shop_open = db_factory::get_count('select shop_id from ' . TABLEPRE . 'witkey_shop where uid=' . $edituid);
}
$member_group_arr = db_factory::query(sprintf("select group_id,groupname from %switkey_member_group", TABLEPRE));
if ($op == 'getzfpwd') {
    $userInfo = keke_user_class::get_user_info(intval($userid));
    $email = $userInfo['email'];
    $strNewCode = kekezu::randomkeys(8);
    $strNewMd5Pwd = keke_user_class::get_password($strNewCode, $userInfo['rand_code']);
    $intRes = db_factory::updatetable(TABLEPRE . 'witkey_space', array('sec_code' => $strNewMd5Pwd), array('uid' => intval($userid)));
    if ($intRes) {
        $message_obj = new keke_msg_class();
        $message_obj->send_message($userInfo['uid'], $userInfo['username'], 'update_sec_code', '找回支付密码', array('支付密码' => $strNewCode), $userInfo['email'], $userInfo['mobile'], 2);
        $system_log_obj = new Keke_witkey_system_log_class();
        $system_log_obj->setLog_content('admin于' . date("Y-m-d H:i:s") . '重置了' . $userInfo['username'] . '的支付密码');
        $system_log_obj->setLog_ip(kekezu::get_ip());
        $system_log_obj->setLog_time(time());
        $system_log_obj->setUser_type($userInfo['group_id']);
        $system_log_obj->setUid($userInfo['uid']);
        $system_log_obj->setUsername($userInfo['username']);
        $system_log_obj->create_keke_witkey_system_log();
        $status = '重置成功';
    } else {
开发者ID:pengfeiaaa,项目名称:web,代码行数:31,代码来源:admin_user_add.php

示例7: intval

 if ($email) {
     if (keke_user_class::user_checkemail($email) != 1) {
         $tips['errors']['email'] = '该email非法或已经被注册';
         kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
     }
 }
 if (strtoupper(CHARSET) == 'GBK') {
     $account = kekezu::utftogbk($account);
 }
 $strNameCheck = keke_user_class::check_username($account);
 if ($strNameCheck != 1 && $account != $_SESSION['username']) {
     $tips['errors']['account'] = $strNameCheck;
     kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
 }
 if (!$password) {
     $password = kekezu::randomkeys(6);
 }
 if (intval($agree) == 0) {
     $tips['errors']['agree'] = '请先同意注册协议';
     kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
 }
 if ($arrBindInfo) {
     global $_K;
     $_K['refer'] = '';
     db_factory::execute("update " . TABLEPRE . "witkey_member_oauth set username='" . $account . "' where oauth_id='" . $arrBindInfo['oauth_id'] . "' and uid=" . intval($arrBindInfo['uid']));
     db_factory::execute("update " . TABLEPRE . "witkey_space set username='" . $account . "',password='" . md5($password) . "',email='" . $email . "' where uid=" . intval($arrBindInfo['uid']));
     db_factory::execute("update " . TABLEPRE . "witkey_member set username='" . $account . "',password='" . md5($password) . "',email='" . $email . "' where uid=" . intval($arrBindInfo['uid']));
     db_factory::execute("update " . TABLEPRE . "witkey_shop set username='" . $account . "',shop_name='" . $account . "' where uid=" . intval($arrBindInfo['uid']));
     $arrUserInfo = keke_user_class::get_user_info($arrBindInfo[uid]);
     $_SESSION[$type . '_oauthInfo'] = null;
     $objReg->register_login($arrUserInfo, 1);
开发者ID:pengfeiaaa,项目名称:web,代码行数:31,代码来源:oauthregister.php

示例8: save_userinfo

 function save_userinfo($reg_username, $reg_email, $reg_uid = null)
 {
     global $_K;
     $reg_username = kekezu::escape($reg_username);
     $slt = kekezu::randomkeys(6);
     $pwd = keke_user_class::get_password($this->_reg_pwd, $slt);
     $this->_member_obj->setUid($reg_uid);
     $this->_member_obj->setEmail($reg_email);
     $this->_member_obj->setUsername($reg_username);
     $this->_member_obj->setPassword($this->_reg_pwd);
     $this->_member_obj->setRand_code($slt);
     $reg_member_uid = $this->_member_obj->create_keke_witkey_member();
     $this->_oltime_obj->setUid($reg_member_uid);
     $this->_oltime_obj->setUsername($reg_username);
     $this->_oltime_obj->setLast_op_time(time());
     $this->_oltime_obj->setOnline_total_time(0);
     $this->_oltime_obj->create_keke_witkey_member_oltime();
     if ($reg_member_uid) {
         $buyer_level = keke_user_mark_class::get_mark_level(0, '2');
         $seller_level = keke_user_mark_class::get_mark_level('0', '1');
         $this->_shop_obj->setShop_type(1);
         $this->_shop_obj->setUid($reg_member_uid);
         $this->_shop_obj->setUsername($reg_username);
         $this->_shop_obj->setShop_name($reg_username);
         $this->_shop_obj->setShop_status($_K['autoshop'] == '1' ? '1' : '3');
         $res_shop_id = $this->_shop_obj->create_keke_witkey_shop();
         $this->_space_obj->setUid($reg_member_uid);
         $this->_space_obj->setUsername($reg_username);
         $this->_space_obj->setPassword($this->_reg_pwd);
         $this->_space_obj->setSec_code($pwd);
         $this->_space_obj->setEmail($reg_email);
         $this->_space_obj->setReg_time(time());
         $this->_space_obj->setReg_ip(keke_glob_class::checkipaddres($this->_reg_ip) ? $this->_reg_ip : '0.0.0.0');
         $this->_space_obj->setBuyer_level(serialize($buyer_level));
         $this->_space_obj->setSeller_level(serialize($seller_level));
         $this->_space_obj->setAutoshop($_K['autoshop']);
         $space_id = $this->_space_obj->create_keke_witkey_space();
     }
     $info = array('uid' => $reg_member_uid, 'username' => $reg_username, 'email' => $reg_email);
     if ($this->_sys_config['allow_reg_action'] != '1') {
         if ($reg_member_uid) {
             $arr = array();
             $arr['用户名'] = $reg_username;
             $arr['网站名称'] = $kekezu->_sys_config['website_name'];
             keke_msg_class::notify_user($reg_member_uid, $reg_username, 'reg', '注册成功', $arr, '2');
         }
     } else {
         keke_user_class::send_email_action_user($info);
     }
     return $reg_member_uid;
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:51,代码来源:keke_register_class.php

示例9: time

    /*if($ajax == 'sendcode'){
    		$validCode = kekezu::randomkeys(6,true);
    		$sendtime = time();
    		$arrNotifyArr = array ('网站名称' => $kekezu->_sys_config ['website_name'],'验证码' => $validCode);
    		keke_shop_class::notify_user ( $_SESSION['retrieve']['userinfo'] ['uid'], $_SESSION['retrieve']['userinfo'] ['username'], 'get_password', '找回密码', $arrNotifyArr, 2 );
    		$encrypteuid = md5(md5($_SESSION['retrieve']['userinfo'] ['uid']));
    		$authsid = md5(md5($_SESSION['retrieve']['userinfo'] ['uid']).$http_agent.$sendtime);
    		keke_user_class::createGetPwdLog('email', $_SESSION['retrieve']['userinfo'] ['uid'], $validCode, $_SESSION['retrieve']['userinfo']['email'], $encrypteuid, $authsid);
    		$echodatas = array(
    			'encrypteuid' => $encrypteuid,	
    			'authsid' 	  => $authsid,
    			'http_agent'  => $http_agent,
    			'sendtime' 	  => $sendtime,
    		);
    		$_SESSION['retrieve']['validinfo']  =  $echodatas;
    		kekezu::echojson('发送成功',1,null);
    	}*/
} else {
    if ($ajax == 'sendcode') {
        $validCode = kekezu::randomkeys(6, true);
        $sendtime = time();
        $arrNotifyArr = array('网站名称' => $kekezu->_sys_config['website_name'], '验证码' => $validCode);
        keke_shop_class::notify_user($_SESSION['retrieve']['userinfo']['uid'], $_SESSION['retrieve']['userinfo']['username'], 'get_password', '找回密码', $arrNotifyArr, 2);
        $encrypteuid = md5(md5($_SESSION['retrieve']['userinfo']['uid']));
        $authsid = md5(md5($_SESSION['retrieve']['userinfo']['uid']) . $http_agent . $sendtime);
        keke_user_class::createGetPwdLog('email', $_SESSION['retrieve']['userinfo']['uid'], $validCode, $_SESSION['retrieve']['userinfo']['email'], $encrypteuid, $authsid);
        $echodatas = array('encrypteuid' => $encrypteuid, 'authsid' => $authsid, 'http_agent' => $http_agent, 'sendtime' => $sendtime);
        $_SESSION['retrieve']['validinfo'] = $echodatas;
        kekezu::echojson('发送成功', 1, null);
    }
}
开发者ID:xupnge1314,项目名称:project,代码行数:31,代码来源:retrieve.php


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