Warning: date(): Invalid date.timezone value 'HKT', we selected the timezone 'UTC' for now. in /home/mrgcom/public_html/catalog/controller/common/footer.php on line 48 phpcms v9修改默認後台

The One 专一

phpcms v9修改默認後台

1 在phpcms/modules/admin/創建獨立函數,文件名 MY_index.php 內容如下:

<?php
defined('IN_PHPCMS') or exit('No permission resources.');
class MY_index extends index {        
    public function __construct() {        
        if(empty($_SESSION['right_enter'])) {header('location:./');exit;}                 
        parent::__construct();         
    }     
    public function public_logout() {                 
        $_SESSION['right_enter'] = 0;         
        parent::public_logout();
    }
}
?>

2 在根目錄下,創建新後台入口。建立文件夾 new ,new下建立index.php 內容如下:

<?php
define('PHPCMS_PATH',realpath(dirname(_FILE_).'/..').'/');
include PHPCMS_PATH . '/phpcms/base.php';
pc_base::creat_app();
$session_storage='session_'.pc_base::load_config('system','session_storage');
pc_base::load_sys_class($session_storage);
session_start();
$_SESSION['right_enter']=1;
unset($session_storage);
header('location:../index.php?m=admin');
?>

 

 

Powered By 爱你若晴天
身体健康 © 2017 粤ICP备14081548号-1

Article

Shopping

Search

Me