SupSite7.5登陸后臺先驗證權限問題解決方案_SupeSite教程

      編輯Tag賺U幣
      教程Tag:暫無Tag,歡迎添加,賺取U幣!
      程序升級到SupSite7.5后,如果通過訪問admincp.php來登陸后臺,會遇到無權限提示,這是因為程序先判斷權限,然后再判斷是否登陸導致的。
      找開admincp.php文件,找到下面一段代碼:

      1. //權限檢查  
      2. if(!checkperm('manageadmincp')) {  
      3.         showmessage('no_authority_management_operation');  
      4. }  
      5.  
      6. //沒有登錄  
      7. if(emptyempty($_SGLOBAL['supe_uid']) || emptyempty($_SGLOBAL['member']['password'])) {  
      8.         setcookie('_refer', rawurlencode(S_URL_ALL.'/admincp.php?'.$_SERVER['QUERY_STRING']));  
      9.         showmessage('admincp_login', geturl('action/login'));  


      將其改為:

       
      1. //沒有登錄  
      2. if(emptyempty($_SGLOBAL['supe_uid']) || emptyempty($_SGLOBAL['member']['password'])) {  
      3.         setcookie('_refer', rawurlencode(S_URL_ALL.'/admincp.php?'.$_SERVER['QUERY_STRING']));  
      4.         showmessage('admincp_login', geturl('action/login'));  
      5. }  
      6.  
      7. //權限檢查  
      8. if(!checkperm('manageadmincp')) {  
      9.         showmessage('no_authority_management_operation');  
      再訪問admincp.php文件就會先判斷是否登陸,再判斷權限了。

      查看更多 supesite教程  supesite模板

      來源:模板無憂//所屬分類:SupeSite教程/更新時間:2009-11-24
      相關SupeSite教程