📄 view.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 GoToRecord(RowID)
{
document.frmData.target ="_self";
document.frmData.action="view.asp?SheetAndRowID="+frmData.SheetID.value+JoinChar+RowID+JoinChar+frmData.RowIDs.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.RowIDs.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.RowIDs.value;
document.frmData.submit();
}
function GoToRefDetail()
{
document.frmData.target ="_self";
document.frmData.action="refdetail.asp?SheetAndRowID="+frmData.SheetID.value+JoinChar+frmData.RowID.value+JoinChar+JoinChar+frmData.RowIDs.value;
document.frmData.submit();
}
function SendMail()
{
window.showModalDialog("frame.asp?target=sendmailset.asp?SheetAndRowID="+frmData.SheetID.value+JoinChar+frmData.RowID.value, "","dialogwidth:490px;dialogheight:395px;Status:0;center:1;resizable=1;")
}
function MakeTable()
{
window.showModalDialog("frame.asp?target=maketableset.asp?SheetAndRowID="+frmData.SheetID.value+JoinChar+frmData.RowID.value, "","dialogwidth:490px;dialogheight:235px;Status:0;center:1;resizable=1;")
}
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(parent.window.location);
}
}
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);
}
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();
}
//-->
</script>
<%
dim WExcel
set WExcel=server.CreateObject("WExcel.Sheet")
dim SheetAndRowID,Parts,SheetID,RowID,RowIDs,PreRowID,NextRowID
SheetAndRowID=Request.QueryString("SheetAndRowID")
Parts=split(SheetAndRowID,JoinChar)
SheetID=Parts(0)
RowID=Parts(1)
RowIDs=""
PreRowID=""
NextRowID=""
if(ubound(Parts)>=2) then
RowIDs=Parts(2)
PreRowID=GetPreItemID(RowID,RowIDs)
NextRowID=GetNextItemID(RowID,RowIDs)
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
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 strBody
WExcel.GetSheetViewPage cint(UserID),cint(SheetID),clng(RowID),true,strBody
CheckErr
dim HasRefDetail
HasRefDetail=WExcel.HasRefDetail(cint(UserID),cint(SheetID))
CheckErr
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%if HasRefDetail then%>
<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="6%"><IMG height=1 src="../images/promptline.gif" width="100%"></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="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="49%" valign="bottom">
<!--NoPrintStart-->
<p align=right>
<%if PreRowID<>"" then%>
<img src="../images/previous.gif" alt="前一条记录" style="cursor:hand" onClick="GoToRecord(<%=PreRowID%>)" width="18" height="15" border="0">
<%else%>
<img src="../images/previous2.gif" alt="前一条记录" width="18" height="15" border="0">
<%end if%>
<%if NextRowID<>"" then%>
<img src="../images/next.gif" alt="后一条记录" style="cursor:hand" onClick="GoToRecord(<%=NextRowID%>)" width="18" height="15" border="0">
<%else%>
<img src="../images/next2.gif" alt="后一条记录" width="18" height="15" border="0">
<%end if%>
<input id="btnPrint" type="button" value="打印" name="btnPrint" title="打印此页面" style="cursor:hand; WIDTH: 45px; HEIGHT: 20px" LANGUAGE="javascript" onclick="return PrintThisPage()">
<input id="btnMakeTable" type="button" value="生成表单" name="btnMakeTable" title="将此记录的数据填入模板文件" style="cursor:hand; WIDTH: 70px; HEIGHT: 20px" LANGUAGE="javascript" onclick="return MakeTable()">
<input id="btnSendMail" type="button" value="发送Email" name="btnSendMail" title="将此记录用Email发出" style="cursor:hand; WIDTH: 70px; HEIGHT: 20px" LANGUAGE="javascript" onclick="return SendMail()">
</p>
<!--NoPrintEnd-->
</td>
</tr>
<tr>
<td height=20 valign=bottom>预览</td>
<td height=20 valign=bottom bgcolor="#E0E0E0" style="cursor:hand" onclick="return GoToRefDetail();">子表</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></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 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>
<%else%>
<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/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="54%">
<!--NoPrintStart-->
<p align=right>
<%if PreRowID<>"" then%>
<img src="../images/previous.gif" alt="前一条记录" style="cursor:hand" onClick="GoToRecord(<%=PreRowID%>)" width="18" height="15" border="0">
<%else%>
<img src="../images/previous2.gif" alt="前一条记录" width="18" height="15" border="0">
<%end if%>
<%if NextRowID<>"" then%>
<img src="../images/next.gif" alt="后一条记录" style="cursor:hand" onClick="GoToRecord(<%=NextRowID%>)" width="18" height="15" border="0">
<%else%>
<img src="../images/next2.gif" alt="后一条记录" width="18" height="15" border="0">
<%end if%>
<input id="btnPrint" type="button" value="打印" name="btnPrint" title="打印此页面" style="cursor:hand; WIDTH: 70px; HEIGHT: 20px" LANGUAGE="javascript" onclick="return PrintThisPage()">
<input id="btnMakeTable" type="button" value="生成表单" name="btnMakeTable" title="将此记录的数据填入模板文件" style="cursor:hand; WIDTH: 75px; HEIGHT: 20px" LANGUAGE="javascript" onclick="return MakeTable()">
<input id="btnSendMail" type="button" value="发送Email" name="btnSendMail" title="将此记录用Email发出" style="cursor:hand; WIDTH: 75px; HEIGHT: 20px" LANGUAGE="javascript" onclick="return SendMail()">
</p>
<!--NoPrintEnd-->
</td>
</tr>
<tr>
<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></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>
<%end if%>
<table width="100%" border=0 CELLSPACING=0 CELLPADDING="0">
<tr height=10>
<td colspan=5></td>
</tr>
<tr height=340 valign="top">
<td colspan=5>
<table width="99%" border=0 CELLSPACING="1" CELLPADDING="0">
<%=strBody%>
</table>
</td>
</tr>
<!--NoPrintStart-->
<tr height=40 valign=bottom>
<td colspan=5><input id="btnCancel" type="button" value="关闭" name="btnCancel" style="cursor:hand; WIDTH: 50px; HEIGHT: 24px" LANGUAGE="javascript" onclick="return Cancel()"></td>
</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="RowIDs" value="<%=RowIDs%>">
</form>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -