帝國CMS如何在"JS調用登陸模板"中調用當前登陸用戶的頭像?
發布時間:2019-11-06 來源:未知 瀏覽: 關鍵詞:
有的小伙伴在做模板的時候,制作了用戶登錄模塊,但是帝國CMS并沒有提供當前用戶登錄后的頭像顯示標簽,那么就要改造一下了!附圖如下:
修改步驟:
打開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?>調用會員頭像!
責任編輯:實速科技