📄 infoprint2.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="StudentConn.asp" -->
<%
Dim Recordset1__MMColParam,strStudentNum,strName,strClass,strTitle
Dim Repeat1__numRows
intPageSize=Request("PageSize")
if intPageSize="" then intPageSize=30
set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_StudentConn_STRING
strStudentNum= Request("StudentNum")
strName=Request("Name")
strClass=Request("ClassID")
if strStudentNum <> "" then
Recordset1__MMColParam=strStudentNum
Recordset1.Source = "SELECT * FROM StudentInfo WHERE StudentNum like '" & Recordset1__MMColParam & "%' ORDER BY StudentNum"
else
if strName<>"" then
Recordset1__MMColParam =strName
Recordset1.Source = "SELECT * FROM StudentInfo WHERE Name like '%" & Recordset1__MMColParam & "%' ORDER BY StudentNum"
else
if strClass<>"" then
if strClass="All" then strClass=""
Recordset1__MMColParam =strClass
Recordset1.Source = "SELECT * FROM StudentInfo WHERE ClassName like '" & Recordset1__MMColParam & "%' ORDER BY StudentNum"
end if
end if
end if
Recordset1.CursorType = 1
Recordset1.CursorLocation = 3
Recordset1.LockType = 3
Recordset1.Open()
Recordset1_numRows = 0
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>人员信息打印预览</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2600.0" Name=GENERATOR>
<style type="text/css">
<!--
TABLE {
font-size: 12px;
line-height: 15px;
text-decoration: none;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</HEAD>
<BODY text=#000000 bgColor=#f7f7ff leftMargin=5 topMargin=5>
<table border="0" style="border-collapse:collapse" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" bgcolor="#f7f7ff">
<%
if Request("StudentNum")<>"" then
strTitle = "编号中含有“" & strStudentNum & "”"
elseif strName<>"" then
strTitle = "姓名中含有“" & strName & "”"
else
if strClass<>"" then strTitle = strClass
end if
strTitle = strTitle & "人员名单"
If Recordset1.EOF or Recordset1.BOF Then
response.write "<br><BR><BR><BR><font color='#FF3399'>抱歉!找不到您所寻找的人员记录!</font><BR><BR><BR>"
Else
Recordset1.MoveFirst
While Not Recordset1.EOF
response.write "<p align='center'><br><font size='6'><b>" & strTitle & "</b></font></p>"
Repeat1__numRows = intPageSize
%>
<table border=1 cellpadding="1" cellspacing=0 bordercolor="#000000" style="border-collapse:collapse">
<tr>
<% If request("chkStudentNum")="True" Then %>
<td width="60" height="30" align="center">编 号</td>
<% End If %>
<% If request("chkName")="True" Then %>
<td width="50" height="30" align="center">姓 名</td>
<% End If %>
<% If request("chkContent")="True" Then %>
<td width="60" height="30" align="center">科室</td>
<% End If %>
<% If request("chkPolitics")="True" Then %>
<td width="60" height="30" align="center">政治面貌</td>
<% End If %>
<% If request("chkTelnum")="True" Then %>
<td width="80" height="30" align="center">身份证号</td>
<% End If %>
<% If request("chkRemark")="True" Then %>
<td width="40" height="30" align="center">帐号</td>
<% End If %>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<%
txtStudentNum=Recordset1.Fields.Item("StudentNum").Value & "" '编号
if txtStudentNum="" then txtStudentNum=" "
txtName=replace(Recordset1.Fields.Item("Name").Value & ""," "," ") '姓名
if txtName="" then txtName=" "
txtClassName=replace(Recordset1.Fields.Item("ClassName").Value & ""," "," ") '科室
if txtClassName="" then txtClassName=" "
txtPolitics=replace(Recordset1.Fields.Item("politics").Value & ""," "," ") '政治面貌
if txtPolitics="" then txtPolitics=" "
txtTelnum=replace(Recordset1.Fields.Item("TelNum").Value & ""," "," ") '身份证号
if txtTelnum="" then txtTelnum=" "
txtRemark=replace(Recordset1.Fields.Item("Remark").Value & ""," "," ") '账号
if txtRemark="" then txtRemark=" "
%>
<tr align="center" valign="middle" bgcolor="#FFFFFF">
<% If request("chkStudentNum")="True" Then %>
<td width="60" height="28" nowrap><%=txtStudentNum%></td>
<% End If %>
<% If request("chkName")="True" Then %>
<td width="50" height="28" nowrap><%=txtName%></td>
<% End If %>
<% If request("chkContent")="True" Then %>
<td width="60" height="28" nowrap><%=txtClassName%></td>
<% End If %>
<% If request("chkPolitics")="True" Then %>
<td width="60" height="28" nowrap><%=txtPolitics%></td>
<% End If %>
<% If request("chkTelnum")="True" Then %>
<td width="80" height="28" nowrap><%=txtTelnum%></td>
<% End If %>
<% If request("chkRemark")="True" Then %>
<td width="40" height="28"><%=txtRemark%></td>
<% End If %>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
</table>
<%
Wend
End If
%>
</td></tr></table>
</BODY>
</HTML>
<%
Recordset1.Close()
Set Recordset1=Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -