时间:2021-07-21人气:-
- $user_medal = C::t('common_member_medal')->fetch_all_by_uid($_G['uid']);
- foreach($user_medal as $k=>$value){
- $us_medal = reset(C::t('forum_medal')->fetch_all_by_id($value['medalid']));
- $user_medals[$k] = $us_medal;
- $user_medals[$k]['image'] = 'static/image/common/'.$us_medal['image'];
- }
复制代码
模板循环代码:
- <!--{loop $user_medals $v}-->
- $v['....']
- <!--{/loop}-->
复制代码
字典解释:
medalidsmallint(6) unsignedNO是勋章idnamevarchar(50)NO勋章名称availabletinyint(1)0NO是否启用imagevarchar(255)NO勋章图片typetinyint(1)0NO勋章类型displayordertinyint(3)0NO勋章显示顺序descriptionvarchar(255)NO勋章描述expirationsmallint(6) unsigned0NO勋章有效期permissionmediumtextNO勋章获得条件表达式credittinyint(1) unsigned0NO勋章购买使用积分pricemediumint(8) unsigned0NO勋章价格
上篇:Discuz common.js 内置(AJAX)函数帮助文...
下篇:discuz帖子截取简介str_replace函数和mess...