📄 index.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="../Function.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="ManageMent.css" rel="stylesheet" type="text/css">
<title>报名登记管理</title>
<style type="text/css">
<!--
.a1{BACKGROUND-IMAGE:url('images/titlebg.gif');COLOR:000000;}
.a2{BACKGROUND-COLOR: A4B6D7;}
.a3{BACKGROUND-COLOR: F2F8FF;}
.a4{BACKGROUND-COLOR: ECF5FF;}
.t1 {font:12px 宋体;color:#000000}
.t2 {font:12px 宋体;color:#ffffff}
.t3 {font:12px 宋体;color:#ffff00}
.t4 {font:12px 宋体;color:#800000}
.t5 {font:12px 宋体;color:#191970}
.aaa:hover{
Font-unline:yes;
font-family: "宋体";
color: #FFFFFF;
text-decoration: underline;
background-color: #CCCCCC;
}
-->
</style>
<script language=javascript>
function ConfirmDel()
{
if(confirm("确定要删除此条信息吗?"))
return true;
else
return false;
}
</script>
</head>
<body>
<table cellpadding="2" cellspacing="1" border="0" width="100%" align="center" class="a2">
<tr><td class="a1" height="25" width="100%" align="center" class="font_cl">报名登记管理</td></tr>
<tr class="a4"><td class="font_cl">
<%
if Request.QueryString("type")="del" then
BM_id=trim(request.QueryString("BM_id"))
if BM_id<>"" then
sql="delete from BM_User where BM_id=" & Clng(BM_id)
conn.Execute sql
end if
call CloseConn()
response.redirect "index.asp"
end if
const MaxPerPage = 20
dim currentPage,totalPage,totalPut,pagecount
sql="select * from BM_User order by BM_Date desc"
set NewsListRs = Server.Createobject("adodb.recordset")
NewsListRs.open sql,conn,1,1
if NewsListRs.EOF then
Response.Write("<p align=center>无报名信息!</p>")
else
currentPage = ReplaceStr(Request("page"))
if currentPage <> "" then
if not IsNumeric(currentPage) then
currentPage = 1
else
currentPage = CInt(currentPage)
end if
else
currentPage = 1
end if
if currentPage < 1 then currentPage = 1
totalPut = NewsListRs.RecordCount
totalPage = Int((totalPut/MaxPerPage) * -1) * -1
if currentPage > totalPage then
currentPage = totalPage
end if
if currentPage > 1 then
NewsListRs.Move (currentPage - 1) * MaxPerPage
end if
Response.Write("<table width='100%' align='center' style='word-break:break-all' cellspacing='2' cellpadding='5' class='a2'>")
Response.Write("<tr align='center' bgcolor='#C0C0C0' class='title'><td width='5%'>序号</td><td width='10%'>姓名</td><td width='10%'>性别</td><td width='20%'>身份证号码</td><td width='30%'>家庭住址</td><td width='10%'>报名时间</td><td width='15%'>操作</td></tr>")
pagecount=0
do while not NewsListRs.eof and pagecount<MaxPerPage
InfoStr="<tr align='center' class='tdbg' bgcolor='#E3E3E3'><td>"&pagecount+1&"</td><td align='left' style='padding-left:10px;'><a href=BM_info.asp?BM_id="&NewsListRs("BM_id")&" target=_blank>"&GetTopic(NewsListRs("BM_Name"),30)&"</a></td><td>"&NewsListRs("BM_Sex")&"</td><td>"&NewsListRs("BM_IDCard")&"</td><td>"&NewsListRs("BM_Address")&"</td><td>"&NewsListRs("BM_Date")&"</td>"
if NewsListRs("BM_id")=3 then
InfoStr=InfoStr&"<td><a href='#' title='测试数据,不允许删除!'>删除(测试数据,已禁止删除!)</a></td></tr>"
else
InfoStr=InfoStr&"<td><a href='index.asp?BM_id="&NewsListRs("BM_id")&"&type=del' onClick='return ConfirmDel();'>删除</a></td></tr>"
end if
Response.Write(InfoStr)
NewsListRs.movenext
pagecount=pagecount+1
loop
Response.Write("</table><br>")
end if
if totalPut > MaxPerPage then
showpage2 currentPage, totalPage, MaxPerPage, totalPut, null
end if
%>
</td></tr>
</table>
<%
sub DelArticle(BM_id)
conn.execute("delete from BM_User where BM_id="&BM_id&"")
end sub
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -