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

📄 manage.asp

📁 一个不完整的硬件报价管理系统
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="chkmanage.asp"-->
<!--#include file="inc/const1.asp"-->
<!--#include file="inc/const2.asp"-->
<!--#include file="inc/char.asp"-->
<html>
<head> 
<title>留言删除修改</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="css.asp"-->
<base target="_self">
</head>
<body topmargin="1" bgcolor="<%=bodybgcolor%>">
<%
const MaxPerPage=10
dim totalPut
dim CurrentPage
dim TotalPages
dim a,j

if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%><body bgcolor="<%=bodybgcolor%>">
<!--#include file="menu.asp"-->
<%
sql="select * from guest order by id desc"
set rs=server.createobject("adodb.recordset")
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,"manage.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"manage.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"manage.asp"
end if
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing

sub showContent
do while not rs.eof
%>
<hr noshade width="650" size="1" color="#C0C0C0">
<div align="center">
  <center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="<%=bordercolor%>" width="650" height="76">
  <tr>
    <td width="527" height="13" bgcolor="<%=infobg%>" >
    <p align="left">&nbsp;<b>留言人:</b><%=rs("guestname")%>&nbsp;&nbsp; <b>留言时间:</b><%=rs("guestdate")%>&nbsp; 
    <b>留言人IP:</b><%=rs("ip")%></td>
    <td width="117" height="13" bgcolor="#EEF2F7">
          <p align="center"><font color="#FF0000">
          <a href="admin_editly.asp?time=<%=rs("guestdate")%>">
          <font color="#FF0000">编辑</font></a></font>|<a href="dele.asp?action=admin&time=<%=rs("guestdate")%>"><font color="#FF0000">删除</font></a>|<a href="reply.asp?time=<%=rs("guestdate")%>"><font color="#FF0000">回复</font></a></td>
  </tr>
  <tr>
    <td width="644" height="53" colspan="2" valign="top"  style="word-break: break-word; font-size: 10pt"  bgcolor="<%=tablebgcolor%>" ><br>
    <br>
  <pre style="padding-left:4px;MARGIN-TOP:2px;MARGIN-BOTTOM:2px;MARGIN-LEFT:2px;MARGIN-RIGHT:2px;word-wrap: break-word">  <%
if len(rs("guestcontent"))>520 then
	response.write ubbcode(left(rs("guestcontent"),520))
else
	response.write ubbcode(rs("guestcontent"))
end if
%>
</pre>
<br>可能来自:<%=rs("comefrom")%>
<p> </td>
  </tr><%if rs("guestreply")<>"" then %>
  <tr>
    <td width="528" height="6" bgcolor="<%=infobg%>"  valign="top"><b>&nbsp;回&nbsp; 复:</b></td>
    <td width="116" height="6" bgcolor="#EEF2F7" valign="top"  style="word-break: break-word; font-size: 10pt">
    <p align="center"><font color="#FF0000">
    <a href="reply.asp?time=<%=rs("guestdate")%>&replycontent=<%=rs("guestreply")%>">
    <font color="#FF0000">编辑回复</font></a></font></td>
  </tr>
  <tr>
    <td width="644" height="42" colspan="2" bgcolor="#EEF2F7" valign="top">  <pre style="padding-left:4px;MARGIN-TOP:2px;MARGIN-BOTTOM:2px;MARGIN-LEFT:2px;MARGIN-RIGHT:2px;word-wrap: break-word">  <%=ubbcode(rs("guestreply"))%></pre> </td>
  </tr><%end if%>
</table>

  </center>
</div>

  </center>
</div>
<div align="center"> 
  <%
a=a+1
if a>=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 "<form method=post action="&filename&">"
response.write "<p> "
if CurrentPage<2 then
response.write "<font color='#000080'>首页 上一页</font> "
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 "<font color='#000080'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&">下一页</a> "
response.write "<a href="&filename&"?page="&n&">尾页</a>"
end if
response.write "<font color='#000080'> 共<b>"&totalnumber&"</b>条留言 <b>"&maxperpage&"</b> 条留言/页</font> "
response.write "<font color='#000080'>转到:</font><input class=smallInput type='text' name='page' size=4 maxlength=10 value="&Currentpage&">"
response.write "<input class=buttonface type='submit' value='Go' name='cndok'></p></form>"
end function
%>
</div>
<hr noshade width="650" size="1" color="#C0C0C0">
<!--#include file="menu.asp"-->
</div>
</body>
</html>

⌨️ 快捷键说明

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