TP框架模板中ifelse
{if $_username}
<ul class="afterLogin">
<li class="username"><a href="{U('pay/deposit/init')}" target="_blank">{$_username}</a></li>
<li class="ml10"><a href="{APP_PATH}index.php?m=member&c=index&a=logout&forward={urlencode($_GET['forward'])}&siteid={$siteid}" target="_top">退出</a></li>
<li class="ml30"><a href="{U('pay/deposit/init')}" target="_blank">我的订单</a></li>
</ul>
{else}
<ul class="unlogin">
<li><a class="mr15" href="{U('member/index/login',array('forward'=>urlencode($_GET['forward'])))}" target="_blank">登录</a>|</li>
<li><a class="ml15" href="{U('member/index/register')}" target="_blank">注册</a></li>
</ul>
{/if}
你要保守你心,胜过保守一切。
本文来自博客园,作者:刘俊涛的博客,转载请注明原文链接:https://www.cnblogs.com/lovebing/p/7639800.html