<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<link  href="skin/css/style.css" rel="stylesheet" type="text/css" />
<title>高级工具</title>
<script src="skin/js/common.js" type="text/javascript"></script>
<script src="skin/js/main.js" type="text/javascript"></script>
</head>
<body>

<div class="r_main">
<div class="r_content">
	<div class="r_content_1">
<form method="post"  name="editform">
<table border="0" cellpadding="0" cellspacing="0" align="center" class="tb">
<tr class="thead">
  <th colspan="7">升级文件列表(<font color="#FF0000">请根据您的版本号选择补丁下载更新！</font>)</th></tr>	
<tr align="center">
<td align="left">选择文件</td>
<td align="left">补丁名称</td>
<td align="left">文件发布时间</td>
<td align="left">功能说明</td>
<td align="left">状态</td>	
</tr>
<?php
$filelist = trim(get($updateHost.'/info.txt'));
$filelist = trim( m_ereg_replace("[\r\n]{1,}","\n",$filelist) );
$fileArr = array();
$f = 0;
if(!empty($filelist))
{
	$verRemote=getrulevalue($filelist,"version");
	$filelist=getrulevalue($filelist,"updatefile");
	$filelists = explode("\n",$filelist);
	foreach($filelists as $k=>$filelist)
	{
		$filelist = trim($filelist);
		if(empty($filelist)) continue;
		$fs = explode(',',$filelist);
		//if(date("Y-m-d",strtotime($oktime))>date("Y-m-d",strtotime(trim($fs[0])))) continue;
		$fileArr[$k]['uptime'] = trim($fs[0]);
		$fileArr[$k]['upfile'] = trim($fs[1]);
		$fileArr[$k]['updes'] = trim($fs[2]);
		$f++;
	}
}
if($f==0){
	echo "<tr align=\"center\"><td colspan='5'>目前没有升级文件</td></tr>";
}else{
	foreach($fileArr as $v){
    	if(!file_exists('../update/'.$v['upfile'].'.zip')) 
        $priv="<font color=\"#FF0000\">请先下载补丁</font>";
    	else  $priv="<font color=\"#00CC00\">可以更新</font>";
        if(!isUpdateFile($v['upfile'],$v['uptime'])){
		echo "<tr align=\"center\"><td align=\"left\"><input type=\"checkbox\" class=\"checkbox\" value=\"".$v['upfile']."----".$v['uptime']."\" name=\"e_id[]\" /></td><td align=\"left\">".$v['upfile']."</td><td align=\"left\">".$v['uptime']."</td><td align=\"left\">".$v['updes']."</td><td align=\"left\">".$priv."</td></tr>\n";
        }
	}
?>
<tr ><td  colspan="5"><input type="hidden"  name="verRemote" value="<?php echo $verRemote;?>" />
全选<input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll(this.checked,'input','e_id[]')" />反选<input type="checkbox" name="chkothers" id="chkothers" class="checkbox" onclick="checkOthers('input','e_id[]')" />
<input type="submit" value="批量下载补丁" onclick="if(confirm('确定要下载选中的文件吗')){editform.action='?action=downloadselect';}else{return false}" class="rb1"  />
<input type="submit" value="批量升级文件" onclick="if(confirm('确定要升级选中的文件吗')){editform.action='?action=updateselect';}else{return false}" class="rb1"  />
<br /><br />
<font color="red">注意：在升级文件发布时间以后安装程序的用户无需升级</font>
</td></tr>
<?php
}
?>
</table>
</form>
	</div>
</div>
</div>

<?php
viewFoot();
?>

</body>
</html>
