<{include file="index/header.html"}> 
<div class="nav"><span>程序更新</span></div>
<style type="text/css">
td.span{ color:#666666; }
a.do{ border:1px solid #ddd; color:#666; padding:3px 10px; border-radius:2px; }
.loadingBox{ width:100%; height:300px; padding:10px 0; background:#f8f8f8; overflow-y:scroll; border-top:1px solid #ddd; border-bottom:1px solid #ddd; float:left; }
.loadingBox p{ font-size:12px; padding:0 0 0 10px; line-height:20px;  } 
.loadingBox2{ width:100%; height:400px; padding:0 0 10px; background:#f8f8f8; overflow-y:scroll; border-bottom:1px solid #ddd; float:left; } 
.filter{ width:100%; padding:10px 0 0 0; float:left; }
.filter a.cbutton{ background:#ddd; color:#666666; border:1px solid #ccc; cursor:default; }
a.abutton{ color:#666; background:#fff; float:right; border:none; }

.ov{ width:300px; text-align:center; margin:0 auto; }
.ov span{ width:100%; font-size:22px; float:left; }
.ov a{ width:100%; text-align:center; background:none; border:none; color:#666; font-size:14px; padding-top:10px; }
/*进度条*/
.process{ width:100%; height:70px; padding:0 0 10px 0; float:left; }
.process ul{ width:100%; background:#f4f4f4;  border-radius:20px; }
.process li{ height:18px; padding:2px 0 1px 0; text-align:center; position:relative; color:#999999; z-index:2;float:left; } 
.step{ width:33.3%; float:left; }
.step1::before{ position:absolute; right: 0; top:46px; content:' '; width:50%; height:3px; background:#FF0000;}
.step1::after{ position:absolute; left: 0; top:46px; content:' '; width:50%; height:3px; background:#FF0000; } 
.step1 .number{ background:#FF0000; } 
.step0::before{ position:absolute; right: 0; top:46px; content:' '; width:50%; height:3px; background: #CCC;}
.step0::after{ position:absolute; left: 0; top:46px; content:' '; width:50%; height:3px; background:#CCC; } 
.step0 .number{ background:#CCC; } 
.step .ttl{ text-align:center; padding:10px 0 10px 0; }
.step .number{ width:20px; height:20px; z-index:2; position: relative; line-height:20px; text-align:center; margin:0 auto; border-radius:40px;  color:#fff;}  
</style>
<div class="explain">
	<div class="name"><span>操作提示</span></div>
	<div class="con">
		<p>更新下载先下载到本地，验证无误后，方可更新原文件。</p>
	</div> 
</div>
<div class="process">
	<ul>
		<li class="step <{if $smarty.get.a == 'version_download' || $smarty.get.a == 'version_decode_zip' || $smarty.get.a == 'version_decode_list' || $smarty.get.a == 'cover_do'}>step1<{else}>step0<{/if}>">
			<div class="ttl">下载文件</div>
			<div class="number">√</div> 
		</li>
		<li class="step <{if $smarty.get.a == 'cover_local' || $smarty.get.a == 'version_decode_zip'|| $smarty.get.a == 'version_decode_list' || $smarty.get.a == 'cover_do'}>step1<{else}>step0<{/if}>">
			<div class="ttl">验证压缩/还原文件</div>
			<div class="number">√</div> 
		</li>
		<li class="step <{if $smarty.get.a == 'cover_do'}>step1<{else}>step0<{/if}>">
			<div class="ttl">更新成功</div>
			<div class="number">√</div> 
		</li>
	</ul>
</div> 
<{if $smarty.get.a == 'version_update'}>
	<div class="filter" style=" text-align:center; width:100%; padding-top:20px; float:left; "> 
		<a href="?m=plug&a=version_download&vname=<{$smarty.get.vname}>&vid=<{$smarty.get.vid}>" class="button down_file" style=" float:none;">开始升级</a> 
	</div> 
<{elseif $smarty.get.a == 'version_download'}>
	<div class="loadingBox"></div> 
	<div class="filter"> 
		<a href="javascript:;" class="button add_url cbutton">正在下载文件</a> 
	</div> 
<{elseif $smarty.get.a == 'version_decode_zip'}><!----解压ZIP文件---->
	<div class="loadingBox"></div>
	<div class="filter"> 
		<a href="javascript:;" class="button add_url cbutton">正在还原文件</a> 
	</div> 
<{elseif $smarty.get.a == 'version_decode_list'}>
	<div class="loadingBox2">
		<table class="ltable">
			<thead>
				<tr>
					<th>文件名</th> 
					<th width="100">大小</th>
				</tr>
			</thead>
			<tbody>
			<{if $file}>
				<{foreach item=i from=$file}>	
					<tr>
						<td><{$i.name}></td> 
						<td><{$i.size}></td> 
					</tr>
				<{/foreach}>
			<{/if}>		
			</tbody>
		</table>
	</div>
	<div class="filter"><a href="?m=plug&a=cover_do&vname=<{$smarty.get.vname}>&vid=<{$smarty.get.vid}>" class="button add_url">覆盖文件</a></div> 
<{elseif $smarty.get.a == 'cover_do'}>
	<div class="filter"> 
		 <div class="ov"><span><{$msg}></span><a href="?m=plug&a=index">返回插件列表</a> </div>
	</div> 
<{/if}> 
<{include file="index/footer.html"}> 
<script type="text/javascript"> 
function updateProgress(str){
	$('.loadingBox').append('<p>'+str+'</p>');
	var div = document.getElementById('installing');
	div.scrollTop = div.scrollHeight;
} 
function add_url(url, msg){
	$("a.add_url").attr("href", url).removeClass("cbutton").html(msg); 
}
function goinfo(msg){
	$("a.add_url").removeClass("cbutton").html(msg); 
}
</script>