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

PHP feed_add函数代码示例

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

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



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

示例1: _updateUser

 private function _updateUser($res, $gender, $avatar)
 {
     global $_G;
     include_once libfile('function/profile');
     $setarr['gender'] = intval($gender);
     if ($setarr) {
         C::t('common_member_profile')->update($_G['uid'], $setarr);
     }
     manyoulog('user', $uid, 'update');
     $operation = 'gender';
     include_once libfile('function/feed');
     feed_add('profile', 'feed_profile_update_' . $operation, array('hash_data' => 'profile'));
     countprofileprogress();
     // ob_start();
     // $this->getController()->forward('user/uploadavatar', false);
     // $result = ob_get_clean();
     // $picInfo = WebUtils::jsonDecode($result, true);
     // $avatar = $picInfo['pic_path'];
     // $avatar = !empty($_GET['avatar']) ? $_GET['avatar'] : '';
     if (!empty($avatar)) {
         $_GET = array_merge($_GET, array('avatar' => $avatar));
         ob_start();
         $this->getController()->forward('user/saveavatar', false);
         $result = ob_get_clean();
         $result = WebUtils::jsonDecode($result);
         if (WebUtils::checkError($result)) {
             return $this->makeErrorInfo($res, 'user_info_avatar_error');
         }
     }
     return $this->makeErrorInfo($res, lang('message', 'profile_succeed'), array('noError' => 1));
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:31,代码来源:UpdateUserInfoAction.php


示例2: 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


示例3: publishTemplatizedAction

	function publishTemplatizedAction($uId, $appId, $titleTemplate, $titleData, $bodyTemplate, $bodyData, $bodyGeneral = '', $image1 = '', $image1Link = '', $image2 = '', $image2Link = '', $image3 = '', $image3Link = '', $image4 = '', $image4Link = '', $targetIds = '', $privacy = '', $hashTemplate = '', $hashData = '') {
		$friend = ($privacy == 'public') ? 0 : ($privacy == 'friends' ? 1 : 2);
		
		$images = array($image1, $image2, $image3, $image4);
		$image_links = array($image1Link, $image2Link, $image3Link, $image4Link);
		$result = feed_add($appId, $titleTemplate, $titleData, $bodyTemplate, $bodyData, $bodyGeneral, $images, $image_links, $targetIds, $friend, 0, 1);
		
		return new APIResponse($result);
	}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:9,代码来源:Feed.php


示例4: publishTemplatizedAction

 function publishTemplatizedAction($uId, $appId, $titleTemplate, $titleData, $bodyTemplate, $bodyData, $bodyGeneral = '', $image1 = '', $image1Link = '', $image2 = '', $image2Link = '', $image3 = '', $image3Link = '', $image4 = '', $image4Link = '', $targetIds = '', $privacy = '', $hashTemplate = '', $hashData = '', $specialAppid = 0)
 {
     global $_SGLOBAL;
     $friend = $privacy == 'public' ? 0 : ($privacy == 'friends' ? 1 : 2);
     $images = array($image1, $image2, $image3, $image4);
     $image_links = array($image1Link, $image2Link, $image3Link, $image4Link);
     include_once S_ROOT . './source/function_cp.php';
     $result = feed_add($appId, $titleTemplate, $titleData, $bodyTemplate, $bodyData, $bodyGeneral, $images, $image_links, $targetIds, $friend, $specialAppid, 1);
     return new APIResponse($result);
 }
开发者ID:shiyake,项目名称:php-ihome,代码行数:10,代码来源:Feed.php


示例5: onFeedPublishTemplatizedAction

 public function onFeedPublishTemplatizedAction($uId, $appId, $titleTemplate, $titleData, $bodyTemplate, $bodyData, $bodyGeneral = '', $image1 = '', $image1Link = '', $image2 = '', $image2Link = '', $image3 = '', $image3Link = '', $image4 = '', $image4Link = '', $targetIds = '', $privacy = '', $hashTemplate = '', $hashData = '', $specialAppid = 0)
 {
     $res = $this->getUserSpace($uId);
     if (!$res) {
         return new Cloud_Service_Server_ErrorResponse('1', "User({$uId}) Not Exists");
     }
     $friend = $privacy == 'public' ? 0 : ($privacy == 'friends' ? 1 : 2);
     $images = array($image1, $image2, $image3, $image4);
     $image_links = array($image1Link, $image2Link, $image3Link, $image4Link);
     require_once libfile('function/feed');
     $result = feed_add($appId, $titleTemplate, $titleData, $bodyTemplate, $bodyData, $bodyGeneral, $images, $image_links, $targetIds, $friend, $specialAppid, 1);
     return $result;
 }
开发者ID:softhui,项目名称:discuz,代码行数:13,代码来源:Feed.php


示例6: usesubmit

 function usesubmit()
 {
     global $_G;
     $uid = $_G['uid'];
     $_G['uid'] = 0;
     $avatar = avatar($uid, 'middle', true);
     include_once libfile('function/feed');
     feed_add('thunder', 'magicuse_thunder_announce_title', array('uid' => $uid, 'username' => "<a href=\"home.php?mod=space&uid={$uid}\">{$_G['username']}</a>"), 'magicuse_thunder_announce_body', array('uid' => $uid, 'magic_thunder' => 1), '', array($avatar), array("home.php?mod=space&uid={$uid}"));
     $_G['uid'] = $uid;
     usemagic($this->magic['magicid'], $this->magic['num']);
     updatemagiclog($this->magic['magicid'], '2', '1', '0', '0', 'uid', $_G['uid']);
     showmessage('magics_thunder_message', '', array('magicname' => $_G['setting']['magics']['thunder']), array('showdialog' => 1));
 }
开发者ID:pan289091315,项目名称:Discuz,代码行数:13,代码来源:magic_thunder.php


示例7: _userFriendSetting

 private function _userFriendSetting($res, $uid, $gid, $note)
 {
     global $_G;
     require_once libfile('function/friend');
     require_once libfile('function/spacecp');
     require_once libfile('function/home');
     if (!checkperm('allowfriend')) {
         return $this->makeErrorInfo($res, 'no_privilege_addfriend');
     }
     if ($uid == $_G['uid']) {
         return $this->makeErrorInfo($res, 'friend_self_error');
     }
     if (friend_check($uid)) {
         return $this->makeErrorInfo($res, 'you_have_friends');
     }
     $tospace = getuserbyuid($uid);
     if (empty($tospace)) {
         return $this->makeErrorInfo($res, 'space_does_not_exist');
     }
     if (isblacklist($tospace['uid'])) {
         return $this->makeErrorInfo($res, 'is_blacklist');
     }
     // $res['body']['gidInfo'] = $this->_getFriendGroupList();
     space_merge($space, 'count');
     space_merge($space, 'field_home');
     $maxfriendnum = checkperm('maxfriendnum');
     if ($maxfriendnum && $space['friends'] >= $maxfriendnum + $space['addfriend']) {
         if ($_G['magic']['friendnum']) {
             return $this->makeErrorInfo($res, 'enough_of_the_number_of_friends_with_magic');
         } else {
             return $this->makeErrorInfo($res, 'enough_of_the_number_of_friends');
         }
     }
     if (friend_request_check($uid)) {
         // if(submitcheck('add2submit')) {
         $_POST['gid'] = intval($gid);
         friend_add($uid, $uid);
         if (ckprivacy('friend', 'feed')) {
             require_once libfile('function/feed');
             feed_add('friend', 'feed_friend_title', array('touser' => "<a href=\"home.php?mod=space&uid={$tospace['uid']}\">{$tospace['username']}</a>"));
         }
         notification_add($uid, 'friend', 'friend_add');
         // showmessage('friends_add', dreferer(), array('username' => $tospace['username'], 'uid'=>$uid, 'from' => $_GET['from']), array('showdialog'=>1, 'showmsg' => true, 'closetime' => true));
         return $this->makeErrorInfo($res, 'friends_add', array('{username}' => $tospace['username']));
         // }
         // $op = 'add2';
         // $groupselect = empty($space['privacy']['groupname']) ? array(1 => ' checked') : array();
         // $navtitle = lang('core', 'title_friend_add');
         // include template('home/spacecp_friend');
         // exit();
     } else {
         if (C::t('home_friend_request')->count_by_uid_fuid($uid, $_G['uid'])) {
             return $this->makeErrorInfo($res, 'waiting_for_the_other_test');
         }
         $_POST['gid'] = $gid;
         $_POST['note'] = censor(htmlspecialchars(cutstr($note, strtolower(CHARSET) == 'utf-8' ? 30 : 20, '')));
         friend_add($uid, $_POST['gid'], $_POST['note']);
         $note = array('uid' => $_G['uid'], 'url' => 'home.php?mod=spacecp&ac=friend&op=add&uid=' . $_G['uid'] . '&from=notice', 'from_id' => $_G['uid'], 'from_idtype' => 'friendrequest', 'note' => !empty($_POST['note']) ? lang('spacecp', 'friend_request_note', array('note' => $_POST['note'])) : '');
         notification_add($uid, 'friend', 'friend_request', $note);
         require_once libfile('function/mail');
         $values = array('username' => $tospace['username'], 'url' => getsiteurl() . 'home.php?mod=spacecp&ac=friend&amp;op=request');
         sendmail_touser($uid, lang('spacecp', 'friend_subject', $values), '', 'friend_add');
         return $this->makeErrorInfo($res, 'request_has_been_sent');
     }
     return $res;
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:66,代码来源:UserAdminAction.php


示例8: array

     }
 } else {
     $setarr = array();
 }
 $feednew['dateline'] = trim($feednew['dateline']);
 if ($feednew['dateline']) {
     require_once libfile('function/home');
     $newtimestamp = strtotime($feednew['dateline']);
     if ($newtimestamp > $_G['timestamp']) {
         $_G['timestamp'] = $newtimestamp;
     }
 }
 if (empty($feedid)) {
     $_G['uid'] = 0;
     require_once libfile('function/feed');
     $feedid = feed_add('sitefeed', trim($feednew['title_template']), array(), trim($feednew['body_template']), array(), trim($feednew['body_general']), array(trim($feednew['image_1']), trim($feednew['image_2']), trim($feednew['image_3']), trim($feednew['image_4'])), array(trim($feednew['image_1_link']), trim($feednew['image_2_link']), trim($feednew['image_3_link']), trim($feednew['image_4_link'])), '', '', '', 1);
 } else {
     if (empty($feednew['feeduid'])) {
         $setarr['body_general'] = trim($feednew['body_general']);
     }
     $setarr['image_1'] = trim($feednew['image_1']);
     $setarr['image_1_link'] = trim($feednew['image_1_link']);
     $setarr['image_2'] = trim($feednew['image_2']);
     $setarr['image_2_link'] = trim($feednew['image_2_link']);
     $setarr['image_3'] = trim($feednew['image_3']);
     $setarr['image_3_link'] = trim($feednew['image_3_link']);
     $setarr['image_4'] = trim($feednew['image_4']);
     $setarr['image_4_link'] = trim($feednew['image_4_link']);
     $setarr['dateline'] = $newtimestamp;
     $setarr['hot'] = intval($feednew['hot']);
     C::t('home_feed')->update('', $setarr, '', '', $feedid);
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:admincp_feed.php


示例9: cplang

            $note_type = 'clickthread';
            $q_note = cplang('note_click_thread', array("space.php?uid={$item['uid']}&do=thread&id={$item['tid']}", $item['subject']));
            break;
        case 'picid':
            $fs['title_template'] = cplang('feed_click_pic');
            $fs['title_data'] = array('touser' => "<a href=\"space.php?uid={$item['uid']}\">{$_SN[$item['uid']]}</a>", 'click' => $click['name']);
            $fs['images'] = array(pic_get($item['filepath'], $item['thumb'], $item['remote']));
            $fs['image_links'] = array("space.php?uid={$item['uid']}&do=album&picid={$item['picid']}");
            $fs['body_general'] = $item['title'];
            $note_type = 'clickpic';
            $q_note = cplang('note_click_pic', array("space.php?uid={$item['uid']}&do=album&picid={$item['picid']}"));
            break;
    }
    //Event Publishing
    if (empty($item['friend']) && ckprivacy('click', 1)) {
        feed_add('click', $fs['title_template'], $fs['title_data'], '', array(), $fs['body_general'], $fs['images'], $fs['image_links']);
    }
    //Reward visitors
    getreward('click', 1, 0, $idtype . $id);
    //Statistics
    updatestat('click');
    //Notice
    notification_add($item['uid'], $note_type, $q_note);
    showmessage('click_success', $_SGLOBAL['refer']);
} elseif ($_GET['op'] == 'show') {
    foreach ($clicks as $key => $value) {
        $value['clicknum'] = $item["click_{$key}"];
        $value['classid'] = mt_rand(1, 4);
        if ($value['clicknum'] > $maxclicknum) {
            $maxclicknum = $value['clicknum'];
        }
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:cp_click.php


示例10: exit

<?php

if (!defined('iBUAA')) {
    exit('Access Denied');
}
//À×ÃùÖ®Éù
if (submitcheck("usesubmit")) {
    magic_use($mid, array(), true);
    //·¢È«Õ¾feed
    $uid = $_SGLOBAL['supe_uid'];
    realname_set($_SGLOBAL['supe_uid'], $_SGLOBAL['supe_username']);
    realname_get();
    $_SGLOBAL['supe_uid'] = 0;
    include_once S_ROOT . './source/function_cp.php';
    $avatar = ckavatar($uid) ? avatar($uid, 'middle', true) : UC_API . '/images/noavatar_middle.gif';
    feed_add('thunder', cplang('magicuse_thunder_announce_title'), array('uid' => $uid, 'username' => "<a href=\"space.php?uid={$uid}\">{$_SN[$uid]}</a>"), cplang('magicuse_thunder_announce_body'), array('uid' => $uid, 'magic_thunder' => 1), '', array($avatar), array("space.php?uid={$uid}"));
    showmessage('magicuse_success', $_POST['refer'], 0);
}
开发者ID:shiyake,项目名称:php-ihome,代码行数:18,代码来源:magic_thunder.php


示例11: getstr

     $magvalues['type'] = $commentcable[$type];
 }
 $arr['body_general'] = getstr($_POST['general'], 150, 1, 1, 1);
 $arr['body_general'] = censor($arr['body_general']);
 if (censormod($arr['body_general']) || $_G['group']['allowsharemod']) {
     $arr['status'] = 1;
 } else {
     $arr['status'] = 0;
 }
 $arr['type'] = $type;
 $arr['uid'] = $_G['uid'];
 $arr['username'] = $_G['username'];
 $arr['dateline'] = $_G['timestamp'];
 if ($arr['status'] == 0 && ckprivacy('share', 'feed')) {
     require_once libfile('function/feed');
     feed_add('share', '{actor} ' . $arr['title_template'], array('hash_data' => $feed_hash_data), $arr['body_template'], $arr['body_data'], $arr['body_general'], array($arr['image']), array($arr['image_link']));
 }
 $arr['body_data'] = serialize($arr['body_data']);
 $setarr = daddslashes($arr);
 $sid = DB::insert('home_share', $setarr, 1);
 switch ($type) {
     case 'space':
         DB::query("UPDATE " . DB::table('common_member_status') . " SET sharetimes=sharetimes+1 WHERE uid='{$id}'");
         break;
     case 'blog':
         DB::query("UPDATE " . DB::table('home_blog') . " SET sharetimes=sharetimes+1 WHERE blogid='{$id}'");
         break;
     case 'album':
         DB::query("UPDATE " . DB::table('home_album') . " SET sharetimes=sharetimes+1 WHERE albumid='{$id}'");
         break;
     case 'pic':
开发者ID:dalinhuang,项目名称:hlwbbsvincent,代码行数:31,代码来源:spacecp_share.php


示例12: addfeed

 function addfeed($get, $post)
 {
     global $_SGLOBAL;
     if (!API_ADDFEED) {
         return API_RETURN_FORBIDDEN;
     }
     $_SGLOBAL['supe_uid'] = intval($post['uid']);
     $_SGLOBAL['supe_username'] = trim($post['username']);
     $images = array($post['image_1'], $post['image_2'], $post['image_3'], $post['image_4']);
     $image_links = array($post['image_1_link'], $post['image_2_link'], $post['image_3_link'], $post['image_4_link']);
     include_once S_ROOT . './source/function_cp.php';
     return feed_add($post['icon'], $post['title_template'], $post['title_data'], $post['body_template'], $post['body_data'], $post['body_general'], $images, $image_links, $post['target_ids'], '', $post['appid']);
 }
开发者ID:NaturalWill,项目名称:UCQA,代码行数:13,代码来源:uc.php


示例13: array

         $n_url = "home.php?mod=space&uid={$tospace['uid']}&do=share&id={$id}&cid={$cid}";
         $note_type = 'sharecomment';
         $note = 'share_comment';
         $note_values = array('url' => $n_url);
         $q_note = 'share_comment_reply';
         $q_values = array('url' => $n_url);
         $msg = 'do_success';
         $magvalues = array();
         break;
 }
 if (empty($comment)) {
     if ($tospace['uid'] != $_G['uid']) {
         if (ckprivacy('comment', 'feed')) {
             require_once libfile('function/feed');
             $fs['title_data']['hash_data'] = "{$idtype}{$id}";
             feed_add($fs['icon'], $fs['title_template'], $fs['title_data'], $fs['body_template'], $fs['body_data'], $fs['body_general'], $fs['images'], $fs['image_links'], $fs['target_ids'], $fs['friend']);
         }
         $note_values['from_id'] = $_POST['id'];
         $note_values['from_idtype'] = $_POST['idtype'];
         $note_values['url'] .= "&goto=new#comment_{$cid}_li";
         notification_add($tospace['uid'], $note_type, $note, $note_values);
     }
 } elseif ($comment['authorid'] != $_G['uid']) {
     notification_add($comment['authorid'], $note_type, $q_note, $q_values);
 }
 if ($stattype) {
     include_once libfile('function/stat');
     updatestat($stattype);
 }
 if ($tospace['uid'] != $_G['uid']) {
     $needle = $id;
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:spacecp_comment.php


示例14: elseif

	
} elseif(submitcheck('showsubmit')) {
	
	$showcredit = intval($_POST['showcredit']);
	if($showcredit > $space['credit']) $showcredit = $space['credit'];
	if($showcredit < 1) {
		showmessage('showcredit_error');
	}
	$_POST['note'] = getstr($_POST['note'], 100, 1, 1, 1);
	
	//增加
	$count = getcount('show', array('uid'=>$_SGLOBAL['supe_uid']));
	if($count) {
		$notesql = $_POST['note']?", note='$_POST[note]'":'';
		$_SGLOBAL['db']->query("UPDATE ".tname('show')." SET credit=credit+$showcredit $notesql WHERE uid='$_SGLOBAL[supe_uid]'");
	} else {
		inserttable('show', array('uid'=>$_SGLOBAL['supe_uid'], 'username'=>$_SGLOBAL['supe_username'], 'credit'=>$showcredit, 'note'=>$_POST['note']), 0, true);
	}

	//减少自己的积分
	$_SGLOBAL['db']->query("UPDATE ".tname('space')." SET credit=credit-$showcredit WHERE uid='$space[uid]'");
	
	//feed
	if(ckprivacy('show', 1)) {
		feed_add('show', cplang('feed_showcredit_self'), array('credit'=>$showcredit), '', array(), $_POST['note']);
	}
		
	showmessage('showcredit_do_success', "space.php?do=top");
}

?>
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:30,代码来源:cp_top.php


示例15: foreach

        foreach ($_POST['info'] as $key => $value) {
            $value = getstr($value, 500, 1, 1);
            $friend = intval($_POST['info_friend'][$key]);
            $inserts[] = "('{$space['uid']}','info','{$key}','{$value}','{$friend}')";
        }
        if ($inserts) {
            $_SGLOBAL['db']->query("DELETE FROM " . tname('spaceinfo') . " WHERE uid='{$space['uid']}' AND type='info'");
            $_SGLOBAL['db']->query("INSERT INTO " . tname('spaceinfo') . "\r\n\t\t\t\t(uid,type,subtype,title,friend)\r\n\t\t\t\tVALUES " . implode(',', $inserts));
        }
        //变更记录
        if ($_SCONFIG['my_status']) {
            inserttable('userlog', array('uid' => $_SGLOBAL['supe_uid'], 'action' => 'update', 'dateline' => $_SGLOBAL['timestamp'], 'type' => 2), 0, true);
        }
        //产生feed
        if (ckprivacy('profile', 1)) {
            feed_add('profile', cplang('feed_profile_update_info'));
        }
        $url = 'cp.php?ac=profile&op=info';
        showmessage('update_on_successful_individuals', $url);
    }
    //隐私
    $list = $friends = array();
    $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('spaceinfo') . " WHERE uid='{$space['uid']}' AND type='info'");
    while ($value = $_SGLOBAL['db']->fetch_array($query)) {
        $list[$value['subtype']] = $value;
        $friends[$value['subtype']][$value['friend']] = ' selected';
    }
}
$cat_actives = array($_GET['op'] => ' class="active"');
if ($_GET['op'] == 'edu' || $_GET['op'] == 'work') {
    $yearhtml = '';
开发者ID:AlexChien,项目名称:ey_uhome,代码行数:31,代码来源:cp_profile.php


示例16: space_merge

 space_merge($space, 'field_home');
 $maxfriendnum = checkperm('maxfriendnum');
 if ($maxfriendnum && $space['friends'] >= $maxfriendnum + $space['addfriend']) {
     if ($_G['magic']['friendnum']) {
         showmessage('enough_of_the_number_of_friends_with_magic');
     } else {
         showmessage('enough_of_the_number_of_friends');
     }
 }
 if (friend_request_check($uid)) {
     if (submitcheck('add2submit')) {
         $_POST['gid'] = intval($_POST['gid']);
         friend_add($uid, $_POST['gid']);
         if (ckprivacy('friend', 'feed')) {
             require_once libfile('function/feed');
             feed_add('friend', 'feed_friend_title', array('touser' => "<a href=\"home.php?mod=space&uid={$tospace['uid']}\">{$tospace['username']}</a>"));
         }
         notification_add($uid, 'friend', 'friend_add');
         showmessage('friends_add', dreferer(), array('username' => $tospace['username'], 'uid' => $uid, 'from' => $_G['gp_from']), array('showdialog' => 1, 'showmsg' => true, 'closetime' => true));
     }
     $op = 'add2';
     $groupselect = empty($space['privacy']['groupname']) ? array(1 => ' checked') : array();
     $navtitle = lang('core', 'title_friend_add');
     include template('home/spacecp_friend');
     exit;
 } else {
     if (getcount('home_friend_request', array('uid' => $uid, 'fuid' => $_G['uid']))) {
         showmessage('waiting_for_the_other_test');
     }
     if ($tospace['videophotostatus']) {
         ckvideophoto('friend', $tospace);
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:spacecp_friend.php


示例17: elseif

} elseif (capi_submitcheck('viewAlbumid')) {
    //上传完成发送feed
    if ($eventid) {
        //跳到活动页面
        $imgs = array();
        $imglinks = array();
        $dateline = $_SGLOBAL['timestamp'] - 600;
        $query = $_SGLOBAL['db']->query("SELECT pic.* FROM " . tname("eventpic") . " ep LEFT JOIN " . tname("pic") . " pic ON ep.picid=pic.picid WHERE ep.uid='{$_SGLOBAL['supe_uid']}' AND ep.eventid='{$eventid}' AND ep.dateline > {$dateline} ORDER BY ep.dateline DESC LIMIT 4");
        while ($value = $_SGLOBAL['db']->fetch_array($query)) {
            $imgs[] = pic_get($value['filepath'], $value['thumb'], $value['remote']);
            $imglinks[] = "space.php?do=event&id={$eventid}&view=pic&picid=" . $value['picid'];
        }
        $picnum = 0;
        if ($imgs) {
            $picnum = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM " . tname("eventpic") . " WHERE eventid='{$eventid}'"), 0);
            feed_add('event', cplang('event_feed_share_pic_title'), '', cplang('event_feed_share_pic_info'), array("eventid" => $eventid, "title" => $event['title'], "picnum" => $picnum), '', $imgs, $imglinks);
        }
        $_SGLOBAL['db']->query("UPDATE " . tname("event") . " SET picnum='{$picnum}', updatetime='{$_SGLOBAL['timestamp']}' WHERE eventid='{$eventid}'");
        showmessage('do_success', 'space.php?do=event&view=pic&id=' . $eventid, 0);
    } else {
        //相册feed
        if (ckprivacy('upload', 1)) {
            include_once S_ROOT . './source/function_feed.php';
            feed_publish($_POST['opalbumid'], 'albumid');
        }
        //单个图片feed
        if ($_POST['topicid']) {
            topic_join($_POST['topicid'], $_SGLOBAL['supe_uid'], $_SGLOBAL['supe_username']);
            $url = "space.php?do=topic&topicid={$_POST['topicid']}&view=pic";
        } else {
            $url = "space.php?uid={$_SGLOBAL['supe_uid']}&do=album&id=" . (empty($_POST['opalbumid']) ? -1 : $_POST['opalbumid']);
开发者ID:NaturalWill,项目名称:UCQA,代码行数:31,代码来源:cp_upload.php


示例18: showmessage

        showmessage("信息填写有误");
    }
    if ($_POST['tel']) {
        if (!ismobile($_POST['tel'])) {
            showmessage("手机号有误!");
        }
    }
    $arr = array("uid" => $_SGLOBAL[supe_uid], "username" => $_SGLOBAL[supe_username], "lpid" => $lpid, "giftname" => $thevalue[name], "time" => time(), "address" => strip_tags($_POST['address']), "tel" => ismobile(strip_tags($_POST['tel'])), "name" => strip_tags($_POST['realname']));
    $id = inserttable('jifen_dhlog', $arr, 1);
    //插入数据
    $_SGLOBAL['db']->query('UPDATE ' . tname('jifen_lp') . ' SET total=total-1,nums=nums+1 WHERE id=' . $lpid);
    //更新礼品信息
    $_SGLOBAL['db']->query('UPDATE ' . tname('space') . ' SET credit=credit-' . $thevalue['price'] . ' WHERE uid=' . $_SGLOBAL[supe_uid]);
    //更新积分信息
    //发全站feed
    $uid = $_SGLOBAL['supe_uid'];
    realname_set($_SGLOBAL['supe_uid'], $_SGLOBAL['supe_username']);
    realname_get();
    include_once S_ROOT . './source/function_cp.php';
    $avatar = ckavatar($uid) ? avatar($uid, 'middle', true) : UC_API . '/images/noavatar_middle.gif';
    $summay = getstr($thevalue['des'], 150, 1, 1, 0, 0, -1);
    if ($thevalue['pic']) {
        $thevalue['pic'] = "jifen/uploads/image/" . $thevalue['id'] . ".jpg";
    } else {
        $thevalue['pic'] = "jifen/images/default.jpg";
    }
    feed_add('share', '{actor} 兑换了 [{gift}]', array('actor' => "<a href=\"space.php?uid={$uid}\">{$_SN[$uid]}</a>", 'gift' => "<a href=\"jifen.php?ac=show&id={$lpid}\">{$thevalue[name]}</a>"), '{summay}', array('summay' => $summay), '', array($thevalue['pic']), array('jifen.php?ac=show&id=' . $lpid));
    showmessage("兑换成功", "index.php", 2);
} else {
    include_once S_ROOT . "jifen/source/jifen_info.php";
}
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:jifen_dh.php


示例19: on_register


//.........这里部分代码省略.........
             require_once $this->extrafile;
         }
         if ($this->setting['regctrl'] || $this->setting['regfloodctrl']) {
             C::t('common_regip')->delete_by_dateline($_G['timestamp'] - ($this->setting['regctrl'] > 72 ? $this->setting['regctrl'] : 72) * 3600);
             if ($this->setting['regctrl']) {
                 C::t('common_regip')->insert(array('ip' => $_G['clientip'], 'count' => -1, 'dateline' => $_G['timestamp']));
             }
         }
         $regmessage = dhtmlspecialchars($_GET['regmessage']);
         if ($this->setting['regverify'] == 2) {
             C::t('common_member_validate')->insert(array('uid' => $uid, 'submitdate' => $_G['timestamp'], 'moddate' => 0, 'admin' => '', 'submittimes' => 1, 'status' => 0, 'message' => $regmessage, 'remark' => ''), false, true);
             manage_addnotify('verifyuser');
         }
         setloginstatus(array('uid' => $uid, 'username' => $_G['username'], 'password' => $password, 'groupid' => $groupinfo['groupid']), 0);
         include_once libfile('function/stat');
         updatestat('register');
         if ($invite['id']) {
             $result = C::t('common_invite')->count_by_uid_fuid($invite['uid'], $uid);
             if (!$result) {
                 C::t('common_invite')->update($invite['id'], array('fuid' => $uid, 'fusername' => $_G['username'], 'regdateline' => $_G['timestamp'], 'status' => 2));
                 updatestat('invite');
             } else {
                 $invite = array();
             }
         }
         if ($invite['uid']) {
             if ($this->setting['inviteconfig']['inviteaddcredit']) {
                 updatemembercount($uid, array($this->setting['inviteconfig']['inviterewardcredit'] => $this->setting['inviteconfig']['inviteaddcredit']));
             }
             if ($this->setting['inviteconfig']['invitedaddcredit']) {
                 updatemembercount($invite['uid'], array($this->setting['inviteconfig']['inviterewardcredit'] => $this->setting['inviteconfig']['invitedaddcredit']));
             }
             require_once libfile('function/friend');
             friend_make($invite['uid'], $invite['username'], false);
             notification_add($invite['uid'], 'friend', 'invite_friend', array('actor' => '<a href="home.php?mod=space&uid=' . $invite['uid'] . '" target="_blank">' . $invite['username'] . '</a>'), 1);
             space_merge($invite, 'field_home');
             if (!empty($invite['privacy']['feed']['invite'])) {
                 require_once libfile('function/feed');
                 $tite_data = array('username' => '<a href="home.php?mod=space&uid=' . $_G['uid'] . '">' . $_G['username'] . '</a>');
                 feed_add('friend', 'feed_invite', $tite_data, '', array(), '', array(), array(), '', '', '', 0, 0, '', $invite['uid'], $invite['username']);
             }
             if ($invite['appid']) {
                 updatestat('appinvite');
             }
         }
         if ($welcomemsg && !empty($welcomemsgtxt)) {
             $welcomemsgtitle = replacesitevar($welcomemsgtitle);
             $welcomemsgtxt = replacesitevar($welcomemsgtxt);
             if ($welcomemsg == 1) {
                 $welcomemsgtxt = nl2br(str_replace(':', '&#58;', $welcomemsgtxt));
                 notification_add($uid, 'system', $welcomemsgtxt, array('from_id' => 0, 'from_idtype' => 'welcomemsg'), 1);
             } elseif ($welcomemsg == 2) {
                 sendmail_cron($email, $welcomemsgtitle, $welcomemsgtxt);
             } elseif ($welcomemsg == 3) {
                 sendmail_cron($email, $welcomemsgtitle, $welcomemsgtxt);
                 $welcomemsgtxt = nl2br(str_replace(':', '&#58;', $welcomemsgtxt));
                 notification_add($uid, 'system', $welcomemsgtxt, array('from_id' => 0, 'from_idtype' => 'welcomemsg'), 1);
             }
         }
         if ($fromuid) {
             updatecreditbyaction('promotion_register', $fromuid);
             dsetcookie('promotion', '');
         }
         dsetcookie('loginuser', '');
         dsetcookie('activationauth', '');
         dsetcookie('invite_auth', '');
         $url_forward = dreferer();
         $refreshtime = 3000;
         switch ($this->setting['regverify']) {
             case 1:
                 $idstring = random(6);
                 $authstr = $this->setting['regverify'] == 1 ? "{$_G['timestamp']}\t2\t{$idstring}" : '';
                 C::t('common_member_field_forum')->update($_G['uid'], array('authstr' => $authstr));
                 $verifyurl = "{$_G[siteurl]}member.php?mod=activate&amp;uid={$_G[uid]}&amp;id={$idstring}";
                 $email_verify_message = lang('email', 'email_verify_message', array('username' => $_G['member']['username'], 'bbname' => $this->setting['bbname'], 'siteurl' => $_G['siteurl'], 'url' => $verifyurl));
                 if (!sendmail("{$username} <{$email}>", lang('email', 'email_verify_subject'), $email_verify_message)) {
                     runlog('sendmail', "{$email} sendmail failed.");
                 }
                 $message = 'register_email_verify';
                 $locationmessage = 'register_email_verify_location';
                 $refreshtime = 10000;
                 break;
             case 2:
                 $message = 'register_manual_verify';
                 $locationmessage = 'register_manual_verify_location';
                 break;
             default:
                 $message = 'register_succeed';
                 $locationmessage = 'register_succeed_location';
                 break;
         }
         $param = array('bbname' => $this->setting['bbname'], 'username' => $_G['username'], 'usergroup' => $_G['group']['grouptitle'], 'uid' => $_G['uid']);
         if (strpos($url_forward, $this->setting['regname']) !== false || strpos($url_forward, 'buyinvitecode') !== false) {
             $url_forward = 'forum.php';
         }
         $href = str_replace("'", "\\'", $url_forward);
         $extra = array('showid' => 'succeedmessage', 'extrajs' => '<script type="text/javascript">' . 'setTimeout("window.location.href =\'' . $href . '\';", ' . $refreshtime . ');' . '$(\'succeedmessage_href\').href = \'' . $href . '\';' . '$(\'main_message\').style.display = \'none\';' . '$(\'main_succeed\').style.display = \'\';' . '$(\'succeedlocation\').innerHTML = \'' . lang('message', $locationmessage) . '\';' . '</script>', 'striptags' => false);
         showmessage($message, $url_forward, $param, $extra);
     }
 }
开发者ID:torrent520,项目名称:torrent520.github.io,代码行数:101,代码来源:class_member.php


示例20: blog_post


//.........这里部分代码省略.........
    $ckmessage = preg_replace("/(\\<div\\>|\\<\\/div\\>|\\s|\\&nbsp\\;|\\<br\\>|\\<p\\>|\\<\\/p\\>)+/is", '', $message);
    if (empty($ckmessage)) {
        return false;
    }
    //添加slashes
    $message = addslashes($message);
    //从内容中读取图片
    if (empty($titlepic)) {
        $titlepic = getmessagepic($message);
        $blogarr['picflag'] = 0;
    }
    $blogarr['pic'] = $titlepic;
    if ($olds['blogid']) {
        //更新
        $blogid = $olds['blogid'];
        updatetable('blog', $blogarr, array('blogid' => $blogid));
        $fuids = array();
        $blogarr['uid'] = $olds['uid'];
        $blogarr['username'] = $olds['username'];
    } else {
        $blogarr['uid'] = $_SGLOBAL['supe_uid'];
        $blogarr['username'] = $_SGLOBAL['supe_username'];
        $blogarr['dateline'] = empty($POST['dateline']) ? $_SGLOBAL['timestamp'] : $POST['dateline'];
        $blogid = inserttable('blog', $blogarr, 1);
    }
    $blogarr['blogid'] = $blogid;
    //附表
    $fieldarr = array('message' => $message, 'postip' => getonlineip(), 'target_ids' => $POST['target_ids']);
    //TAG
    $oldtagstr = addslashes(empty($olds['tag']) ? '' : implode(' ', unserialize($olds['tag'])));
    $tagarr = array();
    if ($POST['tag'] != $oldtagstr) {
        if (!empty($olds['tag'])) {
            //先把以前的给清理掉
            $oldtags = array();
            $query = $_SGLOBAL['db']->query("SELECT tagid, blogid FROM " . tname('tagblog') . " WHERE blogid='{$blogid}'");
            while ($value = $_SGLOBAL['db']->fetch_array($query)) {
                $oldtags[] = $value['tagid'];
            }
            if ($oldtags) {
                $_SGLOBAL['db']->query("UPDATE " . tname('tag') . " SET blognum=blognum-1 WHERE tagid IN (" . simplode($oldtags) . ")");
                $_SGLOBAL['db']->query("DELETE FROM " . tname('tagblog') . " WHERE blogid='{$blogid}'");
            }
        }
        $tagarr = tag_batch($blogid, $POST['tag']);
        //更新附表中的tag
        $fieldarr['tag'] = empty($tagarr) ? '' : addslashes(serialize($tagarr));
    }
    if ($olds) {
        //更新
        updatetable('blogfield', $fieldarr, array('blogid' => $blogid));
    } else {
        $fieldarr['blogid'] = $blogid;
        $fieldarr['uid'] = $blogarr['uid'];
        inserttable('blogfield', $fieldarr);
    }
    //空间更新
    if ($olds) {
        //空间更新
        $_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET updatetime='{$_SGLOBAL['timestamp']}' WHERE uid='{$_SGLOBAL['supe_uid']}'");
    } else {
        //积分
        updatespacestatus('get', 'blog');
    }
    //feed
    if (empty($olds) && $blogarr['friend'] != 3) {
        //事件feed
        $fs = array();
        $fs['icon'] = 'blog';
        $fs['title_data'] = array();
        $fs['images'] = $fs['image_links'] = array();
        if ($blogarr['friend'] == 4) {
            //加密日志feed
            $fs['title_template'] = cplang('feed_blog_password');
            $fs['title_data'] = array('subject' => "<a href=\"space.php?uid={$_SGLOBAL['supe_uid']}&do=blog&id={$blogid}\">{$blogarr['subject']}</a>");
            $fs['body_template'] = '';
            $fs['body_data'] = array();
        } else {
            if ($blogarr['pic']) {
                $fs['images'] = array(mkpicurl($blogarr));
                $fs['image_links'] = array("space.php?uid={$_SGLOBAL['supe_uid']}&do=blog&id={$blogid}");
            }
            $fs['title_template'] = cplang('feed_blog');
            $fs['body_template'] = '<b>{subject}&l 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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