public function goods_top_end() { $goods_list = db_factory::query(sprintf(" select a.service_id ,b.end_time from %switkey_service a left join %switkey_payitem_record b on a.service_id=b.obj_id\n\t\t\t\t where a.model_id=6 and a.goodstop=1 and b.obj_type='goods' and b.end_time<%d order by service_id desc ", TABLEPRE, TABLEPRE, time())); if (is_array($goods_list)) { foreach ($goods_list as $k => $v) { keke_shop_class::updateGoodsTop($v['service_id']); } } }
function order_charge() { global $_K; $order_id = $this->_order_id; $sid = $this->_obj_id; $uid = $this->_uid; $user_info = $this->_userinfo; $order_info = db_factory::get_one(sprintf(" select order_status,order_uid,order_username,seller_uid,seller_username from %switkey_order where order_id='%d'", TABLEPRE, $order_id)); $url = $_K['siteurl'] . "/index.php?do=user&view=finance&op=order&obj_type=service&role=2&order_id=" . $order_id; $s_order_link = "<a href=\"" . $_K['siteurl'] . "/index.php?do=user&view=finance&op=order&obj_type=service&role=1&order_id=" . $order_id . "\">" . $order_info['order_name'] . "</a>"; $b_order_link = "<a href=\"" . $_K['siteurl'] . "/index.php?do=user&view=finance&op=order&obj_type=service&role=2&order_id=" . $order_id . "\">" . $order_info['order_name'] . "</a>"; if ($order_info['order_status'] == 'wait') { $service_info = keke_shop_class::get_service_info($sid); $service_status = db_factory::get_count(sprintf(" select service_status from %switkey_service where service_id='%d'", TABLEPRE, $sid)); if ($service_status == '2') { $data = array(':service_id' => $service_info['service_id'], ':title' => $service_info['title']); keke_finance_class::init_mem('buy_service', $data); $this->_total_fee > 0 and $res = keke_finance_class::cash_out($uid, $this->_total_fee, 'buy_service', '0', 'service', $order_id); if ($res) { db_factory::execute(sprintf(" update %switkey_order set order_status='ok' where order_id='%d'", TABLEPRE, $order_id)); $v_arr = array('用户名' => $order_info['order_username'], '网站名称' => $kekezu->_sys_config['website_name'], '用户' => $_lang['you'], '动作' => $_lang['haved_confirm_pay'], '订单编号' => $order_id, '订单链接' => $b_order_link); keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['goods_order_confirm_pay'], $v_arr); $v_arr = array('用户名' => $order_info['order_username'], '网站名称' => $kekezu->_sys_config['website_name'], '用户' => $order_info['order_username'], '动作' => $_lang['haved_confirm_pay'], '订单编号' => $order_id, '订单链接' => $s_order_link); keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['goods_order_confirm_pay'], $v_arr); $notice = $_lang['goods_pay_success']; $type = 'success'; } else { $notice = $_lang['goods_pay_fail']; $type = 'warning'; } } else { db_factory::execute(sprintf(" update %switkey_order set order_status='close' where order_id='%d'", TABLEPRE, $order_id)); $v_arr = array('用户名' => $order_info['seller_username'], '网站名称' => $kekezu->_sys_config['website_name'], "用户" => $_lang['system'], '动作' => $_lang['stop_your_order_and_your_cash_return'], '订单编号' => $order_id, '订单链接' => $s_order_link); keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['goods_order_close'], $v_arr); $v_arr = array('用户名' => $order_info['order_username'], '网站名称' => $kekezu->_sys_config['website_name'], "用户" => $_lang['system'], '动作' => $_lang['stop_your_order_and_your_cash_return'], '订单编号' => $order_id, '订单链接' => $b_order_link); keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['goods_order_close'], $v_arr); $notice = $_lang['goods_pay_fail']; $type = 'warning'; } } else { $notice = $_lang['goods_pay_success']; $type = 'success'; } return pay_return_fac_class::struct_response($_lang['operate_notice'], $notice, $url, $type); }
private function user_charge() { global $_K; global $_lang; $uid = $this->_uid; $order_id = $this->_order_id; $order_id = keke_order_class::update_order_charge($this->_out_trade_no, $this->_total_fee); $order_info = db_factory::get_one(sprintf(" select order_status,order_type from %switkey_order_charge where order_id='%d' and uid='%d'", TABLEPRE, $order_id, $uid)); if ($order_info['order_status'] == 'wait') { db_factory::execute(sprintf(" update %switkey_order_charge set order_status='ok' where order_id='%d'", TABLEPRE, $order_id)); $res = keke_finance_class::cash_in($uid, $this->_total_fee, $order_info['order_type'], $this->_charge_type, 'user_charge', $order_id); $v_arr = array($_lang['recharge_account'] => $this->_total_fee); keke_shop_class::notify_user($this->_uid, $this->_username, "pay_success", $_lang['online_recharge_success'], $v_arr, 2); } else { $res = true; } if ($res) { return $this->struct_response($_lang['operate_notice'], $_lang['online_recharge_success'], $url, 'success'); } else { return $this->struct_response($_lang['operate_notice'], $_lang['online_recharge_fail'], $url, 'warning'); } }
public function dispose_order($order_id, $action, $isApp = FALSE) { global $uid, $username, $_K, $kekezu, $_lang; $order_info = keke_order_class::get_order_info($order_id); if ($order_info) { $s_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>"; $b_order_link = "<a href=\"" . $_K['siteurl'] . "/index.php?do=user&view=transaction&op=orders&intModelId=" . $order_info['model_id'] . "&order_id=" . $order_id . "\">" . $order_info['order_name'] . "</a>"; if ($uid == $order_info['order_uid'] || $uid == $order_info['seller_uid']) { $service_info = keke_shop_class::get_service_info($order_info['obj_id']); switch ($action) { case "wait": $res = keke_order_class::set_order_status($order_id, $action); if ($res) { if ($order_info['obj_type'] == 'gy') { self::sendNoticeToBuyer($order_info, '对方已经接受了你的雇佣要求'); } else { $v_arr = array($_lang['user_msg'] => $order_info['seller_username'], $_lang['action'] => $_lang['recept_your_order'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $b_order_link); keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_create", $_lang['goods_order_recept'], $v_arr); } if ($isApp) { app_class::response(array('ret' => 1008, 'orderid' => $order_id)); } else { return true; } } else { if ($isApp) { app_class::response(array('ret' => 1009, 'orderid' => $order_id)); } else { return $_lang['order_deal_fail_and_link_kf']; } } break; case "ok": if ($order_info['obj_type'] == 'gy') { $data = array(':title' => $order_info['order_name']); } else { $data = array(':service_id' => $order_info['obj_id'], ':title' => $order_info['order_name']); $v_arr = array($_lang['user_msg'] => $order_info['seller_username'], $_lang['action'] => $_lang['recept_your_order'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $b_order_link); keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['goods_order_recept'], $v_arr); } keke_finance_class::init_mem('buy_' . $order_info['obj_type'], $data); if ($order_info['order_amount'] > 0) { $suc = keke_finance_class::cash_out($order_info['order_uid'], $order_info['order_amount'], 'buy_' . $order_info['obj_type'], '', 'service', $order_info['obj_id']); } else { $suc = 1; } if ($suc) { db_factory::execute("update " . TABLEPRE . "witkey_finance set order_id={$order_id} where fina_id={$suc}"); keke_order_class::set_order_status($order_id, $action); if ($order_info['obj_type'] == 'gy') { $complete_time = time() + 3600 * 24 * 7; } else { if ($service_info['unit_time']) { $unit_time = $service_info['unit_time']; switch ($unit_time) { case '小时': $complete_time = time() + intval($service_info['service_time']) * 3600; break; case '天': $complete_time = time() + intval($service_info['service_time']) * 3600 * 24; break; case '周': $complete_time = time() + intval($service_info['service_time']) * 3600 * 24 * 7; break; case '月': $complete_time = time() + intval($service_info['service_time']) * 3600 * 24 * 30; break; } } } db_factory::execute("update " . TABLEPRE . "witkey_order set service_end_time = {$complete_time} where order_id={$order_info['order_id']}"); if ($order_info['obj_type'] == 'gy') { self::sendNoticeToSeller($order_info, '对方已付款'); } else { $v_arr = array($_lang['user_msg'] => $order_info['order_username'], $_lang['action'] => ' 已完成付款', $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link); keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['goods_order_confirm_pay'], $v_arr); } if ($isApp) { app_class::response(array('ret' => 1010, 'orderinfo' => $order_info)); } else { return true; } } else { if ($isApp) { app_class::response(array('ret' => 1011, 'orderinfo' => $order_info)); } else { return '订单付款失败,您的账户余额不足以支付该订单<br />点击这里<a href="index.php?do=pay&id=' . $order_info['order_id'] . '&type=order">去充值</a>'; } } break; case "close": $res = keke_order_class::order_cancel_return($order_id); if ($res) { keke_order_class::set_order_status($order_id, $action); if ($order_info['obj_type'] == 'gy') { self::sendNoticeToSeller($order_info, '对方关闭订单'); } else { $v_arr = array($_lang['user_msg'] => $order_info['order_username'], $_lang['action'] => $_lang['close_order_have'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link); keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['goods_order_close'], $v_arr); } if ($isApp) { app_class::response(array('ret' => 1012, 'orderinfo' => $order_info)); } else { return true; } } else { if ($isApp) { app_class::response(array('ret' => 1013, 'orderinfo' => $order_info)); } else { return $_lang['order_deal_fail_and_link_kf']; } } break; case 'over_time_close': $res = keke_order_class::order_cancel_return($order_id); if ($res) { keke_order_class::set_order_status($order_id, 'close'); if ($order_info['obj_type'] == 'gy') { self::sendNoticeToSeller($order_info, '对方超时未完成服务'); } else { $v_arr = array($_lang['user_msg'] => $order_info['order_username'], $_lang['action'] => $_lang['close_order_have'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link); keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", '超时未完成服务', $v_arr); } } break; case "confirm_complete": $res = keke_order_class::set_order_status($order_id, $action); if ($res) { $objProm = keke_prom_class::get_instance(); if ($objProm->is_meet_requirement("service", $order_info[obj_id])) { $objProm->create_prom_event("service", $order_info['order_uid'], $order_info['obj_id'], $order_info['order_amount']); } if ($order_info['obj_type'] == 'gy') { self::sendNoticeToBuyer($order_info, '对方确认服务工作完成'); } else { $v_arr = array($_lang['user_msg'] => $order_info['seller_username'], $_lang['action'] => '服务完成', $_lang['order_id'] => $order_id, $_lang['order_link'] => $b_order_link); keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", '服务完成', $v_arr); } if ($order_info['obj_type'] == 'gy') { $arrServiceConfig = unserialize($kekezu->_model_list[7]['config']); $cut_time = time() + intval($arrServiceConfig['confirm_max_day']) * 24 * 3600; } else { $cut_time = time() + $service_info['confirm_max'] * 24 * 3600; } db_factory::execute(sprintf("update %switkey_order set ys_end_time = %d where order_id=%d", TABLEPRE, $cut_time, $order_id)); if ($isApp) { app_class::response(array('ret' => 1014, 'orderinfo' => $order_info)); } else { return true; } } else { if ($isApp) { app_class::response(array('ret' => 1015, 'orderinfo' => $order_info)); } else { return $_lang['order_deal_fail_and_link_kf']; } } break; case "accept": $res = keke_order_class::set_order_status($order_id, $action); if ($res) { $objProm = keke_prom_class::get_instance(); if ($objProm->is_meet_requirement("service", $order_info[obj_id])) { $objProm->create_prom_event("service", $order_info['order_uid'], $order_info['obj_id'], $order_info['order_amount']); } if ($order_info['obj_type'] == 'gy') { self::sendNoticeToBuyer($order_info, '对方确认接收订单'); } else { $v_arr = array($_lang['user_msg'] => $order_info['seller_username'], $_lang['action'] => $_lang['recept_your_order'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $b_order_link); keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['goods_order_recept'], $v_arr); } if ($isApp) { app_class::response(array('ret' => 1016, 'orderinfo' => $order_info)); } else { return true; } } else { if ($isApp) { app_class::response(array('ret' => 1017, 'orderinfo' => $order_info)); } else { return $_lang['order_deal_fail_and_link_kf']; } } break; case "working": $intRes = keke_order_class::set_order_status($order_id, $action); if ($order_info['obj_type'] == 'gy') { self::sendNoticeToBuyer($order_info, '对方已经开始工作'); } if ($intRes) { return true; } else { return '操作失败'; } break; case "send": $res = keke_order_class::set_order_status($order_id, $action); if ($res) { if ($order_info['obj_type'] == 'gy') { self::sendNoticeToBuyer($order_info, '对方确认服务完成'); } else { $v_arr = array($_lang['user_msg'] => $order_info['seller_username'], $_lang['action'] => $_lang['confirm_service_complete'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $b_order_link); keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['service_order_confirm_complete'], $v_arr); } if ($isApp) { app_class::response(array('ret' => 1018, 'orderinfo' => $order_info)); } else { kekezu::keke_show_msg('', $_lang['order_deal_complete_and_order_comfirm'], '', 'json'); } } else { if ($isApp) { app_class::response(array('ret' => 1019, 'orderinfo' => $order_info)); } else { kekezu::keke_show_msg('', $_lang['order_deal_fail_and_link_kf'], 'error', 'json'); } } break; case "complete": $res = keke_order_class::set_order_status($order_id, $action); if ($res) { $model_info = $kekezu->_model_list[$order_info['model_id']]; if ($order_info['obj_type'] == 'gy') { $arrServiceConfig = unserialize($kekezu->_model_list[7]['config']); $profit = floatval($arrServiceConfig['service_profit']) * $order_info['order_amount'] / 100; } else { $profit = $service_info['profit_rate'] * $order_info['order_amount'] / 100; } if ($order_info['obj_type'] == 'gy') { $data = array(':title' => $order_info['order_name']); } else { $data = array(':service_id' => $order_info['obj_id'], ':title' => $order_info['order_name']); } keke_finance_class::init_mem('sale_' . $order_info['obj_type'], $data); keke_finance_class::cash_in($order_info['seller_uid'], $order_info['order_amount'] - $profit, 'sale_' . $order_info['obj_type'], '', 'service', $order_info['obj_id'], $profit); keke_shop_class::plus_sale_num($order_info['obj_id'], $order_info['order_amount']); keke_user_mark_class::create_mark_log($model_info['model_code'], 2, $order_info['order_uid'], $order_info['seller_uid'], $order_id, $order_info['order_amount'] - $profit, $order_info['obj_id'], $order_info['order_username'], $order_info['seller_username']); keke_user_mark_class::create_mark_log($model_info['model_code'], 1, $order_info['seller_uid'], $order_info['order_uid'], $order_id, $order_info['order_amount'], $order_info['obj_id'], $order_info['seller_username'], $order_info['order_username']); keke_shop_class::plus_mark_num($order_info['obj_id']); $objProm = keke_prom_class::get_instance(); $objProm->dispose_prom_event("service", $order_info['order_uid'], $order_info['obj_id']); if ($order_info['obj_type'] == 'gy') { self::sendNoticeToSeller($order_info, '对方工作验收完成'); } else { $v_arr = array($_lang['user_msg'] => $order_info['order_username'], $_lang['action'] => $_lang['confirm_service_complete'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link); keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['service_order_confirm_complete'], $v_arr); } if ($isApp) { app_class::response(array('ret' => 1020, 'orderinfo' => $order_info)); } else { return true; } } else { if ($isApp) { app_class::response(array('ret' => 1021, 'orderinfo' => $order_info)); } else { return $_lang['order_deal_fail_and_link_kf']; } } break; case "arbitral": $res = keke_order_class::set_order_status($order_id, $action); if ($res) { if ($order_info['obj_type'] == 'gy') { if ($uid == $order_info['order_uid']) { self::sendNoticeToSeller($order_info, $_lang['sevice_order_arbitrate_submit']); } else { self::sendNoticeToBuyer($order_info, $_lang['sevice_order_arbitrate_submit']); } } else { if ($uid == $order_info['order_uid']) { $v_arr = array($_lang['user_msg'] => $order_info['order_username'], $_lang['action'] => $_lang['buyer_start_arbitrate'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link); keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['sevice_order_arbitrate_submit'], $v_arr); } else { $v_arr = array($_lang['user_msg'] => $order_info['seller_username'], $_lang['action'] => $_lang['seller_start_arbitrate'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $b_order_link); keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['sevice_order_arbitrate_submit'], $v_arr); } } if ($isApp) { app_class::response(array('ret' => 1022, 'orderinfo' => $order_info)); } else { return true; } } else { if ($isApp) { app_class::response(array('ret' => 1023, 'orderinfo' => $order_info)); } else { return $_lang['order_deal_fail_and_link_kf']; } } break; case "delete": $res = keke_order_class::del_order($order_id); if ($isApp) { $res and app_class::response(array('ret' => 1006)) or app_class::response(array('ret' => 1007)); } else { $res and kekezu::keke_show_msg('', $_lang['order_delete_success'], "", 'json') or kekezu::keke_show_msg('', $_lang['order_delete_fail'], "error", 'json'); } break; } } else { if ($isApp) { app_class::response(array('ret' => 1024, 'orderinfo' => $order_info)); } else { return $_lang['error_order_num_notice']; } } } else { if ($isApp) { app_class::response(array('ret' => 1025, 'orderinfo' => $order_info)); } else { return $_lang['no_exist_goods_order']; } } }
$bank_arr = keke_glob_class::get_bank(); if (isset($ac)) { $order_info = db_factory::get_one(" select * from " . TABLEPRE . "witkey_order_charge where order_id = " . intval($order_id)); $message_obj = new keke_msg_class(); $order_info or kekezu::admin_show_msg($_lang['charge_num_not_exist'], $url, 3, '', 'warning'); switch ($ac) { case 'pass': if ($order_info[order_status] == 'ok') { kekezu::admin_show_msg($_lang['payment_has_been_success_no_need_repeat'], $url, 3, '', 'warning'); } $recharge_obj->setWhere('order_id =' . $order_id); $recharge_obj->setOrder_status('ok'); $res = $recharge_obj->edit_keke_witkey_order_charge(); $user_info = kekezu::get_user_info($order_info[uid]); $v_arr = array('充值金额' => $order_info['pay_money'], '用户名' => $user_info[username], '网站名称' => $kekezu->_sys_config['website_name']); keke_shop_class::notify_user($user_info[uid], $user_info[username], "pay_success", $_lang['line_recharge_success'], $v_arr, 2); keke_finance_class::cash_in($user_info['uid'], $order_info['pay_money'], 'offline_charge', '', 'offline_charge'); kekezu::admin_system_log($_lang['confirm_payment_recharge'] . $order_id); kekezu::admin_show_msg($_lang['message_about_recharge_success'], $url, 3, '', 'success'); break; case 'del': $recharge_obj->setWhere(' order_id=' . $order_id); $res = $recharge_obj->del_keke_witkey_order_charge(); $user_info = kekezu::get_user_info($order_info[uid]); $v = array($_lang['recharge_single_num'] => $order_id, $_lang['recharge_cash'] => $order_info[pay_money]); $message_obj->send_message($user_info['uid'], $user_info['username'], 'recharge_fail', $_lang['recharge_fail'], $v, $user_info[email], $user_info['mobile']); kekezu::admin_system_log($_lang['delete_apply_forwithdraw'] . $order_id); kekezu::admin_show_msg($_lang['message_about_delete'], $url, 3, '', 'success'); break; } } elseif (isset($ckb)) {
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(82); $suggest_obj = new keke_table_class('witkey_proposal'); $proposal_obj = new Keke_witkey_proposal_class(); $suggest_type_arr = array('1' => '我的建议', '2' => '我的问题'); $suggest_status_arr = array('1' => '待回复', '2' => '已回复'); $url = "index.php?do={$do}&view={$view}&suggest_id={$suggest_id}"; if ($suggest_id) { $suggest_info = db_factory::get_one(sprintf("select * from %switkey_proposal where p_id = '%d'", TABLEPRE, $suggest_id)); $user_info = kekezu::get_user_info($suggest_info['uid']); if ($sbt_op) { $proposal_obj->setWhere('p_id = ' . $suggestid); $proposal_obj->setOp_content(kekezu::escape($op_result['process_result'])); $proposal_obj->setOp_time(time()); $proposal_obj->setPro_status(2); $proposal_obj->setOp_uid($_SESSION['uid']); $proposal_obj->setOp_username($_SESSION['username']); $res_id = $proposal_obj->edit_keke_witkey_proposal(); $v_arr = array('用户名' => $suggest_username, '用户标题' => $suggest_title, '建议内容' => kekezu::escape($pro_desc), '回复内容' => kekezu::escape($op_result['process_result']), $_lang['website_name'] => $kekezu->_sys_config['website_name']); keke_shop_class::notify_user($suggest_uid, $suggest_username, 'suggest_reply', '建议答复', $v_arr, 2); $res_id and kekezu::admin_show_msg($_lang['operate_notice'], $url, "2", '回复成功', 'success') or kekezu::admin_show_msg($_lang['operate_notice'], $url, "2", '回复失败', 'warning'); } } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_user_suggest_reply');
$arrNerLists[$k]['service'][$kk]['favorite'] = true; } unset($arrFollow); } } unset($arrService); $arrFollow = db_factory::get_count(sprintf('select count(*) from %s where uid = %d and fuid = %d', TABLEPRE . 'witkey_free_follow', intval($gUid), intval($v['uid']))); if ($arrFollow) { $arrNerLists[$k]['follow'] = true; } unset($arrFollow); } } if ($arrNerLists) { foreach ($arrNerLists as $k => $v) { $arrNerLists[$k]['pro_city'] = keke_shop_class::getUserAddress($v['uid'], 2, 1, 1, 0); } } $arrShopIndusC = $kekezu->_indus_c_arr; $arrShopIndusP = $kekezu->_indus_p_arr; if (is_array($arrShopIndusC)) { $arrNewShopIndusC = array(); foreach ($arrShopIndusC as $k => $v) { $arrNewShopIndusC[$v['indus_pid']][] = $v; } } $arrDisplaypro = CommonClass::getDistrictByPid('0', 'id,upid,name'); $arrSellerType = array('1' => '个人用户', '2' => '企业用户'); $data = array('地区' => $arrCityone['name'] . $arrCitytwo['name'] . $arrCitythree['name'], '店铺类型' => $arrSellerType[$t], '行业' => $arrIndusPInfo['indus_name'], '子行业' => $arrIndusInfo['indus_name']); list($strPageTitle, $strPageKeyword, $strPageDescription) = keke_seo_class::getListSEO($pd, $i, $data, 'seller', true); $floatCashLists = kekezu::get_table_data(' uid,sum(fina_cash) as threeCash', 'witkey_finance', "(fina_action='sale_service' or fina_action='task_bid') and DATE_SUB(CURDATE(),INTERVAL 90 day) <= date(from_unixtime(fina_time))", '', 'uid', '', 'uid');
$reportUrl = $strUrl . '&orderId=' . $orderId . '&action=rights&objId=' . $orderId . '&objType=order&type=1&toUid='; if ($id == $gUid) { $reqPage = 'seller'; $arrBuyerInfo = kekezu::get_user_info($arrOrderInfo['order_uid']); $arrOrderInfo['seller_uid'] != $id and kekezu::show_msg('用户订单不存在', 'index.php?do=seller&id=' . $id, 3, '订单已关闭', 'warning'); $arrBuyerInfo['comefrom'] = keke_shop_class::getUserAddress($arrOrderInfo['order_uid'], 2, 1, 1, 0); $arrBuyerInfo['userlevel'] = unserialize($arrBuyerInfo['buyer_level']); $arrAid = keke_user_mark_class::get_user_aid($arrBuyerInfo['uid'], 1, null, '1'); $arrServiceOrderInfo['indus_pid'] and $arrAllIndustrys = CommonClass::getIndustryByPid($arrServiceOrderInfo['indus_pid'], 'indus_id,indus_pid,indus_name'); $reportUrl .= $arrBuyerInfo['uid']; } else { $reqPage = 'buyer'; $arrSellerInfo = kekezu::get_user_info($id); !$arrSellerInfo and kekezu::show_msg('用户订单不存在', 'index.php?do=seller&id=' . $id, 3, '订单已关闭', 'warning'); $arrOrderInfo['order_uid'] && $arrOrderInfo['order_uid'] != $uid and kekezu::show_msg('用户订单不存在', 'index.php?do=seller&id=' . $id, 3, '订单已关闭', 'warning'); $arrSellerInfo['comefrom'] = keke_shop_class::getUserAddress($id, 2, 1, 1, 0); $arrSellerInfo['userlevel'] = unserialize($arrSellerInfo['seller_level']); $arrSellerInfo['nearlyIncome'] = CommonClass::getNearlyIncomeForDays($arrSellerInfo['uid']); $arrAid = keke_user_mark_class::get_user_aid($arrSellerInfo['uid'], 2, null, '1'); $reportUrl .= $arrSellerInfo['uid']; } switch ($arrOrderInfo['order_status']) { case 'seller_confirm': $step = 'step2'; break; case 'wait': $step = 'step3'; break; case 'ok': $step = 'step4'; break;
$w['a.order_status'] = "confirm"; $t == 'today' and $ext_condit = 'day(date(from_unixtime(a.order_time)))=day(curdate())'; $arrSaleArr = keke_shop_class::get_sale_info($intId, $w, $p, " a.order_time desc", $ext_condit); $arrSaleList = $arrSaleArr['sale_info']; $intCount = count($arrSaleList); $pages = $arrSaleArr['pages']; break; case "comment": $objComment = keke_comment_class::get_instance('service'); $arrCommentDatas = $objComment->get_comment_list($intId, $strUrl, $intPage); $arrCommentLists = $arrCommentDatas['data']; $strPage = $arrCommentDatas['pages']; $arrReplyLists = $objComment->get_reply_info($id); break; case "mark": $arrMarkCount = keke_shop_class::get_mark_count($model_code, $sid); $p['url'] = $strUrl . "&view=mark&intPagesize=" . $p['page_size'] . "&intPage=" . $p['page']; $p['anchor'] = '#pageT'; $w['model_code'] = $arrModelInfo['model_code']; $w['origin_id'] = $intId; $w['mark_status'] = $st; $w['mark_type'] = $ut; $arrMark = keke_user_mark_class::get_mark_info($w, $p, ' mark_id desc ', 'mark_status>0'); $arrMarkInfo = $arrMark['mark_info']; if (is_array($arrMarkInfo)) { foreach ($arrMarkInfo as $k => $v) { $arrMarkInfo[$k]['aidinfo'] = keke_user_mark_class::get_user_aid($v['by_uid'], $v['mark_type'], $v['mark_status'], 2, $v['model_code'], $v['obj_id']); } } $pages = $arrMark['pages']; break;
$table_class->del('uid', $ckb); $member_class->del('uid', $ckb); db_factory::execute(sprintf("delete from %switkey_shop where uid in (%s) ", TABLEPRE, $ids)); db_factory::execute(sprintf("delete from %switkey_service where uid in (%s)", TABLEPRE, $ids)); kekezu::admin_system_log($_lang['delete_user'] . "{$ids}"); kekezu::admin_show_msg($_lang['operate_success'], 'index.php?do=user&view=list', 3, $_lang['mulit_operate_success'], 'success'); break; case $_lang['mulit_disable']: if (in_array(1, $ckb)) { kekezu::admin_show_msg("操作失败", 'index.php?do=user&view=list', 3, "系统账号无法删除", 'warning'); } $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 {
$reportUrl = $strUrl . '&orderId=' . $orderId . '&action=rights&objId=' . $orderId . '&objType=order&type=1&toUid='; if ($arrServiceInfo['uid'] == $gUid) { $reqPage = 'seller'; $arrBuyerInfo = kekezu::get_user_info($arrOrderInfo['order_uid']); $arrBuyerInfo['comefrom'] = keke_shop_class::getUserAddress($arrOrderInfo['order_uid'], 2, 1, 1, 0); $arrBuyerInfo['userlevel'] = unserialize($arrBuyerInfo['buyer_level']); $arrAid = keke_user_mark_class::get_user_aid($arrBuyerInfo['uid'], 1, null, '1'); $arrServiceOrderInfo['indus_pid'] and $arrAllIndustrys = CommonClass::getIndustryByPid($arrServiceOrderInfo['indus_pid'], 'indus_id,indus_pid,indus_name'); $reportUrl .= $arrBuyerInfo['uid']; if (!$orderId) { kekezu::show_msg('无法购买自己的商品', 'index.php?do=goodslist', 3, '操作提示', 'warning'); } } else { $reqPage = 'buyer'; $arrSellerInfo = kekezu::get_user_info($arrServiceInfo['uid']); $arrSellerInfo['comefrom'] = keke_shop_class::getUserAddress($arrServiceInfo['uid'], 2, 1, 1, 0); $arrSellerInfo['userlevel'] = unserialize($arrSellerInfo['seller_level']); $arrSellerInfo['nearlyIncome'] = CommonClass::getNearlyIncomeForDays($arrSellerInfo['uid']); $arrAid = keke_user_mark_class::get_user_aid($arrSellerInfo['uid'], 2, null, '1'); $arrServiceInfo['indus_pid'] and $arrAllIndustrys = CommonClass::getIndustryByPid($arrServiceInfo['indus_pid'], 'indus_id,indus_pid,indus_name'); $reportUrl .= $arrSellerInfo['uid']; } if ($arrServiceInfo['model_id'] === '7') { switch ($arrOrderInfo['order_status']) { case 'seller_confirm': $step = 'step2'; break; case 'wait': $step = 'step3'; break; case 'ok':
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 { $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; 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');
$shop_obj->setWhere("shop_id=" . $shop_id); $shop_obj->setShop_status(2); $shop_obj->edit_keke_witkey_shop(); $v_arr = array($_lang['username'] => "{$shop_info['username']}", '店铺名称' => $shop_info['shop_name']); keke_shop_class::notify_user($shop_info['uid'], $shop_info['username'], 'shop_auth_fail', $_lang['task_auth_fail'], $v_arr, 2); kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['operate_success'], 'success'); break; case "open": $shop_info = db_factory::get_one(sprintf("select * from %switkey_shop where shop_id=%d", TABLEPRE, $shop_id)); $shop_obj->setWhere("shop_id=" . $shop_id); $shop_obj->setShop_status(1); $res = $shop_obj->edit_keke_witkey_shop(); $res and db_factory::execute(sprintf("update %switkey_service set service_status = 2 where uid = %d", TABLEPRE, $shop_info['uid'])); $notice_url = "<a href=\"" . $_K['siteurl'] . "/index.php?do=seller&member_id=" . $shop_info['uid'] . "\">" . $shop_info['shop_name'] . "</a>"; $v_arr = array($_lang['username'] => "{$shop_info['username']}", '店铺名称' => $notice_url); keke_shop_class::notify_user($shop_info['uid'], $shop_info['username'], 'shop_open', '店铺开启', $v_arr, 2); kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['operate_success'], 'success'); break; case 'recommend': $sql = sprintf("update %switkey_space set recommend=1 where uid =%d", TABLEPRE, $edituid); db_factory::execute($sql); kekezu::admin_system_log($_lang['recommend'] . $memberinfo_arr['username']); kekezu::admin_show_msg($_lang['operate_success'], $url, 3, '', 'success'); break; case 'move_recommend': $sql = sprintf("update %switkey_space set recommend=0 where uid =%d", TABLEPRE, $edituid); db_factory::execute($sql); kekezu::admin_system_log($_lang['move_recommend'] . $memberinfo_arr['username']); kekezu::admin_show_msg($_lang['operate_success'], $url, 3, '', 'success'); break; }
<div class="home-shop-body"> <ul class="home-min-list img"> <?php if (is_array($arrRecommGoodsLists)) { foreach ($arrRecommGoodsLists as $k => $v) { ?> <li> <a href="index.php?do=goods&id=<?php echo $v['service_id']; ?> " title="<?php echo $v['title']; ?> " target="_blank"> <img src="tpl/default/img/grey.gif" class="lazy" data-original="<?php echo keke_shop_class::output_pics($v['pic'], 210, 1); ?> " alt="<?php echo $v['title']; ?> "> <div class="home-min-list-detail"> <span class="home-min-list-title"><?php echo $v['title']; ?> </span> <span class="home-min-list-meta"><?php echo $v['username']; ?> 发布</span> <span class="home-min-list-meta"><span class="money"><sub>¥</sub><?php
$intUserType = $objAgreement->_user_role; $step = $objAgreement->stage_access_check($intUserType); $stage_nav = $objAgreement->agreement_stage_nav(); $strUrl = 'index.php?do=' . $do . '&agreeId=' . $agreeId . '&step=' . $step; $reportUrl = 'index.php?do=taskhandle&op=report&taskId=' . $arrAgreeInfo['task_id']; if ($gUid == $arrAgreeInfo['buyer_uid']) { $reportUrl .= '&objId=' . $arrAgreeInfo['work_id'] . '&objType=work&type=1&toUid=' . $arrAgreeInfo['seller_uid'] . '&toUsername='******'&objId=' . $arrAgreeInfo['task_id'] . '&objType=task&type=1&toUid=' . $arrAgreeInfo['buyer_uid'] . '&toUsername='******'seller_uid']); $arrWitkeyInfo['comefrom'] = keke_shop_class::getUserAddress($arrAgreeInfo['seller_uid'], 1, 1, 1, 0); $arrWitkeyLevel = unserialize($arrWitkeyInfo['seller_level']); $nearlyIncome = CommonClass::getNearlyIncomeForDays($arrWitkeyInfo['uid']); $arrEmploymerInfo = kekezu::get_user_info($arrAgreeInfo['buyer_uid']); $arrEmploymerInfo['comefrom'] = keke_shop_class::getUserAddress($arrAgreeInfo['buyer_uid'], 1, 1, 1, 0); $arrEmploymerLevel = unserialize($arrEmploymerInfo['buyer_level']); $arrTaskInfo = db_factory::get_one(sprintf("select * from %switkey_task where task_id = '%d'", TABLEPRE, $arrAgreeInfo['task_id'])); $taskStatus = $arrTaskInfo['task_status']; $config = unserialize($model_list[1]['config']); $jf_end_time = date('Y-m-d', $config['agree_complete_time'] * 24 * 3600 + $arrAgreeInfo['on_time']); $check_right_arr = db_factory::get_one(sprintf("select report_id,username,report_type from %switkey_report where report_status in(1,2) and origin_id ='%d'", TABLEPRE, $arrAgreeInfo['task_id'])); if ($taskStatus == 11 || $taskStatus == 13 || $taskStatus == 9) { header("location:index.php?do=task&id=" . $arrAgreeInfo['task_id']); die; } $arrAgreementProgress = array(1 => array('num' => 1, 'step' => 'step1', 'state' => '同意协议'), 2 => array('num' => 2, 'step' => 'step2', 'state' => '上传源文件'), 3 => array('num' => 3, 'step' => 'step3', 'state' => '确认源文件'), 4 => array('num' => 4, 'step' => 'step4', 'state' => '双方互评')); switch ($step) { case "step1": if ($op === 'sign') { $resText = $objAgreement->agreement_stage_one($user_type);
/*if($ajax == 'sendcode'){ $validCode = kekezu::randomkeys(6,true); $sendtime = time(); $arrNotifyArr = array ('网站名称' => $kekezu->_sys_config ['website_name'],'验证码' => $validCode); keke_shop_class::notify_user ( $_SESSION['retrieve']['userinfo'] ['uid'], $_SESSION['retrieve']['userinfo'] ['username'], 'get_password', '找回密码', $arrNotifyArr, 2 ); $encrypteuid = md5(md5($_SESSION['retrieve']['userinfo'] ['uid'])); $authsid = md5(md5($_SESSION['retrieve']['userinfo'] ['uid']).$http_agent.$sendtime); keke_user_class::createGetPwdLog('email', $_SESSION['retrieve']['userinfo'] ['uid'], $validCode, $_SESSION['retrieve']['userinfo']['email'], $encrypteuid, $authsid); $echodatas = array( 'encrypteuid' => $encrypteuid, 'authsid' => $authsid, 'http_agent' => $http_agent, 'sendtime' => $sendtime, ); $_SESSION['retrieve']['validinfo'] = $echodatas; kekezu::echojson('发送成功',1,null); }*/ } else { if ($ajax == 'sendcode') { $validCode = kekezu::randomkeys(6, true); $sendtime = time(); $arrNotifyArr = array('网站名称' => $kekezu->_sys_config['website_name'], '验证码' => $validCode); keke_shop_class::notify_user($_SESSION['retrieve']['userinfo']['uid'], $_SESSION['retrieve']['userinfo']['username'], 'get_password', '找回密码', $arrNotifyArr, 2); $encrypteuid = md5(md5($_SESSION['retrieve']['userinfo']['uid'])); $authsid = md5(md5($_SESSION['retrieve']['userinfo']['uid']) . $http_agent . $sendtime); keke_user_class::createGetPwdLog('email', $_SESSION['retrieve']['userinfo']['uid'], $validCode, $_SESSION['retrieve']['userinfo']['email'], $encrypteuid, $authsid); $echodatas = array('encrypteuid' => $encrypteuid, 'authsid' => $authsid, 'http_agent' => $http_agent, 'sendtime' => $sendtime); $_SESSION['retrieve']['validinfo'] = $echodatas; kekezu::echojson('发送成功', 1, null); } }
kekezu::admin_show_msg($_lang['user_deduct_limit'] . $info['balance'] . $_lang['yuan'], $url, 3, '', 'warning'); } else { $res = keke_finance_class::cash_out($info['uid'], floatval($cash), 'admin_charge', '', 'admin_charge'); } } $charge_reason = kekezu::filter_input($charge_reason); $sql2 = "update " . TABLEPRE . "witkey_finance set fina_mem='{$charge_reason}' where fina_id = last_insert_id()"; db_factory::execute($sql2); if ($res) { if ($cash_type == 1) { $v_arr = array('用户名' => $info[username], '金额动作' => '充值', '金额' => $cash); keke_shop_class::notify_user($info[uid], $info[username], "admin_charge", '后台手动充值通知', $v_arr, 2); kekezu::admin_show_msg('手动充值现金成功', $url, 3, '', 'success'); } else { $v_arr = array('用户名' => $info[username], '金额动作' => '扣除', '金额' => $cash); keke_shop_class::notify_user($info[uid], $info[username], "admin_charge", '后台手动充值通知', $v_arr, 2); kekezu::admin_show_msg('手动扣除现金成功', $url, 3, '', 'success'); } } else { kekezu::admin_show_msg('手动充值或扣除失败', "index.php?do={$do}&view={$view}", 3, '', 'warning'); } } function get_info($uid, $t) { $sql = " select balance,credit,uid,username from %switkey_space where "; if ($t == '1') { $sql1 = sprintf($sql . " uid=%d ", TABLEPRE, $uid, $uid); $info = db_factory::get_one($sql1); } else { $sql = sprintf($sql . " username='******'", TABLEPRE, $uid); $info = db_factory::get_one($sql);
require keke_tpl_class::template('shop/' . $model_info['model_dir'] . '/admin/tpl/goods_reason'); die; } break; } } if (isset($sbt_action)) { $key_ids = $ckb; if (is_array($key_ids)) { $action = "aa"; $log_mac_arr = array("del" => $_lang['delete'], "user" => $_lang['open'], "pass" => $_lang['pass'], "disable" => $_lang['disable']); $log_msg = $_lang['to_witkey_goods_conduct_mulit'] . $log_mac_arr[$sbt_action] . $_lang['operate']; kekezu::admin_system_log($log_msg); switch ($sbt_action) { case $_lang['mulit_delete']: $res = keke_shop_class::service_del($key_ids); $action = $_lang['delete']; break; case $_lang['mulit_pass']: foreach ($key_ids as $v) { $service_info = kekezu::get_table_data("*", "witkey_service", "service_id = {$v}"); $service_info = $service_info['0']; $add_time = time() - $service_info['on_time']; keke_payitem_class::update_service_payitem_time($service_info['payitem_time'], $add_time, $v); } $res = goods_shop_class::set_service_status($key_ids, 2); $action = $_lang['mulit_pass']; break; case $_lang['mulit_nopass']: $res = goods_shop_class::set_service_status($key_ids, 4); foreach ($key_ids as $v) {
$view = 'goods'; } if (!intval($id)) { $arrSellerInfo = db_factory::get_one(sprintf('select * from %s a left join %s b on a.uid = b.uid where a.uid =%s', TABLEPRE . 'witkey_space', TABLEPRE . 'witkey_shop', intval($gUid))); $arrSellerInfo['uid'] or kekezu::check_login(); } else { $arrSellerInfo = db_factory::get_one(sprintf('select * from %s a left join %s b on a.uid = b.uid where a.uid =%s', TABLEPRE . 'witkey_space', TABLEPRE . 'witkey_shop', intval($id))); $arrSellerInfo['uid'] or kekezu::show_msg(kekezu::lang("operate_notice"), "index.php?do=sellerlist", 2, "对不起,您访问的页面没找到!", "warning"); } if ($arrSellerInfo['shop_backstyle']) { $arrBackgroudStyle = unserialize($arrSellerInfo['shop_backstyle']); } if ($arrSellerInfo['skill_ids']) { $arrSkill = explode(',', $arrSellerInfo['skill_ids']); } $strAddress = keke_shop_class::getUserAddress($id, 2, 1, 1, 0); if ($arrSellerInfo['shop_name']) { $shopTitle = $arrSellerInfo['shop_name']; } else { $shopTitle = $arrSellerInfo['username'] . "-的店铺"; } if ($view == 'goods') { if ($arrSellerInfo['seo_title']) { $strPageTitle = $arrSellerInfo['seo_title']; } else { $strPageTitle = $shopTitle . $_K['html_title']; } if ($arrSellerInfo['seo_keyword']) { $strPageKeyword = $arrSellerInfo['seo_keyword']; } else { $strPageKeyword = $arrSellerInfo['skill_ids'];
kekezu::check_login(); if ($gUid != $arrServiceInfo['uid']) { $arrOrderProgress = array(1 => array('step' => 'step1', 'state' => '确认订单'), 2 => array('step' => 'step2', 'state' => '提交订单并支付'), 3 => array('step' => 'step3', 'state' => '文件交付'), 4 => array('step' => 'step4', 'state' => '双方互评')); } switch ($step) { case 'step1': if ($arrServiceInfo['pic']) { $arrPics = explode(',', $arrServiceInfo['pic']); } if (isset($formhash) && kekezu::submitcheck($formhash)) { $arrOrderInfo = keke_shop_class::check_has_buy($sid, $uid); if (strtoupper(CHARSET) == 'GBK') { $tar_content = kekezu::utftogbk($tar_content); } $tar_content and $arrServiceInfo['leave_message'] = kekezu::escape($tar_content) or $arrServiceInfo['leave_message'] = '0'; $resText = keke_shop_class::create_service_order($arrServiceInfo, false, null, $step); if (0 < intval($resText)) { kekezu::show_msg('订单创建成功', $strUrl . "&step=step2&orderId=" . $resText, 3, null, 'ok'); } else { kekezu::show_msg($resText, $strUrl, 3, null, 'fail'); } } break; case 'step2': if (isset($action)) { switch ($action) { case 'confirm_pay': if ($_SESSION['UserBalance']) { $arrUserBalance = explode('|', $_SESSION['UserBalance']); $strUid = $arrUserBalance[0]; $strIp = $arrUserBalance[1];
public function tender_work_hand($work_info) { global $kekezu, $_K; global $_lang; if ($this->check_if_can_hand() === true) { $this->_task_bid_obj->setWhere("task_id = {$this->_task_id} and uid = {$this->_uid} and bid_status=0"); $is_hand = $this->_task_bid_obj->count_keke_witkey_task_bid(); if ($is_hand) { return $_lang['you_haved_tender']; } $this->_task_bid_obj->setUid($this->_uid); $this->_task_bid_obj->setUsername($this->_username); $this->_task_bid_obj->setArea($work_info['area']); $this->_task_bid_obj->setCycle($work_info['cycle']); $this->_task_bid_obj->setQuote($work_info['price']); $this->_task_bid_obj->setWork_hidden($work_info['work_hidden']); $this->_task_bid_obj->setTask_id($this->_task_id); $this->_task_bid_obj->setBid_time(time()); if ($this->_task_info['workhide'] == 1) { $this->_task_bid_obj->setWorkhide(1); } $this->_task_bid_obj->setMessage($work_info['tar_content']); $res = $this->_task_bid_obj->create_keke_witkey_task_bid(); $work_info['workhide'] == 1 and keke_payitem_class::payitem_cost("workhide", '1', 'work', 'spend', $res, $this->_task_id); $this->plus_work_num(); $this->plus_take_num(); $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['user'] => $this->_username, $_lang['call'] => $_lang['you'], $_lang['task_title'] => $url, $_lang['website_name'] => $kekezu->_sys_config['website_name']); keke_shop_class::notify_user($this->_guid, $this->_gusername, 'task_hand', $_lang['hand_work_notice'], $v_arr); $feed_arr = array("feed_username" => array("content" => $this->_uid, "url" => "index.php?do=seller&id={$this->_uid}"), "action" => array("content" => '报名', "url" => ""), "event" => array("content" => $this->_task_title, "url" => "index.php?do=task&id={$this->_task_id}")); kekezu::save_feed($feed_arr, $this->_uid, $this->_username, 'task_baoming', $this->_task_id); $feed_arr = array("feed_username" => array("content" => $this->_username, "url" => "index.php?do=seller&id={$this->_uid}"), "action" => array("content" => '被报名', "url" => ""), "event" => array("content" => $this->_task_title, "url" => "index.php?do=task&id={$this->_task_id}")); $arrTaskInfo = db_factory::get_one("select * from " . TABLEPRE . "witkey_task where task_id=" . intval($this->_task_id)); kekezu::save_feed($feed_arr, $arrTaskInfo['uid'], $arrTaskInfo['username'], 'task_baoming_bei', $this->_task_id); return true; } }
$strCodeCheck = kekezu::check_secode($getPasswordCode); if ($strCodeCheck != 1) { $tips['errors']['code'] = $strCodeCheck; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } } kekezu::show_msg('', "index.php?do=retrieve&strStep=step2&account={$account}", NULL, NULL, 'ok'); } break; case "step2": if (kekezu::submitcheck($formhash)) { $strAccount = strval($account); $arrUserInfo = kekezu::get_user_info($strAccount, true); $arrPassInfo = reset_set_password($arrUserInfo); $arrNotifyArr = array('用户名' => $arrUserInfo['username'], '网站名称' => $kekezu->_sys_config['website_name'], '密码' => $arrPassInfo['code'], '安全码' => $arrPassInfo['sec_code']); keke_shop_class::notify_user($arrUserInfo['uid'], $arrUserInfo['username'], 'get_password', '找回密码', $arrNotifyArr, 2); kekezu::show_msg('您的新密码已发送到邮箱,请注意查收', $strUrl, NULL, NULL, 'ok'); } else { $arrUserInfo = kekezu::get_user_info($account, true); $arrEmailAuths = db_factory::query(sprintf("select * from %switkey_auth_email where uid=%d and auth_status=1", TABLEPRE, $arrUserInfo['uid'])); $arrEmailAuths and $strEmailInfo = $arrEmailAuths['0']['email']; $strEmail = explode('@', $strEmailInfo); $intLeng = strlen($strEmail[0]); $i = intval($intLeng / 2); $strRe = '*'; $strRe = str_pad($strRe, $intLeng - $i, '*', STR_PAD_LEFT); $strEmail = substr_replace($strEmailInfo, $strRe, $i, $intLeng - $i); $strKfPhone = kekezu::get_rand_kf(); } break; }
public static function closeShop($uid, $status = '3') { $res = self::updateShopStatus($uid, $status); if ($res) { $shop_info = db_factory::get_one("SELECT * FROM `" . TABLEPRE . "witkey_shop` WHERE uid = '{$uid}'"); db_factory::execute("update " . TABLEPRE . "witkey_service set service_status=3 where uid='{$uid}'"); db_factory::execute("update " . TABLEPRE . "witkey_space set autoshop=2 where uid='{$uid}'"); $v_arr = array('用户名' => "{$shop_info['username']}", '店铺名称' => $shop_info['shop_name']); keke_shop_class::notify_user($shop_info['uid'], $shop_info['username'], 'shop_close', '店铺关闭', $v_arr); return true; } return false; }
public function dispose_order($order_id, $action, $is_kf = null, $ht_url = null, $kefu_uid = NULL, $isApp = false) { global $_lang, $uid, $username, $_K, $kekezu; if ($is_kf && $is_kf != 'sys' && $kefu_uid) { $u_info = kekezu::get_user_info($kefu_uid); if ($u_info['group_id'] == 7) { $kefu = TRUE; } else { $kefu = false; } } else { $kefu = false; } if ($is_kf == 'sys') { $kefu = TRUE; } $order_info = keke_order_class::get_order_info($order_id); $service_info = keke_shop_class::get_service_info($order_info['obj_id']); if ($order_info) { $s_order_link = "<a href=\"" . $_K['siteurl'] . "/index.php?do=user&view=transaction&op=sold&intModelId=" . $service_info['model_id'] . "\">" . $order_info['order_name'] . "</a>"; $b_order_link = "<a href=\"" . $_K['siteurl'] . "/index.php?do=user&view=transaction&op=orders&intModelId=" . $service_info['model_id'] . "\">" . $order_info['order_name'] . "</a>"; if ($uid == $order_info['order_uid'] || $uid == $order_info['seller_uid'] || $uid == ADMIN_UID || $kefu) { if ($service_info['service_status'] == '2') { if ($action == 'delete') { $res = keke_order_class::del_order($order_id, '', 'json'); if ($isApp) { $res and app_class::response(array('ret' => 1006)) or app_class::response(array('ret' => 1007)); } } else { switch ($action) { case "ok": $data = array(':service_id' => $service_info['service_id'], ':title' => $service_info['title']); keke_finance_class::init_mem('buy_service', $data); if ($order_info['order_amount'] > 0) { $suc = keke_finance_class::cash_out($order_info['order_uid'], $order_info['order_amount'], 'buy_service', '', 'service', $order_info['obj_id']); } else { $suc = 1; } if ($suc) { db_factory::execute("update " . TABLEPRE . "witkey_finance set order_id={$order_id} where fina_id={$suc}"); keke_order_class::set_order_status($order_id, $action); $exec_time = time() + $service_info['confirm_max'] * 24 * 3600; db_factory::execute(sprintf(" update %switkey_order set ys_end_time='%d' where order_id='%d'", TABLEPRE, $exec_time, $order_id)); $v_arr = array($_lang['user_msg'] => $order_info['order_username'], $_lang['action'] => $_lang['haved_confirm_pay'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link); keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['goods_order_confirm_pay'], $v_arr); $objProm = keke_prom_class::get_instance(); if ($objProm->is_meet_requirement("service", $order_info['obj_id'])) { $objProm->create_prom_event("service", $order_info['order_uid'], $order_info['obj_id'], $order_info['order_amount']); } if ($isApp) { app_class::response(array('ret' => 1010, 'orderinfo' => $order_info)); } else { return true; } } else { if ($isApp) { app_class::response(array('ret' => 1011, 'orderinfo' => $order_info)); } else { return '订单付款失败,您的账户余额不足以支付该订单<br />点击这里<a href="index.php?do=pay&id=' . $order_info['order_id'] . '&type=order">去充值</a>'; } } break; case "close": $res = keke_order_class::order_cancel_return($order_id); if ($res) { keke_order_class::set_order_status($order_id, $action); $v_arr = array($_lang['user_msg'] => $order_info['order_username'], $_lang['action'] => $_lang['close_order_have'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link); keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['goods_order_close'], $v_arr); if ($isApp) { app_class::response(array('ret' => 1012, 'orderinfo' => $order_info)); } else { kekezu::show_msg($_lang['system prompt'], "index.php?do=user&view=employer&op=shop&model_id=" . $service_info['model_id'], '1', $_lang['order_deal_complete_and_close'], 'alert_right'); } } else { if ($isApp) { app_class::response(array('ret' => 1013, 'orderinfo' => $order_info)); } else { kekezu::show_msg($_lang['system prompt'], "index.php?do=user&view=employer&op=shop&model_id=" . $service_info['model_id'], '1', $_lang['order_deal_fail_and_link_kf'], 'alert_error'); } } break; case "confirm": $res = keke_order_class::set_order_status($order_id, $action); if ($res) { $model_info = $kekezu->_model_list[$order_info['model_id']]; $profit = $service_info['profit_rate'] * $order_info['order_amount'] / 100; $data = array(':service_id' => $service_info['service_id'], ':title' => $service_info['title']); keke_finance_class::init_mem('sale_service', $data); keke_finance_class::cash_in($order_info['seller_uid'], $order_info['order_amount'] - $profit, 'sale_service', '', 'service', $order_info['obj_id'], $profit); keke_shop_class::plus_sale_num($order_info['obj_id'], $order_info['order_amount']); keke_user_mark_class::create_mark_log($model_info['model_code'], 2, $order_info['order_uid'], $order_info['seller_uid'], $order_id, $order_info['order_amount'] - $profit, $order_info['obj_id'], $order_info['order_username'], $order_info['seller_username']); keke_user_mark_class::create_mark_log($model_info['model_code'], 1, $order_info['seller_uid'], $order_info['order_uid'], $order_id, $order_info['order_amount'], $order_info['obj_id'], $order_info['seller_username'], $order_info['order_username']); keke_shop_class::plus_mark_num($order_info['obj_id']); $objProm = keke_prom_class::get_instance(); if ($objProm->is_meet_requirement("service", $order_info[obj_id])) { $objProm->create_prom_event("service", $order_info['order_uid'], $order_info['obj_id'], $order_info['order_amount']); } $objProm->dispose_prom_event("service", $order_info['order_uid'], $order_info['obj_id']); if ($is_kf != null) { $v_arr = array($_lang['user_msg'] => $order_info['seller_username'], $_lang['action'] => '客服协助作品已交付完成', $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link); keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['work_order_complete'], $v_arr); $v_arr1 = array($_lang['user_msg'] => $order_info['order_username'], $_lang['action'] => '客服协助作品已交付完成', $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link); keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['work_order_complete'], $v_arr1); return true; } else { $v_arr = array($_lang['user_msg'] => $order_info['order_username'], $_lang['action'] => $_lang['buy_work_coplete'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link); keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['work_order_complete'], $v_arr); if ($isApp) { app_class::response(array('ret' => 1022, 'orderinfo' => $order_info)); } else { return true; } } } else { if ($isApp) { app_class::response(array('ret' => 1023, 'orderinfo' => $order_info)); } else { kekezu::show_msg($_lang['system prompt'], "index.php?do=order&sid={$order_info['obj_id']}&orderId={$order_id}&steps=step3", '1', $_lang['order_deal_fail_and_link_kf'], 'alert_error'); } } break; case "arbitral": $res = keke_order_class::set_order_status($order_id, $action); if ($res) { if ($uid == $order_info['order_uid']) { $v_arr = array($_lang['user'] => $order_info['order_username'], $_lang['action'] => $_lang['buyer_start_arbitrate'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link); keke_shop_class::notify_user($order_id['seller_uid'], $order_info['seller_username'], "order_change", $_lang['sevice_order_arbitrate_submit'], $v_arr); } else { $v_arr = array($_lang['user_msg'] => $order_info['seller_username'], $_lang['action'] => $_lang['seller_start_arbitrate'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $b_order_link); keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['work_order_submit'], $v_arr); } if ($isApp) { app_class::response(array('ret' => 1022, 'orderinfo' => $order_info)); } else { return true; } } else { if ($isApp) { app_class::response(array('ret' => 1023, 'orderinfo' => $order_info)); } else { return $_lang['order_deal_fail_and_link_kf']; } } break; } } } else { $res = keke_order_class::set_order_status($order_id, 'close'); keke_order_class::order_cancel_return($order_id); $v_arr = array($_lang['user_msg'] => $_lang['system'], $_lang['action'] => $_lang['stop_your_order_and_your_cash_return'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $b_order_link); keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['goods_order_close'], $v_arr); $v_arr = array($_lang['user_msg'] => $_lang['system'], $_lang['action'] => $_lang['stop_your_order_and_your_cash_return'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link); keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['goods_order_close'], $v_arr); if ($isApp) { $res and app_class::response(array('ret' => 1006)) or app_class::response(array('ret' => 1007)); } else { $res and kekezu::keke_show_msg('', $_lang['order_delete_success'], "", 'json') or kekezu::keke_show_msg('', $_lang['order_delete_fail'], "error", 'json'); } } } else { if ($isApp) { app_class::response(array('ret' => 1024, 'orderinfo' => $order_info)); } else { kekezu::keke_show_msg('', $_lang['error_order_num_notice'], 'error', 'json'); } } } else { if ($isApp) { app_class::response(array('ret' => 1025, 'orderinfo' => $order_info)); } else { kekezu::keke_show_msg('', $_lang['no_exist_goods_order'], 'error', 'json'); } } }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); $ops = array('basic', 'order', 'comm', 'mark'); in_array($op, $ops) or $op = 'basic'; if ($ajax == 'delfile') { keke_shop_class::delServiceFiles($serviceid, $filename, $type); $data = array(); $data['type'] = $type; $data['dataid'] = $dataid; kekezu::echojson('删除成功', 1, $data); die; } keke_lang_class::loadlang('public', 'shop'); keke_lang_class::loadlang('task_edit', 'task'); if ($op == 'basic') { $service_obj = new service_shop_class(); $service_info = db_factory::get_one(sprintf("select * from %switkey_service where service_id='%d'", TABLEPRE, $service_id)); if ($service_info['pic']) { $servicePics = explode(',', $service_info['pic']); } if ($service_info['file_path']) { $serviceFiles = explode(',', $service_info['file_path']); } $ac_url = "index.php?do=model&model_id=7&view=edit&service_id=" . $service_id; $status_arr = $service_obj->get_service_status(); unset($status_arr[1]); $service_info['ext_fields'] = CustomClass::getExtDataList($service_info['service_id'], $service_info['model_id']); if ($sbt_edit) { if ($ext_fds) { CustomClass::editExtData($service_id, $model_id, $ext_fds);
} $arrBreadcrumbs = array(1 => array('url' => 'index.php?do=goodslist', 'name' => '威客商城'), 2 => array('url' => 'index.php?do=goodslist&pd=' . $arrServiceInfo['indus_pid'], 'name' => $indus_p_arr[$arrServiceInfo['indus_pid']]['indus_name']), 3 => array('url' => 'index.php?do=goodslist&pd=' . $arrServiceInfo['indus_pid'] . '&i=' . $arrServiceInfo['indus_id'], 'name' => $indus_arr[$arrServiceInfo['indus_id']]['indus_name'])); $arrCoverList = keke_shop_class::output_pics($arrServiceInfo['pic'], ''); $intNum = sizeof($arrCoverList); $mc = keke_shop_class::get_mark_count_ext($model_list[$arrServiceInfo['model_id']]['model_code'], $intId); $mc['all'] = intval($mc[1]['c'] + $mc[2]['c']); $mc['seller'] = intval($mc[1]['c']); $mc['buyer'] = intval($mc[2]['c']); $arrOwnerInfo = kekezu::get_user_info($arrServiceInfo['uid']); $strAddress = keke_shop_class::getUserAddress($arrServiceInfo['uid'], 2, 1, 1, 0); $strUserLevel = unserialize($arrOwnerInfo['seller_level']); $arrAuthItems = keke_auth_fac_class::getAuthItemListByUid($arrOwnerInfo['uid']); $arrShopAid = keke_user_mark_class::get_user_aid($arrOwnerInfo['uid'], 2, null, 1); $arrOtherGoods = db_factory::query("select * from " . TABLEPRE . "witkey_service where uid=" . intval($arrOwnerInfo['uid']) . " and service_id!='" . $arrServiceInfo['service_id'] . "' and service_status=2 order by on_time desc limit 3"); $arrPayitemLists = PayitemClass::getPayitemListDetail('goods', $arrServiceInfo['service_id']); $arrPayitemShow = keke_shop_class::getPayitemShow($arrServiceInfo); $arrRecommShops = db_factory::query(sprintf("select a.username,a.uid,b.indus_id,b.indus_pid,a.shop_name,if(b.seller_total_num>0,b.seller_good_num/b.seller_total_num,0) as good_rate from %switkey_shop a " . " left join %switkey_space b on a.uid=b.uid where b.recommend=1 and b.status=1 and IFNULL(a.is_close,0)=0 and shop_status=1 order by if(b.indus_pid=%d ,1,0) desc, good_rate desc limit 0,5", TABLEPRE, TABLEPRE, $arrServiceInfo['indus_pid']), 1, $intIndexCacheTime); if ($arrModelInfo['open_custom'] == '1') { $c_open = 1; $arrShowCustoms = CustomClass::getExtData($arrServiceInfo['service_id'], $arrModelInfo['model_id']); foreach ($arrShowCustoms as $k => $v) { if ($v['extdata']) { $arrShowCustoms[$k]['data'] = unserialize($v['extdata']); } } } require S_ROOT . "/shop/" . $arrModelInfo['model_dir'] . "/control/index.php"; require keke_tpl_class::template("shop/" . $arrModelInfo['model_code'] . "/tpl/" . $_K['template'] . "/index"); die; } $_SESSION['spread'] = 'index.php?do=goods&id=' . intval($id);
<?php defined("ADMIN_KEKE") or exit("Access Denied"); kekezu::admin_check_role(147); $enterprise_obj = new Keke_witkey_auth_enterprise_class(); $url = "index.php?do=" . $do . "&view=" . $view . "&code=" . $code . "&w[page_size]=" . $w[page_size] . "&w[enterprise_auth_id]=" . $w[enterprise_auth_id] . "&w[username]=" . $w[username] . "&w[auth_status]=" . $w[auth_status]; if (isset($ac)) { switch ($ac) { case "pass": kekezu::admin_system_log($obj . $_lang['enterprise_auth_pass']); $auth_obj->review_auth($enterprise_auth_id, 'pass', $url); break; case "not_pass": if ($is_submit == "1") { $v_arr = array($_lang['username'] => $name, '网站名称' => $kekezu->_sys_config['website_name'], "审核原因" => $reason); keke_shop_class::notify_user($_GET['uid'], $name, 'auth_auth_fail', "企业认证失败", $v_arr, 2); kekezu::admin_system_log($obj . $_lang['enterprise_auth_nopass']); $auth_obj->review_auth($enterprise_auth_id, 'not_pass', $url); } else { $uid = $_GET['uid']; $strSql = "select * from " . TABLEPRE . "witkey_space where uid=" . $uid; $arrResult = db_factory::get_one($strSql); require keke_tpl_class::template('auth/enterprise/admin/tpl/auth_tp'); die; } break; case 'del': kekezu::admin_system_log($obj . $_lang['enterprise_auth_delete']); $auth_obj->del_auth($enterprise_auth_id, $url); break; }
} if (strtoupper(CHARSET) == 'GBK') { $title = kekezu::utftogbk($title); $content = kekezu::utftogbk($content); } $serviceOrderInfo = array(); $serviceOrderInfo['uid'] = $gUid; $serviceOrderInfo['username'] = $gUsername; $serviceOrderInfo['service_id'] = $sid; $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); $resText = keke_shop_class::create_service_order($arrServiceInfo, false, $serviceOrderInfo); if (0 < intval($resText)) { kekezu::show_msg('订单创建成功', $strUrl . "&step=step2&orderId=" . $resText, 3, null, 'ok'); } else { kekezu::show_msg($resText, $strUrl, 3, null, 'fail'); } } break; case 'step2': break; case 'step3': if (isset($action)) { switch ($action) { case 'pay': $objShop = new service_shop_class(); $resText = $objShop->dispose_order($orderId, 'ok');