コード例 #1
0
 public function task_agreement_freeze()
 {
     global $model_list, $_K, $_lang;
     $config = unserialize($model_list[1]['config']);
     $sql = " select a.agree_id,a.agree_status,a.seller_status,a.buyer_status,a.seller_uid,a.buyer_uid,a.task_id,a.on_time,b.task_title from %switkey_agreement a left join %switkey_task b on a.task_id=b.task_id where\n\t\t\t\ta.model_id=1  and b.task_status=6 and a.on_time<'%d'";
     $agree_list = db_factory::query(sprintf($sql, TABLEPRE, TABLEPRE, time() - intval($config['agree_complete_time']) * 24 * 3600));
     if (!empty($agree_list)) {
         $msg_obj = new keke_msg_class();
         foreach ($agree_list as $k => $v) {
             $ginfo = kekezu::get_user_info($v['seller_uid']);
             $winfo = kekezu::get_user_info($v['buyer_uid']);
             db_factory::execute(sprintf(" update %switkey_task set task_status=13 where task_id='%d'", TABLEPRE, $v['task_id']));
             db_factory::execute(sprintf(" update %switkey_agreement set agree_status=5 where agree_id='%d'", TABLEPRE, $v['agree_id']));
             $url = "<a href=\"" . $_K['siteurl'] . '/index.php?do=task&id=' . $v['task_id'] . "\">" . $v['task_title'] . "</a>";
             $v1 = array('动作' => $_lang['agree_g_ac'], '原因' => '由于超时未完成交付已被系统冻结,请尽快联系客服,由客服介入处理', '任务标题' => $url);
             $v2 = array('动作' => $_lang['agree_w_ac'], '原因' => '由于超时未完成交付已被系统冻结,请尽快联系客服,由客服介入处理', '任务标题' => $url);
             $msg_obj->send_message($ginfo['uid'], $ginfo['username'], "task_freeze", '协议交付超时冻结通知', $v1, $ginfo['email'], $ginfo['mobile']);
             $msg_obj->send_message($winfo['uid'], $winfo['username'], "task_freeze", '协议交付超时冻结通知', $v2, $winfo['email'], $winfo['mobile']);
         }
     }
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 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");
         }
     }
 }
コード例 #5
0
 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);
         }
     }
 }
コード例 #6
0
ファイル: CommonClass.php プロジェクト: pengfeiaaa/web
 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;
 }
コード例 #7
0
 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;
 }
コード例 #8
0
 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;
             }
         }
     }
 }
コード例 #9
0
 public function notify_user($service_id, $service_status = '2')
 {
     global $_K;
     global $_lang;
     $service_obj = $this->_service_obj;
     $model_code = $this->_model_info['model_code'];
     switch ($model_code) {
         case "goods":
             $status_arr = goods_shop_class::get_goods_status();
             break;
         case "service":
             $status_arr = service_shop_class::get_service_status();
             break;
     }
     $message_obj = new keke_msg_class();
     $url = "<a href=\"" . $_K['siteurl'] . "/index.php?do=goods&id=" . $service_id . "\">" . $service_obj->getTitle() . "</a>";
     $v = array($_lang['service_type'] => $this->_model_info['model_name'], $_lang['goods_link'] => $url, $_lang['goods_status'] => $status_arr[$service_status], $_lang['pub_time'] => date('Y-m-d H:i:s', $service_obj->getOn_time()));
     $message_obj->send_message($this->_uid, $this->_username, "service_pub", $this->_model_info['model_name'] . $_lang['release_tips'], $v, $this->_user_info['email'], $this->_user_info['mobile']);
 }
コード例 #10
0
 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'];
     }
 }
コード例 #11
0
 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;
 }
コード例 #12
0
 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;
     }
 }
コード例 #13
0
ファイル: auth_info.php プロジェクト: huangbinzd/kppwGit
<?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');
コード例 #14
0
 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;
     }
 }
コード例 #15
0
ファイル: task_edit.php プロジェクト: huangbinzd/kppwGit
     $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;
     }
コード例 #16
0
 public static function sendNoticeToSeller($order_info, $statusText)
 {
     global $uid, $username, $_K, $kekezu, $_lang;
     $order_url = "<a href=\"" . $_K['siteurl'] . "/index.php?do=gy&id=" . $order_info['seller_uid'] . "&orderId=" . $order_info['order_id'] . "\">" . $order_info['order_name'] . "</a>";
     $v_arr = array('用户名' => $order_info['seller_username'], '用户' => $order_info['order_username'], '状态变更' => $statusText, '订单编号' => $order_url, '网站名称' => $kekezu->_sys_config['website_name']);
     $msg_obj = new keke_msg_class();
     $msg_obj->send_message($order_info['seller_uid'], $order_info['seller_username'], 'gy_notice_to_seller', '雇佣状态消息', $v_arr);
 }
コード例 #17
0
ファイル: keke_msg_class.php プロジェクト: huangbinzd/kppwGit
 public static function notify_user($uid, $username, $action, $title, $v_arr = array(), $type = null)
 {
     $msg_obj = new keke_msg_class();
     $contact = self::get_contact($uid);
     if (!$username) {
         $username = $contact['username'];
     }
     $msg_obj->send_message($uid, $username, $action, $title, $v_arr, $contact['email'], $contact['mobile'], $type);
 }
コード例 #18
0
 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);
 }
コード例 #19
0
 function process_rights($op_result, $type)
 {
     global $kekezu, $_K, $_lang;
     $prom_obj = $objProm = keke_prom_class::get_instance();
     $trans_name = $this->get_transrights_name($this->_report_type);
     $op_result = $this->op_result_format($op_result);
     $g_info = $this->user_role('gz');
     $w_info = $this->user_role('wk');
     $match_task = $this->_match_task;
     $match_work = $this->_match_work;
     switch ($op_result['action']) {
         case "pass":
             if ($this->_process_can['sharing']) {
                 $hire = $op_result['hire_deposit'];
                 $wiki = $op_result['wiki_deposit'];
                 $host = $op_result['host_amount'];
                 switch ($hire) {
                     case 1:
                         $g_noti = $_lang['deposit_cash_all_refund'];
                         $res = keke_finance_class::cash_in($g_info['uid'], $match_task['deposit_cash'], 'deposit_return', '', 'task', $match_task['task_id']);
                         break;
                     case 2:
                         $g_noti = $_lang['deposit_cash_part_defund'];
                         $rate = $match_task['deposit_rate'];
                         $cash = floatval($match_task['deposit_cash'] - $rate);
                         $profit = $rate;
                         $res = keke_finance_class::cash_in($g_info['uid'], $cash, 'deposit_return', '', 'task', $match_task['task_id'], $profit);
                         break;
                     case 3:
                         $g_noti = $_lang['deposit_cash_all_deduct'];
                         $res = db_factory::execute(sprintf(" update %switkey_finance set site_profit='%.2f' where obj_id='%d' and fina_type='out' and fina_action='pub_task'", TABLEPRE, $match_task['hirer_deposit'], $match_task['task_id']));
                         break;
                 }
                 switch ($wiki) {
                     case 1:
                         $w_noti = $_lang['deposit_cash_all_refund'];
                         $res = keke_finance_class::cash_in($w_info['uid'], $match_work['deposit_cash'], 'deposit_return', '', 'task', $match_task['task_id']);
                         break;
                     case 2:
                         $w_noti = $_lang['deposit_cash_part_defund'];
                         $rate = $match_task['deposit_rate'];
                         $cash = floatval($match_work['deposit_cash'] - $rate);
                         $profit = $rate;
                         $res = keke_finance_class::cash_in($w_info['uid'], $cash, 'deposit_return', '', 'task', $match_task['task_id'], $profit);
                         break;
                     case 3:
                         $w_noti = $_lang['deposit_cash_all_deduct'];
                         $res = db_factory::execute(sprintf(" update %switkey_finance set site_profit='%.2f' where obj_id='%d' and fina_type='out' and fina_action='host_deposit'", TABLEPRE, $match_task['hirer_deposit'], $match_work['work_id']));
                         break;
                 }
                 switch ($host) {
                     case 1:
                         $g_noti .= $_lang['host_cash_has_all_been_refund'];
                         $data = array(':task_id' => $match_task['task_id'], ':task_title' => $match_task['task_title']);
                         keke_finance_class::init_mem('host_return', $data);
                         $res .= keke_finance_class::cash_in($g_info['uid'], $match_task['host_cash'], 'host_return', '', 'task', $match_task['task_id']);
                         break;
                     case 2:
                         $hire_get = floatval(keke_curren_class::convert($op_result['hire_get'], 0, true));
                         $wiki_get = floatval(keke_curren_class::convert($op_result['wiki_get'], 0, true));
                         $g_noti .= $_lang['host_cash_has_part_been_refund'];
                         $data = array(':task_id' => $match_task['task_id'], ':task_title' => $match_task['task_title']);
                         keke_finance_class::init_mem('host_split', $data);
                         $res .= keke_finance_class::cash_in($g_info['uid'], $hire_get, 'host_split', '', 'task', $match_task['task_id']);
                         $w_noti .= $_lang['get_part_host_cash'];
                         $rate = db_factory::get_count(sprintf(" select profit_rate from %switkey_task where task_id ='%d'", TABLEPRE, $match_task['task_id']));
                         $profit = $wiki_get * $rate / 100;
                         $wiki_get -= $profit;
                         $data = array(':task_id' => $match_task['task_id'], ':task_title' => $match_task['task_title']);
                         keke_finance_class::init_mem('host_split', $data);
                         $res .= keke_finance_class::cash_in($w_info['uid'], $wiki_get, 'host_split', '', 'task', $match_task['task_id'], $profit);
                         break;
                 }
                 if ($res) {
                     $this->change_status($this->_report_id, '4', $op_result, $op_result['process_result']);
                     $w_event = $objProm->get_prom_event($this->_obj_info['origin_id'], $w_info['uid'], "bid_task");
                     $objProm->set_prom_event_status($w_event['parent_uid'], $this->_gusername, $w_event['event_id'], '3');
                     $g_event = $objProm->get_prom_event($this->_obj_info['origin_id'], $g_info['uid'], "pub_task");
                     $objProm->set_prom_event_status($g_event['parent_uid'], $this->_gusername, $g_event['event_id'], '3');
                     $url = "<a href=\"{$_K['siteurl']}/index.php?do=task&id={$match_task['task_id']}\">{$this->_obj_info['origin_title']}</a>";
                     $msg_obj = new keke_msg_class();
                     $g_notify = array($_lang['description'] => $_lang['match_task_trans_result'] . $g_noti, $_lang['task_title'] => $url);
                     $msg_obj->send_message($g_info['uid'], $g_info['username'], 'match_task', $_lang['match_website_deal_notice'], $g_notify, $g_info['email']);
                     $w_notify = array($_lang['description'] => $_lang['match_task_trans_result'] . $w_noti, $_lang['task_title'] => $url);
                     $msg_obj->send_message($w_info['uid'], $w_info['username'], 'match_task', $_lang['match_website_deal_notice'], $w_notify, $w_info['email']);
                     db_factory::execute(sprintf(" update %switkey_task set task_status=9 where task_id='%d'", TABLEPRE, $match_task['task_id']));
                 }
                 $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");
             } else {
                 kekezu::admin_show_msg($trans_name . $_lang['deal_fail_now_forbit_deal_cash'], "index.php?do=trans&view=process&type={$type}&report_id=" . $this->_report_id, "3", "", "warning");
             }
             break;
         case "nopass":
             break;
     }
 }
コード例 #20
0
ファイル: buyer_order.php プロジェクト: xupnge1314/project
         $serviceOrderInfo['username'] = $gUsername;
         $serviceOrderInfo['service_id'] = 0;
         $serviceOrderInfo['title'] = kekezu::escape($title);
         $serviceOrderInfo['indus_pid'] = intval($indus_pid);
         $serviceOrderInfo['indus_id'] = intval($indus_id);
         $serviceOrderInfo['content'] = kekezu::escape($content);
         $serviceOrderInfo['file_ids'] = $file_ids;
         $serviceOrderInfo['price'] = floatval($price);
         $orderId = keke_order_class::create_order(7, $arrSellerInfo['uid'], $arrSellerInfo['username'], $serviceOrderInfo['title'], $serviceOrderInfo['price'], '雇佣服务:' . $serviceOrderInfo['title'], 'seller_confirm');
         if ($orderId) {
             $serviceOrderInfo['order_id'] = $orderId;
             keke_order_class::create_order_detail($orderId, $serviceOrderInfo['title'], 'gy', $serviceOrderInfo['service_id'], $serviceOrderInfo['price']);
             keke_order_class::createServiceOrder($serviceOrderInfo);
             $order_url = "<a href=\"" . $_K['siteurl'] . "/index.php?do=gy&id=" . $arrSellerInfo['uid'] . "&orderId=" . $orderId . "\">" . $title . "</a>";
             $v_arr = array('用户名' => $arrSellerInfo['username'], '用户' => $username, '雇佣订单链接' => $order_url, '网站名称' => $kekezu->_sys_config['website_name']);
             $msg_obj = new keke_msg_class();
             $msg_obj->send_message($arrSellerInfo['uid'], $arrSellerInfo['username'], 'gy_order_notice', '雇佣订单消息', $v_arr);
             $feed_arr = array("feed_username" => array("content" => $arrSellerInfo['username'], "url" => "index.php?do=seller&id=" . $arrSellerInfo['uid']), "action" => array("content" => '雇佣', "url" => ''), "event" => array("content" => $serviceOrderInfo['title'], "url" => ""));
             kekezu::save_feed($feed_arr, $gUid, $gUsername, 'gy', $id, '');
             $feed_arr = array("feed_username" => array("content" => $gUsername, "url" => "index.php?do=seller&id=" . $gUid), "action" => array("content" => '雇佣', "url" => ''), "event" => array("content" => $serviceOrderInfo['title'], "url" => ""));
             kekezu::save_feed($feed_arr, $arrSellerInfo['uid'], $arrSellerInfo['username'], 'gy_bei', $id, '');
             kekezu::show_msg('订单创建成功', $strUrl . "&step=step2&orderId=" . $orderId, 3, null, 'ok');
         } else {
             kekezu::show_msg('创建订单失败', $strUrl, 3, null, 'fail');
         }
     }
     break;
 case 'step2':
     break;
 case 'step3':
     if (isset($action)) {
コード例 #21
0
ファイル: admin_user_add.php プロジェクト: pengfeiaaa/web
$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 {
        $status = '重置失败';
    }
    echo json_encode(array('status' => $status));
    die;
コード例 #22
0
<?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');
コード例 #23
0
ファイル: keke_shop_class.php プロジェクト: pengfeiaaa/web
 public static function create_service_order($service_info, $isApp = false, $serviceOrderInfo = array(), $step = '')
 {
     global $uid, $username, $_K;
     global $_lang;
     if ($uid == $service_info['uid']) {
         if ($isApp) {
             app_class::response(array('ret' => 1003));
         } else {
             return $_lang['seller_can_not_order_self'];
         }
     }
     $oder_obj = new Keke_witkey_order_class();
     $order_detail = new Keke_witkey_order_detail_class();
     switch ($service_info['model_id']) {
         case "6":
             $type = $_lang['work'];
             $service_cash = $service_info['price'];
             break;
         case "7":
             $type = $_lang['service'];
             $service_cash = $serviceOrderInfo['price'];
             break;
     }
     $order_name = $service_info['title'];
     $order_body = $_lang['buy_goods'] . "<a href=\"index.php?do=goods&id={$service_info['service_id']}\">" . $order_name . "</a>";
     if ($service_info['model_id'] == 6) {
         $detail_type = 'goods';
         $order_status = 'wait';
     } else {
         $detail_type = 'service';
         $order_status = 'seller_confirm';
     }
     $order_id = keke_order_class::create_order($service_info['model_id'], $service_info['uid'], $service_info['username'], $order_name, $service_cash, $order_body, $order_status, $service_info['leave_message']);
     if ($order_id) {
         if ($service_info['model_id'] == 7) {
             $serviceOrderInfo['order_id'] = $order_id;
             keke_order_class::createServiceOrder($serviceOrderInfo);
         }
         keke_order_class::create_order_detail($order_id, $order_name, 'service', intval($service_info[service_id]), $service_cash);
         $msg_obj = new keke_msg_class();
         $service_url = "<a href=\"" . $_K[siteurl] . "/index.php?do=goods&id=" . $service_info[service_id] . "\">" . $order_name . "</a>";
         $strLeaveMessage = $service_info['leave_message'];
         $order_url = "<a href=\"" . $_K[siteurl] . "/index.php?do=order&sid=" . $service_info['service_id'] . "&orderId=" . $order_id . "#userCenter\">#" . $order_id . "</a>";
         $s_notice = array($_lang['user_action'] => $username . $_lang['order_buy'], $_lang['service_name'] => $service_url, $_lang['service_type'] => $type, $_lang['buyer_leave_message'] => $strLeaveMessage, $_lang['order_link'] => $order_url);
         if ($service_info['model_id'] == '7') {
             unset($s_notice[$_lang['buyer_leave_message']]);
             $msgAction = 'service_order';
             $shopMx = '服务';
         } else {
             $msgAction = 'goods_order';
             $shopMx = '作品';
         }
         $contact = db_factory::get_one(sprintf(" select mobile,email from %switkey_space where uid='%d'", TABLEPRE, $service_info[uid]));
         if ($service_info['model_id'] != '6' && $step != 'step1') {
             $order_info = keke_order_class::get_order_info($order_id);
             $b_order_link = "<a href=\"" . $_K['siteurl'] . "/index.php?do=user&view=transaction&op=sold&intModelId=" . $order_info['model_id'] . "&order_id=" . $order_id . "\">" . $order_info['order_name'] . "</a>";
             $v_arr = array($_lang['user_msg'] => $order_info['seller_username'], '商品标题' => $order_info['order_name'], $_lang['order_link'] => $b_order_link, '商品模型名称' => $shopMx);
             $msg_obj->send_message($service_info['uid'], $service_info['username'], "order_create", $_lang['you_has_new'] . $type . $_lang['order'], $v_arr, $contact['email'], $contact['mobile']);
             $arrTaskInfo = db_factory::get_one("select * from " . TABLEPRE . "witkey_service where service_id=" . intval($service_info[service_id]));
             $feed_arr = array("feed_username" => array("content" => $arrTaskInfo['username'], "url" => "index.php?do=seller&id=" . $arrTaskInfo['uid']), "action" => array("content" => $_lang['buy'], "url" => ''), "event" => array("content" => $order_name, "url" => "index.php?do=goods&id={$service_info['service_id']}"));
             kekezu::save_feed($feed_arr, $uid, $username, 'buy_' . $detail_type, $service_info['service_id'], $service_url);
             $feed_arr = array("feed_username" => array("content" => $username, "url" => "index.php?do=seller&id=" . $uid), "action" => array("content" => $_lang['buy'], "url" => ''), "event" => array("content" => $order_name, "url" => "index.php?do=goods&id={$service_info['service_id']}"));
             kekezu::save_feed($feed_arr, $arrTaskInfo['uid'], $arrTaskInfo['username'], 'buy_' . $detail_type . '_bei', $service_info['service_id'], $service_url);
         }
         if ($isApp) {
             app_class::response(array('ret' => 0, 'orderid' => $order_id));
         } else {
             return $order_id;
         }
     } else {
         if ($isApp) {
             app_class::response(array('ret' => 1004));
         } else {
             return $_lang['order_produce_fail'];
         }
     }
 }
コード例 #24
0
ファイル: keke_task_config.php プロジェクト: pengfeiaaa/web
 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;
 }
コード例 #25
0
ファイル: keke_prom_class.php プロジェクト: pengfeiaaa/web
 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);
         }
     }
 }
コード例 #26
0
ファイル: goods_list.php プロジェクト: pengfeiaaa/web
             }
             $arrLogInfo['log_content'] = $arrLogDatas;
             CommonClass::applyEdit($arrLogInfo, $service_id);
             CommonClass::cancleEdit($service_id, 6);
             $arrServiceInfo = db_factory::get_one('select * from ' . TABLEPRE . 'witkey_service where service_id = ' . intval($service_id));
             if ($arrServiceInfo['service_status'] == '1') {
                 $time = time() - $service_arr['on_time'];
                 keke_payitem_class::update_service_payitem_time($service_arr['payitem_time'], $time, $service_id);
                 goods_shop_class::set_service_status($service_id, 2);
             }
             keke_msg_class::send_private_message('服务审核通知', '您编辑的商品信息<a href="index.php?do=goods&id=' . $service_id . '">' . $arrServiceInfo['title'] . '</a>已通过管理员审核,目前已生效!', $arrServiceInfo['uid'], $arrServiceInfo['username']);
         }
         if ($acc == 'snopass') {
             CommonClass::cancleEdit($service_id, 6);
             keke_shop_release_class::updateEditStatusBySid($service_id, 4);
             keke_msg_class::send_private_message('服务审核通知', '您编辑的商品信息<a href="index.php?do=goods&id=' . $service_id . '">' . $arrServiceInfo['title'] . '</a>未通过管理员的审核,如有疑问请联系网站管理员!', $arrServiceInfo['uid'], $arrServiceInfo['username']);
         }
         kekezu::echojson('操作成功', 1);
     } else {
         $editInfo = CommonClass::getEditLogInfoByLogTypeAndObjId($service_id, 6);
         $arrTopIndustrys = $kekezu->_indus_goods_arr;
         $arrIndustrys = CommonClass::getIndustryByPid($editInfo['log_content_data']['indus_pid']);
         $arrOldImageLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['old_pic']);
         $arrImageLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['pic']);
         $arrOldFileLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['old_file_path']);
         $arrFileLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['file_path']);
         require keke_tpl_class::template('shop/goods/admin/tpl/goods_updateinfo');
         die;
     }
     break;
 case 'off_shelf':
コード例 #27
0
 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);
 }
コード例 #28
0
 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;
コード例 #29
0
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');
    }
}
コード例 #30
0
 public function accept_confirm()
 {
     global $uid;
     global $_lang;
     $agree_info = $this->_agree_info;
     if ($uid != $this->_buyer_uid) {
         return $_lang['warning_you_no_rights_confirm'];
     }
     $trust_info = $this->_trust_info;
     if ($this->_agree_status == 2 && $this->_seller_status == 3 && $this->_buyer_status == 3) {
         $res = db_factory::execute(sprintf(" update %switkey_agreement set buyer_confirmtime = UNIX_TIMESTAMP() where agree_id ='%d'", TABLEPRE, $this->_agree_id));
         db_factory::execute(sprintf(" update %switkey_task set task_status = '8' where task_id ='%d'", TABLEPRE, $this->_task_id));
         $cash_info = db_factory::get_one(sprintf(" select task_cash,task_union,real_cash from %switkey_task where task_id = '%d'", TABLEPRE, $this->_task_id));
         $res *= $this->set_agreement_status('seller_status', '4');
         $res *= $this->set_agreement_status('buyer_status', '4');
         $res *= $this->set_agreement_status('agree_status', '3');
         $this->dispose_task();
         $notice = $_lang['buyer_has_confirm_deliver_complete'];
         $msg_obj = new keke_msg_class();
         $v_arr = array($_lang['the_initiator'] => $this->_buyer_username, $_lang['agreement_link'] => $this->_agree_url, $_lang['action'] => $_lang['confirm_has_received_file'], $_lang['agreement_status'] => $notice);
         $msg_obj->send_message($this->_seller_uid, $this->_seller_username, "agreement_file", $_lang['agreement_file_recevie'], $v_arr, $this->_seller_contact['email'], $this->_seller_contact['mobile'], 1);
         if ($res) {
             return true;
         } else {
             return $_lang['file_confirm_fail_deliver_fail'];
         }
     } else {
         return $_lang['current_status_can_not_confirm'];
     }
 }