<form name=login method=post action="[!--news.url--]e/member/doaction.php"> <input type=hidden name=enews value=login> <input type=hidden name=ecmsfrom value=9> <input name="username" type="text" class="inputText" size="12" placeholder="用户名"/> <input name="password" type="password" class="inputText" size="12" placeholder="密码"/> <input type="submit" name="Submit" value="登录" class="inputsub-dl" /> <a href="[!--news.url--]e/member/register/index.php?tobind=0&groupid=1" class="inputsub-zc">注册</a> </form> [!--empirenews.template--] <div class="clear"></div> <div class="logged"> <b>[!--username--]</b> [!--groupname--],您好!<a href="[!--news.url--]e/member/cp/" target="_parent">会员中心</a> <a href="[!--news.url--]e/member/doaction.php?enews=exit&ecmsfrom=9" onClick="return confirm('确认要退出?');">退出</a> </div>
支持头像
<form name=login method=post action="[!--news.url--]e/member/doaction.php"> <input type=hidden name=enews value=login> <input type=hidden name=ecmsfrom value=9> <input name="username" type="text" class="inputText" size="12" placeholder="用户名"/> <input name="password" type="password" class="inputText" size="12" placeholder="密码"/> <input type="submit" name="Submit" value="登陆" class="inputsub-dl" /> <a href="[!--news.url--]e/member/register/index.php?tobind=0&groupid=5" class="inputsub-zc">注册</a> </form> [!--empirenews.template--] <div class="clear"></div> <div class="logged"> <i><img src="<?=$userpic?>"></i> <b>[!--username--]</b> [!--groupname--],您好!<a href="[!--news.url--]e/member/cp/" target="_parent">会员中心</a> <a href="[!--news.url--]e/member/doaction.php?enews=exit&ecmsfrom=9" onclick="return confirm('确认要退出?');">退出</a> </div>
修改文件
/e/member/login
$r=$empire->fetch1("select ".eReturnSelectMemberF('userid,username,groupid,userfen,money,userdate,havemsg,checked')." from ".eReturnMemberTable()." where ".egetmf('userid')."='$myuserid' and ".egetmf('rnd')."='$myrnd' limit 1");
下面 添加
注意将表前缀phome_改成自己的。
$m=$empire->fetch1("select userpic from phome_enewsmemberadd where userid='$myuserid' limit 1"); $userpic=$m['userpic']?$m['userpic']:$public_r[newsurl].'e/data/images/nouserpic.gif';
在登录状态模板中使用<?=$userpic?>调用会员头像
当前仅支持登录后发布评论