关于登陆和注册之后的页面整合问题
page_header.lbi
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript"> var process_request = "{$lang.process_request}"; </script> <div id="head"> <div class="w1200 top-entrace"> <div class="fav"> <img src="./images/star.jpg" alt=""> <a href="#">收藏慕商城</a> </div> <div class="user-info"> {insert_scripts files='transport.js,utils.js'} {insert name='member_info'} <div class="clear"></div> </div> <div class="clear"></div> <div class="logo-wrap"> <div class="logo"> <img src="./images/logo.jpg" alt=""> </div> <div class="search"> <form id="searchForm" name="searchForm" method="get" action="search.php"> <i class="icon"></i> <input type="text" name="keywords" id="keyword" class="keyword" value="{$search_keywords|escape}"/> <input type="submit" value="搜索" class="btn-submit"> </form> </div> <div class="cart-info"> <a href="#" class="shopping-cart"></a> <a href="flow.php?step=cart" class="cart-text">查看购物车</a> </div> <div class="clear"></div> </div> </div> </div> <div class="h20"></div>
user.passport.dwt
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="Keywords" content="{$keywords}" /> <meta name="Description" content="{$description}" /> <!-- TemplateBeginEditable name="doctitle" --> <title>{$page_title}</title> <!-- TemplateEndEditable --><!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable --> <link rel="shortcut icon" href="favicon.ico" /> <link rel="icon" href="animated_favicon.gif" type="image/gif" /> <link rel="stylesheet" href="themes/demo/css/user.css"> {* 包含脚本文件 *} {insert_scripts files='common.js,user.js,transport.js'} {insert_scripts files='utils.js'} <body> <div id="head"> <div class="wrap w1200"> <div class="logo"> <a href="/"> <img src="./images/logo.jpg" alt=""> </a> </div> </div> </div> <!--#登录界面 start--> <!-- {if $action eq 'login'} --> <div id="main"> <div class="user-info w1200"> <div class="left"> <img src="./images/pic_zc.jpg" alt=""> </div> <div class="right"> <div class="head"> <h3>欢迎登录</h3> <p> <span>没有账号?</span> <a href="user.php?act=register">立即注册</a> <div class="clear"></div> </p> <div class="clear"></div> </div> <div class="body"> <form name="formLogin" action="user.php" method="post" onSubmit="return userLogin()"> <ul> <li><span><input type="text" name="user" id="user" placeholder="请输入用户名" class="user" tabindex="1"></span></li> <li><span><input type="text" name="userPwd" id="userPwd" placeholder="请输入6-18位的密码,区分大小写" class="userPwd" tabindex="2"></span></li> <!-- 判断是否启用验证码{if $enabled_captcha} --> <li><span class="text"><input type="text" name="captcha" id="captcha" placeholder="请输入验证码" class="captcha" tabindex="3"></span> <img src="captcha.php?{$rand}" alt="captcha" style="vertical-align: middle;cursor: pointer;width:140px;height:40px;margin-left:10px; " onClick="this.src='captcha.php?'+Math.random()" /> </li> <!--{/if}--> <li><span><input type="submit" name="submit" value="登录" class="btn-submit" tabindex="5"></span></li> </ul> </form> </div> </div> </div> </div> <!--{/if}--> <!--#登录界面 end--> <!--#注册界面--> <!--{if $action eq 'register'}--> <div id="main"> <div class="user-info w1200"> <div class="left"> <img src="./images/pic_zc.jpg" alt=""> </div> <div class="right"> <div class="head"> <h3>欢迎注册</h3> <p> <span>已有账号</span> <a href="user.php">直接登录</a> <div class="clear"></div> </p> <div class="clear"></div> </div> <div class="body"> <form action="user.php" method="post" name="formUser" onsubmit="return register();"> <ul> <li><span><input type="text" name="user" id="user" placeholder="请输入用户名" class="user" tabindex="1"></span></li> <li><span><input type="text" name="userPwd" id="userPwd" placeholder="请输入6-18位的密码,区分大小写" onblur="check_password(this.value);" class="userPwd" tabindex="3"></span></li> <li><span><input type="text" name="confirm_password" id="confirm_password" placeholder="请确认您的密码,区分大小写" onblur="check_conform_password(this.value);" class="userPwd" tabindex="4"></span></li> <!-- 判断是否启用验证码{if $enabled_captcha} --> <li><span class="text"><input type="text" name="captcha" id="captcha" placeholder="请输入验证码" class="captcha" tabindex="14"></span> <img src="captcha.php?{$rand}" alt="captcha" style="vertical-align: middle;cursor: pointer;width:140px;height:40px;margin-left:10px; " onClick="this.src='captcha.php?'+Math.random()" /> </li> <!--{/if}--> <li><span><input type="submit" value="注册" class="btn-submit"></span></li> </ul> </form> </div> </div> </div> </div> <!--{/if}--> <!-- #BeginLibraryItem "/library/page_footer.lbi" --><!-- #EndLibraryItem --> </body> </html>
这边我登陆到首页之后,头部信息没有变化 这一块不知道怎么整合,请老师指教,谢谢
17
收起
正在回答 回答被采纳积分+1
2回答
Jokky
2018-07-06 16:06:05
member_info.lbi
<div id="append_parent"></div> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> {if $user_info} <ul> <li>{$lang.hello},{$user_info.username},{$lang.welcome_return}!</li> <li><a href="user.php">{$lang.user_center}</a></li> <li><a href="user.php?act=logout">{$lang.user_logout}[退出]</a></li> </ul> {else} <ul> <li><a href="javascript:;">{$lang.welcome}</a></li> <li><a href="user.php">请登录</a></li> <li><a href="user.php?act=register">免费注册</a></li> </ul> {/if}
ECShop3从基本使用到二次开发
- 参与学习 387 人
- 提交作业 102 份
- 解答问题 238 个
从基本使用到独立模块定制开发,深入解析ECShop源码,了解PHP编程思想,一步步打造属于你的大型网上商城!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星