function pub_mode_init($std_cache_name, $data = array()) { global $kekezu; global $_lang; $release_info = $this->_std_obj->_release_info; switch ($this->_pub_mode) { case "professional": break; case "guide": break; case "onekey": if (!$release_info) { $sql = " select model_id,task_title,task_desc,indus_id,indus_pid,\n\t\t\t\t\t\ttask_cash,contact from %switkey_task where task_id='%d' and model_id='%d'"; $task_info = db_factory::get_one(sprintf($sql, TABLEPRE, $data['t_id'], $this->_model_id)); $task_info or kekezu::show_msg($_lang['operate_notice'], $_SERVER['HTTP_REFERER'], 3, $_lang['not_exsist_relation_task_and_not_user_onekey'], "warning"); $release_info = $this->onekey_mode_format($task_info); $allow_time = $kekezu->get_show_day($task_info['task_cash'], $this->_model_id); $task_day = date('Y-m-d', $allow_time * 24 * 3600 + time()); $release_info['txt_task_day'] = $task_day; $release_info['txt_task_cash'] = intval($task_info['task_cash']); $prize_info = db_factory::query(sprintf("select * from %switkey_task_prize where task_id='%d'", TABLEPRE, $data['t_id'])); foreach ($prize_info as $v) { $release_info['txt_prize' . $v['prize'] . '_num'] = $v['prize_count']; $release_info['txt_prize' . $v['prize'] . '_cash'] = intval($v['prize_cash']); } $this->save_task_obj($release_info, $std_cache_name); } break; } }
static function querySelect($table_name, $field, $tablefields) { $db_factory = new db_factory(); $fori = 0; $forlimit = 500; $sqlCount = $db_factory->get_count("select count(*) from " . $table_name); if (!$sqlCount) { return false; } $tabledump = ''; $numfields = count($tablefields); while ($fori <= $sqlCount) { $sql = $db_factory->query("select * from " . $table_name . " limit " . $fori . "," . $forlimit); foreach ($sql as $r) { $row = array_values($r); $sqlmsg = $comma = ''; for ($i = 0; $i < $numfields; $i++) { $sqlmsg .= $comma . (!empty($row[$i]) && (self::strexists($tablefields[$i]['Type'], 'char') || self::strexists($tablefields[$i]['Type'], 'text')) ? '0x' . bin2hex($row[$i]) : '\'' . mysql_escape_string($row[$i]) . '\''); $comma = ','; } $tabledump .= " INSERT INTO " . $table_name . " VALUES(" . $sqlmsg . ") ;\n"; } $fori += $forlimit; } return $tabledump; }
function income_data($path, $every_year = false) { global $_lang; $year_arr = db_factory::query(sprintf("SELECT DISTINCT(YEAR(FROM_UNIXTIME(fina_time))) as year from %switkey_finance", TABLEPRE)); $month_init_arr = array(); $series_arr = array(); for ($i = 1; $i <= 12; $i++) { $month_init_arr[$i] = '<point name="' . $i . '" y="0"/>'; } if (strtolower(CHARSET) != 'utf-8') { $y = kekezu::gbktoutf($_lang['year']); } foreach ($year_arr as $key => $value) { $month_arr = $month_init_arr; $sql = " SELECT MONTH(FROM_UNIXTIME(fina_time)) as mon,sum(fina_cash) as cash,sum(fina_credit) as credit from %switkey_finance where year(FROM_UNIXTIME(fina_time))='%s' GROUP BY mon order by mon desc"; $temp = db_factory::query(sprintf($sql, TABLEPRE, $value['year'])); $point = array(); while (list($k, $v) = each($temp)) { $point[$v['mon']] = '<point name="' . (int) $v['mon'] . '" y="' . ($v['cash'] + $v['credit']) . '"/>'; unset($month_arr[$v['mon']]); } $point = $month_arr + $point; ksort($point); $point = implode('', $point); $series_arr[$value['year']] = '<series name="' . $value['year'] . $y . '">' . $point . '</series>'; if ($every_year == true) { $year_path = sprintf($path, $value['year']); update_xml($year_path, '<data>' . $series_arr[$value['year']] . '</data>', 'income'); } } $series = implode('', $series_arr); update_xml(sprintf($path, 'total'), '<data>' . $series . '</data>', 'income'); }
public function isFieldsExsits() { $col_info = db_factory::query("show COLUMNS FROM " . $this->_tbname . " WHERE Field='" . $this->_tbfield . "' "); if ($col_info) { return true; } return false; }
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 task_confirm_timeout() { $task_list = db_factory::query(sprintf("select * from %switkey_task where task_status =6 and end_time<'%s' and model_id=12", TABLEPRE, time())); if (is_array($task_list)) { foreach ($task_list as $v) { $task_obj = new match_task_class($v); $task_obj->task_other_timeout(); } } }
public function task_top_end() { $task_list = db_factory::query(sprintf(" select * from %switkey_task a left join %switkey_payitem_record b\n\t\t\t\ton a.task_id=b.obj_id where a.tasktop=1 and a.model_id = '2' and b.obj_type='task' and b.end_time < '%s' ", TABLEPRE, TABLEPRE, time())); if (is_array($task_list)) { foreach ($task_list as $k => $v) { $task_obj = new sreward_task_class($v); $task_obj->task_top_end(); } } }
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: $this->_task_obj->dispose_task_return(); $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']); break; case 2: $arrBids = db_factory::query("select * from " . TABLEPRE . "witkey_task_work where work_status=4"); if (is_array($arrBids)) { foreach ($arrBids as $k => $v) { db_factory::execute(sprintf("update %switkey_task_work set work_status = 0 where work_id = '%d'", TABLEPRE, $v['work_id'])); db_factory::execute(sprintf(" update %switkey_space set accepted_num = accepted_num-1 where uid = '%d'", TABLEPRE, $v['uid'])); } } $this->_task_obj->auto_choose(); $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']); break; case 3: $this->process_notify('nopass', $this->_report_info, $this->_user_info, $this->_to_user_info, $op_result['process_result'], $op_result['reply']); $res = $this->change_status($this->_report_id, '3', $op_result, $op_result, $op_result['process_result']); break; case 4: $res = $this->shield_work($this->_obj_info['obj_id']); $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']); break; case 5: $this->cancel_bid($this->_obj_info['obj_id']); $this->_task_obj->auto_choose(); $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']); 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"); } } }
public static function get_priv_item($model_id) { global $kekezu; $priv_item = $kekezu->_cache_obj->get("priv_rule_item_" . $model_id); if (!$priv_item) { $sql = " select a.*,b.g_title,b.m_title,c.rule,c.r_id,c.mark_rule_id from " . TABLEPRE . "witkey_priv_rule c left join " . TABLEPRE . "witkey_priv_item\n\t\ta on c.item_id = a.op_id left join " . TABLEPRE . "witkey_mark_rule b on c.mark_rule_id = b.mark_rule_id where a.model_id = '{$model_id}' order by c.mark_rule_id asc"; $item = db_factory::query($sql); $priv_item = array(); foreach ($item as $v) { $priv_item[$v['op_code']][$v['mark_rule_id']] = $v; } $kekezu->_cache_obj->set("priv_rule_item_" . $model_id, $priv_item); } return $priv_item; }
static function redirect_second_domain() { global $_K, $kekezu; if ($kekezu->_sys_config['second_domain']) { $host = $_SERVER['HTTP_HOST']; preg_match('/^(\\d+)\\./', $host, $m); if ($m[1]) { $uid = intval($m[1]); $e = db_factory::query(sprintf(' select uid from %switkey_member where uid=%d', TABLEPRE, $uid)); if ($e) { header('Location:' . $_K['siteurl'] . '/index.php?do=seller&id=' . $uid . '&' . $_SERVER['QUERY_STRING']); } else { header('Location:' . $_K['siteurl'] . '/index.php?do=error&type=user'); } } } }
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']); } } }
public static function set_on_sale_num($service_ids, $status = 2) { $service_ids = (array) $service_ids; $service_ids = implode(',', $service_ids); if ($service_ids) { $shop_ids = db_factory::query(' select shop_id,service_status ss from ' . TABLEPRE . 'witkey_service where service_id in (' . $service_ids . ')'); if ($shop_ids) { foreach ($shop_ids as $v) { $ss = intval($v['ss']); if ($ss != $status) { if ($status == 3 || $ss == 2 && ($status = -1)) { $plus = -1; } else { $plus = 1; } $ids .= $v['shop_id'] . ','; } } $ids = rtrim($ids, ','); $ids && $plus and db_factory::execute(' update ' . TABLEPRE . 'witkey_shop set on_sale=on_sale+' . $plus . ' where shop_id in (' . $ids . ')'); } } }
public function get_user_auth_info($uid, $is_username = 0, $show_id = '') { $sql = "select * from " . TABLEPRE . $this->_auth_table_name; if ($uid) { $is_username == '0' and $sql .= " where uid = '" . intval($uid) . "' " or $sql .= " where username = '******' "; $show_id and $sql .= " and " . $this->_primary_key . "=" . intval($show_id); $sql .= " order by {$this->_primary_key} desc"; $data = db_factory::query($sql); if (sizeof($data) == 1) { return $data[0]; } else { return $data; } } else { return array(); } }
<?php $msgConfigsTpl = array('admin_charge' => array('config_id' => '142', 'k' => 'admin_charge', 'obj' => 'manage', 'desc' => '手动充值', 'prompt' => '管理员给用户手动充值时用户会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1421811808', 'content' => '<p>尊敬的 {用户名}:</p><p> 后台管理员{金额动作}您现金{金额},感谢您对{网站名称}网的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p><p>--------------------------------------------------------------------------------------------------------------------</p><p>此邮件为系统自动发出的邮件,请勿直接回复。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:后台管理员{金额动作}您现金{金额}', 'mobile' => '0'), 'agreement' => array('config_id' => '81', 'k' => 'agreement', 'obj' => 'task', 'desc' => '协议签署', 'prompt' => '用户中标单人悬赏后,签署协议成功后会收到此通知。(这里有问题,如果是雇主或威客其中一方签订协议,另一方也会收到这条信息,并且内容身份错误)', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1435218234', 'content' => '<p>尊敬的 {用户名}:</p><p>{协议状态}:</p><p>协议链接:{协议链接}</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:{协议状态}:协议链接:{协议链接}', 'mobile' => '1'), 'agreement_file' => array('config_id' => '82', 'k' => 'agreement_file', 'obj' => 'task', 'desc' => '协议文件交付', 'prompt' => '用户发布的单人悬赏,威客方交付了任务时,用户会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1435218234', 'content' => '<p>尊敬的 {用户名}:</p><p>用户{发起者}已经{动作}:</p><p>协议链接:{协议链接}</p><p>协议状态:{协议状态}<br /></p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:用户{发起者}已经{动作}:协议链接:{协议链接}协议状态:{协议状态}', 'mobile' => '1'), 'alipayjs_auth' => array('config_id' => '158', 'k' => 'alipayjs_auth', 'obj' => 'auth', 'desc' => '支付宝认证通知', 'prompt' => '后台打款给用户的时候', 'v' => 'a:3:{s:8:"send_sms";i:1;s:10:"send_email";i:1;s:15:"send_mobile_sms";i:1;}', 'on_time' => '1364996161', 'content' => '<p>您申请的支付宝认证已经受理,管理员已经打款到您的账户,请及时查收,并在<a href="index.php?do=user&view=account&op=index&code=alipayjs">确认收款金额</a>中填写您收到的金额数,以便你认证成功!</p>', 'send_type' => '1', 'mobile_content' => '您申请的支付宝认证已经受理,管理员已经打款到您的账户,请及时查收,并在确认收款金额中填写您收到的金额数,以便你认证成功!', 'mobile' => '1'), 'auth_auth_fail' => array('config_id' => '153', 'k' => 'auth_auth_fail', 'obj' => 'auth', 'desc' => '企业认证审核通知', 'prompt' => '用户申请的企业认证未通过审核时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1421811808', 'content' => '<p>尊敬的 {用户名}:您的申请的企业认证未通过审核,未通过审核的原因:{审核原因},感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的申请的企业认证未通过审核,未通过审核的原因:{审核原因}', 'mobile' => '0'), 'auth_fail' => array('config_id' => '111', 'k' => 'auth_fail', 'obj' => 'auth', 'desc' => '认证失败', 'prompt' => '当用户认证失败时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1343204483', 'content' => '<p>您的{认证代码}没通过,请到<a href="{认证链接}">认证中心</a>查看详细</p>', 'send_type' => '1', 'mobile_content' => '您的{认证代码}没通过,请到认证中心查看详细', 'mobile' => '0'), 'auth_success' => array('config_id' => '110', 'k' => 'auth_success', 'obj' => 'auth', 'desc' => '认证成功', 'prompt' => '当用户认证成功时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1343204483', 'content' => '<p>您的{认证代码}已通过,请到<a href="{认证链接}">认证中心</a>查看详细</p>', 'send_type' => '1', 'mobile_content' => '您的{认证代码}已通过,请到认证中心查看详细', 'mobile' => '0'), 'auto_choose' => array('config_id' => '87', 'k' => 'auto_choose', 'obj' => 'task', 'desc' => '自动选稿', 'prompt' => '用户参与的计件任务,自动选稿后,用户会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1435218234', 'content' => '<p>尊敬的 {用户名}:</p><p>您参与的任务{任务编号}进行了自动选稿,任务信息:</p><p>任务标题:{任务标题}</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您参与的任务{任务编号}进行了自动选稿', 'mobile' => '1'), 'aut_auth_fail' => array('config_id' => '154', 'k' => 'aut_auth_fail', 'obj' => 'auth', 'desc' => '实名认证审核通知', 'prompt' => '用户申请的实名认证未通过审核时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1421811808', 'content' => '<p>尊敬的 {用户名}:您的申请的实名认证未通过审核,未通过审核的原因:{审核原因},感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的申请的实名认证未通过审核,未通过审核的原因:{审核原因}', 'mobile' => '0'), 'bank_auth' => array('config_id' => '109', 'k' => 'bank_auth', 'obj' => 'auth', 'desc' => '银行认证', 'prompt' => '当用户申请进行银行认证时会收到此通知。', 'v' => 'a:1:{s:8:"send_sms";i:1;}', 'on_time' => '1343204483', 'content' => '<p>您申请的银行认证已经受理,管理员已经打款到您的账户,请及时查收,并在<a href="index.php?do=user&view=account&op=index&code=bank">确认收款金额</a>中填写您收到的金额数,以便你认证成功!</p>', 'send_type' => '1', 'mobile_content' => '您申请的银行认证已经受理,管理员已经打款到您的账户,请及时查收,并在确认收款金额中填写您收到的金额数,以便你认证成功!', 'mobile' => '0'), 'dispose_task' => array('config_id' => '101', 'k' => 'dispose_task', 'obj' => 'task', 'desc' => '稿件结算', 'prompt' => '用户参与的计件任务,进行结算环节时,用户会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1335428501', 'content' => '<p>尊敬的 {用户名}:</p><p>您参与的任务已经结束。</p><p>任务编号:{任务编号}</p><p>任务链接:{任务链接}<br /></p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您参与的任务已经结束', 'mobile' => '1'), 'draw_success' => array('config_id' => '5', 'k' => 'draw_success', 'obj' => 'found', 'desc' => '提现成功', 'prompt' => '用户提现成功后将会发送此通知。', 'v' => 'a:3:{s:8:"send_sms";i:1;s:10:"send_email";i:1;s:15:"send_mobile_sms";i:1;}', 'on_time' => '1427947128', 'content' => '<p>您在{网站名称}的提现申请已被受理,您的提现金额为{提现金额}元,提现账户:{帐户}请查收!</p>', 'send_type' => '1', 'mobile_content' => '您在{网站名称}的提现申请已被受理,您的提现金额为{提现金额}元,提现账户:{帐户}请查收!', 'mobile' => '1'), 'dtend_amount' => array('config_id' => '155', 'k' => 'dtend_amount', 'obj' => 'task', 'desc' => '雇主已托管赏金', 'prompt' => '用户中标的订金招标任务,雇主托管赏金后用户会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1421811808', 'content' => '<p>您中标的{模型名称}任务<a href="index.php?do=task&id={任务编号}">{任务标题}</a>雇主已成功托管赏金{金额}元</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '您中标的{模型名称}任务{任务标题}雇主已成功托管赏金{金额}元', 'mobile' => '1'), 'freeze' => array('config_id' => '2', 'k' => 'freeze', 'obj' => 'user', 'desc' => '用户冻结', 'prompt' => '当用户的账号被后台冻结后会收到此通知。', 'v' => 'a:3:{s:8:"send_sms";i:1;s:10:"send_email";i:1;s:15:"send_mobile_sms";i:1;}', 'on_time' => '1427947128', 'content' => '<p>尊敬的 {用户名}:</p><p>您的用户已被冻结,感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p><p>--------------------------------------------------------------------------------------------------------------------</p><p>此邮件为系统自动发出的邮件,请勿直接回复。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的用户已被冻结', 'mobile' => '1'), 'get_password' => array('config_id' => '100', 'k' => 'get_password', 'obj' => 'user', 'desc' => '密码找回', 'prompt' => '当用户申请找回密码成功时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1364996161', 'content' => '<p>亲爱的用户:</p><p>您好!感谢您使用{网站名称},您正在进行邮箱验证,本次请求的验证码为:</p><p>{验证码}(为了保障您帐号的安全性,请在1小时内完成验证。)</p><p>如有任何疑问,欢迎随时与我们联系,我们将竭诚为您服务!</p><p>欢迎继续关注{网站名称}!</p><p>祝:</p><p>工作学习顺利, 生活愉快!</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:感谢您对{网站名称}的信任,您的新密码为{密码},支付密码为{安全码},请保护好您的账号', 'mobile' => '1'), 'goods_order' => array('config_id' => '85', 'k' => 'goods_order', 'obj' => 'service', 'desc' => '商品订单提交', 'prompt' => '用户发布的商品,有人进行了下单操作时用户会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1366440936', 'content' => '<p>尊敬的 {用户名}:</p><p>{用户动作}了您的{服务类型}:{服务名称}。</p><p>买家留言:{买家留言}</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:{用户动作}了您的{服务类型}:{服务名称}。买家留言:{买家留言}', 'mobile' => '1'), 'group_set' => array('config_id' => '121', 'k' => 'group_set', 'obj' => 'manage', 'desc' => '分组设置', 'prompt' => '用户被管理员分配权限设置后台分组时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1343204483', 'content' => '<p>尊敬的 {用户名}:管理员{管理员名称}设置了您的后台用户组</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:管理员{管理员名称}设置了您的后台用户组', 'mobile' => '0'), 'gy_notice_to_buyer' => array('config_id' => '150', 'k' => 'gy_notice_to_buyer', 'obj' => 'service', 'desc' => '雇佣通知买家', 'prompt' => '用户成功发起雇佣时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1421811808', 'content' => '<p>尊敬的 {用户名}:</p><p>你对{用户}发出雇佣,{状态变更}</p><p>请尽快前往用户中心处理。</p><p>雇佣信息:雇佣订单编号:{订单编号}</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:你对{用户}发出雇佣,{状态变更}请尽快前往用户中心处理', 'mobile' => '0'), 'gy_notice_to_seller' => array('config_id' => '148', 'k' => 'gy_notice_to_seller', 'obj' => 'service', 'desc' => '雇佣通知卖家', 'prompt' => '用户被雇佣时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1421811808', 'content' => '<p>尊敬的 {用户名}:</p><p>{用户}对你发出雇佣,{状态变更}</p><p>请尽快前往用户中心处理。</p><p>雇佣信息:雇佣订单编号:{订单编号}</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:{用户}对你发出雇佣,{状态变更}请尽快前往用户中心处理', 'mobile' => '0'), 'gy_order_notice' => array('config_id' => '161', 'k' => 'gy_order_notice', 'obj' => 'service', 'desc' => '雇佣订单消息', 'prompt' => '当用户收到雇佣时会收到此通知', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1364996161', 'content' => '<p>尊敬的 {用户名}:</p><p>{用户}对您发出雇佣操作:{雇佣订单链接}</p><p>感谢您对{网站名称}的信任。</p><p>如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:{用户}对您发出雇佣操作', 'mobile' => '0'), 'kf_set' => array('config_id' => '123', 'k' => 'kf_set', 'obj' => 'manage', 'desc' => '客服设置', 'prompt' => '用户被管理员设置为客服时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1343204483', 'content' => '<p>尊敬的 {用户名}:管理员{管理员名}设置了您为客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:管理员{管理员名}设置了您为客服', 'mobile' => '0'), 'match_task' => array('config_id' => '102', 'k' => 'match_task', 'obj' => 'task', 'desc' => '速配任务', 'prompt' => '雇主发布的速配任务被抢标时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1335428501', 'content' => '<p>尊敬的 {用户名}:{描述}。</p><p>任务标题:{任务标题}。</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p><br />', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:{描述}。任务标题:{任务标题}', 'mobile' => '1'), 'order_change' => array('config_id' => '88', 'k' => 'order_change', 'obj' => 'service', 'desc' => '订单状态变更', 'prompt' => '威客发布的商品服务被购买过程中,状态改变时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1402106715', 'content' => '<p>尊敬的 {用户名}:</p><p>{用户}{动作},请尽快前往用户中心处理,订单信息:</p><p>订单编号:{订单编号}</p><p>订单链接:{订单链接}</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:{用户}{动作},请尽快前往用户中心处理', 'mobile' => '1'), 'order_create' => array('config_id' => '156', 'k' => 'order_create', 'obj' => 'service', 'desc' => '创建订单', 'prompt' => '威客发布的商品服务被购买会收到此通知。', 'v' => 'a:3:{s:8:"send_sms";i:1;s:10:"send_email";i:1;s:15:"send_mobile_sms";i:1;}', 'on_time' => '1364996161', 'content' => '<p>尊敬的 {用户名}:</p><p>您的{商品模型名称}{商品标题}</p><p>购买者:{用户}, 订单详情:{订单链接}</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的{商品模型名称}{商品标题}购买者:{用户}', 'mobile' => '0'), 'pay_fail' => array('config_id' => '4', 'k' => 'pay_fail', 'obj' => 'found', 'desc' => '支付失败', 'prompt' => '用户支付失败后将会发送此通知。', 'v' => 'a:3:{s:8:"send_sms";i:1;s:10:"send_email";i:1;s:15:"send_mobile_sms";i:1;}', 'on_time' => '1427947128', 'content' => '<p>尊敬的 {用户名}:您充值{充值金额}元业务失败,感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。sad</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您充值{充值金额}元业务失败', 'mobile' => '0'), 'pay_success' => array('config_id' => '3', 'k' => 'pay_success', 'obj' => 'found', 'desc' => '支付成功', 'prompt' => '用户成功支付后将会发送此通知。', 'v' => 'a:3:{s:8:"send_sms";i:1;s:10:"send_email";i:1;s:15:"send_mobile_sms";i:1;}', 'on_time' => '1427947128', 'content' => '<p>尊敬的 {用户名}:</p><p>您成功充值{充值金额}元,感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p><p>--------------------------------------------------------------------------------------------------------------------</p><p>此邮件为系统自动发出的邮件,请勿直接回复。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您成功充值{充值金额}元', 'mobile' => '0'), 'plan_confirm_pay' => array('config_id' => '117', 'k' => 'plan_confirm_pay', 'obj' => 'task', 'desc' => '计划确认付款', 'prompt' => '用户发布的任务,威客已经完成计划第N阶段时,用户会收到此通知', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1343204483', 'content' => '<p>您的{模型名称}任务<a href="index.php?do=task&id={任务编号}">{任务标题}</a>中标者已完成第{几}阶段计划,请确认及付款</p>', 'send_type' => '1', 'mobile_content' => '您的{模型名称}任务{任务标题}中标者已完成第{几}阶段计划,请确认及付款', 'mobile' => '0'), 'plan_haved_pay' => array('config_id' => '120', 'k' => 'plan_haved_pay', 'obj' => 'task', 'desc' => '计划已经付款', 'prompt' => '用户承接的订金招标任务,雇主已经确认付款时用户会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1343204483', 'content' => '<p>您在{模型名称}任务<a href="index.php?do=task&id={任务编号}">{任务标题}</a>中,您的第{几}阶段计划已得到雇主确认,对方已付款,您获得了{金额}元,请注意查收</p>', 'send_type' => '1', 'mobile_content' => '您在{模型名称}任务{任务标题}中,您的第{几}阶段计划已得到雇主确认,对方已付款,您获得了{金额}元,请注意查收', 'mobile' => '0'), 'prom_succes' => array('config_id' => '114', 'k' => 'prom_succes', 'obj' => 'prom', 'desc' => '推广成功', 'prompt' => '当用户成功进行了一次推广时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1343204483', 'content' => '<p>您的下线:{推广用户名},{事件}。</p><p>您获得了推广金额:{推广金额}元</p>', 'send_type' => '1', 'mobile_content' => '您的下线:{推广用户名},{事件}。您获得了推广金额:{推广金额}元', 'mobile' => '0'), 'recharge_fail' => array('config_id' => '7', 'k' => 'recharge_fail', 'obj' => 'found', 'desc' => '充值失败', 'prompt' => '用户充值失败后将会发送此通知。', 'v' => 'a:3:{s:8:"send_sms";i:1;s:10:"send_email";i:1;s:15:"send_mobile_sms";i:1;}', 'on_time' => '1427947128', 'content' => '<p>尊敬的 {用户名}:</p><p>您的单号为:{充值单号}的充值受理失败,感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p><p>--------------------------------------------------------------------------------------------------------------------</p><p>此邮件为系统自动发出的邮件,请勿直接回复。</p><br />', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的单号为:{充值单号}的充值受理失败', 'mobile' => '1'), 'recharge_success' => array('config_id' => '6', 'k' => 'recharge_success', 'obj' => 'found', 'desc' => '充值成功', 'prompt' => '用户充值成功后将会发送此通知。', 'v' => 'a:3:{s:8:"send_sms";i:1;s:10:"send_email";i:1;s:15:"send_mobile_sms";i:1;}', 'on_time' => '1427947128', 'content' => '<p>尊敬的 {用户名}:</p><p>您的单号为:{充值单号}的充值受理成功,充值金额:{充值金额}元,感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p><p>--------------------------------------------------------------------------------------------------------------------</p><p>此邮件为系统自动发出的邮件,请勿直接回复。</p><br />', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的单号为:{充值单号}的充值受理成功,充值金额:{充值金额}元', 'mobile' => '1'), 'reg' => array('config_id' => '1', 'k' => 'reg', 'obj' => 'user', 'desc' => '注册成功', 'prompt' => '当用户注册成功后将会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1427947128', 'content' => '<p>尊敬的 {用户名}:</p><p> 感谢您对{网站名称}的信任,当您收到这封信的时候,您已经成功注册为{网站名称}会员。在这里,您可以感受到诚信、活泼、高效的网络交易文化。</p><p>如有任何疑问,欢迎随时与我们联系,我们将竭诚为您服务!<br/> 欢迎继续关注{网站名称}!</p><p> 祝:</p><p> 工作学习顺利, 生活愉快!</p><p>{网站名称}客服中心</p><p>--------------------------------------------------------------------------------------------------------------------</p><p>此邮件为系统自动发出的邮件,请勿直接回复。fff</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您已经成功注册为{网站名称}会员', 'mobile' => '1'), 'reported_nopass' => array('config_id' => '138', 'k' => 'reported_nopass', 'obj' => 'trans', 'desc' => '被举报不成立', 'prompt' => '用户被举报,管理员确认不成立时收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1366440944', 'content' => '<p>尊敬的 {用户名}:</p><p>您被网站用户举报的{交易维权编号}的{交易维权名称}记录网站确认为不成立,处理结果为:</p><p>{处理结果}</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您被网站用户举报的{交易维权编号}的{交易维权名称}记录网站确认为不成立,处理结果为:{处理结果}', 'mobile' => '0'), 'reported_pass' => array('config_id' => '139', 'k' => 'reported_pass', 'obj' => 'trans', 'desc' => '被举报成立', 'prompt' => '用户被举报,管理员确认成立时收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1366440944', 'content' => '<p>尊敬的 {用户名}:</p><p>您被网站用户举报的{交易维权编号}的{交易维权名称}记录网站已经受理完成,{交易维权名称}处理结果为:{处理结果}</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您被网站用户举报的{交易维权编号}的{交易维权名称}记录网站已经受理完成,{交易维权名称}处理结果为:{处理结果}', 'mobile' => '0'), 'report_notice' => array('config_id' => '145', 'k' => 'report_notice', 'obj' => 'user', 'desc' => '举报通知', 'prompt' => '用户发布的任务/作品/服务被其他用户举报时会收到此通知', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1421811808', 'content' => '<p>尊敬的{用户名}:您发布的{模型名称}{类型}{标题}被其他用户举报!</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p>--------------------------------------------------------------------------------------------------------------------</p><p>此邮件为系统自动发出的邮件,请勿直接回复。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的{用户名}:您发布的{模型名称}{类型}{标题}被其他用户举报', 'mobile' => '0'), 'reward_cash_trust' => array('config_id' => '118', 'k' => 'reward_cash_trust', 'obj' => 'task', 'desc' => '诚意金托管', 'prompt' => '用户成功托管任务赏金时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1343204483', 'content' => '<p>您在发布的{模型名称}任务<a href="index.php?do=task&id={任务编号}">{任务标题}</a>已成功托管赏金{金额}元</p><p>您可以去<a href="index.php?do=user&view=finance">财务中心账目明细中查看</a><p>', 'send_type' => '1', 'mobile_content' => '您在发布的{模型名称}任务{任务标题}已成功托管赏金{金额}元您可以去财务中心账目明细中查看', 'mobile' => '0'), 'select' => array('config_id' => '160', 'k' => 'select', 'obj' => 'task', 'desc' => '红包任务', 'prompt' => '当用户完成任务时会收到此通知', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1364996161', 'content' => '<p>您的红包任务{红包任务}已完成,你得到金额{红包金额}元</p>', 'send_type' => '1', 'mobile_content' => '您的红包任务{红包任务}已完成,你得到金额{红包金额}元', 'mobile' => '0'), 'service_auth_fail' => array('config_id' => '152', 'k' => 'service_auth_fail', 'obj' => 'service', 'desc' => '服务审核通知', 'prompt' => '用户发布的服务未通过审核时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1421811808', 'content' => '<p>尊敬的 {用户名}:您的发布的服务 {作品标题} 未通过审核,未通过审核的原因:{审核原因},感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的发布的服务 {作品标题} 未通过审核,未通过审核的原因:{审核原因}', 'mobile' => '0'), 'service_order' => array('config_id' => '84', 'k' => 'service_order', 'obj' => 'service', 'desc' => '服务订单提交', 'prompt' => '当用户提交了一个服务订单时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1402106715', 'content' => '<div style="top: 0px;">尊敬的 {用户名}:</div><p>{用户动作}了您的{服务类型}:{服务名称}。</p><p> 订单详情:{订单链接}</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:{用户动作}了您的{服务类型}:{服务名称}', 'mobile' => '1'), 'service_pub' => array('config_id' => '83', 'k' => 'service_pub', 'obj' => 'service', 'desc' => '服务发布', 'prompt' => '当用户发布了一个服务时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1402106715', 'content' => '<p>尊敬的 {用户名}:</p><p>您的{服务类型}已发布成功。{服务类型}信息:</p><p>{服务类型}链接:{商品链接}</p><p><em><strong>发布时间:{发布时间}</strong></em><br /></p><p>{服务类型}状态:{商品状态}<br /></p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的{服务类型}已发布成功', 'mobile' => '1'), 'suggest_reply' => array('config_id' => '137', 'k' => 'suggest_reply', 'obj' => 'user', 'desc' => '建议反馈', 'prompt' => '用户成功提交建议反馈时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1366440944', 'content' => '<p>亲爱的{用户名}:</p><p>标题:您的建议"{用户标题}"收到了来自管理员的回复</p><p>您建议的内容:{建议内容}</p><p>管理员回复:{回复内容}<br /></p><p> {网站名称}<br /></p>', 'send_type' => '1', 'mobile_content' => '亲爱的{用户名}:标题:您的建议"{用户标题}"收到了来自管理员的回复您建议的内容:{建议内容}管理员回复:{回复内容}', 'mobile' => '0'), 'task_auth_fail' => array('config_id' => '11', 'k' => 'task_auth_fail', 'obj' => 'task', 'desc' => '任务审核失败', 'prompt' => '用户发布的任务没有通过后台审核时会收到此通知。', 'v' => 'a:3:{s:8:"send_sms";i:1;s:10:"send_email";i:1;s:15:"send_mobile_sms";i:1;}', 'on_time' => '1435218234', 'content' => '<p>尊敬的 {用户名}:您的发布的任务 {任务标题} 未通过审核,未通过审核的原因:{审核原因},感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的发布的任务 {任务标题} 未通过审核,未通过审核的原因:{审核原因}', 'mobile' => '1'), 'task_auth_success' => array('config_id' => '12', 'k' => 'task_auth_success', 'obj' => 'task', 'desc' => '审核通过', 'prompt' => '用户发布的任务通过后台审核时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1435218234', 'content' => '<p>尊敬的 {用户名}:您的发布的任务已通过审核,感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。任务编号:{任务编号}</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的发布的任务已通过审核', 'mobile' => '1'), 'task_bid' => array('config_id' => '10', 'k' => 'task_bid', 'obj' => 'task', 'desc' => '任务中标', 'prompt' => '用户投标被雇主采纳将会收到此通知。', 'v' => 'a:3:{s:8:"send_sms";i:1;s:10:"send_email";i:1;s:15:"send_mobile_sms";i:1;}', 'on_time' => '1435218234', 'content' => '<p>尊敬的 {用户名}:</p><p> 您的稿件被雇主{稿件状态},感谢您对{网站名称}网的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p><p>任务编号:{任务编号}</p><p>任务标题:{任务标题}中标金额:{中标金额}</p><p>--------------------------------------------------------------------------------------------------------------------</p><p>此邮件为系统自动发出的邮件,请勿直接回复。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的稿件被雇主{稿件状态}', 'mobile' => '1'), 'task_complete' => array('config_id' => '134', 'k' => 'task_complete', 'obj' => 'task', 'desc' => '任务完成', 'prompt' => '用户发布的任务,确认完成后,会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1366440944', 'content' => '<p>您发布的{模型名称}任务<a href="index.php?do=task&id={任务编号}">{任务标题}</a>{理由}<p>', 'send_type' => '1', 'mobile_content' => '您发布的{模型名称}任务{任务标题}{理由}', 'mobile' => '0'), 'task_edit' => array('config_id' => '116', 'k' => 'task_edit', 'obj' => 'task', 'desc' => '管理员编辑任务', 'prompt' => '当用户的任务被管理员编辑后会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1343204483', 'content' => '<p>管理员{管理员名称}在{时间}成功编辑了您的{模型名称}任务<a href="index.php?do=task&id={任务编号}">{任务标题}</a>请注意查看</p>', 'send_type' => '1', 'mobile_content' => '管理员{管理员名称}在{时间}成功编辑了您的{模型名称}任务{任务标题}请注意查看', 'mobile' => '0'), 'task_end_manually' => array('config_id' => '157', 'k' => 'task_end_manually', 'obj' => 'task', 'desc' => '任务结束通知', 'prompt' => '管理员后台手动结束任务时用户会收到此通知。', 'v' => 'a:3:{s:8:"send_sms";i:1;s:10:"send_email";i:1;s:15:"send_mobile_sms";i:1;}', 'on_time' => '1364996161', 'content' => '<p>您发布的{模型名称}任务{任务标题}被管理员手动结束,原因:{理由}<p>', 'send_type' => '1', 'mobile_content' => '您发布的{模型名称}任务{任务标题}被管理员手动结束,原因:{理由}', 'mobile' => '0'), 'task_fail' => array('config_id' => '127', 'k' => 'task_fail', 'obj' => 'task', 'desc' => '任务失败', 'prompt' => '用户发布的任务因某些原因失败时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1343204483', 'content' => '<p>您发布的{模型名称}任务<a href="index.php?do=task&id={任务编号}">{任务标题}</a>因{理由}已经失败。</p>', 'send_type' => '1', 'mobile_content' => '您发布的{模型名称}任务{任务标题}因{理由}已经失败。', 'mobile' => '0'), 'task_freeze' => array('config_id' => '13', 'k' => 'task_freeze', 'obj' => 'task', 'desc' => '任务冻结', 'prompt' => '用户发布的任务被管理员冻结时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1435218234', 'content' => '<p>尊敬的 {用户名}:</p><p>您的任务<a href="index.php?do=task&id={任务编号}">{任务标题}</a>已被{原因},感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p><p>--------------------------------------------------------------------------------------------------------------------</p><p>此邮件为系统自动发出的邮件,请勿直接回复。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的任务{任务标题}已被{原因}', 'mobile' => '1'), 'task_hand' => array('config_id' => '15', 'k' => 'task_hand', 'obj' => 'task', 'desc' => '任务交稿', 'prompt' => '当用户发布的任务,有威客投稿时会收到此通知。', 'v' => 'a:3:{s:8:"send_sms";i:1;s:10:"send_email";i:1;s:15:"send_mobile_sms";i:1;}', 'on_time' => '1435218234', 'content' => '<p>尊敬的 {用户名}:</p><p>{用户}向{称谓}的{任务标题}提交了稿件。</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:{用户}向{称谓}的{任务标题}提交了稿件', 'mobile' => '1'), 'task_jf' => array('config_id' => '126', 'k' => 'task_jf', 'obj' => 'task', 'desc' => '任务交付', 'prompt' => '用户接受的任务,雇主方已经托管赏金后会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1343204483', 'content' => '<p>您参与的{模型名称}任务<a href="index.php?do=task&id={任务编号}">{任务标题}</a>,雇主{雇主名称}已成功托管任务赏金{金额}元,请尽快完成任务计划</p>', 'send_type' => '1', 'mobile_content' => '您参与的{模型名称}任务{任务标题},雇主{雇主名称}已成功托管任务赏金{金额}元,请尽快完成任务计划', 'mobile' => '0'), 'task_over' => array('config_id' => '119', 'k' => 'task_over', 'obj' => 'task', 'desc' => '任务圆满结束', 'prompt' => '用户发布的任务已经完全完成后会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1343204483', 'content' => '<p>您发布的{模型名称}任务<a href="index.php?do=task&id={任务编号}">{任务标题}</a>已圆满结束,感谢您对本站的支持!</p>', 'send_type' => '1', 'mobile_content' => '您发布的{模型名称}任务{任务标题}已圆满结束', 'mobile' => '0'), 'task_pub' => array('config_id' => '9', 'k' => 'task_pub', 'obj' => 'task', 'desc' => '任务发布', 'prompt' => '用户成功发布一个任务后将会收到此通知。', 'v' => 'a:3:{s:8:"send_sms";i:1;s:10:"send_email";i:1;s:15:"send_mobile_sms";i:1;}', 'on_time' => '1435218234', 'content' => '<p>尊敬的 {用户名}:</p><p>您的任务{任务编号}{任务标题}{任务状态},感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p><p>任务编号:{任务编号}</p><p>任务标题:{任务链接}</p><p>任务状态:{任务状态}</p><p>开始时间:{开始时间}</p><p>投稿结束时间:{投稿结束时间}</p><p>选稿结束时间:{选稿结束时间}</p><p>--------------------------------------------------------------------------------------------------------------------</p><p>此邮件为系统自动发出的邮件,请勿直接回复。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的任务{任务编号}{任务标题}{任务状态}', 'mobile' => '1'), 'task_sign' => array('config_id' => '14', 'k' => 'task_sign', 'obj' => 'task', 'desc' => '任务报名', 'prompt' => '用户发布的任务有人报名后会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1435218234', 'content' => '<p>尊敬的 {用户名}:</p><p>{用户}报名了{称谓}的{任务标题}。</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:{用户}报名了{称谓}的{任务标题}', 'mobile' => '1'), 'task_unbid' => array('config_id' => '108', 'k' => 'task_unbid', 'obj' => 'task', 'desc' => '稿件淘汰', 'prompt' => '当用户投标的稿件被雇主淘汰时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1343204483', 'content' => '<p>尊敬的 {用户名}:</p><p>您参与的任务:{任务标题}的任务稿件,已被雇主淘汰,感谢您对{网站名称}网的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p><p>任务编号:{任务编号}</p><p>--------------------------------------------------------------------------------------------------------------------</p><p>此邮件为系统自动发出的邮件,请勿直接回复。</p><br />', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您参与的任务:{任务标题}的任务稿件,已被雇主淘汰', 'mobile' => '1'), 'task_unfrize' => array('config_id' => '136', 'k' => 'task_unfrize', 'obj' => 'task', 'desc' => '任务解冻', 'prompt' => '用户发布的任务被管理员解冻时会收到此通知', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1366440944', 'content' => '<p>尊敬的 {用户名}:</p><p>您的任务<a href="index.php?do=task&id={任务编号}">{任务标题}</a>已被{原因},感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p><p>--------------------------------------------------------------------------------------------------------------------</p><p>此邮件为系统自动发出的邮件,请勿直接回复。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的任务{任务标题}已被{原因}', 'mobile' => '0'), 'timeout' => array('config_id' => '122', 'k' => 'timeout', 'obj' => 'task', 'desc' => '过期', 'prompt' => '用户发布的投标任务结束了投标期后会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1343204483', 'content' => '<p>您发布的{模型名称}任务<a href="index.php?do=task&id={任务编号}">{任务标题}</a>{投标}期已过,任务在自动进入下一阶段', 'send_type' => '1', 'mobile_content' => '您发布的{模型名称}任务{任务标题}{投标}期已过,任务在自动进入下一阶段', 'mobile' => '0'), 'transrights_accept' => array('config_id' => '18', 'k' => 'transrights_accept', 'obj' => 'trans', 'desc' => '交易维权受理', 'prompt' => '当网站受理了用户的交易维权时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1366440916', 'content' => '<p>尊敬的 {用户名}:</p><p>与您相关的编号为{交易维权编号}的{交易维权名称}记录网站确已经受理,相应{交易维权类型}{交易维权对象}已被{动作}。</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:与您相关的编号为{交易维权编号}的{交易维权名称}记录网站确已经受理,相应{交易维权类型}{交易维权对象}已被{动作}', 'mobile' => '1'), 'transrights_freeze' => array('config_id' => '19', 'k' => 'transrights_freeze', 'obj' => 'trans', 'desc' => '交易维权冻结', 'prompt' => '当网站冻结了用户的交易维权申请时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1366440916', 'content' => '<p>尊敬的 {用户名}:</p><p>由{发起方}对{交易维权对象}发起的维权记录已经提交成功,相应{交易维权类型}已被冻结,请等待网站受理。提交原因:</p><p>{提交原因}<br /></p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:由{发起方}对{交易维权对象}发起的维权记录已经提交成功,相应{交易维权类型}已被冻结,请等待网站受理。提交原因:{提交原因}', 'mobile' => '1'), 'transrights_nopass' => array('config_id' => '17', 'k' => 'transrights_nopass', 'obj' => 'trans', 'desc' => '交易维权不成立', 'prompt' => '当用户发起的交易维权被后台确认不成立时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1366440916', 'content' => '<p>尊敬的 {用户名}:</p><p>您举报的{交易维权编号}的{交易维权名称}记录网站确认为不成立,处理结果为:</p><p>{处理结果}</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您举报的{交易维权编号}的{交易维权名称}记录网站确认为不成立,处理结果为:{处理结果}', 'mobile' => '0'), 'transrights_pass' => array('config_id' => '16', 'k' => 'transrights_pass', 'obj' => 'trans', 'desc' => '交易维权成立', 'prompt' => '当用户发起的交易维权被后台确认成立时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1366440916', 'content' => '<p>尊敬的 {用户名}:</p><p>您举报的{交易维权编号}的{交易维权名称}记录网站已经受理完成,{交易维权名称}处理结果为:</p><p>{处理结果}</p><p>感谢您对{网站名称}的信任。如有特殊情况,请致电客服</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您举报的{交易维权编号}的{交易维权名称}记录网站已经受理完成,{交易维权名称}处理结果为:{处理结果}', 'mobile' => '0'), 'unfreeze' => array('config_id' => '99', 'k' => 'unfreeze', 'obj' => 'user', 'desc' => '用户解冻', 'prompt' => '当用户的账号被后台解冻后会收到此通知。', 'v' => 'a:3:{s:8:"send_sms";i:1;s:10:"send_email";i:1;s:15:"send_mobile_sms";i:1;}', 'on_time' => '1364996161', 'content' => '<p>尊敬的 {用户名}:</p><p>您的用户已被解封,感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p><p>--------------------------------------------------------------------------------------------------------------------</p><p>此邮件为系统自动发出的邮件,请勿直接回复。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的用户已被解封', 'mobile' => '1'), 'update_password' => array('config_id' => '21', 'k' => 'update_password', 'obj' => 'safe', 'desc' => '更新密码', 'prompt' => '当用户修改了登陆密码时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1322020124', 'content' => '<p>尊敬的 {用户名}:</p><p>您的密码已经修改,新密码是:<u>({新密码})</u>,感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p><p>--------------------------------------------------------------------------------------------------------------------</p><p>此邮件为系统自动发出的邮件,请勿直接回复。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的密码已经修改,新密码是:({新密码})', 'mobile' => '1'), 'update_sec_code' => array('config_id' => '20', 'k' => 'update_sec_code', 'obj' => 'safe', 'desc' => '支付密码变更', 'prompt' => '当用户修改了支付密码时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1366440916', 'content' => '<p>尊敬的 {用户名}:</p><p>您的支付密码修改成功,您的新支付密码为:{支付密码}。感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的支付密码修改成功,您的新支付密码为:{支付密码}', 'mobile' => '1'), 'withdraw_fail' => array('config_id' => '113', 'k' => 'withdraw_fail', 'obj' => 'finance', 'desc' => '提现失败', 'prompt' => '当用户提现失败时会收到此通知。', 'v' => 'a:1:{s:8:"send_sms";i:1;}', 'on_time' => '1343204483', 'content' => '<p>您在{网站名称}通过{提现方式}提现,提现账户:{帐户},提现金额{提现金额}元,提现审核未通过</p>', 'send_type' => '1', 'mobile_content' => '您在{网站名称}通过{提现方式}提现,提现账户:{帐户},提现金额{提现金额}元,提现审核未通过', 'mobile' => '0'), 'work_out' => array('config_id' => '141', 'k' => 'work_out', 'obj' => 'task', 'desc' => '稿件淘汰', 'prompt' => '用户发布稿件被雇主淘汰时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1366440936', 'content' => '<p>尊敬的 {用户名}:</p><p> 您的稿件被雇主{稿件状态},感谢您对{网站名称}网的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p><p>任务编号:{任务编号}</p><p>任务标题:{任务标题}</p><p>--------------------------------------------------------------------------------------------------------------------</p><p>此邮件为系统自动发出的邮件,请勿直接回复。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的稿件被雇主{稿件状态}', 'mobile' => '0'), 'work_rw' => array('config_id' => '140', 'k' => 'work_rw', 'obj' => 'task', 'desc' => '稿件入围', 'prompt' => '用户发布稿件被雇主选中入围时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1366440944', 'content' => '<p>尊敬的 {用户名}:</p><p> 您的稿件被雇主{稿件状态},感谢您对{网站名称}网的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p><p>任务编号:{任务编号}</p><p>任务标题:{任务标题}</p><p>--------------------------------------------------------------------------------------------------------------------</p><p>此邮件为系统自动发出的邮件,请勿直接回复。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的稿件被雇主{稿件状态}', 'mobile' => '0'), 'zp_auth_fail' => array('config_id' => '151', 'k' => 'zp_auth_fail', 'obj' => 'service', 'desc' => '作品审核通知', 'prompt' => '用户发布的作品未通过审核时会收到此通知。', 'v' => 'a:2:{s:8:"send_sms";i:1;s:10:"send_email";i:1;}', 'on_time' => '1421811808', 'content' => '<p>尊敬的 {用户名}:您的发布的作品 {作品标题} 未通过审核,未通过审核的原因:{审核原因},感谢您对{网站名称}的信任。如有特殊情况,请致电客服,我们将协助您解决问题。</p>', 'send_type' => '1', 'mobile_content' => '尊敬的 {用户名}:您的发布的作品 {作品标题} 未通过审核,未通过审核的原因:{审核原因}', 'mobile' => '0')); $msgConfigsTplKeys = array_keys($msgConfigsTpl); $tables = db_factory::query("SHOW TABLES LIKE '" . TABLEPRE . "witkey_msg_tpl'"); if ($tables[0]) { $msgLists = db_factory::query("SELECT * FROM `" . TABLEPRE . "witkey_msg_tpl` WHERE send_type != '2' ORDER BY tpl_code ASC"); if ($msgLists) { foreach ($msgLists as $k => $v) { $sql = "UPDATE `" . TABLEPRE . "witkey_msg_config` SET `send_type`='{$v['send_type']}' ,`content`='{$v['content']}' WHERE k='{$v['tpl_code']}'"; db_factory::execute($sql); } } } $smsLists = db_factory::get_table_data('*', 'witkey_msg_config', null, ' k asc ', null, null, 'k', 0); $smsListsKeys = array_keys($smsLists); if ($smsLists) { foreach ($smsLists as $k => $v) { if (in_array($k, $msgConfigsTplKeys)) { $setsqlarr = array(); $setsqlarr['content'] = $v['content'] ? str_replace(array('<p></p>', '<p><br/></p>', '<p><br /></p>'), array('', '', ''), htmlspecialchars_decode($v['content'])) : ''; $setsqlarr['content'] = $v['content'] ? str_replace(array('task_id='), array('id='), $v['content']) : $v['content']; $setsqlarr['mobile_content'] = $v['mobile_content'] ? str_replace(array('<p></p>', '<p><br/></p>', '<p><br /></p>'), array('', '', ''), htmlspecialchars_decode($v['mobile_content'])) : ''; if (!$setsqlarr['content']) { $setsqlarr['content'] = $msgConfigsTpl[$k]['content']; } if (!$setsqlarr['mobile_content']) { $setsqlarr['mobile_content'] = $msgConfigsTpl[$k]['mobile_content']; } $wheresqlarr = array(); $wheresqlarr['config_id'] = $v['config_id'];
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(73); $msg_obj = new Keke_witkey_msg_tpl_class(); $config_msg_arr = $kekezu->get_table_data("*", "witkey_msg_config", " 1 = 1 ", "config_id desc ", '', '', 'config_id'); $now_msg_arr = db_factory::get_one(" select * from " . TABLEPRE . "witkey_msg_config where k='{$slt_tpl_code}'"); $now_v = unserialize($now_msg_arr['v']); if (isset($tpl_code)) { $msg_tpl = db_factory::query(" select * from " . TABLEPRE . "witkey_msg_tpl where tpl_code='{$tpl_code}'"); if ($msg_tpl) { kekezu::echojson('', 1, $msg_tpl); } else { echo json_encode(array("status" => 0)); } } $objMsgC = new Keke_witkey_msg_config_class(); if (isset($sbt_edit)) { if ($slt_tpl_code) { $objMsgC->setWhere("k='{$slt_tpl_code}'"); $objMsgC->setContent($tar_msg_temp_content); $res = $objMsgC->edit_keke_witkey_msg_config(); } if ($res) { kekezu::admin_system_log($_lang['edit_sms_tpl']); kekezu::admin_show_msg($_lang['edit_sms_tpl_success'], 'index.php?do=msg&view=intertpl&slt_tpl_code=' . $slt_tpl_code, 3, '', 'success'); } } $msg_tpl = db_factory::get_one("select content from " . TABLEPRE . "witkey_msg_config where k='{$slt_tpl_code}'"); $msg_tpl = $msg_tpl['content']; require $kekezu->_tpl_obj->template(ADMIN_DIRECTORY . '/tpl/admin_msg_' . $view);
$strSql = ' select a.case_id,a.obj_id,a.obj_type,a.case_img,a.case_title,a.case_price '; $task_open and $strSql .= ',b.work_num,b.model_id,b.username,b.uid '; $shop_open and $strSql .= ' ,c.sale_num,c.model_id,c.username,b.uid '; $strSql .= ' from ' . TABLEPRE . 'witkey_case a '; $task_open and $strSql .= ' left join ' . TABLEPRE . 'witkey_task b ON a.obj_id = b.task_id '; $shop_open or $strSql .= ' where a.obj_type="task" '; $shop_open and $strSql .= ' left join ' . TABLEPRE . 'witkey_service c on a.obj_id= c.service_id '; $task_open or $strSql .= ' where a.obj_type="service" '; $strSql .= " order by a.on_time desc limit 9 "; $arrCaseLists = db_factory::query($strSql, 1, $intIndexCacheTime); if (!$basic_config['css_auto_fit']) { $arrCaseLists = array_merge(array($arrCaseLists[0]), $arrCaseLists); if (count($arrCaseLists) > 9) { unset($arrCaseLists[9]); } } $arrDynamicPlays = kekezu::get_feed("feedtype='work_accept'", "feed_time desc", 10); $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 good_rate desc limit 0,6", TABLEPRE, TABLEPRE), 1, $intIndexCacheTime); $arrRecommShops1 = 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 good_rate desc ", TABLEPRE, TABLEPRE), 1, $intIndexCacheTime); $arrArticleTop = db_factory::get_one("select * from " . TABLEPRE . "witkey_article where cat_type='article' and LENGTH(art_pic)>20 order by pub_time desc limit 1", 1, $intIndexCacheTime); $arrArticleLists = db_factory::query("select * from " . TABLEPRE . "witkey_article where cat_type='article' and art_id !='" . $arrArticleTop['art_id'] . "' order by pub_time desc limit 6", 1, $intIndexCacheTime); $arrPubToday = db_factory::query("select count(*) as count from " . TABLEPRE . "witkey_task where date(from_unixtime(start_time)) = curdate() and task_status>=2", 1, $intIndexCacheTime); $arrAcceptTask = db_factory::query("SELECT obj_id FROM " . TABLEPRE . "witkey_feed where obj_id>0 and feedtype='work_accept' and date(from_unixtime(feed_time)) = curdate() group by obj_id ; ", 1, $intIndexCacheTime); $arrAcceptToday = count($arrAcceptTask); $arrCashToday = db_factory::query("SELECT sum(fina_cash) as cash FROM " . TABLEPRE . "witkey_finance where (fina_action='task_bid' or fina_action='sale_service') and date(from_unixtime(fina_time)) = curdate() ;", 1, $intIndexCacheTime); $arrPubAll = db_factory::query("select count(*) as count from " . TABLEPRE . "witkey_task where task_status>=2", 1, $intIndexCacheTime); $arrAcceptTasks = db_factory::query("SELECT obj_id FROM " . TABLEPRE . "witkey_feed where obj_id>0 and feedtype='work_accept' group by obj_id ;", 1, $intIndexCacheTime); $arrAcceptAll = count($arrAcceptTasks); $arrCashAll = db_factory::query("SELECT sum(fina_cash) as cash FROM " . TABLEPRE . "witkey_finance where (fina_action='task_bid' or fina_action='sale_service') ;", 1, $intIndexCacheTime); $arrFlink = kekezu::get_table_data("link_id,link_name,link_url,listorder", "witkey_link", "", " listorder asc", "", "", "", $intIndexCacheTime); }
public static function get_order_detail($order_id) { $sql = "select * from %switkey_order_detail where order_id = '%d'"; return db_factory::query(sprintf($sql, TABLEPRE, $order_id)); }
if ($col_info) { if ($col_info["Type"] != "varchar(50)") { db_factory::execute("alter table " . TABLEPRE . "witkey_model change column model_intro model_intro varchar(50)"); } } else { db_factory::execute("alter table " . TABLEPRE . "witkey_model add model_intro varchar(50) null default null "); } $col_info = db_factory::query("show COLUMNS FROM " . TABLEPRE . "witkey_model where Field='indus_bid' "); $col_info = $col_info[0]; if ($col_info) { if ($col_info["Type"] != "text") { db_factory::execute("alter table " . TABLEPRE . "witkey_model change column indus_bid indus_bid text"); } } else { db_factory::execute("alter table " . TABLEPRE . "witkey_model add indus_bid text null default null "); } $col_info = db_factory::query("show COLUMNS FROM " . TABLEPRE . "witkey_model where Field='config' "); $col_info = $col_info[0]; if ($col_info) { if ($col_info["Type"] != "text") { db_factory::execute("alter table " . TABLEPRE . "witkey_model change column config config text"); } } else { db_factory::execute("alter table " . TABLEPRE . "witkey_model add config text null default null "); } } $table_exist = false; if (!$table_exist) { db_factory::execute("replace into " . TABLEPRE . "witkey_model (`model_id`,`model_code`,`model_name`,`model_dir`,`model_type`,`model_dev`,`model_status`,`model_desc`,`on_time`,`hide_mode`,`listorder`,`model_intro`,`indus_bid`,`config`) values ('7','service','威客服务','service','shop','kekezu','1','<strong>威客作品的一般流程是:</strong><br /><p>1、买家在网站平台上上传服务,等待后台审核</p><p>2、审核通过后,该服务就会上架,在网站商城里显示</p><p>3、卖家购买服务后,付款</p><p>4、付款后,等待买家提供服务</p><br />','1325152856',0,'7','威客服务是网络商城的一种交易模式。','','a:5:{s:14:\"service_profit\";s:2:\"20\";s:8:\"min_cash\";s:1:\"5\";s:10:\"audit_cash\";s:2:\"20\";s:16:\"step_min_account\";s:1:\"6\";s:13:\"max_filecount\";s:1:\"2\";}')"); } /*********Table witkey_model end **************/
<?php $objRss = new keke_rss_class(); $objRss->title = $kekezu->_sys_config['rss_title']; $objRss->link = $kekezu->_sys_config['website_url']; $objRss->description = $kekezu->_sys_config['rss_content']; if ($kekezu->_sys_config['rss_choice_task'] == '1') { $arrTask = db_factory::query(sprintf("select * from %switkey_task where task_status>=2 order by task_id desc limit 10", TABLEPRE)); foreach ($arrTask as $k => $v) { $arrRss[$v['start_time']]['title'] = '[任务]' . $v['task_title']; $arrRss[$v['start_time']]['link'] = $kekezu->_sys_config['website_url'] . '/index.php?do=task&id=' . $v['task_id']; $arrRss[$v['start_time']]['description'] = kekezu::cutstr(kekezu::escape(strip_tags(htmlspecialchars_decode($v['task_desc']))), 100) . '...'; } } if ($kekezu->_sys_config['rss_choice_news'] == '1') { $arrAct = db_factory::query(sprintf("select * from %switkey_article where cat_type = 'article' order by art_id desc limit 10", TABLEPRE)); foreach ($arrAct as $k => $v) { $arrRss[$v['pub_time']]['title'] = '[资讯]' . $v['art_title']; $arrRss[$v['pub_time']]['link'] = $kekezu->_sys_config['website_url'] . '/index.php?do=article&id=' . $v['art_id']; $arrRss[$v['pub_time']]['description'] = kekezu::cutstr(kekezu::escape(strip_tags(htmlspecialchars_decode($v['content']))), 100) . '...'; } } krsort($arrRss); $arr = array_slice($arrRss, 0, 10); foreach ($arr as $v) { $objItem = new FeedItem(); $objItem->title = $v['title']; $objItem->link = $v['link']; $objItem->description = $v['description']; $objRss->addItem($objItem); }
<?php defined('ADMIN_KEKE') or exit('Access Denied'); if ($op == 'repair') { if ($is_submit) { $table_arr = db_factory::query(" SHOW TABLES"); foreach ($table_arr as $v) { db_factory::execute("REPAIR TABLE " . $v['Tables_in_' . DBNAME]); } kekezu::admin_show_msg($_lang['operate_notice'], 'index.php?do=tool&view=dboptim&op=repair', 3, kekezu::lang("operate_success"), 'success'); } } else { if ($is_submit) { $optimizetables or kekezu::admin_show_msg($_lang['operate_notice'], 'index.php?do=tool&view=dboptim', 3, $_lang['no_select_table'], 'warning'); foreach ($optimizetables as $v) { db_factory::execute("OPTIMIZE TABLE " . $v); } kekezu::admin_show_msg($_lang['operate_notice'], 'index.php?do=tool&view=dboptim', 3, kekezu::lang("operate_success"), 'success'); } else { $table_arr = db_factory::query("SHOW TABLE STATUS FROM `" . DBNAME . "` LIKE '" . TABLEPRE . "%'"); foreach ($table_arr as $k => $v) { $v['Data_free'] > 0 and $table_free_list[$k] = $v; } } } require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
function get_service_comment($sid, $w = array(), $p = array(), $order = null) { global $kekezu; $comm_obj = new Keke_witkey_comment_class(); $where = " select * from " . TABLEPRE . "witkey_comment where obj_id = '{$sid}' and obj_type = 'service' "; $arr = keke_table_class::format_condit_data($where, $order, $w, $p); $comm_info = db_factory::query($arr['where']); $comm_arr['comm_info'] = $comm_info; $comm_arr['pages'] = $arr['pages']; return $comm_arr; }
static function load_autosql_data($tag_info) { $sql = stripslashes($tag_info['tag_sql']); $temp_arr = db_factory::query($sql); return $temp_arr; }
<?php defined('IN_KEKE') or exit('Access Denied'); $strNavActive = 'articlelist'; $strUrl = $_K['siteurl'] . "/index.php?do=articlelist"; $catid and $strUrl .= "&catid=" . intval($catid); $intPage and $strUrl .= "&intPage=" . $intPage; $arrArtCats = kekezu::get_table_data("*", "witkey_article_category", "cat_type='article' and art_cat_pid=1", "listorder asc", "", "", "", null); $page and $intPage = intval($page); $intPage = intval($intPage) ? $intPage : 1; $intPagesize = intval($intPagesize) ? $intPagesize : 20; intval($catid) and $intCatid = intval($catid) or $intCatid = intval($arrArtCats['0']['art_cat_id']); $intCatid and $strWhere .= " and a.art_cat_id = " . intval($intCatid); $strWhere .= " and a.is_show!=2"; $strWhere .= " order by is_recommend desc,a.listorder asc,pub_time desc"; $strSql = "select a.* ,b.cat_name from " . TABLEPRE . "witkey_article a left join " . TABLEPRE . "witkey_article_category b on a.art_cat_id=b.art_cat_id where b.cat_type='article' {$strWhere}"; $strCsql = "select count(a.art_id) as c from " . TABLEPRE . "witkey_article a left join " . TABLEPRE . "witkey_article_category b on a.art_cat_id=b.art_cat_id where b.cat_type='article' {$strWhere}"; $intCount = intval(db_factory::get_count($strCsql, 0, NULL, 10 * 60)); $kekezu->_page_obj->setStatic($static); $strPages = $kekezu->_page_obj->getPages($intCount, $intPagesize, $intPage, $strUrl); $arrArticleLists = db_factory::query($strSql . $strPages['where'], 5 * 60); foreach ($arrArtCats as $k => $v) { intval($v['art_cat_id']) == $intCatid and $articleType = $v['cat_name']; } list($strPageTitle, $strPageKeyword, $strPageDescription) = keke_seo_class::getListSEO(0, 0, array('资讯分类' => $articleType), 'article', true); $arrHotNews = db_factory::query("select * from " . TABLEPRE . "witkey_article where cat_type='article' order by views desc limit 10"); $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 good_rate desc limit 0,5", TABLEPRE, TABLEPRE), 1, $intIndexCacheTime); $_SESSION['spread'] = 'index.php?do=articlelist';
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; } } else { $process_arr = keke_task_config::can_operate($task_info['task_status'], $task_info['is_top']); $file_list = db_factory::query(sprintf(" select * from %switkey_file where task_id='%d' and obj_type='task' ", TABLEPRE, $task_id)); $status_arr = sreward_task_class::get_task_status(); $payitem_list = keke_payitem_class::get_payitem_config('employer'); $indus_arr = $kekezu->_indus_arr; $temp_arr = array(); $indus_option_arr = $indus_arr; kekezu::get_tree($indus_option_arr, $temp_arr, "option", $task_info['indus_id']); $indus_option_arr = $temp_arr; } if ($res) { kekezu::admin_show_msg($_lang['task_operate_success'], "index.php?do=model&model_id={$model_id}&view=list", 3, '', 'success'); } } else { require S_ROOT . '/task/' . $model_info['model_dir'] . '/admin/task_misc.php'; } require $kekezu->_tpl_obj->template('task/' . $model_info['model_dir'] . '/admin/tpl/task_edit_' . $op);
<?php defined('ADMIN_KEKE') or exit('Access Denied'); kekezu::admin_check_role(34); $add_service_type = keke_glob_class::get_value_add_type(); $payitem_record_obj = new Keke_witkey_payitem_record_class(); $url = "index.php?do={$do}&view={$view}&w[record_id]={$w['record_id']}&w[username]={$w['username']}&w[item_code]={$w['item_code']}&w[ord]={$w['ord']}&page={$page}&w[page_size]={$page_size}"; $where = ' 1 = 1 '; $w[record_id] and $where .= " and record_id = " . $w[record_id]; $w[username] and $where .= " and username like '%{$w['username']}%'"; $w[item_code] and $where .= " and item_code like '%{$w['item_code']}%'"; $order_where = " order by on_time desc "; is_array($w['ord']) and $order_where = ' order by ' . $w['ord'][0] . ' ' . $w['ord'][1]; $where = $where . $order_where; $all_buy_sql = "select sum(use_cash) as cash from " . TABLEPRE . "witkey_payitem_record "; $all_buy_pro = db_factory::query($all_buy_sql); $all_buy_pro = $all_buy_pro[0] ? $all_buy_pro[0] : 0; $page_obj = $kekezu->_page_obj; $page = intval($page); $page or $page = 1; $w[page_size] and $page_size = intval($w[page_size]) or $page_size = 10; $payitem_record_obj->setWhere($where); $count = $payitem_record_obj->count_keke_witkey_payitem_record(); $page_obj->setAjax(1); $page_obj->setAjaxDom("ajax_dom"); $pages = $page_obj->getPages($count, $page_size, $page, $url); $where .= $pages[where]; $payitem_record_obj->setWhere($where); $payitem_record_arr = $payitem_record_obj->query_keke_witkey_payitem_record(); require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_payitem_' . $view);
$objId and $strUrl .= "&objId=" . $objId; $intTaskId and $strUrl .= "&intTaskId=" . $intTaskId; if ($intTaskId && $objId) { $strTaskSql = 'select indus_id,indus_pid from ' . TABLEPRE . 'witkey_task where task_id = ' . $intTaskId; $arrTaskInfo = db_factory::get_one($strTaskSql); $strJumpUrl = "index.php?do=user&view=transaction&op=works"; if ($arrTaskInfo['uid'] != $gUid) { exit('禁止未授权访问'); } } if ($objId && !$intTaskId) { $strServiceSql = 'select * from ' . TABLEPRE . 'witkey_service where service_id = ' . $objId; $arrServiceInfo = db_factory::get_one($strServiceSql); $strJumpUrl = "index.php?do=user&view=transaction&op=service&intModelId=" . $arrServiceInfo['model_id']; $strCustomSql = 'select a.id,a.extdata,b.f_name,b.f_tips,b.f_fixed_len,b.f_min_len,b.f_max_len,b.f_required,b.f_code from ' . TABLEPRE . 'witkey_custom_fields_ext a LEFT JOIN ' . TABLEPRE . 'witkey_custom_fields b ON a.c_id = b.id where a.objid = ' . $objId; $arrCustom = db_factory::query($strCustomSql); foreach ($arrCustom as $k => $v) { $arrCustomInfo[$k]['id'] = $v['id']; $arrCustomInfo[$k]['f_name'] = $v['f_name']; $arrCustomInfo[$k]['f_tips'] = $v['f_tips']; $arrCustomInfo[$k]['f_fixed_len'] = $v['f_fixed_len']; $arrCustomInfo[$k]['f_min_len'] = $v['f_min_len']; $arrCustomInfo[$k]['f_max_len'] = $v['f_max_len']; $arrCustomInfo[$k]['f_code'] = $v['f_code']; $arrCustomInfo[$k]['f_required'] = $v['f_required']; $arrService = unserialize($v['extdata']); $arrCustomInfo[$k]['extdata'] = $arrService[$v['f_code']]['content']; } if ($arrServiceInfo['uid'] != $gUid) { exit('禁止未授权访问'); }
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); }
<?php defined('IN_KEKE') or exit('Access Denied'); $arrBreadcrumbs = array(1 => array('url' => 'index.php?do=map', 'name' => '网站地图')); $strSqlP = "select indus_id,indus_name from " . TABLEPRE . "witkey_industry where indus_pid = '0'"; $arrIndusP = db_factory::query($strSqlP); foreach ($arrIndusP as $v) { $strSql = "select indus_id,indus_name from " . TABLEPRE . "witkey_industry where indus_pid = '" . $v['indus_id'] . "'"; $arrIndusC[] = db_factory::query($strSql); } $strUrlTask = "index.php?do=tasklist"; $arrCashStatus = array('0' => '全部', '1' => '未托管', '2' => '已托管'); $arrTaskNavs = TaskClass::getEnabledTaskModelList(); $arrTaskStatus = array('0' => '全部', '1' => '工作中', '2' => '选稿中', '3' => '交付中', '4' => '已结束'); $strUrlWeike = "index.php?do=goodslist"; $arrWeike = array('0' => '全部', '7' => '服务', '6' => '文件'); $strUrlSeller = "index.php?do=sellerlist"; $arrSell = array('0' => '全部', '1' => '个人用户', '2' => '企业用户'); $strUrlCase = "index.php?do=case"; $arrCase = array('0' => '全部', '1' => '任务案例', '2' => '商品案例'); $strUrlArticle = "index.php?do=articlelist"; $arrArticle = array('203' => '安全交易', '5' => '行业动态', '4' => '政策法规', '7' => '媒体报导', '17' => '网站公告', '358' => '新闻列表'); $strUrlUser = "******"; $arrIndex = array(); $arrTitle = array(); $arrTransaction = array('released' => '我发布的任务', 'undertake' => '我承接的任务', 'service' => '我的商品', 'orders' => '我买入的商品'); $arrIndex['transaction'] = $arrTransaction; $arrTitle['transaction'] = '交易管理'; $arrShop = array('setting' => '店铺设置', 'caselist' => '案例管理'); $arrIndex['shop'] = $arrShop; $arrTitle['shop'] = '店铺管理';
$strWhere = ' 1=1 '; $strWhere .= ' and a.seller_uid = ' . $gUid; $intModelId and $strWhere .= ' and a.model_id = ' . $intModelId; $strWhere .= ' and b.obj_type = ' . "'service'"; $page and $intPage = intval($page); $intPage = intval($intPage) ? $intPage : 1; $intPagesize = 10; $intId and $strWhere .= " and b.order_id=" . intval($intId); $strTitle and $strWhere .= " and a.order_name like '%" . trim($strTitle) . "%' "; if (isset($strStatus) && $strStatus != '' && $strStatus > -1 && in_array($strStatus, array_keys($arrStatus))) { $strWhere .= " and a.order_status ='" . strval($strStatus) . "'"; } else { $strStatus = -1; } $strOrder && in_array($strOrder, array_keys($arrListOrder)) and $strWhere .= " order by " . $strOrder or $strWhere .= " order by a.order_time desc"; if ($intModelId === 6) { $strOrderSql = ' SELECT a.order_name,a.model_id, a.seller_uid, a.seller_username,a.order_uid, a.order_username, a.order_amount, a.order_status, a.order_time, ' . ' b.*, c.service_id, c.title , c.price ' . ' FROM `' . TABLEPRE . 'witkey_order` AS a ' . ' LEFT JOIN ' . TABLEPRE . 'witkey_order_detail AS b ON a.order_id = b.order_id ' . ' LEFT JOIN ' . TABLEPRE . 'witkey_service AS c ON b.obj_id = c.service_id ' . ' WHERE ' . $strWhere; } elseif ($intModelId == 7) { $strOrderSql = ' SELECT a.order_name,a.model_id, a.seller_uid, a.seller_username,a.order_uid, a.order_username, a.order_amount, a.order_status, a.order_time, ' . ' b.*, c.service_id, c.title , c.price ' . ' FROM `' . TABLEPRE . 'witkey_order` AS a ' . ' LEFT JOIN ' . TABLEPRE . 'witkey_order_detail AS b ON a.order_id = b.order_id ' . ' LEFT JOIN ' . TABLEPRE . 'witkey_service_order AS c ON b.order_id = c.order_id ' . ' WHERE ' . $strWhere; } else { $strOrderSql = ' SELECT a.order_name,a.model_id, a.seller_uid, a.seller_username,a.order_uid, a.order_username, a.order_amount, a.order_status, a.order_time, ' . ' b.*, c.service_id, c.title , c.price ,d.service_id as oservice_id, d.title as otitle, d.price as oprice' . ' FROM `' . TABLEPRE . 'witkey_order` AS a ' . ' LEFT JOIN ' . TABLEPRE . 'witkey_order_detail AS b ON a.order_id = b.order_id ' . ' LEFT JOIN ' . TABLEPRE . 'witkey_service AS c ON b.obj_id = c.service_id ' . ' LEFT JOIN ' . TABLEPRE . 'witkey_service_order AS d ON b.order_id = d.order_id ' . ' WHERE ' . $strWhere; } $arrDatas = db_factory::query($strOrderSql); $arrPageArr = $kekezu->_page_obj->page_by_arr($arrDatas, $intPagesize, $intPage, $strUrl); $arrLists = $arrPageArr['data']; foreach ($arrLists as $k => $v) { $arrMark = keke_user_mark_class::get_mark_info(array('model_code' => $arrServiceModels[$intModelId]['model_code'], 'obj_id' => $v['order_id'], 'by_uid' => $gUid, 'uid' => $v['order_uid'])); $markInfo = $arrMark['mark_info']['0']; $arrLists[$k]['mark_status'] = $markInfo['mark_status']; } $strPages = $arrPageArr['page'];
$strWhere .= " and task_status=0 "; break; default: $intTaskStatus = -1; break; } } } else { $intTaskStatus = -1; } $strSql = "SELECT task_id, model_id, task_title, task_cash, task_cash_coverage, start_time, task_status FROM `" . TABLEPRE . "witkey_task` WHERE (task_id IN ( SELECT task_id FROM " . TABLEPRE . "witkey_task_bid WHERE uid = " . $gUid . " ) OR task_id IN ( SELECT task_id FROM " . TABLEPRE . "witkey_task_work WHERE uid = " . $gUid . " ) )"; $strCountSql = "SELECT count(*) count FROM `" . TABLEPRE . "witkey_task` WHERE ( task_id IN ( SELECT task_id FROM " . TABLEPRE . "witkey_task_bid WHERE uid = " . $gUid . " ) OR task_id IN ( SELECT task_id FROM " . TABLEPRE . "witkey_task_work WHERE uid = " . $gUid . " ) )"; in_array($strOrder, array_keys($arrListOrder)) and $strWhere .= " order by " . $strOrder or $strWhere .= " order by task_id desc"; $intCount = intval(db_factory::get_count($strCountSql . $strWhere)); $strPages = $page_obj->getPages($intCount, $intPagesize, $intPage, $strUrl); $arrTaskLists = db_factory::query($strSql . $strWhere . $strPages['where']); if ($arrTaskLists) { foreach ($arrTaskLists as $k => $v) { if (in_array($v['model_id'], array('4', '5'))) { $bidInfo = db_factory::get_one("SELECT bid_id FROM " . TABLEPRE . "witkey_task_bid WHERE uid = " . $gUid . " and task_id = " . $v['task_id'] . " ORDER BY bid_id DESC LIMIT 1"); $arrTaskLists[$k]['bid_id'] = $bidInfo['bid_id']; } else { $bidInfo = db_factory::get_one("SELECT work_id FROM " . TABLEPRE . "witkey_task_work WHERE uid = " . $gUid . " and task_id = " . $v['task_id'] . " ORDER BY work_id DESC LIMIT 1"); $arrTaskLists[$k]['work_id'] = $bidInfo['work_id']; } } } } function wiki_opera($m_id, $t_id, $w_id, $url) { global $kekezu;