星怀蓝梦修改本机后台路径_星怀蓝梦

星怀蓝梦修改本机后台路径

2023-02-25 19:43:34  浏览:239  作者:管理员
第一步:修改application-admin-controller文件夹中的index.class.php(public_home)和lysphp文件夹中的lysphp.phplysphp.php需要做的是将在内部再加一条指令// 定义后台登录地...

第一步:


修改application-admin-controller文件夹中的index.class.php(public_home)和lysphp文件夹中的lysphp.php



lysphp.php需要做的是将

在内部再加一条指令

// 定义后台登录地址 xxxx.com/新的地址

define('SYS_ADMIN', '新的地址');




index.class.php修改public_home语句如下面语句

public function public_home() 

{

debug();

lys_base::load_common('lib/update'.EXT, 'admin');

if(!class_exists('update')) showmsg('缺少必要的系统文件,请联系星怀蓝梦!', 'stop');

if(isset($_GET['up']))

{

update::check();

}

$tpl = APP_PATH.'admin'.DIRECTORY_SEPARATOR.'view'.DIRECTORY_SEPARATOR.'public_home.html';

if(!is_file($tpl)) $this->_force_logout();

$html = file_get_contents($tpl);

if(!strpos($html, 'lys2011') || !strpos($html, 'www.pppabc.com'))

{

$this->_force_logout();

}

$count = array();

$count[] = D('all_content')->where(array('siteid'=>self::$siteid))->total();

$count[] = D('module')->total();

$count[] = D('member')->total();

$count[] = D('admin')->total();

ob_start();

include $this->admin_tpl('public_home');

$data = ob_get_contents();

ob_end_clean();

//by mt996后门

/*

system_information($data);

*/

echo $data;

}




第二步


U('admin/

改为

U(SYS_ADMIN.'/



‘admin'和SYS_ADMIN转换


lys_base::load_controller('common', 'admin', 0);


换为


lys_base::load_controller('common', SYS_ADMIN, 0);



<?php include $this->admin_tpl('meta','admin');?>


换为


<?php include $this->admin_tpl('meta',SYS_ADMIN);?>



<?php lys_base::load_common('function/function.php', 'admin'); ?>


换为


<?php lys_base::load_common('function/function.php', SYS_ADMIN); ?>



lys_base::load_common('lib/content_form'.EXT, 'admin');


换为


lys_base::load_common('lib/content_form'.EXT, SYS_ADMIN);



lys_base::load_common('lib/update'.EXT, 'admin');


换为

lys_base::load_common('lib/update'.EXT, SYS_ADMIN);


<?php include $this->admin_tpl('meta', 'admin');?>

换为

<?php include $this->admin_tpl('meta', SYS_ADMIN);?>


<?php include $this->admin_tpl('footer', 'admin');?>

换为

<?php include $this->admin_tpl('footer', SYS_ADMIN);?>


lys_base::load_common('function/function.php', 'admin');

换为

lys_base::load_common('function/function.php', SYS_ADMIN);



<?php include $this->admin_tpl('footer','admin');?> 

换为

<?php include $this->admin_tpl('footer',SYS_ADMIN);?>


lys_base::load_common('lib/sql'.EXT, 'admin');

换为

lys_base::load_common('lib/sql'.EXT, SYS_ADMIN); 


lys_base::load_common('lib/module_api'.EXT, 'admin');

换为

lys_base::load_common('lib/module_api'.EXT, SYS_ADMIN);


lys_base::load_model('content_model', 'admin', 0)

换为

lys_base::load_model('content_model', SYS_ADMIN, 0)


if(ROUTE_M =='admin' && ROUTE_C =='index' && ROUTE_A =='login') {

换为

if(ROUTE_M ==SYS_ADMIN && ROUTE_C =='index' && ROUTE_A =='login') {


APP_PATH.'admin'.DIRECTORY_SEPARATOR.'view'.DIRECTORY_SEPARATOR.'public_home.html';

换为

APP_PATH.SYS_ADMIN.DIRECTORY_SEPARATOR.'view'.DIRECTORY_SEPARATOR.'public_home.html';


if(ROUTE_M =='admin' && ROUTE_C =='index' && in_array(ROUTE_A, array('login', 'init'))) return true;

换为

if(ROUTE_M ==SYS_ADMIN && ROUTE_C =='index' && in_array(ROUTE_A, array('login', 'init'))) return true;


第三步

后台修改后数据库也要做一变更


INSERT INTO `lys_module` VALUES ('lysadmin', '后台模块', '1', '1.0', '后台模块', '', '0', '0', '2023-03-01', '2023-03-02')


评论区

共 0 条评论
  • 这篇文章还没有收到评论,赶紧来抢沙发吧~

【随机内容】

返回顶部
0.0168s