<?php
/*
		程序修正脚本
*/

if(!defined('VI_BASE')) {
	exit('Access Denied');
}

//载入 MySQL 类
require_once(VI_ROOT."class/db.mysql.php");

///////////////////////////////////

//安装步骤
$step = getnum("step",1);

//////////////////////////

$base = VI_ROOT."data/fixbug/";

$list = loop_file( $base, array(), array("php") );

$fixfile = '';

foreach( $list as $file ){	
	if( !file_exists( str_replace(".php",".lock",$base.$file) ) ){		
		$fixfile = $base.$file;		
		break;		
	}	
}

if( $fixfile ){
?>

<link type="text/css" href="style/install.css" rel="stylesheet" />

<script type="text/javascript">
	
	//暂停运行，显示安装界面
	Serv.END = true;

</script>

<!--安装界面_开始-->
<dl id="setup">
    <dt>    
        <span>                	
            <a href="http://www.veryide.com/guide.php" target="_blank"><img src="image/icon/help.png" /> 帮助</a>
            <a href="http://www.veryide.com/bbs.php" target="_blank"><img src="image/icon/talk.png" /> 论坛</a>
        </span>        
        更新向导
    </dt>
    <dd>    
	<?php
	include( $fixfile );
	?>        
    </dd>        
</dl>
<!--安装界面_开始-->
<?php
}
?>