本文整理汇总了PHP中g_icon函数的典型用法代码示例。如果您正苦于以下问题:PHP g_icon函数的具体用法?PHP g_icon怎么用?PHP g_icon使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了g_icon函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: libfile
require_once libfile('function/spacecp');
space_merge($space, 'count');
space_merge($space, 'field_home');
space_merge($space, 'field_forum');
space_merge($space, 'profile');
space_merge($space, 'status');
getonlinemember(array($space['uid']));
if ($space['videophoto'] && ckvideophoto($space, 1)) {
$space['videophoto'] = getvideophoto($space['videophoto']);
} else {
$space['videophoto'] = '';
}
$space['admingroup'] = $_G['cache']['usergroups'][$space['adminid']];
$space['admingroup']['icon'] = g_icon($space['adminid'], 1);
$space['group'] = $_G['cache']['usergroups'][$space['groupid']];
$space['group']['icon'] = g_icon($space['groupid'], 1);
if ($space['extgroupids']) {
$newgroup = array();
$e_ids = explode(',', $space['extgroupids']);
foreach ($e_ids as $e_id) {
$newgroup[] = $_G['usergroups'][$e_id]['grouptitle'];
}
$space['extgroupids'] = implode(',', $newgroup);
}
$space['regdate'] = dgmdate($space['regdate']);
if ($space['lastvisit']) {
$space['lastvisit'] = dgmdate($space['lastvisit']);
}
if ($space['lastactivity']) {
$space['lastactivitydb'] = $space['lastactivity'];
$space['lastactivity'] = dgmdate($space['lastactivity']);
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:space_profile.php
示例2: viewthread_procpost
function viewthread_procpost($post, $lastvisit, $ordertype, $maxposition = 0)
{
global $_G, $rushreply;
if (!$_G['forum_newpostanchor'] && $post['dateline'] > $lastvisit) {
$post['newpostanchor'] = '<a name="newpost"></a>';
$_G['forum_newpostanchor'] = 1;
} else {
$post['newpostanchor'] = '';
}
$post['lastpostanchor'] = $ordertype != 1 && $_G['forum_numpost'] == $_G['forum_thread']['replies'] || $ordertype == 1 && $_G['forum_numpost'] == $_G['forum_thread']['replies'] + 2 ? '<a name="lastpost"></a>' : '';
if (!$post['hotrecommended']) {
if ($_G['forum_pagebydesc']) {
if ($ordertype != 1) {
$post['number'] = $_G['forum_numpost'] + $_G['forum_ppp2']--;
} else {
$post['number'] = $post['first'] == 1 ? 1 : $_G['forum_numpost'] - 1 - $_G['forum_ppp2']--;
}
} else {
if ($ordertype != 1) {
$post['number'] = ++$_G['forum_numpost'];
} else {
$post['number'] = $post['first'] == 1 ? 1 : --$_G['forum_numpost'];
$post['number'] = $post['number'] - 1;
}
}
}
if ($post['existinfirstpage']) {
if ($_G['forum_pagebydesc']) {
$_G['forum_ppp2']--;
} else {
if ($ordertype != 1) {
++$_G['forum_numpost'];
} else {
--$_G['forum_numpost'];
}
}
}
if ($maxposition) {
$post['number'] = $post['position'];
}
if ($post['hotrecommended']) {
$post['number'] = -1;
}
if (!$_G['forum_thread']['special'] && !$rushreply && !$hiddenreplies && $_G['setting']['threadfilternum'] && getstatus($post['status'], 11)) {
$post['isWater'] = true;
if ($_G['setting']['hidefilteredpost'] && !$_G['forum']['noforumhidewater']) {
$post['inblacklist'] = true;
}
} else {
$_G['allblocked'] = false;
}
if ($post['inblacklist']) {
$_G['blockedpids'][] = $post['pid'];
}
$_G['forum_postcount']++;
$post['dbdateline'] = $post['dateline'];
$post['dateline'] = dgmdate($post['dateline'], 'u', '9999', getglobal('setting/dateformat') . ' H:i:s');
$post['groupid'] = $_G['cache']['usergroups'][$post['groupid']] ? $post['groupid'] : 7;
if ($post['username']) {
$_G['forum_onlineauthors'][$post['authorid']] = 0;
$post['usernameenc'] = rawurlencode($post['username']);
$post['readaccess'] = $_G['cache']['usergroups'][$post['groupid']]['readaccess'];
if ($_G['cache']['usergroups'][$post['groupid']]['userstatusby'] == 1) {
$post['authortitle'] = $_G['cache']['usergroups'][$post['groupid']]['grouptitle'];
$post['stars'] = $_G['cache']['usergroups'][$post['groupid']]['stars'];
}
$post['upgradecredit'] = false;
if ($_G['cache']['usergroups'][$post['groupid']]['type'] == 'member' && $_G['cache']['usergroups'][$post['groupid']]['creditslower'] != 999999999) {
$post['upgradecredit'] = $_G['cache']['usergroups'][$post['groupid']]['creditslower'] - $post['credits'];
$post['upgradeprogress'] = 100 - ceil($post['upgradecredit'] / ($_G['cache']['usergroups'][$post['groupid']]['creditslower'] - $_G['cache']['usergroups'][$post['groupid']]['creditshigher']) * 100);
$post['upgradeprogress'] = min(max($post['upgradeprogress'], 2), 100);
}
$post['taobaoas'] = addslashes($post['taobao']);
$post['regdate'] = dgmdate($post['regdate'], 'd');
$post['lastdate'] = dgmdate($post['lastvisit'], 'd');
$post['authoras'] = !$post['anonymous'] ? ' ' . addslashes($post['author']) : '';
if ($post['medals']) {
loadcache('medals');
foreach ($post['medals'] = explode("\t", $post['medals']) as $key => $medalid) {
list($medalid, $medalexpiration) = explode("|", $medalid);
if (isset($_G['cache']['medals'][$medalid]) && (!$medalexpiration || $medalexpiration > TIMESTAMP)) {
$post['medals'][$key] = $_G['cache']['medals'][$medalid];
$post['medals'][$key]['medalid'] = $medalid;
$_G['medal_list'][$medalid] = $_G['cache']['medals'][$medalid];
} else {
unset($post['medals'][$key]);
}
}
}
$post['avatar'] = avatar($post['authorid']);
$post['groupicon'] = $post['avatar'] ? g_icon($post['groupid'], 1) : '';
$post['banned'] = $post['status'] & 1;
$post['warned'] = ($post['status'] & 2) >> 1;
} else {
if (!$post['authorid']) {
$post['useip'] = substr($post['useip'], 0, strrpos($post['useip'], '.')) . '.x';
}
}
$post['attachments'] = array();
$post['imagelist'] = $post['attachlist'] = '';
//.........这里部分代码省略.........
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:101,代码来源:forum_viewthread.php
示例3: g_color
"<?php
g_color($value[groupid]);
?>
><?php
echo $_SN[$value['uid']];
?>
</a>
<?php
if ($value['username'] && $_SN[$value['uid']] != $value['username']) {
?>
<span class="gray">(<?php
echo $value['username'];
?>
)</span><?php
}
g_icon($value[groupid]);
?>
</p>
</td>
<td width="50"><?php
if ($value['sex'] == 2) {
?>
美女<?php
} elseif ($value['sex'] == 1) {
?>
帅哥<?php
} else {
?>
保密<?php
}
?>
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:31,代码来源:template_default_network_space.php
示例4: viewthread_procpost
function viewthread_procpost($post, $lastvisit, $ordertype, $special = 0)
{
global $_G, $rushreply;
if (!$_G['forum_newpostanchor'] && $post['dateline'] > $lastvisit) {
$post['newpostanchor'] = '<a name="newpost"></a>';
$_G['forum_newpostanchor'] = 1;
} else {
$post['newpostanchor'] = '';
}
$post['lastpostanchor'] = $ordertype != 1 && $_G['forum_numpost'] == $_G['forum_thread']['replies'] || $ordertype == 1 && $_G['forum_numpost'] == $_G['forum_thread']['replies'] + 2 ? '<a name="lastpost"></a>' : '';
if ($_G['forum_pagebydesc']) {
if ($ordertype != 1) {
$post['number'] = $_G['forum_numpost'] + $_G['forum_ppp2']--;
} else {
$post['number'] = $post['first'] == 1 ? 1 : $_G['forum_numpost'] - $_G['forum_ppp2']--;
}
} else {
if ($ordertype != 1) {
$post['number'] = ++$_G['forum_numpost'];
} else {
$post['number'] = $post['first'] == 1 ? 1 : --$_G['forum_numpost'];
}
}
$_G['forum_postcount']++;
$post['dbdateline'] = $post['dateline'];
if ($_G['setting']['dateconvert']) {
$post['dateline'] = dgmdate($post['dateline'], 'u');
} else {
$dformat = getglobal('setting/dateformat');
$tformat = getglobal('setting/timeformat');
$post['dateline'] = dgmdate($post['dateline'], $dformat . ' ' . str_replace(":i", ":i:s", $tformat));
}
$post['groupid'] = $_G['cache']['usergroups'][$post['groupid']] ? $post['groupid'] : 7;
if ($post['username']) {
$_G['forum_onlineauthors'][] = $post['authorid'];
$post['usernameenc'] = rawurlencode($post['username']);
$post['readaccess'] = $_G['cache']['usergroups'][$post['groupid']]['readaccess'];
if ($_G['cache']['usergroups'][$post['groupid']]['userstatusby'] == 1) {
$post['authortitle'] = $_G['cache']['usergroups'][$post['groupid']]['grouptitle'];
$post['stars'] = $_G['cache']['usergroups'][$post['groupid']]['stars'];
}
$post['upgradecredit'] = false;
if ($_G['cache']['usergroups'][$post['groupid']]['type'] == 'member' && $_G['cache']['usergroups'][$post['groupid']]['creditslower'] != 999999999) {
$post['upgradecredit'] = $_G['cache']['usergroups'][$post['groupid']]['creditslower'] - $post['credits'];
}
$post['taobaoas'] = addslashes($post['taobao']);
$post['regdate'] = dgmdate($post['regdate'], 'd');
$post['lastdate'] = dgmdate($post['lastactivity'], 'd');
$post['authoras'] = !$post['anonymous'] ? ' ' . addslashes($post['author']) : '';
if ($post['medals']) {
loadcache('medals');
foreach ($post['medals'] = explode("\t", $post['medals']) as $key => $medalid) {
list($medalid, $medalexpiration) = explode("|", $medalid);
if (isset($_G['cache']['medals'][$medalid]) && (!$medalexpiration || $medalexpiration > TIMESTAMP)) {
$post['medals'][$key] = $_G['cache']['medals'][$medalid];
$post['medals'][$key]['medalid'] = $medalid;
$_G['medal_list'][$medalid] = $_G['cache']['medals'][$medalid];
} else {
unset($post['medals'][$key]);
}
}
}
$post['avatar'] = avatar($post['authorid']);
$post['groupicon'] = $post['avatar'] ? g_icon($post['groupid'], 1) : '';
$post['banned'] = $post['status'] & 1;
$post['warned'] = ($post['status'] & 2) >> 1;
} else {
if (!$post['authorid']) {
$post['useip'] = substr($post['useip'], 0, strrpos($post['useip'], '.')) . '.x';
}
}
$post['attachments'] = array();
$post['imagelist'] = $post['attachlist'] = '';
if ($post['attachment']) {
if ($_G['group']['allowgetattach'] || $_G['group']['allowgetimage']) {
$_G['forum_attachpids'] .= ",{$post['pid']}";
$post['attachment'] = 0;
if (preg_match_all("/\\[attach\\](\\d+)\\[\\/attach\\]/i", $post['message'], $matchaids)) {
$_G['forum_attachtags'][$post['pid']] = $matchaids[1];
}
} else {
$post['message'] = preg_replace("/\\[attach\\](\\d+)\\[\\/attach\\]/i", '', $post['message']);
}
}
$_G['forum_ratelogpid'] .= $_G['setting']['ratelogrecord'] && $post['ratetimes'] ? ',' . $post['pid'] : '';
if ($_G['setting']['commentnumber'] && ($post['first'] && $_G['setting']['commentfirstpost'] || !$post['first'])) {
$_G['forum_commonpid'] .= $post['comment'] ? ',' . $post['pid'] : '';
}
$post['allowcomment'] = $_G['setting']['commentnumber'] && in_array(1, $_G['setting']['allowpostcomment']) && ($_G['setting']['commentpostself'] || $post['authorid'] != $_G['uid']) && ($post['first'] && $_G['setting']['commentfirstpost'] && in_array($_G['group']['allowcommentpost'], array(1, 3)) || !$post['first'] && in_array($_G['group']['allowcommentpost'], array(2, 3)));
$_G['forum']['allowbbcode'] = $_G['forum']['allowbbcode'] ? -$post['groupid'] : 0;
$post['signature'] = $post['usesig'] ? $_G['setting']['sigviewcond'] ? strlen($post['message']) > $_G['setting']['sigviewcond'] ? $post['signature'] : '' : $post['signature'] : '';
if (!defined('IN_ARCHIVER')) {
$post['message'] = discuzcode($post['message'], $post['smileyoff'], $post['bbcodeoff'], $post['htmlon'] & 1, $_G['forum']['allowsmilies'], $_G['forum']['allowbbcode'], $_G['forum']['allowimgcode'] && $_G['setting']['showimages'] ? 1 : 0, $_G['forum']['allowhtml'], $_G['forum']['jammer'] && $post['authorid'] != $_G['uid'] ? 1 : 0, 0, $post['authorid'], $_G['cache']['usergroups'][$post['groupid']]['allowmediacode'] && $_G['forum']['allowmediacode'], $post['pid'], $_G['setting']['lazyload']);
if ($post['first']) {
if (!$_G['forum_thread']['isgroup']) {
$_G['relatedlinks'] = getrelatedlink('forum');
} else {
$_G['relatedlinks'] = getrelatedlink('group');
}
}
//.........这里部分代码省略.........
开发者ID:kleitz,项目名称:sports,代码行数:101,代码来源:forum_viewthread.php
示例5: g_color
<h3 class="xs2">
<span class="y xw0 xs1">已有 <em class="xi1"><?php
echo $space['views'];
?>
</em> 人次访问</span>
<a href="home.php?mod=space&uid=<?php
echo $space['uid'];
?>
"<?php
g_color($space[groupid]);
?>
><?php
echo $space['username'];
?>
</a><?php
g_icon($space[groupid]);
?>
</h3><?php
include template('home/space_status');
?>
</td>
</tr>
</table>
<!--[diy=diycontentmiddle]--><div id="diycontentmiddle" class="area"></div><!--[/diy]-->
<?php
if (!empty($_G['setting']['pluginhooks']['space_home_top'])) {
echo $_G['setting']['pluginhooks']['space_home_top'];
}
?>
</div><?php
开发者ID:kleitz,项目名称:sports,代码行数:31,代码来源:1_diy_home_space_home.tpl.php
示例6: if
<div class="avt"><img src="<?php echo STATICURL;?>image/magic/hidden.gif" alt="匿名" /></div>
<h4>匿名</h4>
<?php } else { ?>
<div class="avt">
<a href="home.php?mod=space&uid=<?php echo $value['uid'];?>" c="1">
<?php if($ols[$value['uid']]) { ?><em class="gol" title="在线 <?php echo dgmdate($ols[$value[uid]], 'H:i');?>"></em><?php } ?><?php echo avatar($value[uid],small);?></a>
</div>
<h4>
<span class="xg1 xw0 y">
<?php if($_GET['view'] == 'blacklist') { ?>
<a href="home.php?mod=spacecp&ac=friend&op=blacklist&subop=delete&uid=<?php echo $value['uid'];?>&start=<?php echo $_GET['start'];?>">黑名单除名</a>
<?php } elseif($_GET['view'] == 'visitor' || $_GET['view'] == 'trace') { ?><?php echo dgmdate($value[dateline], 'n月j日');?><?php } elseif($_GET['view'] == 'online') { ?><?php echo dgmdate($ols[$value[uid]], 'H:i');?><?php } else { ?>
<a href="home.php?mod=spacecp&ac=friend&op=changenum&uid=<?php echo $value['uid'];?>&handlekey=hotuserhk_<?php echo $value['uid'];?>" id="friendnum_<?php echo $value['uid'];?>" onclick="showWindow(this.id, this.href, 'get', 0);" title="热度">热度(<span id="spannum_<?php echo $value['uid'];?>"><?php echo $value['num'];?></span>)</a>
<?php } ?>
</span>
<a href="home.php?mod=space&uid=<?php echo $value['uid'];?>"<?php g_color($value[groupid]);?>><?php echo $value['username'];?></a><?php g_icon($value[groupid]);?><?php if($value['videostatus']) { ?>
<img src="<?php echo IMGDIR;?>/videophoto.gif" alt="videophoto" class="vm" />
<?php } if($space['self']) { ?>
<span id="friend_note_<?php echo $value['uid'];?>" class="note xw0" title="<?php echo $value['note'];?>"><?php echo $value['note'];?></span>
<?php } ?>
</h4>
<p class="maxh"><?php echo $value['recentnote'];?></p>
<?php } ?>
<div class="xg1">
<?php if(isset($value['follow']) && $key != $_G['uid'] && $value['username'] != '') { ?>
<a href="home.php?mod=spacecp&ac=follow&op=<?php if($value['follow']) { ?>del<?php } else { ?>add<?php } ?>&fuid=<?php echo $value['uid'];?>&hash=<?php echo FORMHASH;?>&from=a_followmod_" id="a_followmod_<?php echo $key;?>" onclick="showWindow('followmod', this.href, 'get', 0)"><?php if($value['follow']) { ?>取消收听<?php } else { ?>收听TA<?php } ?></a>
<?php } if($value['uid'] != $_G['uid'] && $value['username'] != '') { ?>
<span class="pipe">|</span><a href="javascript:;" id="interaction_<?php echo $value['uid'];?>" onmouseover="showMenu(this.id);" class="showmenu">互动</a>
<?php } if(!$value['isfriend'] && $value['username'] != '') { ?>
<span class="pipe">|</span><a href="home.php?mod=spacecp&ac=friend&op=add&uid=<?php echo $value['uid'];?>&handlekey=adduserhk_<?php echo $value['uid'];?>" id="a_friend_<?php echo $key;?>" onclick="showWindow(this.id, this.href, 'get', 0);" title="加为好友">加为好友</a>
<?php } elseif(!in_array($_GET['view'], array('blacklist', 'visitor', 'trace', 'online'))) { ?>
开发者ID:xiao2ww,项目名称:Bjwlkjc,代码行数:31,代码来源:2_diy_home_space_friend.tpl.php
示例7: if
<div class="mn ptm pbm">
<!--[diy=diycontenttop]--><div id="diycontenttop" class="area"></div><!--[/diy]-->
<?php if($space['uid'] && $space['self']) { if($_G['setting']['homestyle']) { ?>
<div class="bm bw0">
<table cellpadding="0" cellspacing="0" class="mi mbm">
<tr>
<th>
<div class="avatar mbn cl">
<a href="home.php?mod=spacecp&ac=avatar" title="修改头像" id="edit_avt"><span id="edit_avt_tar">修改头像</span><?php echo avatar($_G[uid],middle);?></a>
</div>
<p><a href="home.php?mod=space&uid=<?php echo $space['uid'];?>" target="_blank" class="o xi2">访问我的空间</a></p>
</th>
<td>
<h3 class="xs2">
<span class="y xw0 xs1">已有 <em class="xi1"><?php echo $space['views'];?></em> 人次访问</span>
<a href="home.php?mod=space&uid=<?php echo $space['uid'];?>"<?php g_color($space[groupid]);?>><?php echo $space['username'];?></a><?php g_icon($space[groupid]);?></h3><?php include template('home/space_status'); ?></td>
</tr>
</table>
<!--[diy=diycontentmiddle]--><div id="diycontentmiddle" class="area"></div><!--[/diy]-->
<?php if(!empty($_G['setting']['pluginhooks']['space_home_top'])) echo $_G['setting']['pluginhooks']['space_home_top'];?>
</div><?php echo adshow("feed/bm");?><div class="bm bw0">
<ul class="tb cl">
<li<?php echo $actives['we'];?>><a href="home.php?mod=space&do=home&view=we">好友的动态</a></li>
<li<?php echo $actives['me'];?>><a href="home.php?mod=space&do=home&view=me">我的动态</a></li>
<li<?php echo $actives['all'];?>><a href="home.php?mod=space&do=home&view=all">随便看看</a></li>
<?php if($_G['setting']['my_app_status']) { ?>
<li<?php echo $actives['app'];?>><a href="home.php?mod=space&do=home&view=app">应用动态</a></li>
<?php } ?>
<?php if(!empty($_G['setting']['pluginhooks']['space_home_navlink'])) echo $_G['setting']['pluginhooks']['space_home_navlink'];?>
<?php if($_G['setting']['magicstatus'] && $_G['setting']['magics']['thunder']) { ?>
开发者ID:TeamOfMalaysia,项目名称:X_discuz,代码行数:31,代码来源:1_diy_home_space_home.tpl.php
示例8: if
<?php if(!defined('IN_DISCUZ')) exit('Access Denied'); if($list) { ?>
<ul class="buddy cl"><?php if(is_array($list)) foreach($list as $key => $value) { ?><li class="bbda cl">
<div class="avt"><a href="home.php?mod=space&uid=<?php echo $value['uid'];?>" target="_blank" c="1"><?php echo avatar($value[uid],small);?></a></div>
<h4>
<a href="home.php?mod=space&uid=<?php echo $value['uid'];?>" title="<?php echo $value['username'];?>" target="_blank"<?php g_color($value[groupid]);?>><?php echo $value['username'];?></a>
<?php if($ols[$value['uid']]) { ?><img src="<?php echo IMGDIR;?>/ol.gif" alt="online" title="在线" class="vm" /><?php } if($value['videophotostatus']) { ?> <img src="<?php echo IMGDIR;?>/videophoto.gif" title="视频认证 已认证" class="vm" /><?php } ?>
</h4>
<p class="maxh">
<?php echo $_G['cache']['usergroups'][$value['groupid']]['grouptitle'];?> <?php g_icon($value[groupid]);?><?php if($value['credits']) { ?> 积分数: <?php echo $value['credits'];?><?php } ?>
</p>
<div class="xg1">
<a href="javascript:;" id="interaction_<?php echo $value['uid'];?>" onmouseover="showMenu(this.id);" class="showmenu">互动</a>
<?php if(isset($value['follow']) && $key != $_G['uid']) { ?><span class="pipe">|</span><a href="home.php?mod=spacecp&ac=follow&op=<?php if($value['follow']) { ?>del<?php } else { ?>add<?php } ?>&hash=<?php echo FORMHASH;?>&fuid=<?php echo $value['uid'];?>" id="a_followmod_<?php echo $key;?>" onclick="showWindow('followmod', this.href, 'get', 0)"><?php if($value['follow']) { ?>取消收听<?php } else { ?>收听TA<?php } ?></a><?php } if(isset($value['isfriend']) && !$value['isfriend']) { ?><span class="pipe">|</span><a href="home.php?mod=spacecp&ac=friend&op=add&uid=<?php echo $value['uid'];?>" id="a_friend_<?php echo $key;?>" onclick="showWindow('friend_<?php echo $key;?>', this.href, 'get', 0)" title="加为好友">加为好友</a><?php } ?>
</div>
<div id="interaction_<?php echo $value['uid'];?>_menu" class="p_pop" style="display: none; width: 80px;">
<p><a href="home.php?mod=space&uid=<?php echo $value['uid'];?>&do=profile" target="_blank" title="查看资料">查看资料</a></p>
<p><a href="home.php?mod=space&uid=<?php echo $value['uid'];?>" target="_blank" title="去串个门">去串个门</a></p>
<p><a href="home.php?mod=spacecp&ac=poke&op=send&uid=<?php echo $value['uid'];?>" id="a_poke_<?php echo $key;?>" onclick="showWindow(this.id, this.href, 'get', 0);" title="打个招呼">打个招呼</a></p>
<p><a href="home.php?mod=spacecp&ac=pm&op=showmsg&handlekey=showmsg_<?php echo $value['uid'];?>&touid=<?php echo $value['uid'];?>&pmid=0&daterange=2" id="a_sendpm_<?php echo $key;?>" onclick="showWindow('showMsgBox', this.href, 'get', 0)" title="发送消息">发送消息</a></p>
</div>
</li>
<?php } ?>
</ul>
<?php if($multi) { ?><div class="mtm pgs cl"><?php echo $multi;?></div><?php } ?>
<script type="text/javascript">
function succeedhandle_followmod(url, msg, values) {
var fObj = $('a_followmod_'+values['fuid']);
if(values['type'] == 'add') {
fObj.innerHTML = '取消收听';
fObj.className = 'flw_btn_unfo';
fObj.href = 'home.php?mod=spacecp&ac=follow&op=del&fuid='+values['fuid'];
开发者ID:xiao2ww,项目名称:Bjwlkjc,代码行数:31,代码来源:2_2_home_space_list.tpl.php
示例9: getblockhtml
function getblockhtml($blockname, $parameters = array())
{
global $_G, $space;
$parameters = empty($parameters) ? array() : $parameters;
$list = array();
$sql = $title = $html = $wheresql = $ordersql = $titlemore = $do = $contentclassname = '';
$view = $from = false;
$contenttagname = 'div';
$shownum = 6;
$uid = intval($space['uid']);
$shownum = empty($parameters['shownum']) ? $shownum : intval($parameters['shownum']);
switch ($blockname) {
case 'personalinfo':
$do = 'profile';
space_merge($space, 'profile');
space_merge($space, 'count');
space_merge($space, 'status');
$space['group'] = $_G['cache']['usergroups'][$space['groupid']];
$space['group']['icon'] = g_icon($space['groupid'], 1);
require_once libfile('function/friend');
$isfriend = friend_check($space['uid']);
require_once libfile('function/spacecp');
loadcache('profilesetting');
include_once libfile('function/profile');
$profiles = array();
$privacy = $space['privacy']['profile'] ? $space['privacy']['profile'] : array();
foreach ($_G['cache']['profilesetting'] as $fieldid => $field) {
if (!$field['available'] || in_array($fieldid, array('birthprovince', 'birthdist', 'birthcommunity', 'resideprovince', 'residedist', 'residecommunity'))) {
continue;
}
if ($field['available'] && $field['invisible'] != '1' && ($field['showinthread'] || $field['showincard'] || ($space['self'] || empty($privacy[$fieldid]) || $isfriend && $privacy[$fieldid] == 1))) {
$val = profile_show($fieldid, $space);
if ($val !== false) {
if ($fieldid == 'realname' && $_G['uid'] != $space['uid'] && !ckrealname(1)) {
continue;
}
if ($field['formtype'] == 'file' && $val) {
$imgurl = getglobal('setting/attachurl') . './profile/' . $val;
$val = '<span><a href="' . $imgurl . '" target="_blank"><img src="' . $imgurl . '" style="max-width: 300px;" /></a></span>';
}
if ($val == '') {
$val = '';
}
$html .= '<li><em>' . $field['title'] . ':</em><i>' . $val . '</i></li>';
}
}
}
//-----add------------------------------------------------
$html .= "<li><em>用户组别:</em><i></i>" . $space['group']['grouptitle'] . "</li>";
$html .= "<li><em>青春豆:</em><i></i>{$space['extcredits5']}</li>";
$html .= "<li><em>注册时间:</em><i></i>" . dgmdate($space[regdate]) . "</li>";
$html .= "<li><em>积分:</em><i></i>{$space['extcredits1']}</li>";
$html .= "<li><em>在线时间:</em><i></i>{$space['oltime']}小时</li>";
$html .= "<li><em>上次发帖:</em><i></i>" . dgmdate($space[lastactivity]) . "</li>";
$html .= "<li><em>最后访问:</em><i></i>" . dgmdate($space[lastvisit]) . "</li>";
//--------------------------------------------------------
$html = $html ? $html : '<li>' . lang('space', 'block_view_profileinfo_noperm') . '</li>';
$html = '<ul id="pprl" class="mbm pbm bbda cl">' . $html . $more . '</ul>';
// $more = lang('space', 'block_profile_all', array('uid' => $uid));
$html = $html . $more;
$titlemore = $space['self'] ? lang('space', 'block_profile_edit') : '';
$titlemore = '';
//add
break;
case 'profile':
$do = $blockname;
$managehtml = '';
$avatar = empty($parameters['banavatar']) ? 'middle' : $parameters['banavatar'];
$html .= "<div class=\"hm\"><p><a href=\"home.php?mod=space&uid={$uid}\" target=\"_blank\">" . avatar($uid, $avatar) . '</a></p>';
$memberfieldforum = C::t('common_member_field_forum')->fetch($space['uid']);
$space['medals'] = $memberfieldforum['medals'];
unset($memberfieldforum);
$usermedals = $medal_detial = $usermedalmenus = '';
if ($space['medals']) {
loadcache('medals');
foreach ($space['medals'] = explode("\t", $space['medals']) as $key => $medalid) {
list($medalid, $medalexpiration) = explode("|", $medalid);
if (isset($_G['cache']['medals'][$medalid]) && (!$medalexpiration || $medalexpiration > TIMESTAMP)) {
$usermedals .= '<img src="' . STATICURL . 'image/common/' . $_G['cache']['medals'][$medalid]['image'] . '" id="md_' . $medalid . '" alt="' . $_G['cache']['medals'][$medalid]['name'] . '\'" onmouseover="showMenu({\'ctrlid\':this.id, \'menuid\':\'md_' . $medalid . '_menu\', \'pos\':\'12!\'});" /> ';
$usermedalmenus .= '
<div id="md_' . $medalid . '_menu" class="tip tip_4" style="display: none;">
<div class="tip_horn"></div>
<div class="tip_c">
<h4>' . $_G['cache']['medals'][$medalid]['name'] . '</h4>
<p>' . $_G['cache']['medals'][$medalid]['description'] . '</p>
</div>
</div>';
}
}
if ($usermedals) {
$usermedals = '<p class="md_ctrl"><a href="home.php?mod=medal">' . $usermedals . '</a></p>' . $usermedalmenus;
}
}
$html .= "<h2 class=\"mbn\"><a href=\"home.php?mod=space&uid={$uid}\" target=\"_blank\">" . $space['username'] . "</a></h2>{$usermedals}";
$html .= '</div><ul class="xl xl2 cl ul_list">';
$magicinfo = $showmagicgift = false;
if ($_G['setting']['magicstatus'] && $_G['setting']['magics']['gift']) {
$showmagicgift = true;
$magicinfo = !empty($space['magicgift']) ? dunserialize($space['magicgift']) : array();
}
//.........这里部分代码省略.........
开发者ID:Jaedeok-seol,项目名称:discuz_template,代码行数:101,代码来源:function_space.php
注:本文中的g_icon函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论