最新消息:本站所有跳转向bbs.ykit.cn的附件将全面停止,附件已转移到https://www.qingsj.com

帝国cmsJS调用登陆模板首页调用会员头像_正确的调用方式

帝国CMS 有客 1802浏览

想来大家因为 帝国cms首页JS调用登陆模板 首页还是调用不了会员头像才找到的此文章!

首先大家要明白一个原理 经查看 loginjs.php 文件中并没有调用 userpic字段所以调用不出来

大家再网上看到的图片教程都是

打开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';
在登录状态模板中使用<?=$userpic?>调用会员头像

可按照教程还是调用不出来,更新后首页JS调用登陆模板直接不显示  那是因为你数据表前缀没有修改

【正解】

$m=$empire->fetch1("select userpic from 数据表前缀enewsmemberadd where userid='$myuserid' limit 1");

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

转载请注明:有客帮 » 帝国cmsJS调用登陆模板首页调用会员头像_正确的调用方式