三、後臺退出exit.php【dedecms後臺源碼分析】

 

  1. <?php 
  2. /** 
  3.  * 退出 
  4.  * 
  5.  * @version        $Id: exit.php 1 19:09 2010年7月12日Z tianya $ 
  6.  * @package        DedeCMS.Administrator 
  7.  * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc. 
  8.  * @license        http://help.dedecms.com/usersguide/license.html 
  9.  * @link           http://www.dedecms.com 
  10.  */ 
  11. //引入公共的顯示文件   目錄路徑   域名/include/common.inc.php 
  12. require_once(dirname(__FILE__).'/../include/common.inc.php'); 
  13. //引入管理員登陸類       目錄路徑   域名/include/userlogin.class.php 
  14. require_once(DEDEINC.'/userlogin.class.php'); 
  15. //new一個用戶登陸對象 
  16. $cuserLogin = new userLogin(); 
  17. // exitUser()  結束用戶的會話狀態 
  18. $cuserLogin->exitUser(); 
  19. //判斷$needclose爲空 
  20. if(emptyempty($needclose)) 
  21.     //跳轉到登陸的首頁index.php 
  22.     header('location:index.php'); 
  23. else 
  24.     $msg = "<script language='javascript'
  25.     if(document.all) window.opener=true; 
  26.     window.close(); 
  27.     </script>"; 
  28.     echo $msg

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章