public function authFail($auth_info, $user_get_cash) { global $user_info, $kekezu, $_lang; $uid = $user_info['uid']; $username = $user_info['username']; $intBankAid = $auth_info[$this->_primary_key]; $ac_url = "index.php?do=user&view=account&op=auth&code=" . $this->_auth_code . "&intBankAid=" . $intBankAid . "#userCenter"; $this->set_auth_status($intBankAid, '2'); $this->set_auth_record_status($uid, '2'); $v_arr = array($_lang['auth_code'] => $this->auth_lang(), $_lang['auth_url'] => $ac_url); keke_msg_class::notify_user($uid, $username, 'auth_fail', $this->auth_lang() . $_lang['fail'], $v_arr, 2); }
public function process_report($op_result, $type) { global $_lang; $trans_name = $this->get_transrights_name($this->_report_type); $op_result['result'] = $op_result['process_result']; $op_result = $this->op_result_format($op_result); if ($op_result['action']) { switch ($op_result['task']) { case 1: $res = $this->_task_obj->dispose_task_return(); $this->_task_obj->set_task_status(9); $v_arr = array($_lang['username'] => $this->_task_obj->_gusername, $_lang['model_name'] => $this->_task_obj->_model_name, $_lang['task_id'] => $this->_task_obj->_task_id, $_lang['task_title'] => $this->_task_obj->_task_title, 'reason' => $_lang['trust_cash_timeout'], 'explain' => $_lang['trust_cash_timeout_and_return'] . $res['return_cash'] . $_lang['yuan'] . CREDIT_NAME . ":" . $res['return_credit']); keke_msg_class::notify_user($this->_task_obj->_guid, $this->_task_obj->_gusername, 'task_fail', $_lang['task_fail_notice'], $v_arr, 1); $this->process_notify('pass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['result']); $res = $this->change_status($this->_report_id, '4', $op_result, $op_result['result']); break; case 2: kekezu::admin_show_msg('操作提示', "index.php?do=trans&view=report&type={$type}", "3", "该任务不能进行此操作"); break; case 3: $this->process_notify('nopass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['result'], $op_result['reply']); $res = $this->change_status($this->_report_id, '3', $op_result, $op_result, $op_result['result']); break; case 4: $res = $this->shield_work($this->_obj_info['obj_id']); $this->_task_obj->set_task_status(2); $this->process_notify('pass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['result']); $res = $this->change_status($this->_report_id, '4', $op_result, $op_result['result']); break; case 5: $this->cancel_bid($this->_obj_info['obj_id']); $this->_task_obj->set_task_status(2); $this->process_notify('pass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['result']); $res = $this->change_status($this->_report_id, '4', $op_result, $op_result['result']); break; case 6: $this->disablePeople(); $this->process_notify('pass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['process_result']); $res = $this->change_status($this->_report_id, '4', $op_result, $op_result['process_result']); $res and kekezu::admin_show_msg($trans_name . $_lang['deal_success'], "index.php?do=trans&view=rights&type={$type}", "3", '', 'success') or kekezu::admin_show_msg($trans_name . $_lang['deal_fail'], "index.php?do=trans&view=process&type={$type}&report_id=" . $this->_report_id, "3", '', 'warning'); } if ($res) { kekezu::admin_show_msg($trans_name . $_lang['deal_success'], "index.php?do=trans&view=report&type={$type}", "3", "", "success"); } else { kekezu::admin_show_msg($trans_name . $_lang['deal_fail'], "index.php?do=trans&view=process&type={$type}&report_id=" . $this->_report_id, "3", "", "warning"); } } }
function task_xbtime_out() { global $_lang; $sql = sprintf("select * from %switkey_task where model_id = 4 and task_status=3 and " . time() . ">end_time", TABLEPRE); $task_arr = db_factory::query($sql); foreach ($task_arr as $k => $v) { $count = $this->get_task_work($v['task_id'], 4); if ($count) { $v_arr = array($_lang['username'] => $v['username'], $_lang['model_name'] => $_lang['ptzb'], $_lang['task_id'] => $v['task_id'], $_lang['task_title'] => $v['task_title']); keke_msg_class::notify_user($v['uid'], $v['username'], 'task_over', $_lang['tender_notice'], $v_arr, 1); $this->set_task_status($v['task_id'], 5); } else { $this->set_task_status($v['task_id'], 9); $task_obj = new dtender_task_class($v); $v_arr = array($_lang['username'] => $v['username'], $_lang['model_name'] => $_lang['ptzb'], $_lang['task_id'] => $v['task_id'], $_lang['task_title'] => $v['task_title'], $_lang['reason'] => $_lang['choose_tender_no_choose_fail'], 'explain' => ''); keke_msg_class::notify_user($v['uid'], $v['username'], 'task_fail', $_lang['tender_fail'], $v_arr, 1); } } }
public static function changehongbao($task_id, $moneys, $uid, $money, $title, $g) { $result = db_factory::get_one('select * from ' . TABLEPRE . 'witkey_space where uid=' . $uid); if ($g) { $newbalance = $result['balance'] - $money + $moneys; db_factory::query('update ' . TABLEPRE . 'witkey_space set balance=' . $newbalance . ' where uid=' . $uid); keke_finance_class::insert_trust("in", "task_xg", $uid, -$money + $moneys, $newbalance); } else { $newbalance = $result['balance'] + $money; keke_finance_class::insert_trust("in", "finish_task", $uid, $money, $newbalance, $task_id); db_factory::query('update ' . TABLEPRE . 'witkey_space set balance=' . $newbalance . ' where uid=' . $uid); db_factory::query('update ' . TABLEPRE . 'witkey_space set is_hongbao=1 where uid=' . $uid); db_factory::query('update ' . TABLEPRE . 'witkey_task_work set work_status=4 where uid=' . $uid . ' and task_id=' . $task_id); } if (!$g) { $v_arr = array("红包任务" => '【' . $title . '】', "红包金额" => $money); keke_msg_class::notify_user($uid, $result['username'], 'select', '红包任务完成通知', $v_arr); } return true; }
public function audit_auth($active_code, $email_a_id) { global $_K, $kekezu, $_lang; $user_info = $kekezu->_userinfo; if (md5($user_info['uid'] . $user_info['username'] . $user_info['email']) == $active_code) { $arrAuthInfo = $this->get_auth_info($email_a_id); if (empty($arrAuthInfo[0])) { return false; } $this->set_auth_status($arrAuthInfo[0][$this->_primary_key], '1'); $this->set_auth_record_status($arrAuthInfo[0]['uid'], '1'); $objProm = keke_prom_class::get_instance(); $objProm->dispose_prom_event('reg', $user_info['uid'], $user_info['uid']); $feed_arr = array("feed_username" => array("content" => $user_info[username], "url" => "index.php?do=seller&id={$user_info['uid']}"), "action" => array("content" => $_lang['have_passed'], "url" => ""), "event" => array("content" => $this->auth_lang(), "url" => "")); kekezu::save_feed($feed_arr, $user_info['uid'], $user_info['username'], 'email_auth'); $v_arr = array($_lang['auth_code'] => $this->auth_lang(), $_lang['auth_url'] => $_K['siteurl'] . '/index.php?do=user&view=account&op=auth&code=email&ver=1#userCenter'); keke_msg_class::notify_user($user_info['uid'], $user_info['username'], 'auth_success', $this->auth_lang() . $_lang['success'], $v_arr, 2); return true; } return false; }
public function alipayjs_success_notify($detail_arr, $status = true) { global $_lang, $_K; $ids = implode(",", array_keys($detail_arr)); $info = kekezu::get_table_data("withdraw_id,uid,username,withdraw_status,withdraw_cash,pay_username,pay_account", "witkey_withdraw", " withdraw_id in ({$ids})", "", "", "", "withdraw_id"); foreach ($detail_arr as $k => $v) { if ($info[$k]['withdraw_status'] == 1) { switch ($v['status']) { case "S": $fee = $info[$k]['withdraw_cash'] - keke_finance_class::get_to_cash($info[$k]['withdraw_cash']); $res = db_factory::execute(sprintf(" update %switkey_withdraw set withdraw_status='2',fee=%.2f where withdraw_id ='%d'", TABLEPRE, $fee, $k)); $arr = array($_lang['sitename'] => $_K['sitename'], $_lang['tx_cash'] => $v['fee']); keke_msg_class::notify_user($info[$k]['uid'], $info[$k]['username'], 'draw_success', $_lang['tx_success'], $arr, 2); break; case "F": $res = db_factory::execute(sprintf(" update %switkey_withdraw set withdraw_status='3' where withdraw_id ='%d'", TABLEPRE, $k)); $v_arr = array('网站名称' => $_K['sitename'], '提现方式' => $pay_way[$withdraw_info[0]['pay_type']], '失败原因' => '未注明原因', '帐户' => $withdraw_info[0]['pay_account'], '提现金额' => $v['withdraw_cash']); keke_msg_class::notify_user($info[$k]['uid'], $info[$k]['username'], 'withdraw_fail', $_lang['tx_fail'], $v_arr, 2); break; } } } }
$objMsgM->setTo_username($v['username']); $objMsgM->setTitle(kekezu::str_filter(kekezu::escape("任务结束"))); $objMsgM->setContent(kekezu::str_filter(kekezu::escape($content))); $objMsgM->setOn_time(time()); $objMsgM->create_keke_witkey_msg(); } } db_factory::execute("update " . TABLEPRE . "witkey_task set task_status=9 where task_id=" . intval($task_id)); $v_arr = array("模型名称" => $model_info['model_name'], "任务标题" => '<a href="' . $kekezu->_sys_config['website_url'] . '/index.php?do=task&id=' . $task_audit_arr['task_id'] . '">' . $task_audit_arr['task_title'] . '</a>', "理由" => kekezu::str_filter(kekezu::escape($content))); keke_msg_class::notify_user($task_audit_arr['uid'], $task_audit_arr['username'], 'task_end_manually', '任务结束通知', $v_arr); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['operate_success'], 'success'); break; case "pass": $res = keke_task_config::task_audit_pass($task_id); $v_arr = array($_lang['username'] => $task_audit_arr['username'], $_lang['task_link'] => $url, $_lang['start_time'] => $start_time, $_lang['end_time'] => $end_time, $_lang['task_id'] => "#" . $task_id); keke_msg_class::notify_user($task_audit_arr['uid'], $task_audit_arr['username'], 'task_auth_success', $_lang['task_auth_success'], $v_arr, 1); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['audit_success'], 'success'); break; case "nopass": if ($is_submit == "1") { $res = keke_task_config::task_audit_nopass($task_id); $v_arr = array($_lang['username'] => "{$task_audit_arr['username']}", $_lang['task_title'] => $url, $_lang['web_name'] => "{$kekezu->_sys_config}['website_name']", "审核原因" => $reason); keke_shop_class::notify_user($task_audit_arr['uid'], $task_audit_arr['username'], 'task_auth_fail', $_lang['task_auth_fail'], $v_arr, 1); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['operate_success'], 'success'); } else { $strUsername = sreward_task_class::getUsername($_GET['uid']); $strTittle = sreward_task_class::getTitle($task_id); require keke_tpl_class::template('task/sreward/admin/tpl/admin_user_check'); die; } break;
public function notify_user($task_id, $task_status = '2') { global $_K; global $_lang; $task_obj = $this->_task_obj; $model_code = $this->_model_info['model_code']; $status_arr = call_user_func(array($model_code . "_task_class", 'get_task_status')); $url = '<a href="' . $_K['siteurl'] . '/index.php?do=task&id=' . $task_id . '" target="_blank">' . $task_obj->getTask_title() . '</a>'; $v = array($_lang['task_title'] => $task_obj->getTask_title(), $_lang['task_id'] => $task_id, $_lang['task_link'] => $url, $_lang['task_status'] => $status_arr[$task_status], $_lang['start_time'] => date('Y-m-d H:i:s', $task_obj->getStart_time()), $_lang['hand_work_timeout'] => date('Y-m-d H:i:s', $task_obj->getSub_time()), $_lang['choose_timeout'] => date('Y-m-d H:i:s', $task_obj->getEnd_time())); keke_msg_class::notify_user($this->_uid, $this->_username, "task_pub", $_lang['pub_task_notice'], $v, 1); }
public function reportAutoChoose() { global $kekezu; global $_lang; $arrPrizeDate = $this->get_prize_date(); $arrBidWork = kekezu::get_table_data('count(work_id) as num,work_status', 'witkey_task_work', 'work_status in (1,2,3) and task_id =' . $this->_task_id, '', 'work_status', '', 'work_status', ''); $intChoosePrize1 = intval($arrPrizeDate['count']['prize_1'] - $arrBidWork[1]['num']); $intChoosePrize2 = intval($arrPrizeDate['count']['prize_2'] - $arrBidWork[2]['num']); $intChoosePrize3 = intval($arrPrizeDate['count']['prize_3'] - $arrBidWork[3]['num']); $intPrizeAll = $intChoosePrize1 + $intChoosePrize2 + $intChoosePrize3; switch ($this->_task_config['end_action']) { case "split": $split_style = $this->_task_config['auto_choose_rule']; if (in_array($split_style, array('work_time', 'take_num', 'seller_credit'))) { switch ($split_style) { case "work_time": $order_field = "a.work_time asc"; break; case "take_num": $order_field = "c.take_num desc"; break; case "seller_credit": $order_field = "c.seller_credit desc"; break; } $sql = "select a.* from %switkey_task_work a\n\t\t\t\t\t\t\t\t\tleft join %switkey_space c on a.uid=c.uid\n\t\t\t\t\t\t\t\twhere a.task_id='%d' and a.work_status='0' order by %s,a.work_time asc limit 0,%d"; $work_bid_arr = db_factory::query(sprintf($sql, TABLEPRE, TABLEPRE, $this->_task_id, $order_field, $intPrizeAll)); if ($work_bid_arr) { foreach ($work_bid_arr as $k => $v) { if ($k < $intChoosePrize1) { $this->set_work_status($v['work_id'], 1); $to_status = 1; $prize_cash = $arrPrizeDate['cash']['1']; } elseif ($k < $intChoosePrize1 + $intChoosePrize2) { $this->set_work_status($v['work_id'], 2); $to_status = 2; $prize_cash = $arrPrizeDate['cash']['2']; } elseif ($k < $intPrizeAll) { $this->set_work_status($v['work_id'], 3); $to_status = 3; $prize_cash = $arrPrizeDate['cash']['3']; } $status_desc_arr = array("1" => $_lang['work_get_prize1'], "2" => $_lang['work_get_prize2'], "3" => $_lang['work_get_prize3']); $v_arr = array($_lang['username'] => $v['username'], $_lang['model_name'] => $this->_model_name, $_lang['task_id'] => $this->_task_id, $_lang['task_title'] => $this->_task_title, $_lang['work_title'] => $v['work_title'], $_lang['bid_cash'] => $prize_cash); keke_msg_class::notify_user($v['uid'], $v['username'], 'task_bid', $status_desc_arr[$to_status], $v_arr, 1); } } $this->auto_task_return(); $this->set_task_status(8); } elseif ($split_style == 'master_choose') { $this->set_task_status(7); } break; case "refund": $this->auto_task_return(); $this->set_task_status(8); $v_arr = array($_lang['username'] => $this->_gusername, $_lang['model_name'] => $this->_model_name, $_lang['task_id'] => $this->_task_id, $_lang['task_title'] => $this->_task_title, $_lang['reason'] => $_lang['for_no_operate_and_task_fail']); keke_msg_class::notify_user($this->_guid, $this->_gusername, 'task_fail', $_lang['task_fail'], $v_arr, 1); break; } }
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), 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 review_auth($auth_ids, $type = 'pass', $url = null) { global $_lang; global $kekezu; if ($url === null) { $url = $_SERVER['HTTP_REFERER']; } $prom_obj = keke_prom_class::get_instance(); is_array($auth_ids) and $auth_ids = implode(",", $auth_ids); $auth_info = $this->get_auth_info($auth_ids); $size = sizeof($auth_info); $size > 0 && $type == 'pass' and $status = '1' or $status = '2'; $size == 0 and kekezu::admin_show_msg($this->auth_lang() . $_lang['apply_not_exist_audit_fail'], $_SERVER['HTTP_REFERER']); if ($size == 1 && $auth_info[0]['auth_status'] != '1') { $this->set_auth_status($auth_info[0][$this->_primary_key], $status); $this->set_auth_record_status($auth_info[0]['uid'], $status); $this->_auth_code == 'realname' && $status == 1 and $this->extract_birth($auth_info[0]['uid'], $auth_info[0]['id_card']); } elseif ($size > 1) { foreach ($auth_info as $v) { if ($v['auth_status'] != '1') { $this->set_auth_record_status($v['uid'], $status); $this->set_auth_status($v[$this->_primary_key], $status); $this->_auth_code == 'realname' && $status == 1 and $this->extract_birth($v['uid'], $v['id_card']); } } } switch ($type) { case "pass": kekezu::admin_system_log($this->auth_lang() . $_lang['apply_pass'] . "{$auth_ids}"); foreach ($auth_info as $v) { if ($this->_auth_code == 'enterprise') { $this->set_user_role($auth_info[0][uid], $type); } elseif ($this->_auth_code == 'realname') { $this->set_user_role($auth_info[0][uid], $type); } $feed_arr = array("feed_username" => array("content" => $v[username], "url" => "index.php?do=seller&id={$v['uid']}"), "action" => array("content" => $_lang['has_pass'], "url" => ""), "event" => array("content" => $this->auth_lang(), "url" => "")); kekezu::save_feed($feed_arr, $v['uid'], $v['username'], $this->_auth_name); $prom_obj->dispose_prom_event('reg', $v['uid'], $v['uid']); $auth_arr = keke_glob_class::get_finance_action(); $arr[$_lang['auth_code']] = $auth_arr[$this->_auth_name]; $arr[$_lang['auth_url']] = "index.php?do=user&view=payitem&op=auth&auth_code={$this->_auth_code}"; keke_msg_class::notify_user($v['uid'], $v['username'], 'auth_success', $auth_arr[$this->_auth_name] . $_lang['through'], $arr, 2); } $url = 'HTTP://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?do=auth&view=list&code={$this->_auth_code}"; kekezu::admin_show_msg($this->auth_lang() . $_lang['apply_audit_success'], $url, 3, '', 'success'); break; case "not_pass": kekezu::admin_system_log($this->auth_lang() . $_lang['apply_not_pass'] . "{$auth_ids}"); kekezu::admin_show_msg($this->auth_lang() . $_lang['apply_audit_not_pass'], $url, 3, '', 'success'); break; } }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); $alipayjs_obj = new Keke_witkey_auth_alipayjs_class(); $pay_tool_arr = array(1 => $_lang['alipay'], 2 => $_lang['tenpay'], 3 => $_lang['payment_online']); $alipayjs_name_arr = keke_glob_class::get_bank(); if ($sbt_pay_to_user) { $alipayjs_obj->setWhere('alipayjs_a_id=' . $fds['alipayjs_a_id']); $alipayjs_obj->setPay_to_user_cash($fds['pay_to_user_cash']); $alipayjs_obj->setPay_time(time()); $res = $alipayjs_obj->edit_keke_witkey_auth_alipayjs(); $alipayjs_info = db_factory::get_one(sprintf(" select uid,username from %switkey_auth_alipayjs where alipayjs_a_id = '%d'", TABLEPRE, $fds[alipayjs_a_id])); $v_arr = array($_lang['username'] => $alipayjs_info['username']); keke_msg_class::notify_user($alipayjs_info['uid'], $alipayjs_info['username'], 'alipayjs_auth', "支付宝认证通知", $v_arr, 2); $res and kekezu::admin_show_msg($_lang['give_cach_success'], $_SERVER['HTTP_REFERER'], '3', '', 'success'); } else { $alipayjs_a_id and $alipayjs_info = db_factory::get_one(sprintf(" select * from %switkey_auth_alipayjs where alipayjs_a_id = '%d'", TABLEPRE, $alipayjs_a_id)); } require $template_obj->template('auth/' . $auth_dir . '/admin/tpl/auth_info');
case "add": if ($is_submit) { die('1'); $m_info = db_factory::get_one(" select uid,username,group_id from " . TABLEPRE . "witkey_space where uid = '{$fds['uid']}'"); !$m_info and kekezu::admin_show_msg($_lang['user_no_exit'], $url, 3, '', 'warning'); if ($m_info) { if ($m_info[group_id] == 7) { kekezu::admin_show_msg($_lang['no_operate_again_for_user_is_kf_'], $url, 3, '', 'warning'); } else { $space_obj->setUid($fds[uid]); $space_obj->setGroup_id(7); $res = $space_obj->edit_keke_witkey_space(); if ($res) { kekezu::admin_system_log($_lang['add_new_kf'] . $m_info[username]); $v_arr = array('管理员名' => $admin_info['username'], '用户名' => $spaceinfo['username']); keke_msg_class::notify_user($fds['uid'], $m_info['username'], 'kf_set', '客服设置', $v_arr, 2); kekezu::admin_show_msg($_lang['add_kf_successfully'], $url, 3, '', 'success'); } } } } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_user_custom_add'); die; break; case "del": $del_info = kekezu::get_user_info($delid); $delid or kekezu::admin_show_msg($_lang['param_error'], $url, 3, '', 'warning'); $res = db_factory::execute(sprintf("update %switkey_space set group_id = 0 where uid = '%d' ", TABLEPRE, $delid)); kekezu::admin_system_log($_lang['delete_kf'] . $del_info[username]); $res and kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['delete_success'], 'success') or kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['delete_fail'], 'warning'); break;
$fds['budget'] and $task_obj->setBudget($fds['budget']); $task_obj->setTask_desc($task_desc); $fields = kekezu::escape($fields); $task_obj->setSeo_title($fields['seo_title']); $task_obj->setSeo_keyword($fields['seo_keyword']); $task_obj->setSeo_desc($fields['seo_desc']); if ($_FILES['fle_task_pic']['name']) { $task_pic = keke_file_class::upload_file("fle_task_pic"); } else { $task_pic = $task_pic_path; } $task_obj->setTask_pic($task_pic); kekezu::admin_system_log($_lang['edit_task'] . ":{$task_title}"); $res = $task_obj->edit_keke_witkey_task(); $v_arr = array($_lang['admin_name'] => $myinfo_arr['username'], $_lang['time'] => date('Y-m-d H:i:s', time()), $_lang['model_name'] => $model_info['model_name'], $_lang['task_id'] => $task_info['task_id'], $_lang['task_title'] => $task_info['task_title']); keke_msg_class::notify_user($task_info['uid'], $task_info['username'], 'task_edit', $_lang['edit_task'], $v_arr, 1); } elseif ($sbt_act) { switch ($sbt_act) { case "freeze": $res = keke_task_config::task_freeze($task_id); break; case "unfreeze": $res = keke_task_config::task_unfreeze($task_id); break; case "pass": $res = keke_task_config::task_audit_pass(array($task_id)); break; case "nopass": $res = keke_task_config::task_audit_nopass($task_id); break; }
case "add": if ($is_submit) { die('1'); $m_info = db_factory::get_one(" select uid,username,group_id from " . TABLEPRE . "witkey_space where uid = '{$fds['uid']}'"); !$m_info and kekezu::admin_show_msg($_lang['user_no_exit'], $url, 3, '', 'warning'); if ($m_info) { if ($m_info[group_id] == 7) { kekezu::admin_show_msg($_lang['no_operate_again_for_user_is_kf_'], $url, 3, '', 'warning'); } else { $space_obj->setUid($fds[uid]); $space_obj->setGroup_id(7); $res = $space_obj->edit_keke_witkey_space(); if ($res) { kekezu::admin_system_log($_lang['add_new_kf'] . $m_info[username]); $v_arr = array($_lang['admin_name'] => $admin_info['username'], $_lang['account'] => $spaceinfo['username']); keke_msg_class::notify_user($fds['uid'], $m_info['username'], 'kf_set', $_lang['user_group_set'], $v_arr, 2); kekezu::admin_show_msg($_lang['add_kf_successfully'], $url, 3, '', 'success'); } } } } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_user_custom_add'); die; break; case "del": $del_info = kekezu::get_user_info($delid); $delid or kekezu::admin_show_msg($_lang['param_error'], $url, 3, '', 'warning'); $res = db_factory::execute(sprintf("update %switkey_space set group_id = 0 where uid = '%d' ", TABLEPRE, $delid)); kekezu::admin_system_log($_lang['delete_kf'] . $del_info[username]); $res and kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['delete_success'], 'success') or kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['delete_fail'], 'warning'); break;
public function task_tg_timeout() { global $_K; global $_lang; if ($this->_task_status == 4 && !intval($this->_task_info['single_cash']) && $this->_task_info['sp_end_time'] < time()) { $res = $this->dispose_task_return(); $this->set_task_status('9'); $v_arr = array($_lang['username'] => $this->_gusername, $_lang['model_name'] => $this->_model_name, $_lang['task_id'] => $this->_task_id, $_lang['task_title'] => $this->_task_title, '理由' => $_lang['trust_cash_timeout'], 'explain' => $_lang['trust_cash_timeout_and_return'] . $res['return_cash'] . $_lang['yuan']); keke_msg_class::notify_user($this->_guid, $this->_gusername, 'task_fail', $_lang['task_fail_notice'], $v_arr, 1); } }
public function task_jg_timeout() { global $_K, $kekezu; global $_lang; $prom_obj = $this->_prom_obj; if ($this->_task_status == '2') { if (time() > intval($this->_task_info['sub_time'])) { $task_url = "<a href=\"{$_K['siteurl']}/index.php?do=task&id={$this->_task_id}\">{$this->_task_title}</a>"; if (intval($this->_task_info['work_num']) > 0) { if ($this->set_task_status(3)) { $arr = array($_lang['username'] => $this->_gusername, $_lang["model_name"] => $this->_model_name, $_lang["task_id"] => $this->_task_id, $_lang["task_title"] => $this->_task_title, $_lang["tb"] => $_lang['hand_work'], "next" => $_lang['choose_work']); keke_msg_class::notify_user($this->_guid, $this->_gusername, 'timeout', '任务选稿', $arr, 1); } } else { if ($this->set_task_status(9)) { $refund = $this->dispose_task_return('task_fail'); $objProm = keke_prom_class::get_instance(); $p_event = $objProm->get_prom_event($this->_task_id, $this->_guid, "pub_task"); $objProm->set_prom_event_status($p_event['parent_uid'], $this->_gusername, $p_event['event_id'], '3'); $refund['refund_cash'] || $refund['refund_credit'] and $send_str = $_lang['sys_haved_return']; $refund['refund_cash'] and $send_str .= $_lang['task_cach_'] . $refund['refund_cash'] . $_lang['yuan']; $refund['refund_credit'] and $send_str .= $_lang['task_credit_'] . $refund['refund_credit']; } } } } }
keke_msg_class::notify_user($uid, $username, 'withdraw_fail', $_lang['fail_and_check_you_account'], $v_arr); } } $withdraw_obj->setWithdraw_status(3); $res = $withdraw_obj->edit_keke_witkey_withdraw(); kekezu::admin_system_log($_lang['delete_audit_withdraw'] . $ids); break; case $_lang['mulit_review']: $withdraw_obj->setWhere(' withdraw_id in (' . $ids . ') '); $withdraw_arr = $withdraw_obj->query_keke_witkey_withdraw(); foreach ($withdraw_arr as $k => $v) { if ($v[withdraw_status] == 1) { $fee = $v['withdraw_cash'] - keke_finance_class::get_to_cash($v['withdraw_cash']); db_factory::execute(sprintf(' update %switkey_withdraw set fee=%.2f where withdraw_id=%d', TABLEPRE, $fee, $v['withdraw_id'])); $v_arr = array('网站名称' => $_K['sitename'], '提现方式' => $pay_way[$v['pay_type']], '帐户' => $v['pay_account'], '提现金额' => $v['withdraw_cash']); keke_msg_class::notify_user($v['uid'], $v['username'], 'draw_success', $_lang['withdraw_success'], $v_arr); $feed_arr = array("feed_username" => array("content" => $v['username'], "url" => "index.php?do=seller&id=" . $space_info['uid']), "action" => array("content" => $_lang['withdraw'], "url" => ""), "event" => array("content" => $_lang['withdraw_le'] . $v['withdraw_cash'] . $_lang['yuan'], "url" => "")); kekezu::save_feed($feed_arr, $user_space_info['uid'], $user_space_info['username'], 'withdraw'); $withdraw_obj = new Keke_witkey_withdraw_class(); $withdraw_obj->setWhere(' withdraw_id in (' . $ids . ') '); $withdraw_obj->setWithdraw_status(2); $withdraw_obj->setProcess_uid($admin_info['uid']); $withdraw_obj->setProcess_username($admin_info['username']); $withdraw_obj->setProcess_time(time()); $withdraw_obj->edit_keke_witkey_withdraw(); } } kekezu::admin_system_log($_lang['audit_withdraw_apply'] . $ids); break; } kekezu::admin_show_msg($_lang['mulit_operate_success'], 'index.php?do=' . $do . '&view=' . $view, 3, '', 'success');
$start_time = date("Y-m-d H:i:s", $task_audit_arr['start_time']); $end_time = date("Y-m-d H:i:s", $task_audit_arr['end_time']); $url = "<a href =\"{$_K['siteurl']}/index.php?do=task&id={$task_audit_arr['task_id']}\" target=\"_blank\" >" . $task_audit_arr['task_title'] . "</a>"; } switch ($ac) { case "del": $res = keke_task_config::task_del($task_id); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['delete_success'], 'success'); break; case "pass": $res = keke_task_config::task_audit_pass($task_id); $arr = array(); $arr['用户名'] = $task_audit_arr['username']; $arr['网站名称'] = $kekezu->_sys_config['website_name']; $arr['任务编号'] = "#" . $task_id; keke_msg_class::notify_user($task_audit_arr['uid'], $task_audit_arr['username'], 'task_auth_success', '审核通过', $arr); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['audit_success'], 'success'); break; case "nopass": $res = keke_task_config::task_audit_nopass($task_id); keke_msg_class::send_private_message('审核不通过', '你发布的任务审核未通过', $task_audit_arr['uid'], $task_audit_arr['username']); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['operate_success'], 'success'); break; case "freeze": $res = keke_task_config::task_freeze($task_id); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['freeze_task_success'], 'success'); break; case "unfreeze": $res = keke_task_config::task_unfreeze($task_id); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['unfreeze_task_success'], 'success'); break;
public static function task_unfreeze($task_ids) { global $admin_info; global $_lang, $_K; if ($task_ids && is_array($task_ids)) { $ids = implode(',', $task_ids); $sql = sprintf("select task_id,task_title,task_status,end_time,sub_time,uid from %switkey_task where task_status=7 and task_id in(%s)", TABLEPRE, $ids); $task_arr = db_factory::query($sql); foreach ($task_arr as $v) { $sqlf = sprintf("select task_id,frost_status,frost_time from %switkey_task_frost", TABLEPRE, $v['task_id']); $frost_info = db_factory::get_one($sqlf); $end_time = time() - $frost_info['frost_time'] + $v[end_time]; $sub_time = time() - $frost_info['frost_time'] + $v[sub_time]; $sql2 = sprintf("update %switkey_task set task_status = %d,end_time='%s',sub_time='%s' where task_id = '%d'", TABLEPRE, $frost_info['frost_status'], $end_time, $sub_time, $v['task_id']); db_factory::execute($sql2); db_factory::execute(sprintf("delete from %switkey_task_frost where task_id = '%d'", TABLEPRE, $frost_info['task_id'])); kekezu::admin_system_log($_lang['unfreeze_task'] . ":{$v['task_title']}"); $arr = array($_lang['username'] => $v['username'], $_lang['task_id'] => $v['task_id'], $_lang['task_title'] => $v['task_title'], $_lang['reson'] => $_lang['admin_unfrize'], $_lang['sitename'] => $v['task_title'], $_lang['sitename'] => $_K['sitename']); keke_msg_class::notify_user($v['uid'], $v['username'], 'task_unfrize', $_lang['task_unfrize'], $arr, 1); } } elseif (task_ids) { $sql = sprintf("select task_id,task_title,task_status,end_time,sub_time,uid from %switkey_task where task_status=7 and task_id ='%d'", TABLEPRE, $task_ids); $task_info = db_factory::get_one($sql); $sqlf = sprintf("select task_id,frost_status,frost_time from %switkey_task_frost", TABLEPRE, $task_info['task_id']); $frost_info = db_factory::get_one($sqlf); $end_time = time() - $frost_info['frost_time'] + $task_info[end_time]; $sub_time = time() - $frost_info['frost_time'] + $task_info[sub_time]; $sql2 = sprintf("update %switkey_task set task_status = %d,end_time='%s',sub_time='%s' where task_id = '%d'", TABLEPRE, $frost_info['frost_status'], $end_time, $sub_time, $task_info['task_id']); db_factory::execute($sql2); db_factory::execute(sprintf("delete from %switkey_task_frost where task_id = '%d'", TABLEPRE, $frost_info['task_id'])); kekezu::admin_system_log($_lang['unfreeze_task'] . ":{$task_info['task_title']}"); $arr = array($_lang['username'] => $task_info['username'], $_lang['task_id'] => $task_info['task_id'], $_lang['task_title'] => $task_info['task_title'], $_lang['reson'] => $_lang['admin_unfrize'], $_lang['sitename'] => $task_info['task_title'], $_lang['sitename'] => $_K['sitename']); keke_msg_class::notify_user($task_info['uid'], $task_info['username'], 'task_unfrize', $_lang['task_unfrize'], $arr, 1); } return true; }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); $bank_obj = new Keke_witkey_auth_bank_class(); $pay_tool_arr = array(1 => $_lang['alipay'], 2 => $_lang['tenpay'], 3 => $_lang['payment_online']); $bank_name_arr = keke_glob_class::get_bank(); if ($sbt_pay_to_user) { $bank_obj->setWhere('bank_a_id=' . $fds['bank_a_id']); $bank_obj->setPay_to_user_cash($fds['pay_to_user_cash']); $bank_obj->setPay_time(time()); $res = $bank_obj->edit_keke_witkey_auth_bank(); $bank_info = db_factory::get_one(sprintf(" select uid,username from %switkey_auth_bank where bank_a_id = '%d'", TABLEPRE, $fds[bank_a_id])); $v_arr = array($_lang['username'] => $bank_info['username']); keke_msg_class::notify_user($bank_info['uid'], $bank_info['username'], 'bank_auth', $_lang['bank_auth_notice'], $v_arr, 2); $res and kekezu::admin_show_msg($_lang['give_cach_success'], $_SERVER['HTTP_REFERER'], '3', '', 'success'); } else { $bank_a_id and $bank_info = db_factory::get_one(sprintf(" select a.*,b.bank_full_name from %switkey_auth_bank a left join %switkey_member_bank b\n\t\t\t on a.bank_id=b.bank_id\n\t\t\twhere a.bank_a_id = '%d'", TABLEPRE, TABLEPRE, $bank_a_id)); } require $template_obj->template('auth/' . $auth_dir . '/admin/tpl/auth_info');
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']; } }
$config = unserialize($model_info[config]); $task_info = get_task_info($task_id); $work_info = db_factory::get_one("select * from " . TABLEPRE . "witkey_task_bid where task_id='" . intval($task_id) . "' and bid_status=4"); if ($work_info) { $objMsgM = new Keke_witkey_msg_class(); $objMsgM->setTo_uid($work_info['uid']); $objMsgM->setTo_username($work_info['username']); $objMsgM->setTitle(kekezu::str_filter(kekezu::escape("任务结束"))); $objMsgM->setContent(kekezu::str_filter(kekezu::escape($content))); $objMsgM->setOn_time(time()); $objMsgM->create_keke_witkey_msg(); db_factory::execute("update " . TABLEPRE . "witkey_task_bid set bid_status=0 where task_id='" . intval($task_id) . "' and bid_status=4"); } db_factory::execute("update " . TABLEPRE . "witkey_task set task_status=9 where task_id=" . intval($task_id)); $v_arr = array("模型名称" => $model_info['model_name'], "任务标题" => '<a href="' . $kekezu->_sys_config['website_url'] . '/index.php?do=task&id=' . $task_audit_arr['task_id'] . '">' . $task_audit_arr['task_title'] . '</a>', "理由" => kekezu::str_filter(kekezu::escape($content))); keke_msg_class::notify_user($task_audit_arr['uid'], $task_audit_arr['username'], 'task_end_manually', '任务结束通知', $v_arr); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['operate_success'], 'success'); break; case "pass": $res = keke_task_config::task_audit_pass($task_id); $v_arr = array($_lang['username'] => "{$task_audit_arr['username']}", $_lang['task_link'] => $url, $_lang['start_time'] => $start_time, $_lang['end_time'] => $end_time, $_lang['task_id'] => "#" . $task_id); keke_shop_class::notify_user($task_audit_arr['uid'], $task_audit_arr['username'], 'task_auth_success', $_lang['task_auth_success'], $v_arr); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['audit_success'], 'success'); break; case "nopass": if ($is_submit == "1") { $res = keke_task_config::task_audit_nopass($task_id); $v_arr = array($_lang['username'] => "{$task_audit_arr['username']}", $_lang['task_title'] => $url, $_lang['web_name'] => "{$kekezu->_sys_config}['website_name']", "审核原因" => $reason); keke_shop_class::notify_user($task_audit_arr['uid'], $task_audit_arr['username'], 'task_auth_fail', $_lang['task_auth_fail'], $v_arr); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['operate_success'], 'success'); } else {
function set_prom_event_status($p_uid, $username, $event_id, $status) { global $_lang; $prom_info = db_factory::get_one("select * from " . TABLEPRE . "witkey_prom_event where event_id = " . intval($event_id)); if ($prom_info) { $P_info = kekezu::get_user_info($p_uid); $arr[$_lang['txyhm']] = $username; $arr[$_lang['tx_sj']] = $prom_info['event_desc']; $arr[$_lang['tx_je']] = $prom_info['rake_cash']; $res = db_factory::updatetable(TABLEPRE . 'witkey_prom_event', array('event_status' => intval($status)), array('event_id' => intval($event_id))); if ($res) { if ($status == 2) { $title = $_lang['prom_msg_notice']; $content = $_lang['you_prom_offline'] . $username . $_lang['complete_event_get_money_notice']; } $title && $content and keke_msg_class::notify_user($p_uid, $P_info['username'], 'prom_succes', $_lang['prom_success'], $arr, 2); } } }
} $sql = sprintf("update %switkey_space set status=2 where uid in (%s)", TABLEPRE, $ids); db_factory::execute($sql); foreach ($space_arr as $v) { $v_arr = array($_lang['username'] => $v['username'], $_lang['website_name'] => $kekezu->_sys_config['website_name']); keke_shop_class::notify_user($v['uid'], $v['username'], 'freeze', $_lang['user_freeze'], $v_arr, 2); } kekezu::admin_system_log($_lang['freeze_user'] . "{$ids}"); kekezu::admin_show_msg($_lang['operate_success'], 'index.php?do=user&view=list', 3, $_lang['mulit_disable'], 'success'); break; case $_lang['mulit_use']: $sql = sprintf("update %switkey_space set status=1 where uid in (%s)", TABLEPRE, $ids); db_factory::execute($sql); foreach ($space_arr as $v) { $v_arr = array($_lang['username'] => $v['username'], $_lang['website_name'] => $kekezu->_sys_config['website_name']); keke_msg_class::notify_user($v['uid'], $v['username'], 'unfreeze', $_lang['user_unfreeze'], $v_arr, 2); } kekezu::admin_show_msg($_lang['operate_success'], 'index.php?do=user&view=list', 3, $_lang['mulit_open_operate_success'], 'success'); break; } } else { $where_str = " 1=1 "; $page or $page = 1; $slt_page_size = intval($slt_page_size) ? intval($slt_page_size) : 10; $space['uid'] and $where_str .= "and uid='{$space['uid']}' "; $space['username'] and $where_str .= "and username like '%{$space['username']}%' "; $space['email'] and $where_str .= "and email='{$space['email']}' "; $space['mobile'] and $where_str .= "and mobile='{$space['mobile']}' "; $slt_static == 1 and $where_str .= "and status=1 "; $slt_static == 2 and $where_str .= "and status=2 "; $slt_static == 3 and $where_str .= "and status=3 ";
public function auto_choose() { global $_K, $kekezu; global $_lang; switch ($this->_task_config['end_action']) { case "refund": $this->dispose_task_return(); break; case "split": $bid_uid = array(); $task_info = $this->_task_info; $split_num = intval($this->_task_config['witkey_num']); if ($split_num) { $single_cash = $task_info['task_cash'] / $split_num; $prom_obj = $objProm = keke_prom_class::get_instance(); $site_profit = $single_cash * $this->_profit_rate / 100; $cash = $single_cash - $site_profit; $split_style = $this->_task_config['auto_choose_rule']; if (in_array($split_style, array('work_time', 'take_num', 'seller_credit'))) { switch ($split_style) { case "work_time": $order_field = "a.work_time asc"; break; case "take_num": $order_field = "c.take_num desc"; break; case "seller_credit": $order_field = "c.seller_credit desc"; break; } $sql = "select a.*,b.oauth_id from %switkey_task_work a left join %switkey_member_oauth b on a.uid=b.uid\n\t\t\t\t\t\t\t\t\tleft join %switkey_space c on a.uid=c.uid\n\t\t\t\t\t\t\t\twhere a.task_id='%d' and a.work_status='0' order by %s,a.work_time asc limit 0,%d"; $work_list = db_factory::query(sprintf($sql, TABLEPRE, TABLEPRE, TABLEPRE, $this->_task_id, $order_field, $split_num)); $key = array_keys($work_list); $count = sizeof($key); for ($i = 0; $i < $count; $i++) { $data = array(':task_id' => $this->_task_id, ':task_title' => $this->_task_title); keke_finance_class::init_mem('task_bid', $data); keke_finance_class::cash_in($work_list[$i]['uid'], $cash, 'task_bid', '', 'task', $this->_task_id, $site_profit); $this->set_work_status($work_list[$i]['work_id'], 4); if ($prom_obj->is_meet_requirement("bid_task", $this->_task_id)) { $prom_obj->create_prom_event("bid_task", $work_list[$i]['uid'], $this->_task_id, $single_cash); $prom_obj->dispose_prom_event("bid_task", $work_list[$i]['uid'], $work_list[$i]['work_id']); } $url = '<a href ="' . $_K['siteurl'] . '/index.php?do=task&id=' . $this->_task_id . '">' . $this->_task_title . '</a>'; $v = array($_lang['task_id'] => $this->_task_id, $_lang['task_title'] => $url); $this->notify_user("auto_choose", $_lang['task_auto_choose_bid'], $v, 1, $work_list[$i]['uid']); keke_user_mark_class::create_mark_log($this->_model_code, '1', $work_list[$i]['uid'], $this->_guid, $work_list[$i]['work_id'], $single_cash, $this->_task_id, $work_list[$i]['username'], $this->_gusername); keke_user_mark_class::create_mark_log($this->_model_code, '2', $this->_guid, $work_list[$i]['uid'], $work_list[$i]['work_id'], $cash, $this->_task_id, $this->_gusername, $work_list[$i]['username']); $feed_arr = array("feed_username" => array("content" => $work_list[$i]['uid'], "url" => "index.php?do=seller&id={$work_list[$i]['uid']}"), "action" => array("content" => $_lang['success_bid_haved'], "url" => ""), "event" => array("content" => $this->_task_title, "url" => "index.php?do=task&id={$this->_task_id}", 'cash' => $cash)); kekezu::save_feed($feed_arr, $work_list[$i]['uid'], $work_list[$i]['username'], 'work_accept', $this->_task_id); $this->plus_accepted_num($work_list[$i]['uid']); $this->plus_mark_num(); $bid_uid[] = $work_list[$i]['uid']; } if ($split_num > $count) { $remain_cash = $task_info['task_cash'] - $count * $single_cash; $res = $this->dispose_auto_return($remain_cash); if ($res) { $v = array($_lang['task_id'] => $this->_task_id, $_lang['task_title'] => $url); $this->notify_user("auto_choose", $_lang['task_auto_choose_work_and_return'], $v, 2, $this->_guid); } } $this->set_task_status(8); $prom_obj->dispose_prom_event("pub_task", $this->_guid, $this->_task_id); } elseif ($split_style == 'master_choose') { $this->set_task_status(7); } } else { $this->dispose_task_return(); } break; } $url = '<a href ="' . $_K['siteurl'] . '/index.php?do=task&id=' . $this->_task_id . '">' . $this->_task_title . '</a>'; $v_arr = array($_lang['username'] => '$this->_gusername', $_lang['model_name'] => $this->_model_name, $_lang['task_id'] => $this->_task_id, $_lang['task_title'] => $url); keke_msg_class::notify_user($this->_guid, $this->_gusername, 'auto_choose', $_lang['aito_choose_work_notice'], $v_arr, 1); }
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; }
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'); } }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(33); $space_obj = new Keke_witkey_space_class(); $member_group_arr = db_factory::query(sprintf("select group_id,groupname from %switkey_member_group", TABLEPRE), 1, 3600); $edituid = intval($edituid); $edituid and $spaceinfo = kekezu::get_user_info(intval($edituid)); if ($is_submit) { if (intval($fds['uid']) === 1) { kekezu::admin_show_msg('当前用户ID为管理员,禁止设置,请重新输入', "index.php?do={$do}&view=custom_list", 2, '', 'warning'); die; } $space_obj = keke_table_class::get_instance("witkey_space"); $space_obj->save($fds, array('uid' => $fds['uid'])); kekezu::admin_system_log($_lang['set_user'] . " {$spaceinfo['username']}" . $_lang['of_group']); $v_arr = array($_lang['admin_name'] => $admin_info['username']); keke_msg_class::notify_user($spaceinfo['uid'], $spaceinfo['username'], 'group_set', $_lang['user_group_set'], $v_arr, 2); kekezu::admin_show_msg($_lang['rights_set_success'], "index.php?do={$do}&view=custom_list", 2, '', 'success'); } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_user_custom_add');