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

📄 new.asp

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

function window_onload() 
{
	AttachLimitPrompt();
	if(document.frmData.RefreshByBaseSheet.value>0)
		HasChange();
	
}

function ViewRef(SheetID,FieldID,FieldValue) {
	var RefString;
	RefString=SheetID+JoinChar+FieldID+JoinChar+FieldValue;
	var myScreen,myTop,myLeft;
	myTop=window.screenTop-44;
	myLeft=window.screenLeft+14;
	myScreen="dialogwidth:640px;dialogheight:480px;dialogtop:"+myTop+"px;dialogleft:"+myLeft+"px;Status:0;center:1;resizable=1;"
	window.showModalDialog ("viewframe3.asp?Target=viewref.asp?RefString="+RefString,"",myScreen);
}

//-->
</script>

<%

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

	dim AttachOnlyImage,AttachMaxSize
	WExcel.GetAttachLimit AttachOnlyImage,AttachMaxSize
	
	dim SheetAndRowID,Parts,SheetID,RowID
	dim RefreshByBaseSheet,RefFieldCount
	RefreshByBaseSheet=0
	if Request.QueryString("RefreshByBaseSheet")<>"" then
		RefreshByBaseSheet=cint(Request.QueryString("RefreshByBaseSheet"))
	end if
	if RefreshByBaseSheet>0 then
		'来自于编辑页面刷新,通常是根据所选主表记录,需要显示引用的主表字段
		'保留页面当前输入的数据,仅引用字段从主表的数据库获取,此字段标明哪个主表引起的刷新
		dim myRequest,Err
		Result=WExcel.BuildUploadRequest(Request.BinaryRead(Request.TotalBytes),myRequest,Err)
		SheetID=myRequest.Item("SheetID").Item("Value")
		RowID=0
	else
		'数据都从数据库获取
		SheetAndRowID=Request.QueryString("SheetAndRowID")
		Parts=split(SheetAndRowID,JoinChar)
		SheetID=Parts(0)
		RowID=Parts(1)
	end if

	dim Exist
	Exist=WExcel.SheetExist(cint(UserID),cint(SheetID))
	CheckErr
	if Exist=false then
		Response.Redirect "/hcgis/notfound.asp?Name=数据表&Depth=2"
	end if

	dim NewRecord,strBody,strScript,Result
	NewRecord="1"
	Result=WExcel.GetSheetEditPage(cint(UserID),cint(SheetID),cstr(NewRecord),cstr(RefreshByBaseSheet),strBody,strScript,RefFieldCount,clng(RowID),myRequest)
	Response.Write strScript
	if Result=0 then
%>

		<html>
			<head>
				<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
			</head>
			<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="overflow-x: hidden" onload="return window_onload()">
				<form METHOD="post" name="frmData" ENCTYPE="multipart/form-data">
					<table width="100%" align=center border=0>
						<tr height="35">
							<td colspan=5>
								<b>
									录入新记录
								</b>
							</td>
						</tr>
						<tr height=315 valign="top">
							<td colspan=5>
								<table width="99%" border=0 CELLSPACING="1" CELLPADDING="0">
									<%=strBody%>
								</table>
							</td>
						</tr>
						<tr height=30 valign=bottom>
							<td colspan=5><p id=Prompt></p></td>
						</tr>
						<tr>
							<td colspan="5">
								<table width="100%">
									<tr>
										<td width="25%"></td>
										<td width="25%"><input id="btnSave" type="button" value="确定" name="btnSave" style="cursor:hand; WIDTH: 50px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return Save('save.asp')"></td>
										<td width="25%"><input id="btnCancel" type="button" value="取消" name="btnCancel" style="cursor:hand; WIDTH: 50px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return Cancel()"></td>
										<td width="25%"></td>
									</tr>
								</table>
							</td>
						</tr>
						<img style="visibility:hidden;position:absolute;" id=dumy name=dumy onreadystatechange=OnImageLoad(srcElementName) onerror=OnImageError(srcElementName)>
						<input TYPE="hidden" NAME="CoID" value="<%=CoID%>">
						<input TYPE="hidden" NAME="SheetID" value="<%=SheetID%>">
						<input TYPE="hidden" NAME="AttachOnlyImage" value="<%=AttachOnlyImage%>">
						<input TYPE="hidden" NAME="AttachMaxSize" value="<%=AttachMaxSize%>">
					</table>
					<input TYPE="hidden" NAME="IsDetail" value="0">
					<input TYPE="hidden" NAME="NewRecord" value="<%=NewRecord%>">
					<input TYPE="hidden" NAME="RefreshByBaseSheet" value="<%=RefreshByBaseSheet%>">
					<input TYPE="hidden" NAME="RefFieldCount" value="<%=RefFieldCount%>">
					<iframe id="SaveArea" name="SaveArea" style="visibility:hidden" width="0" height="0" frameborder="0" src="">
					</iframe>
				</form>
			</body>                                                                                                           
		</html>
<%
	else
%>
		<html>
			<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
					<table width="60%" align=center border=0>
						<tr height=315 valign="center">
							<td>
									系统未授予您录入权限。
							</td>
						</tr>
						<tr>
							<td>
								<p align=center>
									<input id="btnCancel" type="button" value="关闭" name="btnCancel" style="cursor:hand; WIDTH: 50px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return Cancel()">
								</p>
							</td>
						</tr>
					</table>
			</body>                                                                                                           
		</html>

<%
	end if
	CheckErr
%>	

⌨️ 快捷键说明

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