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

📄 refdetail.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 ChangeSubSheet() 
{
	var SubSheetID;
	SubSheetID=parseInt(SubSheet.value);
	document.frmData.target ="_self";
	document.frmData.action="refdetail.asp?SheetAndRowID="+frmData.SheetID.value+JoinChar+frmData.RowID.value+JoinChar+SubSheetID+JoinChar+frmData.ParentRowIDs.value;
	document.frmData.submit();
}

function AddSubRecord() 
{
	var SubSheetID;
	SubSheetID=parseInt(SubSheet.value);
	var SheetAndRowID;
	SheetAndRowID=SubSheetID+JoinChar+frmData.SheetID.value+JoinChar+frmData.RowID.value;
	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;"
	if(window.showModalDialog("viewframe.asp?target=newsub.asp?SheetAndRowID="+SheetAndRowID, "",myScreen)==true)
	{
		parent.window.returnValue =true;
		window.navigate(window.location);
	}
}

function DelSubRecord() 
{
	var SubSheetID;
	SubSheetID=parseInt(SubSheet.value);

	var SelectedRow,BadRow;
	BadRow=CheckDelAuth();
	if(BadRow!="")
	{
		alert("以下记录您没有删除权限,请检查。\n" + "ID号:" + BadRow)
	}
	else
	{
		SelectedRow=RowSelect();
		if(SelectedRow=="")
		{
			alert("您要删除哪些记录?请选择。")
		}
		else
		{
			var RecordCount;
			RecordCount=SelectedRow.split(",").length;
			if(confirm("您确定要删除这" + RecordCount + "条记录吗?")==true)
			{
				parent.window.returnValue =true;
				document.frmData.SubSheetID.value =SubSheetID;
				document.frmData.RowSelect.value =SelectedRow;
				document.frmData.target ="SaveArea";
				document.frmData.action="deldetail.asp";
				document.frmData.submit();
			}	
		}
	}
}

function View(SheetID,RowID) 
{
	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;"
	var RowIDs;
	eval("RowIDs=RowIDsForSheet" + SheetID + ".value;");
	if(window.showModalDialog ("viewframe.asp?Target=view.asp?SheetAndRowID="+SheetID+JoinChar+RowID+JoinChar+RowIDs,"",myScreen)==true)
	{
		parent.window.returnValue =true;
		window.navigate(window.location);  
	}
}

function GoToView()
{
	document.frmData.target ="_self";
	document.frmData.action="view.asp?SheetAndRowID="+frmData.SheetID.value+JoinChar+frmData.RowID.value+JoinChar+frmData.ParentRowIDs.value;
	document.frmData.submit();
}
function GoToEdit()
{
	document.frmData.target ="_self";
	document.frmData.action="edit.asp?SheetAndRowID="+frmData.SheetID.value+JoinChar+frmData.RowID.value+JoinChar+frmData.ParentRowIDs.value;
	document.frmData.submit();
}
function GoToHistory()
{
	document.frmData.target ="_self";
	document.frmData.action="historyframe.asp?SheetAndRowID="+frmData.SheetID.value+JoinChar+frmData.RowID.value+JoinChar+frmData.ParentRowIDs.value;
	document.frmData.submit();
}


function ViewRef(SheetID,FieldID,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;"
	var RefString;
	RefString=SheetID+JoinChar+FieldID+JoinChar+FieldValue;
	window.showModalDialog ("viewframe3.asp?Target=viewref.asp?RefString="+RefString,"",myScreen);
}

function PrintThisPage()
{
	var curPageBody,PrintBody;
	curPageBody=window.document.body.innerHTML;
	PrintBody=RemoveNoPrint(curPageBody);
	window.document.body.innerHTML=PrintBody;
	window.print();
	window.document.body.innerHTML=curPageBody;
}

function Cancel()
{
	parent.window.close();
}

function SelectAllSub()
{
	if (CurPage.value>0)
	{
		if(chkAll.status==true)
			CheckAll();
		else
			ClearAll();
	}
}

//-->
</script>
<%
	dim WExcel
	set WExcel=server.CreateObject("WExcel.Sheet")

	dim SheetAndRowID,Parts,SheetID,RowID,curSubSheetID,ParentRowIDs
	SheetAndRowID=Request.QueryString("SheetAndRowID")
	Parts=split(SheetAndRowID,JoinChar)
	SheetID=Parts(0)
	RowID=Parts(1)
	curSubSheetID=Parts(2)
	if curSubSheetID="" then
		curSubSheetID=Request.Cookies("Sheet")("SubSheetID" & SheetID)
	end if
	if curSubSheetID="" then
		curSubSheetID=0
	end if
	ParentRowIDs=""
	if(ubound(Parts)>=3) then 
		ParentRowIDs=Parts(3) 
	end if
	Response.Cookies("Sheet")("SubSheetID" & SheetID)=curSubSheetID
	Response.Cookies("Sheet").Expires = CookieLife

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

	dim CurPage,RowIDs,CanDeleteRowIDs,SheetData,Success
	Success=WExcel.GetRefDetail(cint(UserID),cint(SheetID),clng(RowID),cint(curSubSheetID),CurPage,RowIDs,CanDeleteRowIDs,SheetData)
	CheckErr
	dim Count
	Count=ubound(SheetData)

	Response.Cookies("InSubSheet")="1"
%>

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
	</head>
	<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
		<table width="100%" border=0 cellPadding=0 cellSpacing=0>
			<tr height=5>
				<td colspan="11">
			</tr>
			<tr>
				<td height=1 rowspan="3" valign="bottom" width="8%"><IMG height=1 src="../images/promptline.gif" width="100%"></td>

				<td height=1 rowspan="3" width="1%"><IMG height=22 src="../images/leftoff.gif" width=11></td>
				<td height=1 valign="center" width="10%"><IMG height=1 src="../images/promptline.gif" width="100%"></td>
				<td height=1 rowspan="3" width="1%"><IMG height=22 src="../images/rightoff.gif" width=11></td>

				<td height=1 rowspan="3" width="1%"><IMG height=22 src="../images/lefton.gif" width=11></td>
				<td height=1 valign="center" width="10%"><IMG height=1 src="../images/promptline.gif" width="100%"></td>
				<td height=1 rowspan="3" width="1%"><IMG height=22 src="../images/righton.gif" width=11></td>

				<td height=1 rowspan="3" width="1%"><IMG height=22 src="../images/leftoff.gif" width=11></td>
				<td height=1 valign="center" width="10%"><IMG height=1 src="../images/promptline.gif" width="100%"></td>
				<td height=1 rowspan="3" width="1%"><IMG height=22 src="../images/rightoff.gif" width=11></td>

				<td height=1 rowspan="3" width="1%"><IMG height=22 src="../images/leftoff.gif" width=11></td>
				<td height=1 valign="center" width="10%"><IMG height=1 src="../images/promptline.gif" width="100%"></td>
				<td height=1 rowspan="3" width="1%"><IMG height=22 src="../images/rightoff.gif" width=11></td>

				<td height=1 rowspan="2" width="47%">
					<!--NoPrintStart-->
					<p align=right>
						<input id="btnPrint" type="button" value="打印" name="btnPrint" title="打印此页面" style="cursor:hand; WIDTH: 70px; HEIGHT: 20px" LANGUAGE="javascript" onclick="return PrintThisPage()">&nbsp;
					</p>
					<!--NoPrintEnd-->
				</td>
			</tr>
			<tr>
				<td height=20 valign=bottom bgcolor="#E0E0E0" style="cursor:hand" onclick="return GoToView();">预览</td>
				<td height=20 valign=bottom>子表</td>
				<td height=20 valign=bottom bgcolor="#E0E0E0" style="cursor:hand" onclick="return GoToEdit();">修改</td>
				<td height=20 valign=bottom bgcolor="#E0E0E0" style="cursor:hand" onclick="return GoToHistory();">历史</td>
			</tr>
			<tr>
				<td height=1 rowspan="3" valign="bottom"><IMG height=1 src="../images/promptline.gif" width="100%"></td>
				<td></td>
				<td height=1 rowspan="3" valign="bottom"><IMG height=1 src="../images/promptline.gif" width="100%"></td>
				<td height=1 rowspan="3" valign="bottom"><IMG height=1 src="../images/promptline.gif" width="100%"></td>
				<td height=1 valign="bottom"><IMG height=1 src="../images/promptline.gif" width="100%"></td>
			</tr>
		</table>
		<table width="99%" border=0 align="center" BORDER=0 CELLSPACING=1 CELLPADDING=0>
			<tr height=10>
				<td></td>
			</tr>
			<tr height=337 valign="top">
				<TD>
					<%for i=1 to Count:Response.Write SheetData(i-1):next%>
				</TD>
			</tr>
			<!--NoPrintStart-->
			<tr height=40 valign=bottom>
				<td><input id="btnCancel" type="button" value="关闭" name="btnCancel" style="cursor:hand; WIDTH: 50px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return Cancel()"></td>
				<iframe id="SaveArea" name="SaveArea" style="visibility:hidden" width="0" height="0" frameborder="0" src="">
				</iframe>
			</tr>
			<!--NoPrintEnd-->
			<form METHOD="post" name="frmData">
				<input TYPE="hidden" NAME="SheetID" value="<%=SheetID%>">
				<input TYPE="hidden" NAME="RowID" value="<%=RowID%>">
				<input TYPE="hidden" NAME="ParentRowIDs" value="<%=ParentRowIDs%>">
				<input TYPE="hidden" NAME="SubSheetID">
				<input TYPE="hidden" NAME="RowSelect">
			</form>
			<input TYPE="hidden" NAME="CurPage" value="<%=CurPage%>">
			<input TYPE="hidden" NAME="RowIDs" value="<%Count=ubound(RowIDs):for i=1 to Count:IF i=1 then Response.Write RowIDs(i-1) else Response.Write "," & RowIDs(i-1):end if:next%>">
			<input TYPE="hidden" NAME="CanDeleteRowIDs" value="<%Count=ubound(CanDeleteRowIDs):for i=1 to Count:IF i=1 then Response.Write CanDeleteRowIDs(i-1) else Response.Write "," & CanDeleteRowIDs(i-1):end if:next%>">
		</table>
	</body>                                                                                                           
</html>

⌨️ 快捷键说明

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