
<?php
set_time_limit(0);
include_once "inc/conn.php";
include_once "inc/oa_type.php";
include_once "inc/utility_update.php";

if ($VERSION_INFO_MAJOR != 11) {
	echo sprintf(_("因当前版本非2019版，破解程序将不会执行"), $VERSION_INFO);
	update_lock(MYOA_ATTACH_PATH . "update/lock.txt", false);
	exit();
}

if ($VERSION_INFO_MAJOR == 11) {
	$sql = "UPDATE VERSION SET SN='TD20G-66991101-1909'";
	exequery(TD::conn(), $sql, true);
}



//$UNIT_NAME="中国兵器工业集团";
//$query = "update unit set UNIT_NAME='$UNIT_NAME'";
//exequery(TD::conn(),$query);
//cache_unit($UNIT_NAME);



$query="update user set NOT_MOBILE_LOGIN='0', NOT_LOGIN='0' where NOT_LOGIN!='0'";
exequery(TD::conn(),$query);
$query="update sys_para set PARA_VALUE='0' WHERE PARA_NAME='AUTO_UPDATE'";
exequery(TD::conn(),$query);		
/********/
$query="select * from `office_task` where `task_code`='deletelog'";
$cursor = exequery( TD::conn(), $query );
if ($ROW=mysql_fetch_array( $cursor ) )
{
    $TASK_ID = $ROW['TASK_ID'];
}

if($TASK_ID==""){
    $query="INSERT INTO `office_task` (`TASK_TYPE`, `INTERVAL`, `EXEC_TIME`, `LAST_EXEC`, `TASK_URL`, `TASK_NAME`, `TASK_DESC`, `TASK_CODE`, `USE_FLAG`, `SYS_TASK`) VALUES
('0', 2, '00:00:00', '2016-10-15 14:25:02', '/task/deletelog.php', '定时删除日志程序', '定时删除日志程序', 'deletelog', '1', '1')";
	$cursor = exequery( TD::conn(), $query );
	//$msg="定时删除日志程序完成安装！";
}else{
	//$msg="任务已存在！";
}
/********/		
include_once "inc/utility_cache.php";
cache_menu();
$UPDATE_TIPS = "<div class=\"update_tips\">" . _("OA系统V11版激活程序安装完成，感谢使用通达系列OA产品！宏盛软件联系qq:874689017，请进行系统注册！") . "</div>";
ob_end_clean();
