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

📄 stud.asp

📁 公共选修课报名及成绩查询管理系统。ASP.NET+ACCESS的组合
💻 ASP
字号:
<!--#include file="config.asp"-->
<!--#include file="Session.asp"-->
<%
'初始化Session变量,方便操作
If Request("pl")<>"" Then Session("Pl_Name")=Request("pl")
If Request("menu")="del" Then
	dim F:F=0
	for each X_H in (Request("X_S_XH"))
		Conn.Execute("delete * From [T_Stu] Where xhao='"&X_H&"' ")
		Conn.Execute("delete * From [T_GBooK] Where G_Xhao='"&X_H&"' ")
		Conn.Execute("delete * From [T_Class] Where C_Xhao='"&X_H&"' ")
		F=F+1
	next
	Response.write"<script language='javascript'>alert(""删除成功!\n\n返回刷新即可!"");location.href=""StuD.asp"";</script>"
End If
%>
<%
   dim MaxPerPage
   dim sql 
   dim rs
   dim gstBookID
   dim totalPut   
   dim CurrentPage
   dim TotalPages
   dim i,j
   se=request("se")
   if not isEmpty(request("pl")) then
	pl=request("pl")
   else
	pl="xhao"
   end if
   if not isempty(request("page")) then
      currentPage=cint(request("page"))
   else
      currentPage=1
   end if
%>
<html><head>
<title><%response.write  webname%>-----栏目:学生资料中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="images/vpei.css">
</head>
<body topmargin=10 leftmargin=5>
<% Call top() %>
<br>
<table width="100%" align="center" cellspacing="1" cellpadding="1" border="0" bgcolor="#000000">
<tr>
<td bgcolor="#FFFFFF" background="images/cent.gif" height="25">
<form name="searchtitle" method="POST" action="Stud.asp">
 <font color="#000000">关键词语:<input type="text" name="se" size="40" style="font-family: 宋体; font-size: 9pt; color: #0000FF; border: 1 solid #000000">
 搜索范围:
<select name="pl" size="1">   
<option value="xhao"<%If Session("Pl_Name")="xhao" Then Response.Write " Selected"%>>学----号</option> 
<option value="name"<%If Session("Pl_Name")="name" Then Response.Write " Selected"%>>姓----名</option> 
<option value="S_Rschool"<%If Session("Pl_Name")="S_Rschool" Then Response.Write " Selected"%>>入学时间</option>
<option value="S_Email"<%If Session("Pl_Name")="S_Email" Then Response.Write " Selected"%>>电子邮件</option>    
</select>                     
<input type="submit" value=" 搜索 " name="title" style="font-family: 宋体; font-size: 9pt; background-color: #FFFFFF; border-style: solid; border-width: 1">
</td></tr></form></table>
<br>
<%
set rs=server.createobject("adodb.recordset")
If Request("pl")="xy" Then
	If Request("X_S_XClass")<>"" or Request("se")<>"" or Request("X_Year")<>"" Then
		If Request("pl")="xy" and Request("se")<>"" Then
			TEMPS=" xy="&int(Request("se"))&""
		Else
			TEMPS=" id<>0"
		End IF

		If Request("X_Year")<>"" Then TEMPS=TEMPS&" and S_Rschool="&int(Request("X_Year"))&""
		If Request("X_S_XClass")<>"" Then TEMPS=TEMPS&" and S_XClass="&int(Request("X_S_XClass"))&""

		Sql="Select * from T_Stu where "&TEMPS&" order by xhao"
	Else
		sql="select * from T_Stu order by xhao"
	End If
Else
	sql="select * from T_Stu where "&pl&" like '%"&se&"%' order by xhao"  
End If  
rs.open sql,conn,1,3  
if rs.eof and rs.bof then %>  
<p align="center">没有或没找到任何记录!</p>
<%
else
   rs.pagesize=60  '每页显示条数
   totalPut=rs.recordcount '记录总数
   totalPage=rs.pagecount
   MaxPerPage=rs.pagesize
      if currentpage<1 then
          currentpage=1
      end if
      if currentpage>totalPage then
          currentpage=totalPage
      end if
   if currentPage=1 then
         showpages
         showContent
         showpages
    else
         if (currentPage-1)*MaxPerPage<totalPut then
         rs.move  (currentPage-1)*MaxPerPage
         dim bookmark
         bookmark=rs.bookmark '移动到开始显示的记录位置
         showpages
         showContent
         showpages
		end if
   end if

end if
  

sub showContent
    dim i
    dim k
    k=(totalPut-MaxPerPage*(currentPage-1))+1
    i=0
%>
<table width="100%" cellspacing="1" cellpadding="3" bgcolor="#000000" align="center">
<tr bgcolor=#FFFFFF><td width=95% background=images/cent.gif height=25>&nbsp;&nbsp;所有专业</td></tr>
<tr bgcolor=#FFFFFF><td width=95%>
<%
Set Rs_Yz=Conn.Execute("select * from T_Yz where Yz_FollowId=0 order by Yz_SortNum")
do until Rs_Yz.eof
	Response.Write "<font color=red>"&Rs_Yz("Yz_Name")&"</font><BR>&nbsp;&nbsp;"
	Set Rs_YzF=Conn.Execute("Select * from T_Yz where Yz_FollowId="&Rs_Yz("Yz_Id")&" order by Yz_SortNum")
	do until Rs_YzF.eof
		Response.Write "<a href=Stud.asp?pl=xy&se="&Rs_YzF("Yz_Id")&"&X_Year="&Request("X_Year")&"&X_S_XClass="&Request("X_S_XClass")&">"&Rs_YzF("Yz_Name")&"</a>&nbsp;"
	Rs_YzF.movenext
	loop
	Rs_YzF.close
	set Rs_YzF=nothing
	Response.Write "<BR>"
Rs_Yz.movenext
loop
Rs_Yz.close
Set Rs_Yz=nothing
%>
<%
'Set Rs_YzF=Conn.Execute("Select * from T_Yz where Yz_FollowId<>0 order by Yz_Id")
'do until Rs_YzF.eof
'	Response.Write "&nbsp;&nbsp;<a href=Stud.asp?pl=xy&se="&Rs_YzF("Yz_Id")&">"&Rs_YzF("Yz_Name")&"</a>"
'Rs_YzF.movenext
'loop
'Rs_YzF.close
'set Rs_YzF=nothing
%>
</td></tr>
<tr bgcolor=#FFFFFF><td width=95%>&nbsp;&nbsp;入学年份:<%
	dim i_0:i_0=0
	do until i_0=XX_A_ZGXZ
		Response.Write "<a href=Stud.asp?pl=xy"
		If Request("pl")="xy" Then Response.Write "&se="&Request("se")
		Response.Write "&X_Year="&DatePart("yyyy",now())-i_0&"&X_S_XClass="&Request("X_S_XClass")&"><font color=green>"&DatePart("yyyy",now())-i_0&"</font></a>&nbsp;&nbsp;"
		i_0=i_0+1
	loop
%></td></tr></table><br>

<table width="100%" cellspacing="1" cellpadding="3" bgcolor="#000000" align="center">
<form method="POST" action="StuD.asp?menu=del">
<tr bgcolor=#FFFFFF>
<td width=4% background=images/cent.gif height=25><center>删除</font></td>
<td width=17% background=images/cent.gif><center><font color="#000000">所在系院</font></td>
<td width=8% background=images/cent.gif><center><font color="#000000">学&nbsp;&nbsp;&nbsp;&nbsp;号</font></td>
<td width=6% background=images/cent.gif><center><font color="#000000">姓&nbsp;&nbsp;名</font></td>
<td width=3% background=images/cent.gif><center><font color="#000000">小班</font></td>
<td width=50% background=images/cent.gif>其他信息资料</td>
<td width=8% background=images/cent.gif align=center>资料编辑</td>
<td width=4% background=images/cent.gif align=center>状态</td>
</tr>
<%do while not (rs.eof or err)
k=k-1
%>
<TR bgcolor=#FFFFFF>
<td align=center><font color=red><input type=checkbox value="<%=Rs("xhao")%>" name="X_S_XH" style="font-family: 宋体; font-size: 9pt; background-color: #FFFFFF; border-style: solid; border-width: 0"></font></td>
<td align=center><a href=Stud.asp?pl=xy&se=<%=Rs("xy")%>><%=left(Rs("xhao"),2)%><%=Conn.Execute("Select * From T_Yz Where Yz_Id="&int(Rs("xy"))&" ")("Yz_Name")%></a></td>
<td align=center><%=Rs("xhao")%></td>
<td align=center><%=Rs("Name")%></td>
<td align=center><a href=Stud.asp?pl=xy&se=<%=Rs("xy")%>&X_Year=<%=Rs("S_RSchool")%>&X_S_XClass=<%=Rs("S_XClass")%>><%=Rs("S_XClass")%></a></td>
<td>&nbsp;入学时间:<%=Rs("S_Rschool")%><%If Rs("S_Tel")<>"" Then Response.Write "&nbsp;电话:"&Rs("S_Tel")%><%If Rs("S_Tel")<>"" Then Response.Write "&nbsp;邮件:"&Rs("S_Email")%></td>
<td align=center><a href="StuD_E.asp?X_Id=<%=Rs("id")%>" title=资料修改><font color=red>资料修改</font></a></td>
<td align=center><%If Rs("S_Lock")=True Then Response.Write "<font color=red>锁定</font>":Else Response.Write "正常":End If %></td>
</tr>
<%
	i=i+1
	if i>=MaxPerPage then exit do '循环时如果到尾部则先退出,如果记录达到页最大显示数,也退出
	rs.movenext
	loop
%>
<tr bgcolor=#FFFFFF><td colspan=8 align=center background=images/cent.gif height=25><input type="submit" value="确定删除"></td></tr></Form>
<%
end sub 
sub showpages()
dim n
n=totalPage
%>
</table>
<%  
end sub  
%>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td height=20></td></tr>
<tr><td width="100%" height="30" align=right>
<%   
   If currentPage <> 1 Then  
      Response.Write "<A HREF="&filename&"?pl="&pl&"&se="&se&">[第一页]</A> "  
      Response.Write "<A HREF="&filename&"?pl="&pl&"&se="&se&"&Page=" & (currentPage-1) & ">[上一页]</A> "  
End If  
   If currentPage <> rs.PageCount Then  
      Response.Write "<A HREF="&filename&"?pl="&pl&"&se="&se&"&Page=" & (currentPage+1) & ">[下一页]</A> "  
      Response.Write "<A HREF="&filename&"?pl="&pl&"&se="&se&"&Page=" & totalPage & ">[最后一页]</A> "  
End If  
%><%if se<>"" then%>查找<b><font color="#FF0000"><%=se%></font></b><%end if%> 共找到<font color="#FF0000"><%=totalPut%></font>条记录,第<%=currentPage%>页,共<%=totalPage%>页     
</td></tr></table>
<% Call bottom() %>
</body></html>

⌨️ 快捷键说明

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