本文整理汇总了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);
}