<html>
<head>
<meta http-equiv=content-language content=zh-cn>
<meta http-equiv=content-type content="text/html; charset=gb2312">
<style>
 td { padding:2px 5px 2px 5px;}
</style>
<link href="../CSS/Base.css" rel=stylesheet>
<script language=javascript src="../JS/CheckQuestion.js.php"></script>
<script language=javascript>
function File_Form_Validator(){
	if (!CheckNotNull(document.File_Form.localFile, "上传本地文本文件")) {return false;}
}

function CheckExt(obj)
{
   	var AllowExt = ".xls|";
	FileExt = obj.value.substr(obj.value.lastIndexOf(".")).toLowerCase();
	if( AllowExt.indexOf(FileExt + "|") == -1) 
	{
		document.getElementById("fileSubmit").disabled = true;
	    alert("上传的文件扩展名仅支持xls格式");
		return false;
	}
	else
	{
		document.getElementById("fileSubmit").disabled = false;
		return true;
    }    
}
</script>
<meta content="mshtml 6.00.3790.0" name=generator></head>
<body oncontextmenu="return false" style="margin-top:0px">
  <table class=datatable style="line-height: 150%;border-collapse:collapse;" cellspacing=0 cellpadding=0 bordercolor=#b5cfd9 border=1 width=100%>
     <div class=position>位置：&nbsp; 我的问卷 &raquo; 自XLS文件导入选修课学生数据 </div>
     <tr><td colspan="2" bgcolor="#f5f5f5" height="25"><b>上传本地格式文件(.xls)</b></td></tr>
   <form name="File_Form" method="post" action="" onsubmit="return File_Form_Validator();" enctype="multipart/form-data">
   <tr>
      <td width=22% nowrap>&nbsp;选择本地文件(.xls)</td>
	  <td><input type="file" name="localFile" size=70 onchange="CheckExt(this);"></td>
   </tr></table><table width=100%>
   <tr><td width=22%>
  	   <td height="15">
	   	 <input name="Action" type="hidden" value="CoursesElectiveImportSubmit">
		 <input name="classID" type="hidden" value="{classID}">
		 <input name="gradeID" type="hidden" value="{gradeID}">
		 <input name="depID" type="hidden" value="{depID}">
	     <input type=submit class=inputsubmit id="fileSubmit" name="fileSubmit" value="确定">&nbsp;<input class=inputsubmit type="button" name="close" value="关闭" onClick="javascript:parent.hidePopWin();"></td>
      </td>
    </tr>
  </form>
 </table>
 <table width=100%>
   <tr><td style="padding-left:0px">
   <b>1)</b> 导入的文本格式必须是EXCEL 2003的XLS文件<br/>
   <b>2)</b> 点击<a href="?Action=DownloadFile&{thisURLString}&txtFileName=XLS_Sample_StudentElective.xls"><font color=red><b>下载导入示例文件</b></font></a><br/>
   <b>3)</b> 批量导入的XLS文件<b>须保留文件标题行(第1行)</b>，并确保上传的XLS文件<b>列顺序</b>与示例文件保持一致<br/>
   <b>4)</b> 课程编号、课程名称、选修课班级、学号请确保不能为空<br/>
   <b>5)</b> 关于课程编号、课程名称、选修课班级可能需要咨询教务管理处得到<br/>
</td></tr></table>
</body></html>