PHP建站技术分享-从入门到精通_各类知识收集PHP建站技术分享-从入门到精通_各类知识收集PHP建站技术分享-从入门到精通_各类知识收集

QQ:420220301 微信/手机:150-3210-7690
当前位置:首页 > CMS教程 > PHPCMS

phpcms v9 首页登录框的实现

管理员 2022-08-28
PHPCMS
445

 首先找到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 首页 登录

希望以上内容对你有所帮助!如果还有其他问题,请随时提问。 各类知识收集 拥有多年CMS企业建站经验,对 iCMS, LeCMS, ClassCMS, Fastadmin, PbootCMS, PHPCMS, 易优CMS, YzmCMS, 讯睿CMS, 极致CMS, Wordpress, HkCMS, YznCMS, WellCMS, ThinkCMF, 等各类cms的相互转化,程序开发,网站制作,bug修复,程序杀毒,插件定制都可以提供最佳解决方案。

相关推荐

扫码关注

qrcode

QQ交谈

回顶部