📄 editdepart.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="adovbs.inc" -->
<!--#include file ="connection.asp"-->
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/MainBorder.css" rel="stylesheet" type="text/css">
<title>信息显示</title>
<style type="text/css">
<!--
body {
background-color: #FBC2AD;
}
-->
</style></head>
<%
cs1=request.form("deldepart")
if cs1="" then
%>
<%
user=session("user")
lb=session("lb")
if user="" or lb="" then
response.Redirect("index.asp")
else
%>
<%
set RS = server.CreateObject("ADODB.Recordset")
sqlstr="select * from 系"
RS.open sqlstr , CN,1,3
if RS.eof then
response.write("没有可以显示的系部信息!")
response.end
else
%>
<body>
<table width="200" border="0">
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<form action="editdepart.asp" method="post">
<table width="395" height="133" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
<tr>
<td height="27" colspan="4" ><div class="style2 STYLE3 STYLE1" id="title" >
<div align="center" class="STYLE7"></div>
</div>
<input name="deldepart" type="submit" class="s04" id="deldepart" value="删除信息"></td>
</tr>
<tr class="but">
<td width="38" align="right" class="but01"> </td>
<td width="96" height="35" align="right" class="but01"><div align="center">系部编号</div></td>
<td width="150" align="left " class="but01" ><div align="center">系部名称</div></td>
<td width="111" align="left " class="but01" ><div align="center">操作</div></td>
</tr>
<%
RS.movefirst
RS.pagesize=5
page=CLng(Request("page"))
if page<1 then page=1
RS.absolutepage=page
for i=1 to RS.pagesize
if not RS.eof then
%>
<tr bgcolor="#FFFFF4">
<td align="right" class="but1" ><input name="xicheck" type="checkbox" id="xicheck" value=<%=RS("xino") %>></td>
<td height="31" align="right" class="but1" ><div align="center"><% response.write(RS("xino"))%></div></td>
<td class="but1" >
<div align="center">
<% response.write(RS("xiname"))%>
</div></td>
<td class="but1" > <div align="center">
<input name="Submit22" type="button" class="s04" onClick="JavaScript:window.open('departxg.asp?xino=<%=RS("xino") %>','','width=450,height=250,top=150,left=350')" value="修改信息">
</div></td>
</tr>
<%
end if
if not RS.eof then
RS.movenext
else
exit for
end if
next
'RS.close
%>
<tr >
<th height="27" colspan="4">
<div id="di"> <span class="STYLE5">
<% if page<>1 then %>
当前<%=page%>页<a href=<%=path%>?page=1 >第一页</a>
<a href=<%=path%>?page=<%=(page-1)%>>上一页</a></span>
<span class="STYLE5">
<%end if
if page<>RS.pagecount then %>
当前<%=page%>页</span> <span class="STYLE5"><a href=<%=path%>?page=<%=(page+1)%> >下一页</a>
<a href=<%=path%>?page=<%=RS.pagecount%> >最后一页</a></span>
<%end if %>
</div></th>
</tr>
</table>
<%
end if
end if
else
'删除所有选中的学生信息
xi=request.form("xicheck")
xino=split(xi,",")
sqlstr="delete from 系 where xino in("
for i=LBound(xino) to UBound(xino)-1
sqlstr=sqlstr &"'" & trim(xino(i)) &"',"
next
sqlstr=sqlstr&"'" & trim(xino(UBound(xino))) & "')"
'response.write sqlstr
'response.end
CN.execute sqlstr
response.redirect("editdepart.asp")
end if
%>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -