<?php
	$pdo = get_pdo();
	$a_bb_res = $pdo -> query('select * from '.DB_PRE."config where id='49' limit 1",'');
	$a_bb_data='没有新版本';
	$a_bb_data=file_get_contents("http://upgrade.blog.ithhc.cn/data1.php?k={$a_bb_res['v']}");
	if(empty($a_bb_data))
		die('无法访问！');
?>
<{include index::header.hhc}>
<{include index::left.hhc}>
		<div class="main">
<{include index::msg.hhc}>
			<{*网站基本信息开始*}>
			<div class="admin_con_main_parent">
				<div class="admin_con_main">
					<h1 class="admin_con_main_title">
						系统在线升级
					</h1>
					<form method="post" action="?h=system&c=upgrade_submit" class="sj_form">
					<div class="admin_con_main_con">
						<div class="admin_con_main_con_main">
							<ul>
								<?php 
									$a_bb_data = trim($a_bb_data);
								?>
								<li class="oli">
									当前版本：V<?php echo $a_bb_res['v']; ?><br/><br/>
									<{if @a_bb_data=='没有新版本'}>
										没有新版本
									<{else /}>
										升级后的版本：V<{@a_bb_data}>
									<{/if}>
								</li>
							</ul>
							<{if @a_bb_data!='没有新版本'}>
							<input type="submit" class="create_zidingyi" style="margin:50px 10px 30px 10px;" value="升级">
							<{else /}>
							<div style="margin:50px 0 0 20px;"></div>
							<{/if}>
							<div class="sjdyc" style="margin:50px 0 50px 20px;display:none;"></div>
						</div>
					</div>
				</form>
				</div>
			</div>
			<{*网站基本信息结束*}>
<script type="text/javascript">
	$(function(){
		$('.sj_form').submit(function(){
			$('.create_zidingyi').hide();
			$('.sjdyc').text('升级中 请勿关闭浏览器...');
			$('.sjdyc').show();
		})
	})
</script>

		</div>
		<{include index::footer.hhc}>
