<?php echo $this->fetch('header.html'); ?>
<div class="row">
<div class="span12">
<table width="100%" class="table table-bordered">
  <tr>
    <td  >欢迎使用得推餐饮系统，当前版本：<?php echo VERSION; ?>。<span id="newversion"></span><span style="display:none;" id="update_loading">正在更新...</span></td>
    </tr>
  
  <tr>
  	<td>授权情况：<div id="shouquan">您当前程序未授权，得推餐饮系统授权价格：3000元，若要授权请联系QQ:362606856。</div></td>
     
  </tr>  
  <tr>
  <td>缓存管理： 
  <a href="<?php echo APPADMIN; ?>?m=admin_cache&type=all">清除所有</a>
  <a href="<?php echo APPADMIN; ?>?m=admin_cache&type=compiled">清除模板编译</a> 
  <a href="<?php echo APPADMIN; ?>?m=admin_cache&type=cache">清除模板缓存</a> 
  <a href="<?php echo APPADMIN; ?>?m=admin_cache&type=filecache">清除文件缓存</a></td>
  </tr> 
  <tr>
    <td>当前统计：</td>
    </tr>
  
  <tr>
    <td><?php echo $this->_var['product_0_num']; ?>条未审核产品</td>
  </tr>
  <tr>
    <td><?php echo $this->_var['product_1_num']; ?>条已审核产品</td>
  </tr>
  <tr>
    <td><?php echo $this->_var['product_2_num']; ?>条可发微博产品</td>
  </tr>
  <tr>
    <td>用户共<?php echo $this->_var['user_num']; ?>人</td>
    </tr>
    <tr><td><iframe src="http://www.deitui.com/index.php?m=list&a=default&catid=175" style="width:100%; min-height:200px; border:0px;"></iframe></td></tr>
</table>

</div>

</div>

<script language="javascript">
$(document).ready(function(){
	
	$.get("<?php echo APPADMIN; ?>?m=admin_main&a=CheckNewVersion",function(data){
		$("#newversion").html(data);
	});
	
	$.get("<?php echo APPADMIN; ?>?m=admin_main&a=shouquan",function(data){
		$("#shouquan").html(data);
	});
	
	$("#update_submit").live("click",function(){
		$("#update_loading").show();
		if(confirm('更新前请做好数据备份，确定更新吗？')){
			$.get("<?php echo APPADMIN; ?>?m=admin_main&a=update",function(data){
				alert(data.message);
				window.location.reload();
			},"json")
		}else{
			$("#update_loading").hide();
		}
	});
});
</script>
<?php echo $this->fetch('footer.html'); ?>