Esempio n. 1
0
function notification_add($uid, $type, $note, $returnid=0) {
	global $_SGLOBAL;

	//获取对方的筛选条件
	$tospace = getspace($uid);
	
	//更新我的好友关系热度
	if($_SGLOBAL['supe_uid']) {
		addfriendnum($tospace['uid'], $tospace['username']);
	}
	
	$setarr = array(
		'uid' => $uid,
		'type' => $type,
		'new' => 1,
		'authorid' => $_SGLOBAL['supe_uid'],
		'author' => $_SGLOBAL['supe_username'],
		'note' => addslashes(sstripslashes($note)),
		'dateline' => $_SGLOBAL['timestamp']
	);

	$filter = empty($tospace['privacy']['filter_note'])?array():array_keys($tospace['privacy']['filter_note']);
	if(cknote_uid($setarr, $filter)) {
		//更新用户通知
		$_SGLOBAL['db']->query("UPDATE ".tname('space')." SET notenum=notenum+1 WHERE uid='$uid'");
	
		if($returnid) {
			return inserttable('notification', $setarr, $returnid);
		} else {
			inserttable('notification', $setarr);
		}
	}
}
Esempio n. 2
0
            } else {
                $widelist[] = $value;
            }
        }
    }
}
//ᅧ새
realname_get();
//feed
foreach ($feedlist as $key => $value) {
    $feedlist[$key] = mkfeed($value);
}
//ᄌ￐ᅡ채ᅮ￑￈￈ᄊ￈
if (!$space['self'] && $_SGLOBAL['supe_uid']) {
    include_once S_ROOT . './source/function_cp.php';
    addfriendnum($space['uid'], $space['username']);
}
@(include_once S_ROOT . './data/data_profilefield.php');
$fields = empty($_SGLOBAL['profilefield']) ? array() : $_SGLOBAL['profilefield'];
//ᄌᄊ¢ᅲᅧ￁ᅬ
$base_farr = $contact_farr = array();
$query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('spaceinfo') . " WHERE uid='{$space['uid']}'");
while ($value = $_SGLOBAL['db']->fetch_array($query)) {
    $v_friend = ckfriend($value['uid'], $value['friend']);
    if ($value['type'] == 'base' || $value['type'] == 'contact') {
        if (!$v_friend) {
            $space[$value['subtype']] = '';
        }
    } else {
        if ($v_friend) {
            $space[$value['type']][] = $value;