📄 listuncheckedstudent.asp
字号:
<!-- #include file="utility/checkAdmin.asp" -->
<%
'****************************************
'目的: 未通过审核的学生列表
'开始时间: 2005-6-4 15:43
'最后修改时间: 2005-6-4 15:43
'编写人: 某某某
'****************************************
'搜索关键字定义
dim stuID
dim stuIDIS
dim stuName
dim stuNameIS
dim stuGrade
dim stuGradeIS
dim stuSex
dim stuPhone
dim stuPhoneIS
dim stuAddress
dim stuAddressIS
'参数是否来源于Post
dim isPost
isPost = Request.QueryString("isPost")
'对搜索关键字赋值
if(isPost <> "") then
stuID = Request.Form("stuID")
stuIDIS = Request.Form("stuIDIS")
stuName = Request.Form("stuName")
stuNameIS = Request.Form("stuNameIS")
stuGrade = Request.Form("stuGrade")
stuGradeIS = Request.Form("stuGradeIS")
stuSex = Request.Form("stuSex")
stuPhone = Request.Form("stuPhone")
stuPhoneIS = Request.Form("stuPhoneIS")
stuAddress = Request.Form("stuAddress")
stuAddressIS = Request.Form("stuAddressIS")
else
stuID = Request.QueryString("stuID")
stuIDIS = Request.QueryString("stuIDIS")
stuName = Request.QueryString("stuName")
stuNameIS = Request.QueryString("stuNameIS")
stuGrade = Request.QueryString("stuGrade")
stuGradeIS = Request.QueryString("stuGradeIS")
stuSex = Request.QueryString("stuSex")
stuPhone = Request.QueryString("stuPhone")
stuPhoneIS = Request.QueryString("stuPhoneIS")
stuAddress = Request.QueryString("stuAddress")
stuAddressIS = Request.QueryString("stuAddressIS")
end if
dim message '提示信息
dim sql
dim rs
dim pageSize '每页显示信息数目
dim pgnm '总共的页面数目
dim page '用户请求的页面索引
dim count '消息计数器,用来判断是否到达分页条目
dim link '把翻页链接地址保存在变量中
count = 0
pageSize = 9
link = "listUnCheckedStudent.asp?is=is"
sql = "select * from student where sCheck = 0 "
'*********************************************
'开始根据参数构造SQL语句和翻页链接地址link
'*********************************************
'处理stuID参数
if(stuID <> "") then
if(stuIDIS = "yes") then
sql = sql & "and ID = '" & stuID & "' "
link = link & "&stuID=" & stuID & "&stuIDIS=yes"
else
sql = sql & "and ID like '%" & stuID & "%' "
link = link & "&stuID=" & stuID
end if
end if
'处理stuName参数
if(stuName <> "") then
if(stuNameIS = "yes") then
sql = sql & "and sName = '" & stuName & "' "
link = link & "&stuName=" & stuName & "&stuNameIS=yes"
else
sql = sql & "and sName like '%" & stuName & "%' "
link = link & "&stuName=" & stuName
end if
end if
'处理stuGrade参数
if(stuGrade <> "") then
if(stuGradeIS = "yes") then
sql = sql & "and sGrade = '" & stuGrade & "' "
link = link & "&stuGrade=" & stuGrade & "&stuGradeIS=yes"
else
sql = sql & "and sGrade like '%" & stuGrade & "%' "
link = link & "&stuGrade=" & stuGrade
end if
end if
'处理stuSex参数
if(stuSex <> "") then
sql = sql & "and sSex = '" & stuSex & "' "
link = link & "&stuSex=" & stuSex
end if
'处理stuPhone参数
if(stuPhone <> "") then
if(stuPhoneIS = "yes") then
sql = sql & "and sPhone = '" & stuPhone & "' "
link = link & "&stuPhone=" & stuPhone & "&stuPhoneIS=yes"
else
sql = sql & "and sPhone like '%" & stuPhone & "%' "
link = link & "&stuPhone=" & stuPhone
end if
end if
'处理stuAddress参数
if(stuAddress <> "") then
if(stuAddressIS = "yes") then
sql = sql & "and sAddress = '" & stuAddress & "' "
link = link & "&stuAddress=" & stuAddress & "&stuAddressIS=yes"
else
sql = sql & "and sAddress like '%" & stuAddress & "%' "
link = link & "&stuAddress=" & stuAddress
end if
end if
'***************************************************
'所有参数处理完毕,SQL语句和link构造完毕
'***************************************************
page = Request.QueryString("page")
link = link & "&page="
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>已发信息列表</title>
<link rel="stylesheet" type="text/css" href="images/link.css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body>
<div align="center">
<table border="1" width="749" id="table2" cellspacing="0" cellpadding="0" style="border-collapse: collapse" height="22">
<tr>
<td> 当前操作: 未审核的学生列表</td>
</tr>
</table>
<br>
<table border="1" width="749" id="table1" cellspacing="0" cellpadding="0" style="border-collapse: collapse" height="70" bordercolor="#CCCCCC">
<tr>
<td width="91" height="22" align="center" bgcolor="#F2F2F2">学号</td>
<td height="22" align="center" width="66" bgcolor="#F2F2F2">姓名</td>
<td height="22" align="center" width="56" bgcolor="#F2F2F2">班级</td>
<td height="22" align="center" width="47" bgcolor="#F2F2F2">性别</td>
<td height="22" align="center" width="73" bgcolor="#F2F2F2">电话</td>
<td height="22" align="center" width="129" bgcolor="#F2F2F2">邮箱</td>
<td height="22" align="center" width="129" bgcolor="#F2F2F2">住址</td>
<td height="22" align="center" width="147" bgcolor="#F2F2F2">操作</td>
</tr>
<%
set rs = ExecuteQuery(sql)
if(not rs.eof) then
rs.PageSize = pageSize
pgnm = rs.PageCount
if(IsEmpty(page) or cint(page) < 1 or cint(page) > pgnm) then
page = 1
end if
rs.absolutePage = page '指定当前页码
else
Alert("无符合条件的记录,请返回并访问其他页面!")
Go("welcome.htm")
Response.end
end if
do while(not rs.EOF and count <> pageSize)
%>
<tr>
<td width="91" align="center" height="26"><%=rs("ID")%></td>
<td height="26" align="center" width="66"><%=rs("sName")%></td>
<td height="26" align="center" width="56"><%=rs("sGrade")%></td>
<td height="26" align="center" width="47"><%=rs("sSex")%></td>
<td height="26" align="center" width="73"><%=rs("sPhone")%></td>
<td height="26" align="center" width="129"><%=rs("sEmail")%></td>
<td height="26" align="center" width="129"><%=rs("sAddress")%></td>
<td height="26" align="center" width="147">
<a href="manageStudent.asp?actionType=check&stuID=<%=rs("ID")%>">
<font color="#FF0000">通过审核</font></a>/<a href="changeStudentInfo.asp?stuID=<%=rs("id")%>">修改信息</a>/<a href="manageStudent.asp?actionType=delete&stuID=<%=rs("ID")%>">删除</a></td>
</tr>
<%
rs.MoveNext()
count = count + 1
loop
%>
<tr align="right">
<td width="713" align="right" height="23" colspan="8" align="right">
<%if page=1 then%> <font color="#CCCCCC">上一页</font><%else%>
<a href="<%Response.write(link & (page-1))%>">上一页</a><%end if%>
<%if page\pgnm=0 then%><a href="<%Response.write(link & (page+1))%>">下一页</a><%else%>
<font color="#CCCCCC">下一页</font><%end if%> 共<font color="#FF0000"><%=rs.recordcount%></font>条信息,每页<font color="#FF0000"><%=pageSize%></font>条,共<font color="#FF0000"><%=pgnm%></font>页,<span lang="zh-cn">当前为第<font color="#FF0000"><%=page%></font>页,</span>跳转到<select name="page" onchange="MM_jumpMenu('this',this,0)" style="border:1px solid #8293E6; font-size: 9pt;width=62px;height=16px; color:#111111; background-color:#DDDDFF">
<option selected value="#">请选择</option>
<%for i=1 to pgnm%>
<option value="<%Response.write(link & i)%>">
第<%=i%>页</option>
<%next%></select></td>
</tr>
</table>
<br>
<table border="1" width="749" id="table3" cellspacing="0" cellpadding="0" style="border-collapse: collapse" height="129">
<tr>
<td bgcolor="#F2F2F2" height="20" colspan="4"> 搜索面板:</td>
</tr>
<tr>
<td height="8" colspan="4"></td>
</tr>
<form action=listUnCheckedStudent.asp?isPost=yes method=post>
<tr>
<td width="78" align="right" bgcolor="#F2F2F2" height="22">学号:</td>
<td width="286" height="22" valign="bottom"> <input type=text name="stuID" size="20" class="inputText"> <input type=checkbox name="stuIDIS" value="yes" id="fp1"><label for="fp1">精确匹配</label></td>
<td width="80" align="right" bgcolor="#F2F2F2" height="22">性别:</td>
<td width="300" height="22" valign="bottom"> <input type=radio name="stuSex" value="男" checked id="fp7"><label for="fp7">男</label>
<input type=radio value="女" name="stuSex" id="fp6"><label for="fp6">女</label></td>
</tr>
<tr>
<td width="78" align="right" bgcolor="#F2F2F2" height="22">姓名:</td>
<td width="286" height="22" valign="bottom"> <input type=text name="stuName" size="20" class="inputText"> <input type=checkbox name="stuNameIS" value="yes" id="fp2"><label for="fp2">精确匹配</label></td>
<td width="80" align="right" bgcolor="#F2F2F2" height="22">电话:</td>
<td width="300" height="22" valign="bottom"> <input type=text name="stuPhone" size="20" class="inputText"> <input type=checkbox name="stuPhoneIS" value="yes" id="fp5"><label for="fp5">精确匹配</label></td>
</tr>
<tr>
<td width="78" align="right" bgcolor="#F2F2F2" height="23">班级:</td>
<td width="286" height="23" valign="bottom"> <input type=text name="stuGrade" size="20" class="inputText"> <input type=checkbox name="stuGradeIS" value="yes" id="fp3"><label for="fp3">精确匹配</label></td>
<td width="80" align="right" bgcolor="#F2F2F2" height="23">住址:</td>
<td width="300" height="23" valign="bottom"> <input type=text name="stuAddress" size="20" class="inputText"> <input type=checkbox name="stuAddressIS" value="yes" id="fp4"><label for="fp4">精确匹配</label></td>
</tr>
<tr>
<td height="24" bgcolor="#F2F2F2">
<p align="right">操作:</td>
<td height="24" colspan="3"> <input type=submit value="确定查询" name="OK" class="anniu">
<input type=reset value="重新填写" name="Cancel" class="anniu"></td>
</tr>
</form>
</table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -