QQ咨询 官方微信

添加微信好友

官方小程序

百度小程序

微信小程序

头条小程序

关于我们

PHPCMS

phpcms v9 首页登录框的实现

 admin  2013-08-26 17:19:00

 首先找到phpcmstemplatesdefaultmembermini.html这个文件
将其内容修改为

  1. php if(!HTTP_REFERER || strpos(HTTP_REFERER,'&a=login')) @header("Location: ".$_GET['forward']); }  
  2.   
  3. <style>  
  4.   
  5. body,html{background:none; padding:0; margin:0}  
  6.   
  7. .log{line-height:25px; height:139px; width:178px; float:left; font-size:12px; padding-top:10px; padding-left:5px;}  
  8.   
  9. .list { float:left; width:168px; height:30px; line-height:30px; }  
  10.   
  11. </style>  
  12.   
  13. <body style="background-color:transparent">  
  14.   
  15. <div class="log">{if $_username}{L('hellow')} {get_nickname()}<br> <a href="{APP_PATH}index.php?m=member&siteid={$siteid}" target="_blank">{L('member_center')}</a> <a href="{APP_PATH}index.php?m=member&c=index&a=logout&forward={urlencode($_GET['forward'])}&siteid={$siteid}" target="_top">{L('logout')}</a>{else}  
  16.   
  17. <form method="post" action="{APP_PATH}index.php?m=member&c=index&a=login" id="myform" name="myform" target="_top">  
  18.   
  19. <input type="hidden" name="forward" id="forward" value="{if $_GET['forward']}{$_GET['forward']}{else}{HTTP_REFERER}{/if}">  
  20.   
  21. <div class="list">账 号:<input type="text" id="username" name="username" size="15" class="input-text"></div>  
  22.   
  23. <div class="list">密 码:<input type="password" id="password" name="password" size="16" class="input-text"></div>  
  24.   
  25. <div class="list">验 证:<input type="text" id="code" name="code" size="4" class="input-text">{form::checkcode('code_img', '4', '14', 75, 24)}</div>  
  26.   
  27. <div class="list"><input type="submit" name="dosubmit" id="dosubmit" value="{L('login')}"> | <a href="{APP_PATH}index.php?m=member&c=index&a=register&siteid={$siteid}" target="_blank">{L('register')}</a></div>  
  28.   
  29. </form>  
  30.   
  31. {/if}</div>  
  32.  
  33. </body>  

在首页调用的方式是

  1. <script type="text/javascript">
  2. document.write('<iframe src="{APP_PATH}index.php?m=member&c=index&a=mini&forward='+encodeURIComponent(location.href)+'&siteid={get_siteid()}" 
  3. allowTransparency="true"  width="178" height="139" frameborder="0" scrolling="no">
  4. </iframe>')</script> 

大致效果:

phpcms v9 首页登录框的实现

 

¥ 打赏
×
如果您觉得文章帮助了您就打赏一下吧
非常感谢你的打赏,我们将继续分享更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏

本文《phpcms v9 首页登录框的实现》发布于石头博客文章,作者:admin,如若转载,请注明出处:https://www.pweb123.com/cms/phpcms/251.html,否则禁止转载,谢谢配合!

文章点评

我来说两句 已有0条评论
点击图片更换

添加微信好友

添加微信好友

微信小程序

百度小程序