<?php
error_reporting(E_ALL ^ E_NOTICE);

@set_time_limit(1000);

if(file_exists("install.off"))
{
	echo"《帝国小说系统》安装程序已锁定。如果要重新安装，请删除<b>/e/install/install.off</b>文件！";
	exit();
}

require("../class/connect.php");
require("../class/db_sql.php");
require("../class/functions.php");
require("../class/dpfun.php");
require LoadLang("pub/fun.php");
require("../class/t_functions.php");
require("../data/dbcache/class.php");
$link=db_connect();
$empire=new mysqlquery();

$ecms=$_GET['ecms'];
$defaultdata=$_GET['defaultdata'];


//更新其它数据
if($ecms=='ChangeInstallOtherData')
{
	//--- 删除缓存文件 ---
	DelListEnews();
	//生成首页
	$indextemp=GetIndextemp();
	NewsBq(0,$indextemp,1,0);
	echo"更新文件完毕.<script>self.location.href='index.php?enews=success&f=6&defaultdata=$defaultdata';</script>";
	exit();
}
else//更新数据库缓存
{
	GetConfig(1);//更新参数设置
	GetClass();//更新栏目
	echo"更新数据库缓存完毕.<script>self.location.href='changedata.php?ecms=ChangeInstallOtherData&defaultdata=$defaultdata';</script>";
	exit();
}
?>