当前位置: 首页>>代码示例>>PHP>>正文


PHP uc_pm_list函数代码示例

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


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

示例1: get

 function get($uId)
 {
     global $_SGLOBAL;
     $notify = $result = array();
     $result = array('message' => array('unread' => 0, 'mostRecent' => 0), 'notification' => array('unread' => 0, 'mostRecent' => 0), 'friendRequest' => array('uIds' => array()));
     //通知
     $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('notification') . "  WHERE uid='{$uId}' AND new='1' ORDER BY id DESC");
     $i = 0;
     while ($value = $_SGLOBAL['db']->fetch_array($query)) {
         $i++;
         if (!$result['notification']['mostRecent']) {
             $result['notification']['mostRecent'] = $value['dateline'];
         }
     }
     $result['notification']['unread'] = $i;
     //短消息
     include_once S_ROOT . './uc_client/client.php';
     $pmarr = uc_pm_list($uId, 1, 1, 'newbox', 'newpm');
     if ($pmarr['count']) {
         $result['message']['unread'] = $pmarr['count'];
         $result['message']['mostRecent'] = $pmarr['data'][0]['dateline'];
     }
     // 好友
     $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('friend') . "  WHERE fuid='{$uId}' AND status='0' ORDER BY dateline DESC");
     $fIds = array();
     while ($value = $_SGLOBAL['db']->fetch_array($query)) {
         if (!$result['friendRequest']['mostRecent']) {
             $result['friendRequest']['mostRecent'] = $value['dateline'];
         }
         $fIds[] = $value['uid'];
     }
     $result['friendRequest']['uIds'] = $fIds;
     return new APIResponse($result);
 }
开发者ID:NaturalWill,项目名称:UCQA,代码行数:34,代码来源:Notifications.php

示例2: get

	function get($uId) {
		$notify = $result = array();
		$result = array(
			'message' => array(
				'unread' => 0,
				'mostRecent' => 0
			),
			'notification'   => array(
				'unread' => 0 ,
				'mostRecent' => 0
			),
			'friendRequest' => array(
				'uIds' => array()
			)
		);

		$query = $GLOBALS['db']->query("SELECT * FROM ".$GLOBALS['tablepre']."notification WHERE uid='$uId' AND new='1' ORDER BY id DESC");
		$i = 0;
		while($value = $GLOBALS['db']->fetch_array($query)) {
			$i++;
			if(!$result['notification']['mostRecent']) $result['notification']['mostRecent'] = $value['dateline'];
		}
		$result['notification']['unread'] = $i;

		$pmarr = uc_pm_list($uId, 1, 1, 'newbox', 'newpm');
		if($pmarr['count']) {
			$result['message']['unread'] = $pmarr['count'];
			$result['message']['mostRecent'] = $pmarr['data'][0]['dateline'];
		}


		return new APIResponse($result);
	}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:33,代码来源:Notifications.php

示例3: onNotificationsGet

 public function onNotificationsGet($uId)
 {
     $notify = $result = array();
     $result = array('message' => array('unread' => 0, 'mostRecent' => 0), 'notification' => array('unread' => 0, 'mostRecent' => 0), 'friendRequest' => array('uIds' => array()));
     $i = 0;
     foreach (C::t('home_notification')->fetch_all_by_uid($uId, 1) as $value) {
         $i++;
         if (!$result['notification']['mostRecent']) {
             $result['notification']['mostRecent'] = $value['dateline'];
         }
     }
     $result['notification']['unread'] = $i;
     loaducenter();
     $pmarr = uc_pm_list($uId, 1, 1, 'newbox', 'newpm');
     if ($pmarr['count']) {
         $result['message']['unread'] = $pmarr['count'];
         $result['message']['mostRecent'] = $pmarr['data'][0]['dateline'];
     }
     $fIds = array();
     foreach (C::t('home_friend_request')->fetch_all_by_uid($uId) as $value) {
         if (!$result['friendRequest']['mostRecent']) {
             $result['friendRequest']['mostRecent'] = $value['dateline'];
         }
         $fIds[] = $value['uid'];
     }
     $result['friendRequest']['uIds'] = $fIds;
     return $result;
 }
开发者ID:softhui,项目名称:discuz,代码行数:28,代码来源:Notifications.php

示例4: _getPmInfos

 private function _getPmInfos($uid)
 {
     $pmInfos = array();
     loaducenter();
     $pmList = uc_pm_list($uid, 1, 10000, 'inbox', 'newpm', 200);
     $pmList = (array) $pmList['data'];
     foreach ($pmList as $pm) {
         // 目前只要两人对话的列表
         if ($pm['members'] > 2 || $pm['pmtype'] != 1) {
             continue;
         }
         $pmInfos[] = array('fromUid' => (int) $pm['touid'], 'plid' => (int) $pm['plid'], 'pmid' => (int) $pm['pmid'], 'time' => $pm['lastdateline'] . '000');
     }
     return $pmInfos;
 }
开发者ID:caidongyun,项目名称:CS,代码行数:15,代码来源:HeartAction.php

示例5: _getPMList

 private function _getPMList($page, $pageSize)
 {
     $pmList = array('list' => array(), 'count' => 0);
     global $_G;
     // 在DISCUZ_ROOT/source/include/space/space_pm.php基础上二次开发
     loaducenter();
     $filter = 'privatepm';
     $perpage = $pageSize;
     $count = 0;
     $list = array();
     if ($filter == 'privatepm' || $filter == 'newpm') {
         $result = uc_pm_list($_G['uid'], $page, $perpage, 'inbox', $filter, 200);
         $count = $result['count'];
         $list = $result['data'];
     }
     if ($_G['member']['newpm']) {
         if ($newpm && $_G['setting']['cloud_status']) {
             $msgService = Cloud::loadClass('Cloud_Service_Client_Message');
             $msgService->setMsgFlag($_G['uid'], $_G['timestamp']);
         }
         C::t('common_member')->update($_G['uid'], array('newpm' => 0));
         uc_pm_ignore($_G['uid']);
     }
     $tempPMList = array();
     foreach ($list as $pm) {
         // 目前只要两人对话的列表
         if ($pm['members'] > 2 || $pm['pmtype'] != 1) {
             $count--;
             continue;
         }
         $tempPm = array();
         $tempPm['plid'] = (int) $pm['plid'];
         $tempPm['pmid'] = (int) $pm['pmid'];
         $tempPm['lastUserId'] = (int) $pm['lastauthorid'];
         $tempPm['lastUserName'] = (string) $pm['lastauthor'];
         $tempPm['lastSummary'] = (string) $pm['lastsummary'];
         $tempPm['lastDateline'] = $pm['lastdateline'] . '000';
         $tempPm['toUserId'] = (int) $pm['touid'];
         $tempPm['toUserAvatar'] = UserUtils::getUserAvatar($pm['touid']);
         $tempPm['toUserName'] = (string) $pm['tousername'];
         $tempPm['toUserIsBlack'] = UserUtils::isBlacklist($_G['uid'], $pm['touid']) ? 1 : 0;
         $tempPm['isNew'] = $pm['new'] ? 1 : 0;
         $tempPMList[] = $tempPm;
     }
     $pmList['list'] = $tempPMList;
     $pmList['count'] = $count;
     return $pmList;
 }
开发者ID:caidongyun,项目名称:CS,代码行数:48,代码来源:PMSessionListAction.php

示例6: array

        $page = 1;
    }
    $newannouncepm = array();
    if ($filter == 'privatepm' && $page == 1) {
        $result = uc_pm_list($_G['uid'], 1, 1, 'inbox', 'announcepm', 100);
        if (!empty($result['data'][0]) && is_array($result['data'][0]) && $result['data'][0]['pmid'] != $_G['cookie']['viewannouncepmid']) {
            $newannouncepm = $result['data'][0];
        }
    }
    $result = uc_pm_list($_G['uid'], $page, $perpage, 'inbox', $filter, 100);
    $count = $result['count'];
    $list = $result['data'];
    if ($_G['member']['newpm']) {
        if ($filter == 'privatepm' && !$count) {
            $filter = 'systempm';
            $result = uc_pm_list($_G['uid'], $page, $perpage, 'inbox', $filter, 100);
            $count = $result['count'];
            $list = $result['data'];
        }
        DB::update('common_member', array('newpm' => 0), array('uid' => $_G['uid']));
        uc_pm_ignore($_G['uid']);
    }
    $multi = multi($count, $perpage, $page, "home.php?mod=space&do=pm&filter={$filter}");
    $actives = array($filter => ' class="a"');
}
if ($list) {
    $today = $_G['timestamp'] - ($_G['timestamp'] + $_G['setting']['timeoffset'] * 3600) % 86400;
    foreach ($list as $key => $value) {
        $value['message'] = str_replace('&', '&', $value['message']);
        $value['message'] = preg_replace("/&[a-z]+\\;/i", '', $value['message']);
        $value['daterange'] = 5;
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:space_pm.php

示例7: switch

	<a href=\"$phpself\">短消息</a>
	<a href=\"$phpself&filter=newpm\">未读消息</a>
	<a href=\"$phpself&filter=announcepm\">公共消息</a>
	<a href=\"$phpself&action=send\">发送短消息</a>
	<a href=\"$phpself&action=viewblackls\">黑名单</a>
	<hr>
".print_r($newdata, 1);

switch($action) {
	case '':
		$_GET['page'] =  max(1, intval($_GET['page']));
		
		$_GET['folder'] = !empty($_GET['folder']) ? $_GET['folder'] : 'inbox';
		$_GET['filter'] = !empty($_GET['filter']) ? $_GET['filter'] : '';
		
		$data = uc_pm_list($Example_uid, $_GET['page'], $ppp, $_GET['folder'], $_GET['filter'], 100);

		foreach($data['data'] as $pm) {
			if($_GET['filter'] != 'announcepm') {
				$output .= "<li>[$pm[msgfrom]]<a href=\"$phpself&action=view&touid=$pm[touid]\">$pm[subject] (".gmdate('Y-m-d H:i:s', $pm['dateline'] + $timeoffset * 3600).")</a>";
				$pm['new'] && $output .= " New! ";
				$output .= "<br />$pm[message]";
			} else {
				$output .= "<li><a href=\"$phpself&action=view&pmid=$pm[pmid]\">$pm[subject]</a>";
			}			
		}
		break;
	case 'view':
		$pmid = !empty($_GET['pmid']) ? $_GET['pmid'] : '';
		$data = uc_pm_view($Example_uid, $pmid, $_GET['touid']);
		
开发者ID:healthguo,项目名称:PHP,代码行数:30,代码来源:pmlist.php

示例8: uc_pm_view

        $list = uc_pm_view($_SGLOBAL['supe_uid'], $pmid);
    }
    $actives = array($daterange => ' class="active"');
} elseif ($_GET['subop'] == 'ignore') {
    $ignorelist = uc_pm_blackls_get($_SGLOBAL['supe_uid']);
    $actives = array('ignore' => ' class="active"');
} else {
    $filter = in_array($_GET['filter'], array('newpm', 'privatepm', 'systempm', 'announcepm')) ? $_GET['filter'] : ($space['newpm'] ? 'newpm' : 'privatepm');
    //分页
    $perpage = 10;
    $perpage = mob_perpage($perpage);
    $page = empty($_GET['page']) ? 0 : intval($_GET['page']);
    if ($page < 1) {
        $page = 1;
    }
    $result = uc_pm_list($_SGLOBAL['supe_uid'], $page, $perpage, 'inbox', $filter, 100);
    $count = $result['count'];
    $list = $result['data'];
    $multi = multi($count, $perpage, $page, "space.php?do=pm&filter={$filter}");
    if ($_SGLOBAL['member']['newpm']) {
        //取消新短消息提示
        updatetable('space', array('newpm' => 0), array('uid' => $_SGLOBAL['supe_uid']));
        //UCenter
        uc_pm_ignore($_SGLOBAL['supe_uid']);
    }
    $actives = array($filter => ' class="active"');
}
//实名
if ($list) {
    $today = $_SGLOBAL['timestamp'] - ($_SGLOBAL['timestamp'] + $_SCONFIG['timeoffset'] * 3600) % 86400;
    foreach ($list as $key => $value) {
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:space_pm.php

示例9: API_ListMsg

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

示例10: intval

include_once '../data_oauth_check.php';
$userid = intval(oauth_check());
include_once '../../../common.php';
include_once S_ROOT . './uc_client/client.php';
//$filter = in_array($_GET['filter'], array('newpm', 'privatepm', 'systempm', 'announcepm'))?$_GET['filter']:($space['newpm']?'newpm':'privatepm');
$filter = 'privatepm';
//分页
$perpage = 10;
//$perpage = mob_perpage($perpage);
$page = empty($_POST['page']) ? 0 : intval($_POST['page']);
if ($page < 1) {
    $page = 1;
}
//$userid=3;
//获取私信收件箱信息
$result = uc_pm_list($userid, $page, $perpage, 'inbox', $filter, 50);
$count = $result['count'];
$list = $result['data'];
$result = array();
//$result['count'] = $count;
//获取姓名
foreach ($list as $values) {
    realname_set($values['msgfromid'], $values['msgfrom']);
}
realname_get();
//生成数组
foreach ($list as $values) {
    //将公告中的图片进行绝对路径化。  start<img src=\"image\/face\/24.gif\" class=\"face\">
    preg_match_all("#[<]img\\s+src[=]\"(.*)\".*[>]#U", $value['message'], $matches, PREG_SET_ORDER);
    foreach ($matches as $item) {
        $TmpString = $item[1];
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:do_getmessages.php

示例11: unset

    unset($query);
    $page_front = $page - 1;
    $page_next = $page + 1;
    $pagelinks = get_pages($page, $pagecount, 'command=' . $command);
} elseif ($command == 'mymessage') {
    $page = intval($_GET['page']);
    $msgtype = empty($_GET['msgtype']) ? 'receive' : $_GET['msgtype'];
    if ($page < 1) {
        $page = 1;
    }
    $pagerow = 10;
    $msg_list = array();
    if ($msgtype == 'receive') {
        $msg_list = uc_pm_list($cyask_uid, $page, $pagerow, 'inbox', '');
    } else {
        $msg_list = uc_pm_list($cyask_uid, $page, $pagerow, 'outbox', '');
    }
    foreach ($msg_list['data'] as $k => $v) {
        $msg_list['data'][$k]['dateline'] = date("Y-m-d H:i:s", $msg_list['data'][$k]['dateline']);
    }
    $page_front = $page - 1;
    $page_next = $page + 1;
    $parameter = 'command=' . $command . '&msgtype=' . $msgtype;
    $pagelinks = get_pages($page, $pagecount, $parameter);
} elseif ($command == 'myinfo') {
    $query = $dblink->query("select username,gender,email,bday from {$dbprefix}members where uid={$cyask_uid}");
    $members = $dblink->fetch_array($query);
    $member_username = $members['username'];
    $member_email = $members['email'];
    $member_gender = $members['gender'];
    $member_bday = $members['bday'];
开发者ID:yunsite,项目名称:cyaskuc,代码行数:31,代码来源:my.php

示例12: onNotificationsGet

 function onNotificationsGet($uId)
 {
     $notify = $result = array();
     $result = array('message' => array('unread' => 0, 'mostRecent' => 0), 'notification' => array('unread' => 0, 'mostRecent' => 0), 'friendRequest' => array('uIds' => array()));
     $query = DB::query("SELECT * FROM " . DB::table('home_notification') . "  WHERE uid='{$uId}' AND new='1' ORDER BY id DESC");
     $i = 0;
     while ($value = DB::fetch($query)) {
         $i++;
         if (!$result['notification']['mostRecent']) {
             $result['notification']['mostRecent'] = $value['dateline'];
         }
     }
     $result['notification']['unread'] = $i;
     loaducenter();
     $pmarr = uc_pm_list($uId, 1, 1, 'newbox', 'newpm');
     if ($pmarr['count']) {
         $result['message']['unread'] = $pmarr['count'];
         $result['message']['mostRecent'] = $pmarr['data'][0]['dateline'];
     }
     $query = DB::query("SELECT * FROM " . DB::table('home_friend_request') . "  WHERE uid='{$uId}' ORDER BY dateline DESC");
     $fIds = array();
     while ($value = DB::fetch($query)) {
         if (!$result['friendRequest']['mostRecent']) {
             $result['friendRequest']['mostRecent'] = $value['dateline'];
         }
         $fIds[] = $value['uid'];
     }
     $result['friendRequest']['uIds'] = $fIds;
     return $result;
 }
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:30,代码来源:my.php

示例13: elseif

        } elseif ($pm['dateline'] >= $today - 86400) {
            $pm['daterange'] = 2;
        } elseif ($pm['dateline'] >= $today - 172800) {
            $pm['daterange'] = 3;
        }
        $pm['date'] = gmdate($dateformat, $pm['dateline'] + $timeoffset * 3600);
        $pm['time'] = gmdate($timeformat, $pm['dateline'] + $timeoffset * 3600);
        $pmlist[] = $pm;
    }
} elseif ($action == 'viewnew') {
    $newpmnum = uc_pm_checknew($discuz_uid);
    $pmlist = array();
    if ($newpmnum) {
        $num = min(5, $newpmnum);
        $morenum = max(0, $newpmnum - 5);
        $ucdata = uc_pm_list($discuz_uid, 1, $num, 'inbox', 'newpm', 0);
        $today = $timestamp - ($timestamp + $timeoffset * 3600) % 86400;
        foreach ($ucdata['data'] as $pm) {
            $pm['daterange'] = 5;
            if ($pm['dateline'] >= $today) {
                $pm['daterange'] = 1;
            } elseif ($pm['dateline'] >= $today - 86400) {
                $pm['daterange'] = 2;
            } elseif ($pm['dateline'] >= $today - 172800) {
                $pm['daterange'] = 3;
            }
            $pmlist[] = $pm;
        }
        $db->query("UPDATE {$tablepre}members SET prompt=prompt^1 WHERE uid='{$discuz_uid}' AND prompt=prompt|1", 'UNBUFFERED');
    }
    include template('pm_viewnew');
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:31,代码来源:pm.php

示例14: intval

require_once './common.php';
$send_result = '';
$act = $_GET['act'];
$filter = $_GET['filter'];
// 跳轉到查看短信得頁面
if (!empty($filter) && in_array($filter, array('systempm', 'privatepm', 'announcepm'))) {
    $pm->view_pm($filter);
    exit;
}
if ($act == 'list') {
    @(include_once B_ROOT . './uc_client/client.php');
    $page = intval($_GET['page']);
    if ($page == 0) {
        $page = 1;
    }
    $pm_notices = uc_pm_list($_G['uid'], $page, 5, '', 'systempm', 0);
    $url = 'pm.php?act=list&msgtype=systempm';
    if ($_GET['inajax'] == 1) {
        $url .= '&inajax=1';
    }
    $multi = multi($pm_notices['count'], 5, $page, $url);
} elseif ($act == 'view') {
    @(include_once B_ROOT . './uc_client/client.php');
    $pm = uc_pm_viewnode($_G['uid'], 'systempm', intval($_GET['pmid']));
    uc_pm_readstatus($_G['uid'], null, intval($_GET['pmid']), 0);
    if (!empty($_SERVER['HTTP_REFERER'])) {
        $return_url = $_SERVER['HTTP_REFERER'];
    } else {
        $return_url = 'pm.php?act=list&msgtype=systempm';
        if ($_GET['inajax'] == 1) {
            $return_url .= '&inajax=1';
开发者ID:pan289091315,项目名称:Discuz,代码行数:31,代码来源:pm.php

示例15: updateprompt

		updatesettings();
		$s .= updateprompt('announcepm', $discuz_uid, $ucnewpm['announcepm'], 0);
	}
	dsetcookie('checkpm', 1, 30, 0);
	include_once template('pm_checknew');
	exit;
}

$page = max($page, 1);
$action = !empty($action) ? $action : (isset($uid) || !empty($pmid) ? 'view' : '');

if(!$action) {

	$pmstatus = uc_pm_checknew($discuz_uid, 4);
	$filter = !empty($filter) && in_array($filter, array('newpm', 'privatepm', 'announcepm')) ? $filter : ($pmstatus['newpm'] ? 'newpm' : 'privatepm');
	$ucdata = uc_pm_list($discuz_uid, $page, $ppp, !isset($search) ? 'inbox' : 'searchbox', !isset($search) ? $filter : $srchtxt, 200);
	if(!empty($search) && $srchtxt !== '') {
		$filter = '';
		$srchtxtinput = htmlspecialchars(stripslashes($srchtxt));
		$srchtxtenc = rawurlencode($srchtxt);
	} else {
		$multipage = multi($ucdata['count'], $ppp, $page, 'pm.php?filter='.$filter);
	}
	$_COOKIE['checkpm'] && setcookie('checkpm', '', -86400 * 365);

	$pmlist = array();
	$today = $timestamp - ($timestamp + $timeoffset * 3600) % 86400;
	foreach($ucdata['data'] as $pm) {
		$pm['msgfromurl'] = $pm['fromappid'] && $ucapp[$pm['fromappid']]['viewprourl'] ? sprintf($ucapp[$pm['fromappid']]['viewprourl'], $pm['msgfromid']) : 'space.php?uid='.$pm['msgfromid'];
		$pm['daterange'] = 5;
		if($pm['dateline'] >= $today) {
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:pm.php


注:本文中的uc_pm_list函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。