1. 程式人生 > >phpcms之帶圖片的登錄信息(帶cookie版)

phpcms之帶圖片的登錄信息(帶cookie版)

index rpo pat spa ember end pos php member

{php if(!HTTP_REFERER || strpos(HTTP_REFERER,‘&a=login‘)) @header("Location: ".$_GET[‘forward‘]); }
        {if $_username}
            <!-- login_member start -->
            <div class="login_member">
                <a href="<?php echo APP_PATH;?>index.php?m=member&siteid=<?php echo $siteid
;?>" class="userPhoto" target="_blank"> <img src="{get_memberavatar($_userid,1,90)}" onerror="this.src=‘{$phpsso_api_url}/statics/images/member/nophoto.gif‘"/> </a> <ul class="user_menu"> <li> <a href="<?php echo APP_PATH;?>index.php?m=member&siteid=<?php echo $siteid
;?>" class="" target="_blank">個人中心</a> <ul class="user_subnav"> <li> <a href="<?php echo APP_PATH;?>index.php?m=member&siteid=<?php echo $siteid;?>" class="" target="_blank">個人中心</a> </li> <li> <a href="<?php echo APP_PATH;?>index.php?m=member&c=index&a=logout&forward=<?php echo urlencode($_GET
[‘forward‘]);?>&siteid=<?php echo $siteid;?>" class="" target="_blank">退出</a> </li> </ul> </li> </ul> </div> <!-- login_member end --> {else} <!-- login_user end --> <div class="login_reg"> <a role="button" href="<?php echo APP_PATH;?>index.php?m=member&c=index&a=register&siteid=<?php echo $siteid;?>" target="_blank">註冊</a> <a role="button" href="<?php echo APP_PATH;?>index.php?m=member&c=index&a=login&forward=<?php echo urlencode($_GET[‘forward‘]);?>&siteid=<?php echo $siteid;?>" target="_top">登錄</a> </div> {/if} <script> $.cookie("YHZX", "<?php echo APP_PATH;?>index.php?m=member&siteid=<?php echo $siteid;?>"); $.cookie("YHTC", "<?php echo APP_PATH;?>index.php?m=member&c=index&a=logout&forward=<?php echo urlencode($_GET[‘forward‘]);?>&siteid=<?php echo $siteid;?>"); $.cookie("YHTX", "{get_memberavatar($_userid,1,90)}"); var s = $.cookie(); console.log(s); </script>

下面是單頁面:

<script>
	var ZX = $.cookie(‘YHZX‘); 
	var TC = $.cookie(‘YHTC‘); 
	var TX = $.cookie(‘YHTX‘);
	if(ZX == null || TC == null || TX == null){
		$(".login_user").html("<div class=‘login_reg‘><a role=‘button‘ href=‘<?php echo APP_PATH;?>index.php?m=member&c=index&a=register&siteid=<?php echo $siteid;?>‘ target=‘_blank‘>註冊</a><a role=‘button‘ href=‘<?php echo APP_PATH;?>index.php?m=member&c=index&a=login&forward=<?php echo urlencode($_GET[‘forward‘]);?>&siteid=<?php echo $siteid;?>‘ target=‘_top‘>登錄</a></div>")
	}else{
		$(".login_user").html("<div class=‘login_member‘><a class=‘userPhoto‘ href="+ZX+" target=‘_blank‘><img src="+TX+"></a><ul class=‘user_menu‘><li><a href="+ZX+" class=‘‘ target=‘_blank‘>個人中心</a><ul class=‘user_subnav‘><li><a href="+ZX+" class=‘‘ target=‘_blank‘>個人中心</a></li><li><a href="+TC+" class=‘‘ target=‘_blank‘>退出</a></li></ul></li></ul></div>")
	}
</script>

  

phpcms之帶圖片的登錄信息(帶cookie版)