<?php 
/*登出页面*/
   require "Run.php";
   echo head('退出登录').'<body>'.UBB($wap_top,$wapid);
   if($login==1){
       
      if($_GET['aq']=='yes'){
	 
       function M_D_5($data){
	        $data1 = md5($data);
	        $data2 = md5($data1);
	        $data3 = md5($data2);
	        $data4 = md5($data3);
	        $pass_word = strtoupper($data4);
            return $pass_word;	 
            }
	$D = date(YmdHis);
	$data=$name.$nc.$pass.$D;
	$sid_mod  = M_D_5($data);
	$sql="UPDATE user SET sid='{$sid_mod}' WHERE id='{$id}'";
    $result=mysql_query($sql);
	if($result && mysql_affected_rows()>0){
	echo "<div class=\"tip\">你已经安全退出，您保存的书签全部失效！</div>";
    }else{
    echo "<div class=\"tip\">修改失败</div>";
    }
    }else{
   echo '<div class="title">请选择您的退出方式</div>';
   echo '<div class="tip">';
   echo '<a href="http://'.$_SERVER['HTTP_HOST'].'/index.php?cid='.$_GET['cassid'].'&sid=-'.$userinfo['ver'].'-'.$userinfo['css'].'">退出帐号</a>';
   echo '</div><div class="content">普通退出，您的帐号将不再是在线状态。</div><div class="tip">';
   echo '<a href="http://'.$_SERVER['HTTP_HOST'].'/waplogout.php?cid='.$_GET['cassid'].'&aq=yes">安全退出</a>';
   echo '</div><div class="content">安全退出，您保存的书签会失效。</div><div class="tip">';
   echo '<a href="http://'.$_SERVER['HTTP_HOST'].'/login.php?cid='.$_GET['cassid'].'&sid=">切换帐号</a>';
   echo '</div><div class="content">切换帐号，退出到登录页面。</div>';
      }
   }else{
   echo '<div class="tip">错误提示</div>
   <div class="content">您好，您的已经处于离线状态，无需再次退出!<br>您可以：<br> <a href="http://'.$_SERVER['HTTP_HOST'].'/login.php?cid='.$_GET['cassid'].'&sid=">现在登录网站</a>';
   
   }
   echo '<div class="mylink"><a href="http://'.$_SERVER['HTTP_HOST'].'/index.php?cid='.$_GET['cassid'].'&">返回上级</a><a href="http://'.$_SERVER['HTTP_HOST'].'/index.php?sid='.$sid_info.'">网站首页</a>
   </div>';
   echo UBB($wap_bottom,$wapid).'</body></html>';

?>