Пример #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();
 }
Пример #2
0
    $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);
}
Пример #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();
 }
Пример #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();
 }