public static function init($uid = null) { global $kekezu; global $_lang; global $user_info; $user_info = keke_user_class::get_user_info($uid); self::$_basic_config = $kekezu->_sys_config; if ($user_info) { try { return $user_info; } catch (Exception $e) { keke_exception::handler($e); } } }
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 = '******' , 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 = '******' , 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; }
} ?> </div> <!-- nav-action end --> <div class="content-panel"> <div class="user-short"> <div class="media"> <div class="user-avatar"> <a href="index.php?do=seller&id=<?php echo $gUid; ?> "> <?php echo keke_user_class::get_user_pic($gUid, 'larger'); ?> </a> </div> <div class="media-body"> <div class="user-info"> <h2 class="media-heading username"><?php echo $username; ?> </h2> <div class="top-left"> <div class="p-row1">
<?php defined('ADMIN_KEKE') or exit('Access Denied'); $uid = $_R['uid']; $userinfo = keke_user_class::get_user_info($uid); $username = $userinfo['username']; switch ($type) { case 'task': $arrData = db_factory::query('select task_id,task_title from ' . TABLEPRE . 'witkey_task where uid = ' . $uid); break; case 'parrt': $strSql = "SELECT task_title,task_id FROM `" . TABLEPRE . "witkey_task` WHERE ( task_id IN ( SELECT task_id FROM " . TABLEPRE . "witkey_task_bid WHERE uid = " . $uid . " ) OR task_id IN ( SELECT task_id FROM " . TABLEPRE . "witkey_task_work WHERE uid = " . $uid . " ) )"; $arrData = db_factory::query($strSql); break; case 'added': $arrData = db_factory::query('select title,service_id from ' . TABLEPRE . 'witkey_service where uid = ' . $uid . ' and service_status = 2'); break; case 'buy': $strWhere = ' 1=1 '; $strWhere .= ' and a.order_uid = ' . $uid; $strWhere .= ' and b.obj_type = ' . "'service'"; $strSql = ' SELECT c.title,c.service_id FROM `' . TABLEPRE . 'witkey_order` AS a ' . ' LEFT JOIN ' . TABLEPRE . 'witkey_order_detail AS b ON a.order_id = b.order_id ' . ' LEFT JOIN ' . TABLEPRE . 'witkey_service AS c ON b.obj_id = c.service_id ' . ' LEFT JOIN ' . TABLEPRE . 'witkey_service_order AS d ON b.order_id = d.order_id ' . ' WHERE ' . $strWhere; $arrData = db_factory::query($strSql); break; } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
public function save_user_info($user_info, $account, $ckb_cookie = 1, $login_type = 0, $auto_login = 0, $oauth_login = 0) { global $kekezu, $_K, $handlekey; global $_lang; $_SESSION['uid'] = $user_info['uid']; $_SESSION['username'] = $user_info['username']; $_SESSION['last_login_time'] = $user_info['last_login_time']; $this->add_login_time(0); $login_type = $this->_login_type; if ($auto_login == '1') { $c = array(); $c[0] = base64_encode($user_info['uid']); $c[1] = base64_encode($account); $c[2] = base64_encode($user_info['uid'] . '|' . $user_info['password'] . '|' . $account); setcookie('keke_auto_login', serialize($c), time() + 3600 * 24 * 30); } if ($_K['refer']) { //登录之后不同身份跳转到各自管理页面 $user_obj = new keke_user_class(); $user_type = $user_obj->get_user_type($user_info['uid']); if ($user_type['user_type'] == 2) { $r_url = '?do=user&view=wk'; } elseif ($user_type['user_type'] == 1) { $r_url = '?do=user&view=gz'; } $r = $_K['refer'] . $r_url; } else { $r = 'index.php'; } if ($login_type) { $r = 'index.php'; } if ($oauth_login) { $r = 'index.php'; } if ($this->_sys_config['user_intergration'] == 2) { $synhtml = keke_user_class::user_synlogin($user_info['uid'], $this->_password); } $synhtml = isset($synhtml) ? $synhtml : ""; $user_obj = new Keke_witkey_space_class(); $user_obj->setLast_login_time(time()); $user_obj->setWhere("uid = '{$user_info['uid']}'"); $user_obj->edit_keke_witkey_space(); $black_obj = new Keke_witkey_member_black_class(); $black_obj->setWhere("uid = '{$user_info['uid']}'"); $black_obj->del_keke_witkey_member_black(); db_factory::execute(sprintf("update %switkey_member_oltime set last_op_time=%d where uid = %d", TABLEPRE, time(), $user_info['uid'])); if (isset($_COOKIE['prom']) && $_COOKIE['prom']) { $prom_obj = keke_prom_class::get_instance(); $url_data = $prom_obj->extract_prom_cookie(); $url_data['p'] == 'reg' or $prom_obj->create_prom_relation($user_info['uid'], $user_info['username'], $url_data, '2'); } if ($login_type == 1) { if (strtolower($_SERVER['REQUEST_METHOD']) == 'post') { $this->show_msg($_lang['login_success'] . "{$synhtml}", 1, $r); } elseif (strtolower($_SERVER['REQUEST_METHOD']) == 'get') { echo "{$synhtml}<script>window.location.href='{$r}';</script>"; die; } } else { if ($login_type == 3 || $login_type == 4) { $info = $user_info; $return_info['uid'] = $info['uid']; $return_info['username'] = $info['username']; $return_info['balance'] = intval($info['balance']); $return_info['credit'] = intval($info['credit']); $return_info['pic'] = keke_user_class::get_user_pic($user_info['uid']); $return_info['syn'] = $synhtml; $user_info['uid'] == ADMIN_UID || $user_info['group_id'] > 0 and $return_info['is_admin'] = 1; $return_info['g_pic'] = unserialize($info['buyer_level']); $return_info['s_pic'] = unserialize($info['seller_level']); $this->show_msg($_lang['login_success'], 1, $return_info); die; } elseif ($login_type == 2) { return true; } else { $this->show_msg($_lang['login_success'] . "{$synhtml}", 1, $r); } } }
$objMsgM = new Keke_witkey_msg_class(); if (strtoupper(CHARSET) == 'GBK') { $to_username = kekezu::utftogbk($to_username); } $arrSpaceInfo = kekezu::get_user_info($to_username, 1); if (!$arrSpaceInfo) { $tips['errors']['to_username'] = '******'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } if ($arrSpaceInfo['uid'] == $gUid) { $tips['errors']['to_username'] = '******'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } if (strtoupper(CHARSET) == 'GBK') { $title = kekezu::utftogbk($title); $content = kekezu::utftogbk($content); } $objMsgM->setUid($gUid); $objMsgM->setUsername($username); $objMsgM->setTo_uid($arrSpaceInfo['uid']); $objMsgM->setTo_username($arrSpaceInfo['username']); $objMsgM->setTitle(kekezu::str_filter(kekezu::escape($title))); $objMsgM->setContent(kekezu::str_filter(kekezu::escape($content))); $objMsgM->setOn_time(time()); $objMsgM->setType(3); $objMsgM->create_keke_witkey_msg(); unset($objMsgM); kekezu::show_msg('已发送', NULL, NULL, NULL, 'ok'); } else { $userArrData = keke_user_class::get_user_info($id); }
kekezu::admin_system_log($_lang['add_member'] . $fds['username']); kekezu::admin_show_msg($_lang['operate_notice'], "index.php?do=user&view=add", 3, $_lang['user_creat_success'], 'success'); } else { $uinfo = kekezu::get_user_info($edituid); if ($fds['password']) { $slt = db_factory::get_count(sprintf("select rand_code from %switkey_member where uid = '%d'", TABLEPRE, $edituid)); $sec_code = keke_user_class::get_password($fds['password'], $slt); $fds['sec_code'] = $sec_code; $newpwd = $fds['password']; $pwd = md5($fds['password']); $fds[password] = $pwd; db_factory::execute(sprintf("update %switkey_member set password ='******' where uid=%d", TABLEPRE, $pwd, $edituid)); } else { unset($fds['password']); } keke_user_class::user_edit($uinfo['username'], '', $newpwd, '', 1); $space_class->save($fds, array("uid" => "{$edituid}")); kekezu::admin_system_log($_lang['edit_member'] . $member_arr[username]); kekezu::admin_show_msg($_lang['edit_success'], "index.php?do=user&view=add&edituid=" . $edituid, 3, '', 'success'); } } if ($check_email) { $regClass = new keke_register_class(); $result = $regClass->check_email($check_email); if ($result !== true) { echo $result; } else { echo 1; } die; }
<?php $regionCfg = keke_glob_class::getRegionConfig(); $arrDistrictInfo = db_factory::get_one("select * from " . TABLEPRE . "witkey_service where service_id=" . intval($id)); $province = CommonClass::getDistrictById($arrDistrictInfo['province']); $city = CommonClass::getDistrictById($arrDistrictInfo['city']); $area = CommonClass::getDistrictById($arrDistrictInfo['area']); $intSellerGoodsNum = db_factory::get_count(sprintf("select count(service_id) from %switkey_service where model_id=6 and uid=%d and service_status=2", TABLEPRE, $arrOwnerInfo['uid'])); $intFavorite = db_factory::get_count(sprintf('select count(*) from %s where uid = %d and obj_id = %d and keep_type = "service"', TABLEPRE . 'witkey_favorite', intval($gUid), intval($arrServiceInfo['service_id']))); if ($type == "get") { $arrResult1 = keke_user_class::get_user_info($uid); $objFavorite = keke_table_class::get_instance('witkey_favorite'); $arrFields = array('keep_type' => $obj_type, 'obj_type' => $do, 'origin_id' => $service_id, 'obj_id' => $service_id, 'obj_name' => $arrServiceInfo['title'], 'uid' => $uid, 'username' => $gUsername, 'on_date' => time()); $intResult = $objFavorite->save($arrFields); die; } if ($type == "getno") { $sql1 = "DELETE FROM " . TABLEPRE . "witkey_favorite WHERE obj_id =" . $service_id . ' and uid=' . $uid; $sql1 .= " and obj_type='" . $do . "'"; db_factory::query($sql1); die; } $intFollow = db_factory::get_count(sprintf('select count(*) from %s where uid = %d and fuid = %d', TABLEPRE . 'witkey_free_follow', intval($gUid), intval($arrServiceInfo['uid']))); if ($gUid && $gUid !== $arrServiceInfo['uid']) { $myOrderInfo = db_factory::get_one("select a.order_status from " . TABLEPRE . "witkey_order a left join " . TABLEPRE . "witkey_order_detail b on a.order_id=b.order_id where b.obj_type='service' and b.obj_id={$id} and a.order_uid={$gUid}"); } $page and $intPage = intval($page); intval($intPage) and $p['page'] = intval($intPage) or $p['page'] = '1'; intval($intPagesize) and $p['page_size'] = intval($intPagesize) or $p['page_size'] = 10; $objTime = new goods_time_class(); $objTime->validtaskstatus();
<?php defined('IN_KEKE') or exit('Access Denied'); $arrMemer = db_factory::get_one("select * from " . TABLEPRE . "witkey_member where uid=" . $gUid); $twoPassword = keke_user_class::get_password($arrMemer['password'], $arrMemer['rand_code']); $intUserRole = intval($gUserInfo['user_type']); $footer_load = 1; $identy_auth_info = kekezu::get_table_data('auth_code,auth_status', 'witkey_auth_record', "uid=" . $gUid, '', '', '', 'auth_code'); if ($intUserRole === 2) { $strCodeWh = " auth_code!='realname' "; $intAuthStatus = keke_auth_fac_class::auth_check('enterprise', $gUid); if ($intUserRole && !$intAuthStatus) { $intAuthStatus = 1; } } else { $strCodeWh = " auth_code!='enterprise' "; $intAuthStatus = keke_auth_fac_class::auth_check('realname', $gUid); if ($intUserRole && !$intAuthStatus) { $intAuthStatus = 1; } } $arrAuthItems = keke_auth_fac_class::getAuthItemListByUid($gUid); $arrAllAuthItems = keke_auth_base_class::get_auth_item(null, null, 1, null); $keys = array_keys($arrAuthItems); $arrAllowAuth = array('realname', 'enterprise', 'bank', 'mobile', 'email', 'alipayjs'); if ($code && in_array($code, $arrAllowAuth)) { $code or $code = $keys['0']; $code or kekezu::show_msg($_lang['param_error'], "index.php?do=auth", 3, '', 'warning'); $auth_class = "keke_auth_" . $code . "_class"; $objAuth = new $auth_class($code); $auth_item = $arrAllAuthItems[$code];
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(11); $page_obj = $kekezu->_page_obj; $table_class = new keke_table_class('witkey_space'); $member_class = new keke_table_class('witkey_member'); $url_str = "index.php?do={$do}&view={$view}&space[username]={$space['username']}&space[email]={$space['email']}&space[uid]={$space['uid']}&slt_page_size={$slt_page_size}&ord[0]={$ord['0']}&ord[1]={$ord['1']}&slt_static={$slt_static}"; $grouplist_arr = keke_admin_class::get_user_group(); switch ($op) { case "del": $del_uid = keke_user_class::user_delete($edituid); kekezu::admin_system_log(kekezu::lang('delete_member}') . $memberinfo_arr['username']); $del_uid and kekezu::admin_show_msg($_lang['operate_success'], "index.php?do=user&view=list", 3, '', 'success') or kekezu::admin_show_msg($_lang['operate_fail'], "index.php?do=user&view=list", 3, '', 'warning'); break; case "disable": $sql = sprintf("update %switkey_space set status=2 where uid =%d", TABLEPRE, $edituid); db_factory::execute($sql); $v_arr = array($_lang['username'] => $memberinfo_arr['username'], $_lang['website_name'] => $kekezu->_sys_config['website_name']); keke_shop_class::notify_user($memberinfo_arr['uid'], $memberinfo_arr['username'], 'freeze', $_lang['user_freeze'], $v_arr, 2); kekezu::admin_system_log($_lang['unfreeze_member'] . $memberinfo_arr['username']); kekezu::admin_show_msg($_lang['operate_success'], "index.php?do=user&view=list", 3, '', 'success'); break; case "able": kekezu::admin_check_role(24); $sql = sprintf("update %switkey_space set status=1 where uid =%d", TABLEPRE, $edituid); db_factory::execute($sql); $v_arr = array($_lang['username'] => $memberinfo_arr['username'], $_lang['website_name'] => $kekezu->_sys_config['website_name']); keke_msg_class::notify_user($memberinfo_arr['uid'], $memberinfo_arr['username'], 'unfreeze', $_lang['user_unfreeze'], $v_arr, 2); kekezu::admin_system_log($_lang['unfreeze_member'] . $memberinfo_arr['username']); kekezu::admin_show_msg($_lang['operate_success'], "index.php?do=user&view=list", 3, '', 'success');
$arrUserInfo = kekezu::get_user_info($arrBindInfo['uid']); $loginUserInfo = $objLogin->oauth_user_login($arrUserInfo['username'], $arrUserInfo['password'], null, 1); $objLogin->save_user_info($loginUserInfo, 1); } $objReg = new keke_register_class(); $arrApiNames = keke_glob_class::get_open_api(); if (isset($formhash) && kekezu::submitcheck($formhash)) { 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) { $tips['errors']['account'] = $strNameCheck; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } if (intval($agree) == 0) { $tips['errors']['agree'] = '请先同意注册协议'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } if (!$arrBindInfo) { $intRegUid = $objReg->user_register($account, $password, $email, $code, false, $password); $arrUserInfo = keke_user_class::get_user_info($intRegUid); UserCenter::bindingAccount($arrUserInfo['uid'], $arrUserInfo['username'], $arrOauthInfo); $_SESSION[$type . '_oauthInfo'] = null; $objReg->register_login($arrUserInfo); } }
if ($timeDesc) { echo $timeDesc; ?> 前<?php } else { ?> 刚刚<?php } ?> </span> <a href="<?php echo $v['feed_username']['url']; ?> "> <?php echo keke_user_class::get_user_pic($v['uid'], 'small'); echo $v['username']; ?> </a> </p> <p class="record-list-post"> <a href="<?php echo $v['event']['url']; ?> " title="<?php echo $v['event']['content']; ?> "><span class="money"><?php if ($v['event']['cash']) { ?> <sub>¥</sub><?php
kekezu::admin_system_log($_lang['delete_apply_forwithdraw'] . $order_id); kekezu::admin_show_msg($_lang['message_about_delete'], $url, 3, '', 'success'); break; } } elseif (isset($ckb)) { $ids = implode(',', $ckb); if (count($ids)) { $recharge_obj->setWhere(" order_id in ({$ids}) and order_status = 'wait' "); $nodraw_arr = $recharge_obj->query_keke_witkey_order_charge(); $del_ids = array(); switch ($sbt_action) { case $_lang['mulit_delete']: foreach ($nodraw_arr as $k => $v) { $del_ids[$k] = $v[order_id]; $message_obj = new keke_msg_class(); $user_info = keke_user_class::get_user_info($v[uid]); $v = array($_lang['recharge_single_num'] => $v['order_id'], $_lang['recharge_cash'] => $v[pay_money]); $message_obj->send_message($user_info['uid'], $user_info['username'], 'recharge_fail', $_lang['recharge_fail'], $v, $user_info[email], $user_info['mobile']); } $del_ids = implode(",", $del_ids); if ($del_ids) { $recharge_obj->setWhere(" order_id in ({$del_ids})"); $res = $recharge_obj->del_keke_witkey_order_charge(); kekezu::admin_system_log($_lang['delete_recharge_order'] . $del_ids); } break; } kekezu::admin_show_msg($_lang['mulit_operate_success'], $url, 3, '', 'success'); } else { kekezu::admin_show_msg($_lang['please_select_an_item_to_operate'], 'index.php?do=' . $do . '&view=' . $view, 3, '', 'warning'); }
<?php defined('IN_KEKE') or exit('Access Denied'); $uid and header("location:index.php"); $strPageTitle = '重置密码' . '- ' . $_K['html_title']; $authstatus = false; $validInfo = keke_user_class::getPwdAuth($authsid, $encrypteuid); if ($_SESSION['retrieve']['validinfo']['http_agent'] == $_SERVER['HTTP_USER_AGENT'] && is_array($validInfo) && $validInfo && $authsid == $_SESSION['retrieve']['validinfo']['authsid']) { $authstatus = true; } $validInfo['userinfo'] = kekezu::get_user_info($validInfo['get_uid']); if (kekezu::submitcheck($formhash)) { $newpwd = trim($newpwd); $newpwd2 = trim($newpwd2); if ($newpwd != $newpwd2) { $tips['errors']['newpwd'] = '您输入的密码与确认密码不一致'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } $user_code = md5($newpwd); $sql1 = sprintf("update %switkey_member set password = '******' where uid=%d", TABLEPRE, $user_code, $validInfo['userinfo']['uid']); db_factory::execute($sql1); $sql2 = sprintf("update %switkey_space set password = '******' where uid=%d", TABLEPRE, $user_code, $validInfo['userinfo']['uid']); db_factory::execute($sql2); keke_user_class::user_edit($validInfo['userinfo']['username'], '', $newpwd, '', 1); keke_user_class::updateGetPwdStatusByGetUid($validInfo['userinfo']['uid'], 1); unset($_SESSION['retrieve']); unset($_SESSION); kekezu::show_msg('密码修改成功', "index.php?do=login", NULL, NULL, 'ok'); }
<?php $refer = parse_url($_SERVER['HTTP_REFERER']); $refer_do = array('do' => null); isset($refer['query']) and parse_str($refer['query'], $refer_do); !$refer_do['do'] && ($do = 'logout') and $refer_do['do'] = 'logout'; $_SESSION['uid'] = ''; $_SESSION['username'] = ''; $_SESSION['auid'] = ""; unset($uid); unset($_SESSION); if (isset($_COOKIE['user_login'])) { setcookie('user_login', ''); } if (isset($_COOKIE['prom'])) { setcookie('prom', ''); } $synhtml = keke_user_class::user_synlogout(); unset($_COOKIE); unset($_COOKIE['username']); session_destroy(); in_array($refer_do['do'], array('user', 'pubtask', 'pubgoods', 'logout', 'register')) and $jump = 'index.php?do=login' or $jump = $_SERVER['HTTP_REFERER']; setcookie('keke_auto_login', '', time() - 1); echo $synhtml; echo '<script type="text/javascript">location.href="' . $jump . '"</script>'; die;
?> </li> <li> <?php echo $_lang['suggest_hide_notice']; ?> </li> </ul> </div> </div>--> <div class="box user_quick clearfix"> <div class="detail pad10"> <ul> <li class="avatar"> <a href="#" title="admin"><?php echo keke_user_class::get_user_pic($admin_info['uid'], 'small'); ?> </a> </li> <li class="name"> <span><?php echo $_lang['good_morning']; ?> </span>,<?php echo $_lang['public_admin_uid']; ?> <b><?php echo $admin_info['username']; ?> </b> <span class="clock"> - <?php
} else { $strPageDescription = kekezu::cutstr(htmlspecialchars_decode(stripslashes($arrTaskInfo['task_desc'])), 100); } } } $arrCashCoves = TaskClass::getTaskCashCove(); $arrBreadcrumbs = array(1 => array('url' => 'index.php?do=tasklist', 'name' => '任务大厅'), 2 => array('url' => 'index.php?do=tasklist&pd=' . $arrTaskInfo['indus_pid'], 'name' => $indus_p_arr[$arrTaskInfo['indus_pid']]['indus_name']), 3 => array('url' => 'index.php?do=tasklist&pd=' . $arrTaskInfo['indus_pid'] . '&i=' . $arrTaskInfo['indus_id'], 'name' => $indus_arr[$arrTaskInfo['indus_id']]['indus_name'])); $arrWorkFlag = array(1 => array('id' => 2, 'style' => 'fa-trophy', 'name' => '一等奖'), 2 => array('id' => 2, 'style' => 'fa-trophy', 'name' => '二等奖'), 3 => array('id' => 2, 'style' => 'fa-trophy', 'name' => '三等奖'), 4 => array('id' => 4, 'style' => 'fa-check-circle', 'name' => '中标'), 5 => array('id' => 5, 'style' => 'fa-dot-circle-o', 'name' => '入围'), 6 => array('id' => 6, 'style' => 'fa-check-circle', 'name' => '合格'), 7 => array('id' => 7, 'style' => 'fa-times-circle', 'name' => '淘汰'), 8 => array('id' => 8, 'style' => 'fa-times-circle', 'name' => '不可选标'), 9 => array('id' => 9, 'style' => 'fa-times-circle', 'name' => '放弃')); $strUrl = "index.php?do=task&id=" . $intId; $arrView = array('work', 'comment', 'mark'); if (!in_array($view, $arrView)) { $view = 'work'; } $intDeals = TaskClass::getWikiDealbyUid($arrTaskInfo['uid']); $arrWorkService = TaskClass::getWorkServers($intId, $arrTaskInfo['model_id']); $arrUserInfo = keke_user_class::get_user_info($arrTaskInfo['uid']); $strMarkQuerySQl = " SELECT COUNT(mark_id) FROM `" . TABLEPRE . "witkey_mark` "; $strMarkQuerySQl .= " WHERE origin_id = '" . $arrTaskInfo['task_id'] . "' "; $strMarkQuerySQl .= " AND mark_status > 0 AND model_code = '" . $arrModelInfo['model_dir'] . "'"; $arrTaskInfo['mark_num'] = db_factory::get_count($strMarkQuerySQl); $arrPayitemLists = PayitemClass::getPayitemListDetail('task', $arrTaskInfo['task_id']); $arrPayitemListAlls = PayitemClass::getPayitemListForPub('task'); $arrOrderInfo = array(); $sql = "SELECT a.*,b.order_status FROM `" . TABLEPRE . "witkey_order_detail` a LEFT JOIN `" . TABLEPRE . "witkey_order` b ON a.order_id= b.order_id WHERE a.obj_type = 'task' and a.obj_id = " . $arrTaskInfo['task_id']; $arrOrderInfo = db_factory::get_one($sql); if ($arrOrderInfo['order_status'] == 'ok') { $boolIsHosting = true; } else { $boolIsHosting = false; } $arrSimpleTasks = db_factory::query("select * from " . TABLEPRE . "witkey_task where indus_pid=" . $arrTaskInfo['indus_pid'] . " and task_id!=" . $arrTaskInfo['task_id'] . " and task_status not in(0,1,10) order by start_time desc limit 10");
/*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); } }
function init_user() { if ($_SESSION['uid']) { $this->_uid = $_SESSION['uid']; $this->_username = $_SESSION['username']; $userinfo = keke_user_class::get_user_info($this->_uid); if (!$userinfo['last_login_time']) { db_factory::execute(' update ' . TABLEPRE . 'witkey_space set last_login_time=' . time() . ' where uid=' . $this->_uid); $userinfo['last_login_time'] = time(); } $userinfo['last_login_time'] = $_SESSION['last_login_time'] ? $_SESSION['last_login_time'] : time(); $this->_userinfo = $userinfo; $this->_user_group = $this->_userinfo['group_id']; $user_obj = new keke_user_class(); $user_type = $user_obj->get_user_type($this->_uid); $this->_user_type = $user_type['user_type']; //用户身份类型 } elseif ($_COOKIE['keke_auto_login']) { $loginInfo = unserialize($_COOKIE['keke_auto_login']); $pwdInfo = explode('|', base64_decode($loginInfo[2])); $uInfo = kekezu::get_table_data('*', 'witkey_space', " username='******'2']}' and password = '******'1']}'", '', ''); if ($uInfo[0]['uid'] == $pwdInfo[0]) { $_SESSION['uid'] = $uInfo[0]['uid']; $_SESSION['username'] = $uInfo[0]['username']; $this->_uid = $_SESSION['uid']; $this->_username = $uInfo[0]['username']; } } }
unset($floatPlanAmount); if ($resText === true) { kekezu::show_msg('报价成功', 'index.php?do=task&id=' . $taskId, 3, NULL, 'ok'); } else { kekezu::show_msg($resText, 'index.php?do=task&id=' . $taskId, 3, NULL, 'fail'); } } else { require keke_tpl_class::template('task/' . $arrModelInfo['model_code'] . '/tpl/default/quote'); } die; break; case "consign": if (isset($formhash) && kekezu::submitcheck($formhash)) { $resText = $objTask->hosted_amount(); $sec_code = kekezu::escape(trim($zfpwd)); $strMd5Pwd = keke_user_class::get_password($sec_code, $gUserInfo['rand_code']); $arrUserInfo = db_factory::get_one(sprintf("select * from %switkey_space where uid=%d and sec_code='%s'", TABLEPRE, intval($gUid), $strMd5Pwd)); if (!$arrUserInfo) { $tip['errors']['zfpwd'] = '密码不正确!'; kekezu::show_msg($tip, NULL, NULL, NULL, 'error'); } if ($resText === true) { kekezu::show_msg('托管成功', 'index.php?do=task&id=' . $taskId, 3, NULL, 'ok'); } else { kekezu::show_msg($resText, NULL, NULL, NULL, 'fail'); } } else { $arrBidInfo = $objTask->_bid_info; $cash = $arrBidInfo['quote'] - $arrTaskInfo['real_cash']; $floatBalance = floatval($user_info['balance']); if ($floatBalance > $cash) {
public static function add_report($obj, $obj_id, $to_uid, $desc, $report_type, $front_status = null, $origin_id = null, $user_type = null, $file_name = NULL, $reason = NULL, $is_hide = 1) { global $uid, $username, $kekezu, $_lang; kekezu::check_login(); $resText = self::check_if_report($report_type, $obj, $obj_id, $uid, $to_uid); if ($resText !== true) { return $resText; } $transname = self::get_transrights_name($report_type); if (CHARSET == 'gbk') { $desc = kekezu::utftogbk($desc); $reason = kekezu::utftogbk($reason); } $to_uid and $arrUserInfo = keke_user_class::get_user_info($to_uid); $report_obj = new Keke_witkey_report_class(); $report_obj->setObj($obj); $report_obj->setObj_id($obj_id); $report_obj->setUid($uid); $report_obj->setUsername($username); $report_obj->setUser_type($user_type); $report_obj->setOn_time(time()); $report_obj->setOrigin_id($origin_id); $report_obj->setTo_uid($to_uid); $report_obj->setTo_username($arrUserInfo['username']); $report_obj->setReport_desc($desc); $report_obj->setReport_type($report_type); $report_obj->setFront_status($front_status); $report_obj->setReport_file($file_name); $report_obj->setReport_status(1); $report_obj->setIs_hide($is_hide); $report_obj->setReport_reason($reason); $report_id = $report_obj->create_keke_witkey_report(); if ($report_type == '1') { self::process_freeze($report_id, $report_type, '1', $to_uid, $obj, $obj_id, $origin_id, $desc); } if ($report_id) { switch ($obj) { case 'task': $task_info = self::get_task_info($obj_id); $model_info = $kekezu->_model_list[$task_info['model_id']]; $result = array('用户名' => $task_info['username'], '模型名称' => $model_info['model_name'], '类型' => '任务', '标题' => '<a href="index.php?do=task&id=' . $task_info['task_id'] . '">' . $task_info['task_title'] . '</a>', $_lang['website_name'] => $kekezu->_sys_config['website_name']); break; case 'product': $service_info = self::get_service_info($obj_id); $model_info = $kekezu->_model_list[$service_info['model_id']]; $result = array('用户名' => $task_info['username'], '模型名称' => $model_info['model_name'], '类型' => '商品(服务)', '标题' => '<a href="index.php?do=task&id=' . $service_info['task_id'] . '">' . $service_info['task_title'] . '</a>', $_lang['website_name'] => $kekezu->_sys_config['website_name']); break; } $result and keke_msg_class::notify_user($to_uid, $to_username, 'report_notice', '举报通知', $result, 1); return true; } else { return $transname . $_lang['submit_fail']; } }
} } $floatGoodMark = CommonClass::getGoodsMark(intval($intId)); if ($uid != $arrServiceInfo['uid'] && $arrServiceInfo['service_status'] != 2 && $arrServiceInfo['service_status'] != 5) { $gUid == ADMIN_UID or kekezu::show_msg('操作提示', "index.php?do=goodslist", '1', '商品不存在', 'warning'); } if (isset($op)) { switch ($op) { case "report": $transname = keke_report_class::get_transrights_name($type); $report_reason = keke_report_class::get_report_product_reason(); if (isset($formhash) && kekezu::submitcheck($formhash)) { $resCheck = keke_report_class::check_if_report($type, $objType, $objId, $uid, $toUid); if ($resCheck === true) { $tarContent = kekezu::escape($tarContent); $toUserInfo = keke_user_class::get_user_info($toUid); $resText = keke_shop_class::set_report($objId, $toUid, $type, $filepath, $tarContent, $sltReason); if ($resText === true) { kekezu::show_msg('感谢您的举报,管理员会尽快受理,请耐心等待处理结果。', 'index.php?do=goods&id=' . $id, 3, NULL, 'ok'); } else { kekezu::show_msg($resText, null, null, NULL, 'fail'); } } else { kekezu::show_msg($resCheck, null, null, NULL, 'fail'); } } else { $strUrl .= '&op=report'; require keke_tpl_class::template("tpl/default/ajax/report"); die; } break;
$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) { $tips['errors']['account'] = $strNameCheck; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } $strCodeCheck = kekezu::check_secode($code); if ($strCodeCheck != 1) { $tips['errors']['code'] = $strCodeCheck; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } if (intval($agree) == 0) { $tips['errors']['agree'] = '请先同意注册协议'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } //增加$user_type, $intRegUid = $objReg->user_register(kekezu::escape($account), $password, $email, $code, 1, $password, $reg_user_type, $reg_user_type_xf); $arrUserInfo = keke_user_class::get_user_info($intRegUid); $objReg->register_login($arrUserInfo); } if (isset($check_username) && !empty($check_username)) { $res = keke_user_class::check_username($check_username); echo $res; die; } $_SESSION['spread'] = 'index.php?do=register';
$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='******' where oauth_id='" . $arrBindInfo['oauth_id'] . "' and uid=" . intval($arrBindInfo['uid'])); db_factory::execute("update " . TABLEPRE . "witkey_space set username='******',password='******',email='" . $email . "' where uid=" . intval($arrBindInfo['uid'])); db_factory::execute("update " . TABLEPRE . "witkey_member set username='******',password='******',email='" . $email . "' where uid=" . intval($arrBindInfo['uid'])); db_factory::execute("update " . TABLEPRE . "witkey_shop set username='******',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); } }
function check_email($reg_email) { global $_lang; $check_res = keke_user_class::user_checkemail($reg_email); if ($check_res == 1) { return true; } else { if ($check_res == -4) { return $_lang['email_format_error']; } else { if ($check_res == -5) { return $_lang['email_not_allow_register']; } else { if ($check_res == -6) { return $_lang['email_not_allow_register']; } } } } }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); $intTaskId = intval($task_id); $intModelId = intval($model_id); $arrTaskInfo = db_factory::get_one("select * from " . TABLEPRE . "witkey_task where task_id=" . $intTaskId); $arrWorkInfo = db_factory::get_one("select * from " . TABLEPRE . "witkey_task_work where task_id=" . $intTaskId . " and work_status=4"); if ($arrTaskInfo['task_status'] != 13) { kekezu::admin_show_msg($_lang['param_error'], 'index.php?do=model&model_id=' . $intModelId . '&view=list', 3, '', 'warning'); } $floatCash = $arrTaskInfo['task_cash'] * (1 - $arrTaskInfo['task_fail_rate'] / 100); $arrGinfo = keke_user_class::get_user_info($arrTaskInfo['uid']); $arrWinfo = keke_user_class::get_user_info($arrWorkInfo['uid']); if ($intSbtEdit == 1) { $floaTotalCash = floatval($floatCash); $floatGzGet = floatval(keke_curren_class::convert($op_result['gz_get'], 0, true)); $floatWkGet = floatval(keke_curren_class::convert($op_result['wk_get'], 0, true)); if ($floaTotalCash != $floatGzGet + $floatWkGet) { kekezu::admin_show_msg($_lang['wain_you_give_cash_error_notice'], "index.php?do=model&model_id={$model_id}&view=list", "3", "", "warning"); } else { $res = keke_finance_class::cash_in($arrGinfo['uid'], $floatGzGet, 'task_fail'); $res .= keke_finance_class::cash_in($arrWinfo['uid'], $floatWkGet, 'task_fail'); if ($res) { db_factory::execute("update " . TABLEPRE . "witkey_task set task_status=9 where task_id=" . $intTaskId); kekezu::admin_show_msg('处理成功', "index.php?do=model&model_id={$model_id}&view=list", "3", "", "success"); } else { kekezu::admin_show_msg('处理失败', "index.php?do=model&model_id={$model_id}&view=list", "3", "", "warning"); } } } require keke_tpl_class::template('task/' . $model_info['model_dir'] . '/admin/tpl/task_' . $view);
defined('IN_KEKE') or exit('Access Denied'); $strUrl = 'index.php?do=user&view=account&op=password'; if (isset($formhash) && kekezu::submitcheck($formhash)) { $old_pass = kekezu::escape(trim($old_password)); $new_pass = kekezu::escape(trim($new_password)); $confirm_pass = kekezu::escape(trim($confirm_password)); if (md5($old_pass) != $gUserInfo['password']) { $title['errors']['old_password'] = '******'; kekezu::show_msg($title, NULL, NULL, NULL, 'error'); } if ($old_pass === $new_pass) { $title['errors']['new_password'] = '******'; kekezu::show_msg($title, NULL, NULL, NULL, 'error'); } if ($new_pass != $confirm_pass) { $title['errors']['confirm_password'] = '******'; kekezu::show_msg($title, NULL, NULL, NULL, 'error'); } $intRes1 = db_factory::updatetable(TABLEPRE . 'witkey_space', array('password' => md5($new_pass)), array('uid' => $gUid)); $intRes2 = db_factory::updatetable(TABLEPRE . 'witkey_member', array('password' => md5($new_pass)), array('uid' => $gUid)); $flag = keke_user_class::user_edit($gUserInfo['username'], $old_pass, $new_pass, '', 0) > 0 ? 1 : 0; if ($flag && $intRes1 === 1 && $intRes2 === 1) { kekezu::admin_system_log($_SESSION['username'] . '于' . date("Y-m-d H:i:s") . '修改了密码'); keke_msg_class::notify_user($gUserInfo['uid'], $gUserInfo['username'], 'update_password', '修改密码', array('新密码' => $new_pass, '网站名称' => $kekezu->_sys_config['website_name'], '用户名' => $gUserInfo['username']), 2); setcookie('rememberme', ''); unset($_SESSION, $_SESSION['uid'], $_SESSION['username']); unset($_COOKIE['rememberme']); session_destroy(); kekezu::show_msg('新密码已生效', 'index.php?do=login', NULL, NULL, 'ok'); } }
public function admin_login($username, $password, $allow_times, $formhash = '') { global $_lang; global $kekezu; if (!kekezu::submitcheck($formhash, true)) { $hash = kekezu::formhash(); $kekezu->echojson($_lang['repeat_form_submit'], 6, array('formhash' => $hash)); die; } $user_info = keke_user_class::user_login($username, $password); $hash = kekezu::formhash(); if ($user_info == -1) { $kekezu->echojson($_lang['username_input_error'], "6", array('formhash' => $hash)); die; } else { if ($user_info == -2) { $kekezu->echojson($_lang['username_password_input_error'], "5", array('formhash' => $hash)); die; } } if (!$user_info) { $kekezu->echojson($_lang['login_fail'], "4", array('formhash' => $hash)); die; } else { $user_info = kekezu::get_user_info($user_info['uid']); } if (!$user_info) { $kekezu->echojson($_lang['no_rights_login_backstage'], "3", array('formhash' => $hash)); die; } else { if (!$user_info['group_id'] && $user_info['uid'] != ADMIN_UID) { $kekezu->echojson($_lang['no_rights_login_backstage'], "2", array('formhash' => $hash)); die; } else { $_SESSION['auid'] = $_SESSION['uid'] = $user_info['uid']; $_SESSION['username'] = $user_info['username']; kekezu::admin_system_log($user_info['username'] . date('Y-m-d H:i:s', time()) . $_lang['login_system']); $kekezu->echojson($_lang['login_success'], "1"); die; } } }