<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LccUpdateSafe.aspx.cs" Inherits="schoolUpdateSubPlate.Sys.LccUpdateSafe" %>

<!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" />
<title>授权客户端 -- 升级安全包</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />

</head>

<body>
<form runat="server" id="form1">
<div id="index">
	<div class="top">
    	<table width="1000" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="299" height="82"><img src="images/logo2.png" /></td>
    <td width="372">&nbsp;</td>
    <td width="329">
    	<p>注册单位全称：<asp:Label runat="server" ID="lbUnitFullName" Text="未知"/></p>
        <p>序列号： <asp:Label runat="server" ID="lbSN" Text="未知"/></p>
        <p>服务电话：021-51098339-15</p>
    </td>
  </tr>
</table>

    </div>
    
    <div class="nav nav2">欢迎 &nbsp;<asp:Label runat="server" ID="lbUserName"/>&nbsp; 进入！&nbsp;<span style="color:Black;">【</span> <asp:HyperLink ID="hlIndex" runat="server" Text="首页" ForeColor="black" />&nbsp;&nbsp;<asp:LinkButton runat="server" ID="lbnLogout" OnClick="lbnLogout_Click" Text="退出"  ForeColor="black"/> <span style="color:Black;">】</span></div>
    
    <div style="clear:both"></div>
    
    <div id="mainBox">
    <table width="890" border="0" cellspacing="0" cellpadding="0" style="margin:0 auto;">
  <tr>
    <td>&nbsp;</td>
  </tr> 
  <tr>
    <td height="50" align="left">
    	<table border="0" cellspacing="0" cellpadding="0">
  <tr>    
    <td width="110">选择安全包版本：</td>
    <td width="284">
    	<asp:DropDownList ID="ddlVersion" runat="server" CssClass="select" Width="272px" OnSelectedIndexChanged="ddlVersion_SelectedIndexChanged" AutoPostBack="true"/>
    </td>
    <td width="90">
    <asp:ImageButton ImageUrl="images/download.png" runat="server" ID="btnDownAndDO" OnClick="btnDownAndDO_Click" OnClientClick="return checkOK()" />
    <img id="imgDownAndDO" src="images/download.png" style="display:none;" /></td>
    <td width="200" align="left">
      <a id="aNext" class="btn zc" target="_blank" style="display:none;"></a>
    </td>
  </tr>  
  <tr>
    <td height="20" style="color:#615c5c;" colspan="5" valign="middle"><asp:Label runat="server" ID="lbLog" /></td>
  </tr>
  <tr>
        <td align="left" colspan="5">
            <input type="hidden" runat="server" id="hdWebSitePath" />
            <input type="hidden" runat="server" id="hdBD" />
            <input type="hidden" runat="server" id="hdState" value="0" />
            
            <span id="hlLog" style="display:none; cursor:pointer;" onclick="javascript:clickLog()"> 刷新升级日志</span>&nbsp;&nbsp;
            <input type="checkbox" id="cbAutoFresh" checked="checked" style="display:none;"/><label for="cbAutoFresh" style="display:none;">自动刷新</label>
        </td>                
    </tr>
    <tr>
        <td align="left" colspan="5">
            <iframe id="ifStepInfo" height="500" frameborder="0" width="100%" style="border-style:none;display:none;"  runat="server"></iframe>
        </td>
    </tr>
    
</table>

    </td>
  </tr>
  
</table>    
        
        <!--mainBoxRight end-->
      
      <div style="clear:both"></div>
        
    </div><!--mainBox end-->
    
    <div id="bom">
    	<p style="margin-bottom:10px;">鼎创应用管理平台 V3.2 ©2002-2014　上海鼎创信息科技有限公司　保留所有权利。</p>
        <p>警告：本计算机程序受版权法和国际条约保护。如未经授权而擅自复制或传播本程序（或其中任何部分），将受到严厉的民事和刑事制裁，并将<br />在法律许可的最大限度内受到起诉。
</p>
    </div>

    </div><!--index end-->
    </form>
</body>
</html>
<script type="text/javascript" language="javascript" src="js/jquery.js"></script>
<script language="javascript" type="text/javascript">
var timeOutprocess=null;

$(document).ready(function(){  
  var state=$("#hdState").val();
  if(state=="0")
  { 
      $("#hlLog").hide();
      $("#cbAutoFresh").hide().next().hide();
      $("#ifStepInfo").hide();
  }
  else
  {
      $("#hlLog").show();
      $("#cbAutoFresh").show().next().show();
      $("#ifStepInfo").show();
      clickLog(); 
           
      timeOutprocess = setInterval("clickLog()",3000);
  } 
  
  $("#cbAutoFresh").click(function(){
     if($(this).is(":checked")==true)
     {  
         timeOutprocess = setInterval("clickLog()",3000);
     }
     else
     {
         clearInterval(timeOutprocess);
     }
  });
  
});


function checkOK()
{
    $("select").attr("disabled",true);
    $("#btnDownAndDO").hide();
    $("#imgDownAndDO").show();
    
    var myDate = new Date(); 
	var strDate=""+myDate.getFullYear();
	
	var month=myDate.getMonth()+1; //获取当前月份(0-11,0代表1月) 
    if(month<10)month="0"+month;
    strDate+=month;
	
	var date=myDate.getDate(); //获取当前日(1-31) 
    if(date<10)date="0"+date;
    strDate+=date;   
        
    var rd = Math.round(Math.random()*10000);
    if(rd>=100&&rd<1000)rd="0"+rd;
    if(rd>=10&&rd<100)rd="00"+rd;
    if(rd<10)rd="000"+rd;
    
    $("#hdBD").val(strDate+".2."+$("#ddlVersion").val()+".<%=schoolUpdateSubPlate.LccMethod.SetupHID %>."+rd+".0");
    return true;
}

function clickLog()
{    
    $("#ifStepInfo").attr("src","UpdateInfo.aspx?BD="+$("#hdBD").val()+"&RD="+Math.round(Math.random()*1000000));
}

function setOver()
{    
    if($("#cbAutoFresh:checked").length>0)
    {  
        clearInterval(timeOutprocess);
    }
    
    $("#aNext").text("已完毕，开始执行"); 
    $("#aNext").attr("href","SafetyPromote/SafetyIndex.aspx?RD="+Math.round(Math.random()*1000000));
    $("#aNext").show();
}
</script>