加入收藏 设为首页 会员中心 我要投稿 RSS
您当前的位置:首页 > 帝国CMS

帝国CMS如何在"JS调用登陆模板"中调用当前登陆用户的头像?

时间:2023-10-25 21:11:48  来源:  作者:

有的小伙伴在做模板的时候,制作了用户登录模块,但是帝国CMS并没有提供当前用户登录后的头像显示标签,那么就要改造一下了!附图如下:

78c2d7931211fca7120b225d5c1690f4.jpg

修改步骤:

打开e/data/template/loginiframetemp.txt   

$r=$empire->fetch1("select ".$user_userid.",".$user_username.",".$user_group.",".$user_userfen.",".$user_money.",".$user_userdate.",".$user_havemsg.",".$user_checked." from ".$user_tablename." where ".$user_userid."='$myuserid' and ".$user_rnd."='$myrnd' limit 1");

下面 添加

$m=$empire->fetch1("select userpic from {$user_tbpre}enewsmemberadd where userid='$myuserid' limit 1");

        $userpic=$m['userpic']?$m['userpic']:$public_r[newsurl].'e/data/images/nouserpic.gif';

这样就可以了!然后:

在JS调用登陆模板中使用<?=$userpic?>调用会员头像!


来顶一下
返回首页
返回首页
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表
推荐资讯
相关文章
    无相关信息
栏目更新
栏目热门