Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
<?php

if (isset($formhash) && kekezu::submitcheck($formhash)) {
    $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');
Exemplo n.º 3
0
 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();
 }
Exemplo n.º 4
0
 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();
 }
Exemplo n.º 5
0
         } else {
             $editInfo = CommonClass::getEditLogInfoByLogTypeAndObjId($service_id, 6);
             $arrTopIndustrys = $kekezu->_indus_goods_arr;
             $arrIndustrys = CommonClass::getIndustryByPid($editInfo['log_content_data']['indus_pid']);
             $arrOldImageLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['old_pic']);
             $arrImageLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['pic']);
             $arrOldFileLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['old_file_path']);
             $arrFileLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['file_path']);
             require keke_tpl_class::template('shop/goods/admin/tpl/goods_updateinfo');
             die;
         }
         break;
     case 'off_shelf':
         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;
 }
Exemplo n.º 6
0
switch ($ac) {
    case "del":
        $res = keke_task_config::task_del($task_id);
        kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['delete_success'], 'success');
        break;
    case "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);
Exemplo n.º 7
0
<?php

defined('IN_KEKE') or exit('Access Denied');
$strUrl = 'index.php?do=user&view=message&op=send';
if (isset($formhash) && kekezu::submitcheck($formhash)) {
    $title = kekezu::str_filter(kekezu::escape(strip_tags(htmlspecialchars_decode($title))));
    $content = kekezu::str_filter(kekezu::escape(strip_tags(htmlspecialchars_decode($content))));
    $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($title);
    $objMsgM->setContent($content);
    $objMsgM->setOn_time(time());