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}

posted @ 2017-10-09 10:07  刘俊涛的博客  阅读(2337)  评论(0编辑  收藏  举报