本文整理匯總了PHP中realname_get函數的典型用法代碼示例。如果您正苦於以下問題:PHP realname_get函數的具體用法?PHP realname_get怎麽用?PHP realname_get使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了realname_get函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: intval
$doid = intval(trim($_POST[doingid]));
//$doid = 587;
$result = array();
$perpage = 20;
$page = empty($_POST['page']) ? 0 : intval($_POST['page']);
if ($page < 1) {
$page = 1;
}
$start = ($page - 1) * $perpage;
//echo "SELECT uid,username,id,message,dateline FROM ".tname('docomment')." where doid=$doid LIMIT $start,$perpage";exit();
$query = $_SGLOBAL['db']->query("SELECT uid,username,id,message,dateline FROM " . tname('docomment') . " where doid={$doid} LIMIT {$start},{$perpage}");
while ($value = $_SGLOBAL['db']->fetch_array($query)) {
$topiclist[] = $value;
realname_set($value['uid'], $value[username]);
}
realname_get();
if ($topiclist) {
foreach ($topiclist as $value) {
//將公告中的圖片進行絕對路徑化。 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];
$HrefString = $_SCONFIG[siteallurl] . $item[1];
$TmpFace = $item[0];
//開始處理圖片
if (preg_match_all("#image\\/face\\/(\\d+)\\.gif#i", $TmpString, $matchface, PREG_SET_ORDER)) {
foreach ($matchface as $facenum) {
switch ($facenum[1]) {
case 1:
$newface = ' [:what] ';
break;
示例2: DB_Set_Logined
function DB_Set_Logined($uid)
{
global $db, $_SGLOBAL, $_SN;
// echo var_dump($_SN)."--_SN0<br>";
$setarr = array('uid' => $uid, 'username' => '', 'password' => '');
$query = $db->query("SELECT username,password FROM " . tname('member') . " WHERE uid='{$setarr['uid']}'");
if ($value = $db->fetch_array($query)) {
$setarr['username'] = addslashes($value['username']);
$setarr['password'] = addslashes($value['password']);
}
$invitearr = $_SESSION['invitearr'];
//從會話裏將已有帳戶登錄時的邀請信息取出,不用從通行證返回信息裏取
$url_plus = $_SESSION['url_plus'];
//從會話裏將已有帳戶登錄時的邀請信息取出,不用從通行證返回信息裏取
$app = $_SESSION['app'];
//從會話裏將已有帳戶登錄時的邀請信息取出,不用從通行證返回信息裏取
$_SN = $_SESSION['SN'];
//從會話裏取出後邊要用的這個變量
// echo var_dump($invitearr)."--invitearr<br>";
// echo var_dump($url_plus)."--url_plus<br>";
// echo var_dump($app)."--app<br>";
// echo var_dump($_SN)."--_SN1<br>";
include_once S_ROOT . './source/function_space.php';
//開通空間
$query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('space') . " WHERE uid='{$setarr['uid']}'");
if (!($space = $_SGLOBAL['db']->fetch_array($query))) {
$space = space_open($setarr['uid'], $setarr['username'], 0, $passport['email']);
}
$_SGLOBAL['member'] = $space;
//實名
realname_set($space['uid'], $space['username'], $space['name'], $space['namestatus']);
//這裏$_SN再次被賦值
// echo var_dump($_SN)."--_SN2<br>";
//設置cookie
ssetcookie('auth', authcode("{$setarr['password']}\t{$setarr['uid']}", 'ENCODE'), $cookietime);
ssetcookie('loginuser', $passport['username'], 31536000);
ssetcookie('_refer', '');
//同步登錄
include_once S_ROOT . './uc_client/client.php';
$ucsynlogin = uc_user_synlogin($setarr['uid']);
// echo var_dump($ucsynlogin)."--ucsynlogin<br>";
//好友邀請
if ($invitearr) {
// echo $_SGLOBAL."--_SGLOBAL1<br>";
// echo var_dump($_SN)."--_SN1<br>";
// echo var_dump($invitearr['id'])."--invitearr['id']<br>";
// echo var_dump($setarr['uid'])."--setarr['uid']<br>";
// echo var_dump($setarr['username'])."--setarr['username']<br>";
// echo var_dump($invitearr['uid'])."--invitearr['uid']<br>";
// echo var_dump($invitearr['username'])."--invitearr['username']<br>";
//成為好友
invite_update($invitearr['id'], $setarr['uid'], $setarr['username'], $invitearr['uid'], $invitearr['username'], $app);
}
// echo var_dump($_SGLOBAL['supe_uid'])."--_SGLOBAL['supe_uid']<br>";
// echo var_dump($space['uid'])."--space['uid']<br>";
//判斷用戶是否設置了頭像
$_SGLOBAL['supe_uid'] = $space['uid'];
$reward = $setarr = array();
$experience = $credit = 0;
$avatar_exists = ckavatar($space['uid']);
if ($avatar_exists) {
if (!$space['avatar']) {
//獎勵積分
$reward = getreward('setavatar', 0);
$credit = $reward['credit'];
$experience = $reward['experience'];
if ($credit) {
$setarr['credit'] = "credit=credit+{$credit}";
}
if ($experience) {
$setarr['experience'] = "experience=experience+{$experience}";
}
$setarr['avatar'] = 'avatar=1';
$setarr['updatetime'] = "updatetime={$_SGLOBAL['timestamp']}";
}
} else {
if ($space['avatar']) {
$setarr['avatar'] = 'avatar=0';
}
}
if (empty($_POST['refer'])) {
$_POST['refer'] = 'space.php?do=home';
}
realname_get();
showmessage('login_success', $app ? "userapp.php?id={$app}" : $_POST['refer'], 1, array($ucsynlogin));
}
示例3: invite_update
function invite_update($inviteid, $uid, $username, $m_uid, $m_username, $appid=0) {
global $_SGLOBAL, $_SN;
if($uid && $uid != $m_uid) {
$friendstatus = getfriendstatus($uid, $m_uid);
if($friendstatus < 1) {
friend_update($uid, $username, $m_uid, $m_username, 'invite');
//查找邀請記錄
$query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('invite')." WHERE uid='$m_uid' AND fuid='$uid'");
if($oldinvite = $_SGLOBAL['db']->fetch_array($query)) {
//已經邀請過
return false;
}
//獎勵積分
getreward('invitefriend', 1, $m_uid, '', 0);
//feed
$_SGLOBAL['supe_uid'] = $m_uid;
$_SGLOBAL['supe_username'] = $m_username;
//實名
realname_set($uid, $username);
realname_get();
if(ckprivacy('invite', 1)) {
$title_template = cplang('feed_invite');
$tite_data = array('username'=>'<a href="space.php?uid='.$uid.'">'.stripslashes($_SN[$uid]).'</a>');
feed_add('friend', $title_template, $tite_data);
}
//通知
$_SGLOBAL['supe_uid'] = $uid;
$_SGLOBAL['supe_username'] = $username;
notification_add($m_uid, 'friend', cplang('note_invite'));
//更新邀請
$setarr = array('fuid'=>$uid, 'fusername'=>$username, 'appid'=>$appid);
if($inviteid) {
updatetable('invite', $setarr, array('id'=>$inviteid));
} else {
$setarr['uid'] = $m_uid;
inserttable('invite', $setarr, 0, true);//插入邀請記錄
}
}
}
}
示例4: bbs_pm_view
function bbs_pm_view($uid, $_pmid, $touid = 0, $daterange = 1)
{
global $_SGLOBAL, $_SN, $pmid;
if (empty($_SGLOBAL['supe_uid'])) {
exit('Access denied');
}
bbs_dbconnect();
$uid = $_SGLOBAL['supe_uid'];
$query = $_SGLOBAL['bbs_db']->query("SELECT * FROM " . bbs_name('pms') . " WHERE pmid='{$pmid}' AND (msgtoid='{$uid}' OR msgfromid='{$uid}')");
$pm = $_SGLOBAL['bbs_db']->fetch_array($query);
realname_set($pm['msgfromid'], $pm['msgfrom']);
realname_get();
$pm['message'] = getstr($pm['message'], 0, 0, 0, 0, 1, 1);
return array($pm);
}