⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 analyze.asp

📁 学生档案与成绩管理(1)学生档案管理:记录每个学生的档案信息
💻 ASP
字号:
<!-- #include file = "../include/asphead.asp" -->
<!-- #include file = "../include/function.asp" -->
<%CheckUser()%>
<link href="../include/main.css" rel="stylesheet" type="text/css">
<script src="../include/function.js" type="text/javascript"></script>

<script ID="clientEventHandlersJS" LANGUAGE="javascript">
<!--

	function LocalDC()
	{
		if(ValidSheetDataCount.value<=0)
		{
			alert("没有可以导入的数据,请检查数据内容与格式。")
			return false;
		}
		else
			return confirm("您确定要导入这" + ValidSheetDataCount.value + "条数据吗?");
	}

	function Finish()
	{
		if(LocalDC()==true)
		{
			window.parent.document.all['Prompt'].innerHTML="正在导入数据,此过程需要花费一点时间,请稍候。";
			DisableButton();
			document.frmData.target ="SaveArea";
			document.frmData.action="import.asp";
			document.frmData.submit();
		}
	}

	function DisableButton() 
	{
		window.parent.document.all['btnCancel'].disabled =true;
		window.parent.document.all['btnPre'].disabled =true;
		window.parent.document.all['btnNext'].disabled =true;
	}
//-->
</script>
<%

	dim WExcel
	set WExcel=server.CreateObject("WExcel.ImExport")

	dim i,ExcelSheet,Head,SheetID,DictID
	dim ValidSheetDataCount,ValidSheetData,InvalidSheetDataCount,InvalidSheetData

	ExcelSheet=Request.Cookies("ImExport")("ExcelSheet")
	Head=Request.Cookies("ImExport")("Head")

	if Request.Cookies("Temp")("ImportFor")="dictitem" then
		DictID=Request.Cookies("System")("DictID")
		WExcel.AnalyzeDictData cint(UserID),cstr(ExcelSheet),cint(Head),cint(DictID),ValidSheetDataCount,ValidSheetData,InvalidSheetDataCount,InvalidSheetData
		Response.Buffer =true
	elseif Request.Cookies("Temp")("ImportFor")="useraccount" then
		WExcel.AnalyzeUserAccount cint(UserID),cstr(ExcelSheet),cint(Head),ValidSheetDataCount,ValidSheetData,InvalidSheetDataCount,InvalidSheetData
		Response.Buffer =true
	else
		SheetID=Request.Cookies("Temp")("SheetID")
		WExcel.AnalyzeSheetData cint(UserID),cstr(ExcelSheet),cint(Head),cint(SheetID),ValidSheetDataCount,ValidSheetData,InvalidSheetDataCount,InvalidSheetData
		Response.Buffer =true
	end if
%>

<HTML>
<HEAD>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</HEAD>
<BODY>
	<form METHOD="post" name="frmData">
		<table width="100%" border=0 cellPadding=0 cellSpacing=0>
			<tr>
				<td>可导入行数:<%=ValidSheetDataCount%>,不可导入行数:<%=InvalidSheetDataCount%>
				</td>
			</tr>
			<%if ValidSheetDataCount>0 then%>
				<tr>
					<td>
						<table width="100%" border=0 CELLSPACING="1" CELLPADDING="0" bgcolor=999999>
							<%
								for i=1 to ValidSheetDataCount+2	'包含前面2标题行
									Response.Write ValidSheetData(i-1)
								next
							%>
						</table>
					</td>
				</tr>
				<tr height=15>
					<td>
					</td>
				</tr>
			<%end if%>
			<%if InvalidSheetDataCount>0 then%>
				<tr>
					<td>
						<table width="100%" border=0 CELLSPACING="1" CELLPADDING="0" bgcolor=999999>
							<%
								for i=1 to InvalidSheetDataCount+2	'包含前面2标题行
									Response.Write InvalidSheetData(i-1)
								next
							%>
						</table>
					</td>
				</tr>
			<%end if%>
			<iframe id="SaveArea" name="SaveArea" style="visibility:hidden" width="0" height="0" frameborder="0" src="">
			</iframe>
		</table>
	</form>
	<input TYPE="hidden" NAME="ValidSheetDataCount" value="<%=ValidSheetDataCount%>">
<%
	CheckErr
	Response.Flush
%>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -