📄 edit.asp
字号:
<!--#include file="conn.asp"-->
<%
if session("admin")<>"ok" then
response.write "对不起,你没有管理权限。<a href='login.asp'>请登录</a>后再操作"
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>念青迷你下载系统</title>
<link href="css.css" rel="stylesheet" type="text/css">
</head>
<%Const MaxPerPage=10%>
<%
dim rs,sql
dim totalPut
dim CurrentPage, TotalPages
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
set rs = server.createobject("adodb.recordset")
%>
<body background="images/bg.jpg">
<table width="90%" border="0" align="center">
<tr>
<td valign="top"><table border="0" cellpadding="0" cellspacing="0" width="100%" align="left">
<tr>
<td width="100%" valign="top" align="left"><table width="100%" border="1" bordercolor="#FFFFCC">
<tr>
<td align="center" class="toptitlenew">
<span class="subjecttitle">念青迷你下载系统</span><br>
<br>
<table width="80%" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="EBF1F6">
<tr>
<td bordercolordark="#ffffff" bordercolorlight="#000000"><table width="100%" border="1" cellpadding="0" cellspacing="0" bgcolor="EBF1F6">
<tr>
<td bordercolordark="#ffffff" bordercolorlight="#000000"><table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td width="5%" height="16"><div align="center"><img src="../arrow2.gif" width="8" height="20"></div></td>
<td class="font1"><div align="center"><a href="index.asp" class="font1">首页</a> <a href="add.asp" class="font1">添加软件</a> <a href="edit.asp" class="font1">修改删除</a>
<a href="userpass.asp" class="font1">修改用户密码</a> <a href="logout.asp" class="font1">退出</a> <a href="help.htm" class="font1">帮助</a></div></td>
<td width="11%"><a href="index.asp" class="toptitlenew"><<<</a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<div align="center">
<p> </p><table border="1" cellpadding="0" cellspacing="0" width="90%">
<tr>
<td width="100%">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="590" height="17">
<tr class=toptitlenew>
<td width="52" height="17">
<p align="center">序号</td>
<td width="481" height="17">
<p align="center">软件列表</td>
<td width="56" height="17">
<p align="center">选择删除</td>
</tr>
</table>
</div>
</td></tr>
<tr>
<td width="100%">
<%
sql="select * from download order by date desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>你还没有输入软件信息</p>"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"edit.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
showContent
showpage totalput,MaxPerPage,"edit.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"edit.asp"
end if
end if
rs.close
end if
sub showContent
dim i
i=0
do while not rs.eof
%>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="590">
<tr>
<td width="52">
<p align="center"><%=i+1%></td>
<td width="481">
<a href=editsoft.asp?id=<%=rs("id")%> class=toptitlenew><%=rs("soft")%></a></td>
<td width="56">
<p align="center"><a href=del.asp?id=<%=rs("id")%> class=toptitlenew>删除</a></td>
</tr>
<tr>
<td width="588" colspan="3">
<hr size=1 color=#b8ffff style="filter:progid:DXImageTransform.Microsoft.Shadow(color:#d6ae56,direction:125,strength:8)"> </td>
</tr>
</table>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
end sub
%>
<%
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<p align='center'><span class=toptitlenew>"
response.write "共<b>"&totalnumber&"</b>个软件 "
if CurrentPage<2 then
response.write ""
else
response.write "<a href="&filename&"?page=1>首页</a> | "
response.write "<a href="&filename&"?page="&CurrentPage-1&">上一页</a> | "
end if
if n-currentpage<1 then
response.write ""
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&">"
response.write "下一页</a> | <a href="&filename&"?page="&n&">尾页</a>"
end if
response.write "<font color='#000080'> 页次:</font><strong><font color=red>"&CurrentPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
response.write "<font color='#000080'> <b>"&maxperpage&"</b>个软件/页</font></span>"
%>
<%
end function
set rs=nothing
conn.close
set conn=nothing
%>
</div>
</td>
</tr>
</table>
</div>
<p align="center"><div align=center><table border=0 cellpadding=0 cellspacing=0>
<iframe name="nq" src="bq.asp" width="350" height="68" frameborder="0"></iframe>
</table></div></td>
</tr>
</table> </td>
<td width="60" valign="top" align="left"><a href="http://input.foruto.com/nianqing" border=0><img src="images/logo.gif" width="58" height="243" border="0" target=blank></a></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -