• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP uc_pm_send函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中uc_pm_send函数的典型用法代码示例。如果您正苦于以下问题:PHP uc_pm_send函数的具体用法?PHP uc_pm_send怎么用?PHP uc_pm_send使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了uc_pm_send函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: space_open

function space_open($uid, $username, $gid = 0, $email = '')
{
    global $_SGLOBAL, $_SCONFIG;
    if (empty($uid) || empty($username)) {
        return array();
    }
    //验证空间是否被管理员删除
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('spacelog') . " WHERE uid='{$uid}' AND flag='-1'");
    if ($value = $_SGLOBAL['db']->fetch_array($query)) {
        showmessage('the_space_has_been_closed');
    }
    $space = array('uid' => $uid, 'username' => $username, 'dateline' => $_SGLOBAL['timestamp'], 'groupid' => $gid);
    inserttable('space', $space, 0, true);
    inserttable('spacefield', array('uid' => $uid, 'email' => $email), 0, true);
    //发送PM
    if ($_SGLOBAL['supe_uid'] && $_SGLOBAL['supe_uid'] != $uid) {
        include_once S_ROOT . './uc_client/client.php';
        uc_pm_send($_SGLOBAL['supe_uid'], $uid, cplang('space_open_subject'), cplang('space_open_message', array(getsiteurl())), 1, 0, 0);
    }
    //产生feed
    include_once S_ROOT . './source/function_cp.php';
    $_uid = $_SGLOBAL['supe_uid'];
    $_username = $_SGLOBAL['supe_username'];
    $_SGLOBAL['supe_uid'] = $uid;
    $_SGLOBAL['supe_username'] = addslashes($username);
    feed_add('profile', cplang('feed_space_open'));
    $_SGLOBAL['supe_uid'] = $_uid;
    $_SGLOBAL['supe_username'] = $_username;
    return $space;
}
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:30,代码来源:function_space.php


示例2: sendpm

 public static function sendpm($toid, $subject, $message, $fromid = '', $replypmid = 0, $isusername = 0, $type = 0)
 {
     global $_G;
     if ($fromid === '') {
         $fromid = $_G['uid'];
     }
     $author = '';
     if ($fromid) {
         if ($fromid == $_G['uid']) {
             $sendpmmaxnum = $_G['group']['allowsendpmmaxnum'];
             $author = $_G['username'];
         } else {
             $user = getuserbyuid($fromid);
             $author = $user['username'];
             loadcache('usergroup_' . $user['groupid']);
             $sendpmmaxnum = $_G['cache']['usergroup_' . $user['groupid']]['allowsendpmmaxnum'];
         }
         $currentnum = C::t('common_member_action_log')->count_day_hours(getuseraction('pmid'), $fromid);
         if ($sendpmmaxnum && $currentnum >= $sendpmmaxnum) {
             return -16;
         }
     }
     loaducenter();
     $return = uc_pm_send($fromid, $toid, addslashes($subject), addslashes($message), 1, $replypmid, $isusername, $type);
     if ($return > 0 && $fromid) {
         if ($_G['setting']['cloud_status']) {
             $msgService = Cloud::loadClass('Cloud_Service_Client_Message');
             if (is_numeric($toid)) {
                 $tospace = getuserbyuid($toid);
                 if ($tospace['conisbind']) {
                     $msgService->add($toid, $fromid, $author, $_G['timestamp']);
                 }
             } else {
                 $senduids = array();
                 foreach (C::t('common_member')->fetch_all_by_username(explode(',', $toid)) as $touser) {
                     if ($touser['conisbind']) {
                         $senduids[$touser['uid']] = $touser['uid'];
                     }
                 }
                 if ($senduids) {
                     $msgService->add($senduids, $fromid, $author, $_G['timestamp']);
                 }
             }
         }
         foreach (explode(',', $fromid) as $v) {
             useractionlog($fromid, 'pmid');
         }
     }
     return $return;
 }
开发者ID:Jaedeok-seol,项目名称:discuz_template,代码行数:50,代码来源:helper_pm.php


示例3: uc_pm_send

 /**
  * 发送短消息
  *
  * @param integer $fromuid 发件人用户 ID,0 为系统消息
  * @param string $msgto 收件人用户名,多个用逗号分割
  * @param string $subject 消息标题
  * @param string $message 消息内容
  * @param integer $replypmid 回复的消息 ID 大于 0:回复指定的短消息 0:(默认值) 发送新的短消息
  * @return integer {大于 0:发送成功的最后一条消息 ID 0:发送失败 -1:超出了24小时最大允许发送短消息数目
  *         -2:不满足两次发送短消息最短间隔 -3:不能给非好友批量发送短消息
  *         -4:目前还不能使用发送短消息功能(注册多少日后才可以使用发短消息限制)}
  */
 public function uc_pm_send($fromuid, $msgto, $subject, $message, $replypmid)
 {
     return uc_pm_send($fromuid, $msgto, $subject, $message, $instantly = 1, $replypmid = 0, $isusername = 1);
 }
开发者ID:hubs,项目名称:yuncms,代码行数:16,代码来源:uc_client.php


示例4: sendpm

function sendpm($toid, $subject, $message, $fromid = '')
{
    extract($GLOBALS, EXTR_SKIP);
    include language('pms');
    require_once DISCUZ_ROOT . './uc_client/client.php';
    if (isset($language[$subject])) {
        eval("\$subject = addslashes(\"" . $language[$subject] . "\");");
    }
    if (isset($language[$message])) {
        eval("\$message = addslashes(\"" . $language[$message] . "\");");
    }
    if ($fromid === '') {
        $fromid = $discuz_uid;
    }
    uc_pm_send($fromid, $toid, $subject, $message);
}
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:16,代码来源:global.func.php


示例5: sendpm

function sendpm($toid, $subject, $message, $fromid = '')
{
    global $_G;
    if ($fromid === '') {
        $fromid = $_G['uid'];
    }
    loaducenter();
    uc_pm_send($fromid, $toid, $subject, $message);
}
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:9,代码来源:function_core.php


示例6: API_SendMsg

function API_SendMsg($uid, $ti, $co)
{
    global $userid;
    include_once ONEZ_ROOT . './uc_client/client.php';
    return uc_pm_send($userid, $uid, $ti, $co);
}
开发者ID:shenhua4286,项目名称:gxw,代码行数:6,代码来源:discuz.php


示例7: submenu_mail_box

 function submenu_mail_box()
 {
     echo '<div class=wrap>';
     echo '<h2>' . __('Mail Box', 'ucenter') . '</h2>';
     global $current_user;
     wp_get_current_user();
     list($uid, $_, $_) = uc_get_user($current_user->user_login);
     $timeoffset = get_option('gmt_offset');
     $pm_per_page = 10;
     $max_msg_length = 100;
     $handler = $_SERVER['PHP_SELF'] . '?page=' . $_GET['page'];
     $current_handler = $handler . '&tab=' . $_GET['tab'];
     $action = !empty($_GET['action']) ? $_GET['action'] : '';
     $_GET['tab'] = !empty($_GET['tab']) ? $_GET['tab'] : 'inbox';
     $menu = array(array('inbox', '', __('Inbox', 'ucenter')), array('uread', 'filter=newpm', __('Unread Mail', 'ucenter')), array('announcepm', 'filter=announcepm', __('Public Message', 'ucenter')), array('systempm', 'filter=systempm', __('System Message', 'ucenter')), array('send', 'action=send', __('Send Message', 'ucenter')), array('blacklist', 'action=blacklist', __('Black List', 'ucenter')));
     echo '<ul class="ucenter-ul">';
     foreach ($menu as $item) {
         printf("<li><a href='{$handler}&tab={$item['0']}&{$item['1']}' %s>{$item['2']}</a></li>", $_GET['tab'] == $item[0] ? 'class="current"' : '');
     }
     echo '</ul><br /><hr />';
     switch ($action) {
         case '':
             $_GET['pageid'] = max(1, intval($_GET['pageid']));
             $_GET['filter'] = !empty($_GET['filter']) ? $_GET['filter'] : '';
             $data = uc_pm_list($uid, $_GET['pageid'], $pm_per_page, $_GET['folder'], $_GET['filter'], $max_msg_length);
             foreach ($data['data'] as $pm) {
                 if ($_GET['filter'] == 'announcepm' || $_GET['filter'] == 'systempm') {
                     $output .= "<li><a href='{$current_handler}&action=view&subtab=within3days&daterange=3&pmid={$pm['pmid']}'>{$pm['subject']}</a>";
                     $output .= '<br /> ' . __('Content:', 'ucenter') . $pm[message] . '</li>';
                 } else {
                     $output .= "<li><a href='{$current_handler}&action=view&subtab=within3days&daterange=3&touid={$pm['touid']}'>[{$pm['msgfrom']}]</a> (" . gmdate('Y-m-d H:i:s', $pm['dateline'] + $timeoffset * 3600) . ')';
                     $pm['new'] && ($output .= " New! ");
                     $output .= '<br /> ' . __('Content: ', 'ucenter') . $pm[message] . '</li>';
                 }
             }
             $page_n = $data['count'] / $pm_per_page;
             if ($page_n > 1) {
                 $output .= '<hr / ><br />';
                 $output .= __('Page ', 'ucenter');
                 for ($i = 1; $i <= $page_n; $i++) {
                     $output .= " <a href='{$current_handler}&pageid={$i}'>{$i}</a> ";
                 }
             }
             break;
         case 'view':
             $pmid = !empty($_GET['pmid']) ? $_GET['pmid'] : '';
             $daterange = !empty($_GET['daterange']) ? $_GET['daterange'] : '1';
             $data = uc_pm_view($uid, $pmid, $_GET['touid'], $daterange);
             $dateranges = array(array('within3days', '3', __('Within 3 Days', 'ucenter')), array('within1week', '4', __('Within This Week', 'ucenter')), array('all', '5', __('All', 'ucenter')));
             echo '<ul class="ucenter-ul">';
             foreach ($dateranges as $item) {
                 printf("<li><a href='{$current_handler}&action=view&touid={$_GET['touid']}&pmid={$pmid}&subtab={$item['0']}&daterange={$item['1']}' %s>{$item['2']}</a></li>", $_GET['subtab'] == $item[0] ? 'class="current"' : '');
             }
             echo '</ul><br /><hr />';
             foreach ($data as $pm) {
                 $output .= "<b>{$pm['msgfrom']}</b>";
                 if ($_GET['touid'] == $pm['msgfromid']) {
                     $output .= "<a href='{$current_handler}&action=addblacklist&user={$pm['msgfrom']}'>" . __(' [ Ban This User ] ', 'ucenter') . "</a>";
                 }
                 $output .= ' ( ' . gmdate('Y-m-d H:i:s', $pm['dateline'] + $timeoffset * 3600) . ' ) ';
                 $output .= "<br />{$pm['message']}<br /><br />";
             }
             if (empty($_GET['pmid'])) {
                 $output .= "\n\t\t\t\t\t\t<a href='{$current_handler}&action=delete&uid={$_GET['touid']}'>" . __('Delete All Message From This user', 'ucenter') . "</a><br />\n\t\t\t\t\t\tReply:\n\t\t\t\t\t\t<form method='post' action='{$current_handler}&action=send'>\n\t\t\t\t\t\t<input name='touid' type='hidden' value='{$_GET['touid']}'>\n\t\t\t\t\t\t<textarea name='message' cols='30' rows='5'></textarea><br />\n\t\t\t\t\t\t<input type='submit'>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t\t";
             }
             break;
         case 'delete':
             if (uc_pm_deleteuser($uid, array($_GET['uid']))) {
                 $output .= __('Deleted', 'ucenter');
             }
             break;
         case 'addblacklist':
             $user = !empty($_GET['user']) ? $_GET['user'] : (!empty($_POST['user']) ? $_POST['user'] : '');
             if (uc_pm_blackls_add($uid, $user)) {
                 $output .= $_GET['user'] . __('has been added to your black list', 'ucenter');
             }
             break;
         case 'deleteblacklist':
             if (uc_pm_blackls_delete($uid, $_GET['user'])) {
                 $output .= $_GET['user'] . __('has been removed from your black list', 'ucenter');
             }
             break;
         case 'blacklist':
             $data = explode(',', uc_pm_blackls_get($uid));
             foreach ($data as $ls) {
                 $ls && ($output .= "{$ls} <a href='{$current_handler}&action=deleteblacklist&user={$ls}'>" . __('Remove', 'ucenter') . "</a>");
             }
             $output .= "\n\t\t\t\t\t<form method='post' action='{$current_handler}&action=addblacklist'>\n\t\t\t\t\t<input type='input' name='user' value=''>\n\t\t\t\t\t<input type='submit'>\n\t\t\t\t\t</form>\n\t\t\t\t\t";
             break;
         case 'send':
             if (!empty($_POST)) {
                 if (!empty($_POST['touser'])) {
                     $msgto = $_POST['touser'];
                     $isusername = 1;
                 } else {
                     $msgto = $_POST['touid'];
                     $isusername = 0;
                 }
                 if (uc_pm_send($uid, $msgto, $_POST['subject'], $_POST['message'], 1, 0, $isusername)) {
                     $output .= __('Sended', 'ucenter');
//.........这里部分代码省略.........
开发者ID:hotmob,项目名称:likedome,代码行数:101,代码来源:ucenter.php


示例8: mcmessage

    } else {
        //发送短信
        if (!regcode_pass('pm', empty($regcode) ? '' : trim($regcode))) {
            mcmessage(lang('regcodeerror'), M_REFERER);
        }
        $pmnew['title'] = trim($pmnew['title']);
        $pmnew['tonames'] = trim($pmnew['tonames']);
        $pmnew['content'] = trim($pmnew['content']);
        if (empty($pmnew['content']) || empty($pmnew['tonames'])) {
            mcmessage(lang('pmdatamiss'), M_REFERER);
        }
        $tos = array_filter(explode(',', $pmnew['tonames']));
        $count = 0;
        $pmnew['title'] = $pmnew['title'] ? $pmnew['title'] : ($pmnew['content'] ? $pmnew['content'] : '');
        foreach ($tos as $to) {
            if (uc_pm_send($uid, $to, $pmnew['title'], $pmnew['content'], 1, 0, 1)) {
                $count++;
            }
        }
        $count ? mcmessage($count . lang('pmsendfinish'), "?action=pmbox&box={$box}&page={$page}") : mcmessage(lang('pmsenderr'), M_REFERER);
    }
} elseif (empty($fid) && empty($pmid)) {
    if (!submitcheck('bpmbox')) {
        //各收件箱
        $ucpm = uc_pm_list($uid, $page, $mrowpp, 'inbox', $box, 30);
        tabheader(lang('pmlist'), 'pmsedit', "?action=pmbox&box={$box}&page={$page}", 6);
        trcategory(array($box == 'announcepm' ? '' : "<input class=\"checkbox\" type=\"checkbox\" name=\"chkall\" class=\"category\" onclick=\"checkall(this.form, '', 'chkall')\">" . lang('del'), array(lang('title'), 'left'), lang('senduser'), lang('state'), lang('senddate'), lang('content')));
        if ($ucpm['data']) {
            foreach ($ucpm['data'] as $pm) {
                echo "<tr title=\"" . mhtmlspecialchars($pm['message']) . "\">\n<td align=\"left\" width=\"40\">" . ($box == 'announcepm' ? '' : "<input class=\"checkbox\" type=\"checkbox\" name=\"" . ($pm['msgformid'] ? "fids[{$pm['msgformid']}]\" value=\"{$pm['msgform']}" : "pmids[{$pm['pmid']}]\" value=\"{$pm['pmid']}") . '">') . "</td>\n" . "<td class=\"item2\">" . mhtmlspecialchars($pm['subject']) . "</td>\n" . "<td align=\"center\" width=\"120\">" . ($pm['msgfromid'] ? $pm['msgfrom'] : lang('syspm')) . "</td>\n" . "<td align=\"center\" width=\"40\">" . ($box == 'announcepm' ? '-' : lang($pm['new'] ? 'noread' : 'read')) . "</td>\n" . "<td align=\"center\" width=\"80\">" . date($dateformat, $pm['dateline']) . "</td>\n" . "<td align=\"center\" width=\"40\"><a href=\"?action=pmbox&box={$box}&page={$page}&" . ($pm['msgfromid'] ? "fid={$pm['msgfromid']}" : "pmid={$pm['pmid']}") . "\">" . lang('look') . "</a></td></tr>\n";
            }
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:pmuc.inc.php


示例9: sendpm

function sendpm($toid, $subject, $message, $fromid = '')
{
    if ($fromid === '') {
        require_once DISCUZ_ROOT . './uc_client/client.php';
        $fromid = $discuz_uid;
    }
    if ($fromid) {
        uc_pm_send($fromid, $toid, $subject, $message);
    } else {
        global $promptkeys;
        if (in_array($subject, $promptkeys)) {
            $type = $subject;
        } else {
            extract($GLOBALS, EXTR_SKIP);
            require_once DISCUZ_ROOT . './include/discuzcode.func.php';
            $message = str_replace(array('{', '}', '"'), ' ', $message);
            eval("\$message = addslashes(\"" . $message . "\");");
            $type = 'systempm';
            $message = '<div>' . $subject . ' {time}<br />' . discuzcode($message, 1, 0) . '</div>';
        }
        sendnotice($toid, $message, $type);
    }
}
开发者ID:lilhorse,项目名称:cocoa,代码行数:23,代码来源:global.func.php


示例10: tname

             if ($iauth_type == 'RP') {
                 //如果是api,则更新api信息,同时同步api信息至iauth
                 $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('api') . " WHERE appid={$appsid}");
                 if ($value = $_SGLOBAL['db']->fetch_array($query)) {
                     $api_id = $value['id'];
                     $iauth_api_name = $value['iauth_api_name'];
                     $api['appid'] = $iauth_arr['id'];
                     $api['url'] = $value['url'];
                     //print_r($value);
                     //print_r($api);
                 }
                 $api['iauthAPIid'] = IAUTH_new_API($api['appid'], $iauth_api_name, $api['url']);
                 updatetable('api', $api, array('id' => $api_id));
             }
             $pmContent = "【应用开发信息】(请妥善保管,勿轻易泄漏,否则由此造成的一切后果由应用申请者负责)\n中文名称【" . $name . "】\n英文名称【" . $iauth_name . "】\napp id【" . $iauth_arr['id'] . "】不含括号\napp secret【" . $iauth_arr['secret'] . "】不含括号\n应用访问链接:http://i.buaa.edu.cn/plugin.php?pluginid=apps&ac=detail&appsid=" . $iauth_arr['id'] . "\n应用开发讨论区:http://i.buaa.edu.cn/space.php?do=mtag&tagid=1822\n祝开发愉快! ihome团队敬上";
             uc_pm_send(0, $_GET['applyuid'], '应用已通过审核', $pmContent);
             $notes = '管理员审核通过了应用【<a href="/plugin.php?pluginid=apps&ac=detail&appsid=' . $iauth_arr['id'] . '">' . $name . '</a>】,详见<a href="/space.php?do=pm&filter=systempm">系统消息</a><br/>【附加说明】' . $notes;
         }
     }
     //更新本地app信息
     //print_r($app_arr);
     updatetable('apps', $app_arr, array('id' => $appsid));
     //通知申请者
     $applyuid = $_GET['applyuid'];
     notification_add($applyuid, 'systemnote', $notes);
     header("Location:admincp.php?ac=apps");
     exit;
 } else {
     $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('apps') . " WHERE id={$appsid}");
     if ($value = $_SGLOBAL['db']->fetch_array($query)) {
         $logo = $value['logo'] ? $_SC['attachurl'] . $value['logo'] : 'plugin/apps/images/app.gif';
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:admincp_apps.php


示例11: getletter

        $shop['letter'] = getletter(trim($_POST['subject']));
        $shop['address'] = $_POST['address'];
        $shop['catid'] = $_POST['catid'];
        $shop['validity_end'] = mktime(0, 0, 0, date('m', $_G['timestamp']), date('d', $_G['timestamp']), date('Y', $_G['timestamp']) + 10);
        // 自動為用戶加商店
        $shopid = inserttable('shopitems', $shop, 1);
        $itemmessage['itemid'] = $shopid;
        $itemmessage['postip'] = $_G['clientip'];
        inserttable('shopmessage', $itemmessage);
        $_BCACHE->deltype('sitelist', 'shop', $_G['uid']);
        if (!pkperm('isadmin')) {
            DB::query('UPDATE ' . tname('members') . " SET myshopid='{$shopid}' WHERE uid='{$_G['uid']}'");
        }
        if ($_G['setting']['auditnewshops']) {
            uc_pm_send(0, $_SC['founder'], $lang['apm_admin_title'], $lang['apm_admin_msg']);
            uc_pm_send(0, $_G['uid'], $lang['apm_panel_title'], $lang['apm_panel_msg']);
            showmessage('apm_panel_msg', 'index.php');
        } else {
            DB::query('UPDATE ' . tname('shopitems') . " SET grade='3', groupid='{$_G['setting']['defaultshopgroup']}' WHERE itemid='{$shopid}'");
            showmessage('attend_register_success', 'index.php');
        }
        exit;
    } else {
        showmessage('no_submit', geturl('attend.php'));
    }
} elseif ($do && $do == "attend") {
    //第二步,填寫基本信息
    $uid = $_G['uid'];
    $ucurl = avatar($uid);
    if (postget('refer')) {
        $refer = postget('refer');
开发者ID:pan289091315,项目名称:Discuz,代码行数:31,代码来源:attend.php


示例12: pm_msgbox

function pm_msgbox($array)
{
    global $db, $pre, $timestamp, $webdb, $TB_pre, $TB, $userDB, $db_modes;
    $array[content] = addslashes($array[content]);
    $array[title] = addslashes($array[title]);
    if (ereg("^pwbbs", $webdb[passport_type]) && !is_array($db_modes)) {
        if (strlen($array[title]) > 130) {
            showerr("±êÌâ²»ÄÜ´óÓÚ65¸öºº×Ö");
        }
        if (is_table("{$TB_pre}msgc")) {
            $db->query("INSERT INTO {$TB_pre}msg (`touid`,`fromuid`, `username`, `type`, `ifnew`, `mdate`) VALUES ('{$array['touid']}','{$array['fromuid']}', '{$array['fromer']}', 'rebox', '1', '{$timestamp}')");
            $mid = $db->insert_id();
            $db->query("INSERT INTO {$TB_pre}msgc (`mid`, `title`, `content`) VALUES ('{$mid}','{$array['title']}','{$array['content']}')");
        } else {
            $db->query("INSERT INTO {$TB_pre}msg (`touid`,`fromuid`, `username`, `type`, `ifnew`, `title`, `mdate`, `content`) VALUES ('{$array['touid']}','{$array['fromuid']}', '{$array['fromer']}', 'rebox', '1', '{$array['title']}', '{$timestamp}', '{$array['content']}')");
        }
        $array = array('uid' => $array[touid], 'newpm' => 1);
        $userDB->edit_pw_member($array);
    } elseif (defined("UC_CONNECT")) {
        if (strlen($array[title]) > 75) {
            showerr("±êÌâ²»ÄÜ´óÓÚ32¸öºº×Ö");
        }
        uc_pm_send('$array[fromuid]', '$array[touid]', '$array[title]', '$array[content]', 1, 0, 1);
    } else {
        if (strlen($array[title]) > 130) {
            showerr("±êÌâ²»ÄÜ´óÓÚ65¸öºº×Ö");
        }
        $db->query("INSERT INTO `{$pre}pm` (`touid`,`fromuid`, `username`, `type`, `ifnew`, `title`, `mdate`, `content`) VALUES ('{$array['touid']}','{$array['fromuid']}', '{$array['fromer']}', 'rebox', '1', '{$array['title']}', '{$timestamp}', '{$array['content']}')");
    }
}
开发者ID:xubo245,项目名称:liuyangzhang,代码行数:30,代码来源:function.inc.php


示例13: show_message

        show_message('user_nologin', '');
        exit;
    }
} elseif ($command == 'sendmsg') {
    if (!$cyask_user) {
        $backurl = 'member.php?uid=' . $uid;
        show_message('user_nologin', '');
        exit;
    }
    if ($cyask_uid == $uid) {
        $url = 'member.php?uid=' . $uid;
        show_message('sendmsg_self', $url);
        exit;
    }
    if (check_submit($_POST['sendmsg'], $_POST['formhash'])) {
        $num = uc_pm_send($cyask_uid, $uid, $_POST['title'], $_POST['content'], 1, 0, 0);
        if ($num > 0) {
            $url = 'member.php?uid=' . $uid;
            show_message('sendmsg_succeed', $url);
        } else {
            $url = 'member.php?uid=' . $uid;
            show_message('sendmsg_error', $url);
        }
        /*		if($passport=='discuz5.0.0')
        		{
        			$dblink->query("insert into $dbprefix"."pms set msgfrom='$cyask_user',msgfromid='$cyask_uid',msgtoid='$uid',folder='inbox',new=1,subject='$_POST[title]',dateline='$timestamp',message='$_POST[content]'");
        			
        		}
        		elseif($passport=='discuz5.5.0')
        		{
        			$dblink->query("insert into $dbprefix"."pms set msgfrom='$cyask_user',msgfromid='$cyask_uid',msgtoid='$uid',folder='inbox',new=1,subject='$_POST[title]',dateline='$timestamp',message='$_POST[content]'");
开发者ID:yunsite,项目名称:cyaskuc,代码行数:31,代码来源:member.php


示例14: gradechange

function gradechange($items = '', $opcheck = 3, $check_txt = '', $model = 'shop')
{
    global $_G, $_SGLOBAL;
    require_once B_ROOT . './uc_client/client.php';
    if ($model != 'shop') {
        $query = DB::query('SELECT shopid,itemid,subject FROM ' . tname($model . 'items') . ' WHERE itemid IN (' . $items . ')');
        while ($result = DB::fetch($query)) {
            $shopids[] = $result['shopid'];
            $itemsinfo[$result['itemid']] = $result;
        }
        //echo 'SELECT shopid FROM '.tname($model.'items').' WHERE itemid IN ('.$items.')';
        //print_r($shopids);
        $items = implode(",", $shopids);
    }
    $query = DB::query('SELECT uid, username, subject, itemid as shopid FROM ' . tname('shopitems') . ' WHERE itemid IN (' . $items . ')');
    while ($value = DB::fetch($query)) {
        $passuids .= $value['uid'] . ', ';
        $passuidarr[$value['shopid']] = $value;
    }
    if ($passuidarr) {
        if ($model == 'shop') {
            $passuids = substr($passuids, 0, -2);
            $pmcont = !empty($check_txt) ? $check_txt : lang('mod_checktxt_change');
            switch ($opcheck) {
                case 1:
                    $pmtitle = lang('mod_checktitle_fail');
                    //if($model == 'shop') DB::query('UPDATE '.tname('members')." SET myshopstatus='unverified' WHERE uid IN ('$passuids')");//審核後將狀態更新至members表
                    break;
                case 2:
                    $pmtitle = lang('mod_checktitle_close');
                    //if($model == 'shop') DB::query('UPDATE '.tname('members')." SET myshopstatus='verified' WHERE uid IN ('$passuids')");
                    break;
                case 3:
                    $pmtitle = lang('mod_checktitle_pass');
                    //if($model == 'shop') DB::query('UPDATE '.tname('members')." SET myshopstatus='verified' WHERE uid IN ('$passuids')");
                    break;
                case 4:
                    $pmtitle = lang('mod_checktitle_recommend');
                    //if($model == 'shop') DB::query('UPDATE '.tname('members')." SET myshopstatus='verified' WHERE uid IN ('$passuids')");
                    break;
                default:
                    $pmtitle = lang('mod_checktitle_change');
                    //if($model == 'shop') DB::query('UPDATE '.tname('members')." SET myshopstatus='unverified' WHERE uid IN ('$passuids')");
                    break;
            }
            foreach ($passuidarr as $eachuid) {
                $tmpcont = trim(strip_tags(str_replace(array('USERNAME', 'SHOPTITLE', 'GRADENOW'), array(saddslashes($eachuid['username']), saddslashes($eachuid['subject']), $_SGLOBAL['shopgrade'][$opcheck]), $pmcont)));
                //$_G['uid'] . $eachuid['uid'] . $pmtitle . $tmpcont;
                uc_pm_send(0, $eachuid['uid'], $pmtitle, $tmpcont);
            }
        } else {
            $pmtitle = $opcheck;
            $pmcont = !empty($check_txt) ? $check_txt : lang('mod_checktxt_change_' . $model);
            foreach ($itemsinfo as $itemid => $iteminfo) {
                $eachuid = $passuidarr[$iteminfo['shopid']];
                $tmpcont = trim(strip_tags(str_replace(array('USERNAME', 'SUBJECT'), array($eachuid['username'], '[url=' . B_URL . '/store.php?id=' . $iteminfo['shopid'] . '&action=' . $model . '&xid=' . $itemid . ']' . $iteminfo['subject'] . '[/url]'), $pmcont)));
                uc_pm_send(0, $eachuid['uid'], $pmtitle, $tmpcont);
            }
        }
    }
    //grade_s店舖狀態信息數據冗余到相冊、消費券等各個物件表中
    if ($model == 'shop') {
        $models = array('album', 'consume', 'good', 'groupbuy', 'notice', 'photo');
        foreach ($models as $m) {
            DB::query("UPDATE " . tname($m . 'items') . " i INNER JOIN " . tname('shopitems') . " si ON i.shopid=si.itemid SET i.grade_s = si.grade WHERE i.shopid IN ({$items})", 'UNBUFFERED');
        }
    }
}
开发者ID:pan289091315,项目名称:Discuz,代码行数:68,代码来源:tool.func.php


示例15: header

            header("location: " . $_SERVER['HTTP_REFERER']);
        }
    } else {
        $msgto = intval($_REQUEST['msgto']);
        if (intval($_G['uid']) == $msgto) {
            // 不能給自己發消息
            $send_result = 'notallowtomyself';
        } elseif ($_G['uid'] < 1) {
            // 沒有 LOGIN
            $send_result = 'notlogin';
            // 發送窗口
        } elseif ($act == 'sendbox') {
            if (empty($send_result)) {
                $user = DB::fetch(DB::query('SELECT uid,username FROM ' . tname('members') . " WHERE uid='{$msgto}'"));
                $uid = $user['uid'];
                $username = $user['username'];
            }
            // 發送操作
        } elseif ($act == 'send') {
            if (submitcheck('pmsubmit')) {
                $subject = $_POST['subject'];
                $message = $_POST['message'];
                @(include_once B_ROOT . './uc_client/client.php');
                $send_result = uc_pm_send($_G['uid'], $msgto, $subject, $message);
            } else {
                showmessage('FORMHASH ERROR', 'index.php');
            }
        }
    }
}
include template('templates/site/default/pm.html.php', 1);
开发者ID:pan289091315,项目名称:Discuz,代码行数:31,代码来源:pm.php


示例16: showmessagee

    if (!$_g_xid || !$_g_uid) {
        showmessagee('system_error');
    }
    $c_groupby = loadClass('groupbuy');
    $sql = "update " . tname('groupbuyjoin') . " set status = 1 WHERE itemid = " . $_g_xid . " AND uid=" . $_g_uid . ";";
    $query = DB::query($sql);
    $c_groupby->update_groupby_join_num($_g_xid);
    $_BCACHE->deltype('detail', 'groupbuy', $_GET['id'], $_g_xid);
    $username = DB::result_first("SELECT username FROM " . tname('members') . " WHERE uid=" . $_g_uid);
    if (isset($lang['groupbuy_join_finalsuccess_title'])) {
        eval("\$pm_title = \"" . $lang['groupbuy_join_finalsuccess_title'] . "\";");
    }
    if (isset($lang['groupbuy_join_finalsuccess_message'])) {
        eval("\$pm_message = \"" . $lang['groupbuy_join_finalsuccess_message'] . "\";");
    }
    uc_pm_send($shop['uid'], $_g_uid, $pm_title, $pm_message);
    header("location: store.php?id=" . $_GET['id'] . "&action=groupbuy&do=groupbuy_attend_detail&xid=" . $_g_xid);
    exit;
} elseif ($_GET['do'] == 'groupbuy_attend_detail') {
    $groupbuy['date'] = date('Y' . $lang['year'] . 'm' . $lang['mon'] . 'd' . $lang['day'], $groupbuy['dateline']);
    $groupbuy['days'] = ceil(($_G['timestamp'] - $groupbuy['dateline']) / 86400);
    $groupbuy['join_total_num'] = DB::fetch(DB::query("SELECT count(*) as count FROM " . tname("groupbuyjoin") . " WHERE itemid = " . $_g_xid . ""));
    $groupbuy['join_total_num'] = $groupbuy['join_total_num']['count'];
    $groupbuyattr = loadClass('attr')->get_groupby_user_attr();
    $sql = "SELECT * FROM " . tname('groupbuyjoin') . " WHERE itemid = " . $_g_xid;
    $query = DB::query($sql);
    while ($res = DB::fetch($query)) {
        $groupbuy_join_list[] = $res;
    }
    //導出 Excel
    if ($_GET['exportexcel'] == 1) {
开发者ID:pan289091315,项目名称:Discuz,代码行数:31,代码来源:groupbuy.inc.php


示例17: showmessage

         }
         $msgto = $uid;
     }
 }
 if ($discuz_uid == $msgto) {
     showmessage('pm_send_self_ignore');
 }
 if (trim($message) === '') {
     showmessage('pm_send_empty');
 }
 include_once './forumdata/cache/cache_bbcodes.php';
 foreach ($_DCACHE['smilies']['replacearray'] as $key => $smiley) {
     $_DCACHE['smilies']['replacearray'][$key] = '[img]' . $boardurl . 'images/smilies/' . $_DCACHE['smileytypes'][$_DCACHE['smilies']['typearray'][$key]]['directory'] . '/' . $smiley . '[/img]';
 }
 $message = preg_replace($_DCACHE['smilies']['searcharray'], $_DCACHE['smilies']['replacearray'], $message);
 $pmid = uc_pm_send($discuz_uid, $msgto, '', $message, 1, 0, 0);
 if ($pmid > 0) {
     !($exempt & 1) && updatecredits($discuz_uid, $creditspolicy['sendpm'], -1);
     if (empty($sendnew)) {
         $pm = uc_pm_viewnode($discuz_uid, 0, $pmid);
         $dateline = $pm['dateline'] + $timeoffset * 3600;
         $pm['daterange'] = gmdate($dateformat, $dateline);
         $pm['daterange'] = $pm['daterange'] != $lastdaterange ? $pm['daterange'] : '';
         $pm['dateline'] = gmdate("{$dateformat} {$timeformat}", $dateline);
         include template('header_ajax');
         include template('pm_node');
         include template('footer_ajax');
         exit;
     } else {
         showmessage('pm_send_succeed', '', 1);
         exit;
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:31,代码来源:pm.php


示例18: json_encode

         $result['status'] = 0;
         $result['msg'] = '很悲桑的说,你大概被拉黑了。。';
         echo json_encode($result);
         exit;
     }
 }
 if (empty($content)) {
     $result['status'] = 0;
     $result['msg'] = '这条可怜的消息木有了,再来一发吧';
     echo json_encode($result);
     exit;
 }
 $subject = '';
 $return = 0;
 if ($touid) {
     $return = uc_pm_send($_SGLOBAL['supe_uid'], $touid, $subject, $content, 1, $pmid, 0);
     if ($return > 0) {
         require 'Predis/Autoloader.php';
         Predis\Autoloader::register();
         $client = new Predis\Client();
         $keyT = 'ihome_T' . $touid;
         if ($client->exists($keyT)) {
             $keyR = 'ihome_R' . $touid;
             if ($client->exists($keyR)) {
                 $value = intval($client->get($keyR));
                 $return = $value > $return ? $value : $return;
             }
             $client->set($keyR, $return);
         }
         smail($touid, '', cplang('friend_pm', array($_SN[$space['uid']], getsiteurl() . 'space.php?do=pm')), '', 'friend_pm');
     }
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:send.php


示例19: space_open

function space_open($uid, $username, $gid = 0, $email = '')
{
    global $_SGLOBAL, $_SCONFIG;
    if (empty($uid) || empty($username)) {
        return array();
    }
    //验证 space 是否被管理员 delete
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('spacelog') . " WHERE uid='{$uid}' AND flag='-1'");
    if ($value = $_SGLOBAL['db']->fetch_array($query)) {
        showmessage('the_space_has_been_closed');
    }
    $space = array('uid' => $uid, 'username' => $username, 'dateline' => $_SGLOBAL['timestamp'], 'groupid' => $gid, 'regip' => getonlineip());
    // Bonus Points
    $reward = getreward('register', 0, $uid);
    if ($reward['credit']) {
        $space['credit'] = $reward['credit'];
    }
    if ($reward['experience']) {
        $space['experience'] = $reward['experience'];
    }
    inserttable('space', $space, 0, true);
    inserttable('spacefield', array('uid' => $uid, 'email' => $email), 0, true);
    //发送PM
    if ($_SGLOBAL['supe_uid'] && $_SGLOBAL['supe_uid'] != $uid) {
        include_once S_ROOT . './uc_client/client.php';
        uc_pm_send($_SGLOBAL['supe_uid'], $uid, cplang('space_open_subject'), cplang('space_open_message', array(getsiteurl())), 1, 0, 0);
    }
    //发送邮箱验证邮件
    include_once S_ROOT . './source/function_cp.php';
    emailcheck_send($uid, $email);
    //产生feed
    $_uid = $_SGLOBAL['supe_uid'];
    $_username = $_SGLOBAL['supe_username'];
    $_SGLOBAL['supe_uid'] = $uid;
    $_SGLOBAL['supe_username'] = addslashes($username);
    if (ckprivacy('spaceopen', 1)) {
        feed_add('profile', cplang('feed_space_open'));
    }
    // update 最新会员
    if ($_SCONFIG['newspacenum'] > 0) {
        $newspacelist = array();
        $wherearr = array('1');
        if ($_SCONFIG['newspaceavatar']) {
            $wherearr[] = "avatar='1'";
        }
        if ($_SCONFIG['newspacerealname']) {
            $wherearr[] = "namestatus='1'";
        }
        if ($_SCONFIG['newspacevideophoto']) {
            $wherearr[] = "videostatus='1'";
        }
        $query = $_SGLOBAL['db']->query("SELECT uid,username,name,namestatus,videostatus,dateline FROM " . tname('space') . " WHERE " . implode(' AND ', $wherearr) . " ORDER BY uid DESC LIMIT 0,{$_SCONFIG['newspacenum']}");
        while ($value = $_SGLOBAL['db']->fetch_array($query)) {
            $newspacelist[] = $value;
        }
        data_set('newspacelist', $newspacelist);
    }
    //Statistics update
    include_once S_ROOT . './source/function_cp.php';
    updatestat('register');
    $_SGLOBAL['supe_uid'] = $_uid;
    $_SGLOBAL['supe_username'] = $_username;
    return $space;
}
开发者ID:v998,项目名称:discuzx-en,代码行数:64,代码来源:function_space.php


示例20: htmlspecialchars

	<a href="' . $_SERVER['PHP_SELF'] . '?example=pmlist&folder=inbox&filter=newpm">未读收件箱</a>
	<a href="' . $_SERVER['PHP_SELF'] . '?example=pmlist&folder=outbox&filter=newpm">未读发件箱</a>
	<a href="' . $_SERVER['PHP_SELF'] . '?example=pmlist&folder=inbox&filter=systempm">系统消息</a>
	<a href="' . $_SERVER['PHP_SELF'] . '?example=pmlist&folder=inbox&filter=announcepm">公共消息</a>
	<a href=&quo 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP uc_pm_view函数代码示例发布时间:2022-05-23
下一篇:
PHP uc_pm_list函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap