static function SendFeedMsg($receiver, $title, $content, $type = '1') { $receiverInfo = kekezu::get_user_info(intval($receiver)); if (!$receiverInfo) { return false; } $objMsgM = new Keke_witkey_msg_class(); $objMsgM->setType($type); $objMsgM->setTo_uid($receiverInfo['uid']); $objMsgM->setTo_username($receiverInfo['username']); $objMsgM->setTitle(kekezu::escape($title)); $objMsgM->setContent(kekezu::escape($content)); $objMsgM->setOn_time(time()); return $objMsgM->create_keke_witkey_msg(); }
$objMsgM = new Keke_witkey_msg_class(); if (strtoupper(CHARSET) == 'GBK') { $to_username = kekezu::utftogbk($to_username); } $arrSpaceInfo = kekezu::get_user_info($to_username, 1); if (!$arrSpaceInfo) { $tips['errors']['to_username'] = '******'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } if ($arrSpaceInfo['uid'] == $gUid) { $tips['errors']['to_username'] = '******'; kekezu::show_msg($tips, NULL, NULL, NULL, 'error'); } if (strtoupper(CHARSET) == 'GBK') { $title = kekezu::utftogbk($title); $content = kekezu::utftogbk($content); } $objMsgM->setUid($gUid); $objMsgM->setUsername($username); $objMsgM->setTo_uid($arrSpaceInfo['uid']); $objMsgM->setTo_username($arrSpaceInfo['username']); $objMsgM->setTitle(kekezu::str_filter(kekezu::escape($title))); $objMsgM->setContent(kekezu::str_filter(kekezu::escape($content))); $objMsgM->setOn_time(time()); $objMsgM->setType(3); $objMsgM->create_keke_witkey_msg(); unset($objMsgM); kekezu::show_msg('已发送', NULL, NULL, NULL, 'ok'); } else { $userArrData = keke_user_class::get_user_info($id); }
static function notify_user($title, $content, $uid, $username = "") { if (!$username) { $userinfo = kekezu::get_user_info($uid); $username = $userinfo['username']; } if (is_array($content)) { $objMsgConfig = new Keke_witkey_msg_config_class(); $wh = "`k` = '{$content['tpl']}' limit 1"; $objMsgConfig->setWhere($wh); $res = $objMsgConfig->query_keke_witkey_msg_config(); $content = strtr($res[0]['content'], $content['data']); } $message_obj = new Keke_witkey_msg_class(); $message_obj->setTitle($title); $message_obj->setContent($content); $message_obj->setOn_time(time()); $message_obj->setTo_uid($uid); $message_obj->setTo_username($username); $message_obj->create_keke_witkey_msg(); }
public static function send_private_message($title, $tar_content, $to_uid, $to_username, $url = '', $output = 'normal') { global $uid, $username; global $_lang; if (CHARSET == 'gbk') { $title = kekezu::utftogbk($title); $tar_content = kekezu::utftogbk($tar_content); $to_username = kekezu::utftogbk($to_username); } $msg_obj = new Keke_witkey_msg_class(); $msg_obj->_msg_id = null; $msg_obj->setUid($uid); $msg_obj->setUsername($username); $msg_obj->setTitle($title); $msg_obj->setTo_uid($to_uid); $msg_obj->setTo_username($to_username); $msg_obj->setContent($tar_content); $msg_obj->setOn_time(time()); $msg_obj->setType(2); return $msg_obj->create_keke_witkey_msg(); }
$editInfo = CommonClass::getEditLogInfoByLogTypeAndObjId($service_id, 6); $arrTopIndustrys = $kekezu->_indus_goods_arr; $arrIndustrys = CommonClass::getIndustryByPid($editInfo['log_content_data']['indus_pid']); $arrOldImageLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['old_pic']); $arrImageLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['pic']); $arrOldFileLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['old_file_path']); $arrFileLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['file_path']); require keke_tpl_class::template('shop/goods/admin/tpl/goods_updateinfo'); die; } break; case 'off_shelf': if ($is_submit == "1") { $serviceInfo = db_factory::get_one("select * from " . TABLEPRE . "witkey_service where service_id=" . intval($service_id)); $objMsgM = new Keke_witkey_msg_class(); $objMsgM->setTo_uid($serviceInfo['uid']); $objMsgM->setTo_username($serviceInfo['username']); $objMsgM->setTitle("商品下架"); $objMsgM->setContent(kekezu::str_filter(kekezu::escape("您的商品 " . $serviceInfo[title] . " 被管理员下架,下架原因:{$reason}"))); $objMsgM->setOn_time(time()); $objMsgM->setType(2); $objMsgM->create_keke_witkey_msg(); goods_shop_class::set_service_status($service_id, 3); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, '商品下架成功', 'success'); } else { require keke_tpl_class::template('shop/' . $model_info['model_dir'] . '/admin/tpl/goods_reason'); die; } break; } }
case "del": $res = keke_task_config::task_del($task_id); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['delete_success'], 'success'); break; case "settask": require $kekezu->_tpl_obj->template('task/' . $model_info['model_dir'] . '/admin/tpl/task_reason'); die; break; case "stoptask": $model_info = db_factory::get_one("select * from " . TABLEPRE . "witkey_model where model_id=4"); $config = unserialize($model_info[config]); $task_info = get_task_info($task_id); $work_info = db_factory::get_one("select * from " . TABLEPRE . "witkey_task_bid where task_id='" . intval($task_id) . "' and bid_status=4"); if ($work_info) { $objMsgM = new Keke_witkey_msg_class(); $objMsgM->setTo_uid($work_info['uid']); $objMsgM->setTo_username($work_info['username']); $objMsgM->setTitle(kekezu::str_filter(kekezu::escape("任务结束"))); $objMsgM->setContent(kekezu::str_filter(kekezu::escape($content))); $objMsgM->setOn_time(time()); $objMsgM->create_keke_witkey_msg(); db_factory::execute("update " . TABLEPRE . "witkey_task_bid set bid_status=0 where task_id='" . intval($task_id) . "' and bid_status=4"); } db_factory::execute("update " . TABLEPRE . "witkey_task set task_status=9 where task_id=" . intval($task_id)); $v_arr = array("模型名称" => $model_info['model_name'], "任务标题" => '<a href="' . $kekezu->_sys_config['website_url'] . '/index.php?do=task&id=' . $task_audit_arr['task_id'] . '">' . $task_audit_arr['task_title'] . '</a>', "理由" => kekezu::str_filter(kekezu::escape($content))); keke_msg_class::notify_user($task_audit_arr['uid'], $task_audit_arr['username'], 'task_end_manually', '任务结束通知', $v_arr); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['operate_success'], 'success'); break; case "pass": $res = keke_task_config::task_audit_pass($task_id); $v_arr = array($_lang['username'] => "{$task_audit_arr['username']}", $_lang['task_link'] => $url, $_lang['start_time'] => $start_time, $_lang['end_time'] => $end_time, $_lang['task_id'] => "#" . $task_id);
break; case "stoptask": $model_info = db_factory::get_one("select * from " . TABLEPRE . "witkey_model where model_id=3"); $config = unserialize($model_info[config]); $task_info = get_task_info($task_id); $sum = db_factory::get_one("select count(*) as sum from " . TABLEPRE . "witkey_task_work where task_id='" . intval($task_id) . "' and work_status=6"); if ($sum != $task_info[work_count]) { $singlecash = number_format($task_info[real_cash] / $task_info[work_count], 2); $cash = $singlecash * ($task_info[work_count] - $sum[sum]) * (100 - $config[task_fail_rate]) / 100; keke_finance_class::cash_in($task_info['uid'], $cash, 'task_fail', '', 'task_fail'); } $arrWorkInfo = db_factory::query("select * from " . TABLEPRE . "witkey_task_work where task_id='" . intval($task_id) . "' and work_status=6 group by uid"); foreach ($arrWorkInfo as $v) { if ($v) { $objMsgM = new Keke_witkey_msg_class(); $objMsgM->setTo_uid($v['uid']); $objMsgM->setTo_username($v['username']); $objMsgM->setTitle(kekezu::str_filter(kekezu::escape("任务结束"))); $objMsgM->setContent(kekezu::str_filter(kekezu::escape($content))); $objMsgM->setOn_time(time()); $objMsgM->create_keke_witkey_msg(); } } db_factory::execute("update " . TABLEPRE . "witkey_task set task_status=9 where task_id=" . intval($task_id)); $v_arr = array("模型名称" => $model_info['model_name'], "任务标题" => '<a href="' . $kekezu->_sys_config['website_url'] . '/index.php?do=task&id=' . $task_audit_arr['task_id'] . '">' . $task_audit_arr['task_title'] . '</a>', "理由" => kekezu::str_filter(kekezu::escape($content))); keke_msg_class::notify_user($task_audit_arr['uid'], $task_audit_arr['username'], 'task_end_manually', '任务结束通知', $v_arr); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['operate_success'], 'success'); break; case "pass": $res = keke_task_config::task_audit_pass($task_id); $v_arr = array($_lang['username'] => $task_audit_arr['username'], $_lang['task_link'] => $url, $_lang['start_time'] => $start_time, $_lang['end_time'] => $end_time, $_lang['task_id'] => "#" . $task_id);