[转]phpcms 判断用户登录代码
时间:2015-11-21 11:42:30
收藏:0
阅读:386
<!-- 用户登录开始 --> <?php //读取用户信息 $ypzy_userid = param::get_cookie(‘_userid‘); if(!empty($ypzy_userid)){ $ypzy_memberinfo=get_memberinfo($ypzy_userid); } ?> {if $ypzy_userid} <!-- 登陆之后 --> <span onclick="window.location=‘{APP_PATH}index.php?m=member&c=index‘">{$ypzy_memberinfo[‘username‘]}</span> <span onclick="window.location=‘{APP_PATH}index.php?m=member&c=index‘">会员中心</span> {else} <!-- 登陆之前 --> <span onclick="window.location=‘{APP_PATH}index.php?m=member&c=index&a=login&siteid=1&forward=<?php echo rawurlencode(get_url());?>‘">登陆</span> <span onclick="window.location=‘{APP_PATH}index.php?m=member&c=index&a=register&siteid=1&forward=<?php echo rawurlencode(get_url());?>‘">注册</span> {/if} <span onclick="window.location=‘{APP_PATH}index.php?m=member&c=index&a=cart‘">购物车</span> <!-- 用户登录结束 --> 本文来自:懒鱼博客原文地址:http://www.yulijun.com/phpcms-login-code.html
原文:http://www.cnblogs.com/dhsx/p/4983077.html
评论(0)