<%@ page autoeventwireup="false" inherits="WebExam.Web.secure_multimedia_uploadzip, App_Web_nrcem01d" language="VB" %>

<!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 runat="server">
    <title>上传自解压文件</title>
    <script type ="text/javascript">
    function window.onload(){

  parent.tab.document.getElementById("sl_mode").style.visibility="hidden";
  
}
function window_onunload() {
parent.tab.document.getElementById("sl_mode").style.visibility="visible";
}
      function change(){
        switch (document.forms[0].sl_from.selectedIndex){
         case 0:
           self.location ="upload.aspx";
           break;
         case 1:
         
           self.location ="upload.aspx";
           break;
         case 2:
           
           break;
   
   
   }

}
function Form1_onsubmit() {

 
   if(document.forms[0].Fpath.value==""){alert("请选择文件");document.forms[0].Fpath.focus();return false;}
  var re = /\.[^\.]+$/;
 var pf=document.forms[0].Fpath.value
  var r = pf.search(re);
  var att=pf.substring(r).toLowerCase()
  if(att!=".zip"){alert("上传后解压，仅限zip格式");return;}
 document.forms[0].upload.disabled='true'
 document.forms[0].upload.value="正在上传"
 document.forms[0].Button1.click()
}
function selectFile(){}
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
       
        <select id="sl_from" name="sl_from" onpropertychange="javascript:change()">
            <option value="0">本地文件</option>
            <option value="1">服务器文件</option>
            <option selected="selected" value="2">上传后解压</option>
        </select>
        <input id="Fpath" runat="server" contenteditable="false" language="javascript" name="Fpath"
            onpropertychange="return selectFile()" style="font-weight: bold" type="file" />
            
        <input language="javascript" name="upload" onclick="Form1_onsubmit();" type="button"
            value="上传">
        <asp:Button ID="Button1" runat="server" Height="0px" Width="0px" /></div>
    </form>
</body>
</html>
