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

📄 hover_book.asp

📁 后台默认管理账号密码:admin 后台主要功能如下:一、系统管理:管理员管理
💻 ASP
字号:
<!--#include file="toptable.asp"-->
<!--#include file="Inc/articleCHAR.INC"-->
<%
'=================================
'   良精科技企业管理系统
'   QQ在线客服:65961930 82993936
'   咨询定购Tel:010-81991660
'      asp3721@hotmail.com 
'        www.liangjing.net
'  copyright(c)2001-2008 HoverCms 2007特别版
'=================================
%>
<%
if Request.QueryString("no")="eshop" then
If request.form("title")="" Then
Response.Write("<script language=""JavaScript"">alert(""错误:您没输入标题,请返回检查!!"");history.go(-1);</script>")
response.end
end if


If request.form("content")="" Then
Response.Write("<script language=""JavaScript"">alert(""错误:您没输入留言内容,请返回检查!!"");history.go(-1);</script>")
response.end
end if

Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from Hover_book  "
rs.open sql,conn,1,3


rs.addnew
if request.form("html")="on" then
rs("content")=request.form("content")
else
rs("content")=htmlencode2(request.form("content"))
end if
rs("name")=request.form("name")
rs("title")=request.form("title")
rs("time")=date()
rs.update
rs.close
response.redirect "Hover_Book.asp"
end if

%>
<!-- #include file="Inc/Head.asp" -->
<BR>
 <table width="97%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableBorder">
                <% 
const MaxPerPage=5 '分页显示的纪录个数 
dim sql 
dim rs 
dim totalPut 
dim CurrentPage 
dim TotalPages 
dim i,j 
 
 
if not isempty(request("page")) then 
currentPage=cint(request("page")) 
else 
currentPage=1 
end if 
set rs=server.createobject("adodb.recordset") 
sql="select * from Hover_book  order by id desc" 
rs.open sql,conn,1,1 
 
if rs.eof and rs.bof then 
response.write "<p align='center'>还没有任何留言!</p>" 
else 
totalPut=rs.recordcount 
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 
showpages 
showContent 
showpages 
else 
if (currentPage-1)*MaxPerPage<totalPut then 
rs.move (currentPage-1)*MaxPerPage 
dim bookmark 
bookmark=rs.bookmark 
showpages 
showContent 
showpages 
else 
currentPage=1 
showContent 
end if 
end if 
rs.close 
end if 
set rs=nothing 
conn.close 
set conn=nothing 
sub showContent 
dim i 
i=0 
do while not (rs.eof or err) %>
     	<tr>
		<td class="title" colspan="2" height="25" align="center"><strong>留言管理</strong></td>
	</tr>     	<tr>
		<td class="title2" colspan="2" height="25">选择您需要更改的留言信息。 </td>
	</tr><tr bgcolor="#C0C0C0"> 
                  <td width="42%" height="25" align="right" bgcolor="#C0C0C0" class="table">  
                      <%if rs("name")="管理员"then%>
                      『网站公告』 
                      <%else%>
                      用户名 
      <%end if%>      </td>
                  <td width="58%" bgcolor="#C0C0C0" class="table">&nbsp;&nbsp;<%=rs("name")%> 
                    &nbsp; <a href="Hover_Book_Del.asp?id=<%=rs("ID")%>">删除</a>&nbsp;&nbsp;&nbsp;&nbsp; 
                    <a href="Hover_Book_Re.asp?id=<%=rs("id")%>"> 
                    <%if rs("name")<>"管理员" then%>
                    <%if rs("name")<>"未注册用户" then 
response.write "回复" 
end if 
%>
                    </a> 
                    <%if rs("name")="未注册用户" then 
response.write "没有注册为会员通过E-amil回复!" 
end if%>
                    <%end if%>
      </td>
                </tr>
                <%if rs("email")<>"" then%>
                <tr bgcolor="#E3E3E3"> 
                  <td height="10" align="right" class="table"> 公司名称</td>
                  <td bgcolor="#E3E3E3" class="table">&nbsp;&nbsp;<%=rs("Comane")%></td>
                </tr>
                <tr bgcolor="#E3E3E3"> 
                  <td height="10" align="right" class="table">联系人</td>
                  <td bgcolor="#E3E3E3" class="table">&nbsp;&nbsp;<%=rs("Somane")%></td>
                </tr>
                <tr bgcolor="#E3E3E3"> 
                  <td height="22" align="right" class="table">联系电话</td>
                  <td bgcolor="#E3E3E3" class="table">&nbsp;&nbsp;<%=rs("Phone")%></td>
                </tr>
                <tr bgcolor="#E3E3E3"> 
                  <td height="22" align="right" class="table">联系传真</td>
                  <td bgcolor="#E3E3E3" class="table">&nbsp;&nbsp;<%=rs("Fox")%></td>
                </tr>
                <tr bgcolor="#E3E3E3"> 
                  <td height="22" align="right" class="table">E-mail</td>
                  <td bgcolor="#E3E3E3" class="table"><a href="Hover_Mail_Send.asp?email=<%=rs("email")%>"><%=rs("email")%></a></td>
                </tr>
                <%end if%>
                <tr bgcolor="#C0C0C0"> 
                  <td height="25" align="right" bgcolor="#C0C0C0" class="table">主 题</td>
                  <td height="25" class="table">&nbsp;&nbsp;<%=rs("title")%>&nbsp;&nbsp;[<%=rs("time")%>]</td>
                </tr>
                <tr bgcolor="#E3E3E3"> 
                  <td height="25" align="right" class="table"> 内 容</td>
                  <td height="25" class="table">&nbsp;&nbsp;<%=rs("content")%></td>
                </tr>
                <%if rs("rebook")<>""then%>
                <tr bgcolor="#E3E3E3"> 
                  <td height="25" align="right" class="table"> 回复内容</td>
                  <td height="25" class="table">&nbsp;&nbsp;<%=rs("rebook")%></td>
                </tr>
                <%end if%>
 <tr>
    <td colspan="2" align="center" class="table"> <% i=i+1 
if i>=MaxPerPage then exit do 
rs.movenext 
loop 
end sub 
sub showpages() 
dim n 
if (totalPut mod MaxPerPage)=0 then 
n= totalPut \ MaxPerPage 
else 
n= totalPut \ MaxPerPage + 1 
end if 
if n=1 then 
response.write " 请点击上面回复留言 " 
 
exit sub 
end if 
dim k 
response.write "<p align='left'>&gt;&gt; 留言分页 " 
for k=1 to n 
if k=currentPage then 
response.write "[<b>"+Cstr(k)+"</b>] " 
else 
response.write "[<b>"+"<a href='Hover_Book.asp?page="+cstr(k)+"'>"+Cstr(k)+"</a></b>] " 
end if 
next 
end sub 
%></td>
   </tr>
</table>
<BR>
<%htmlend%>

⌨️ 快捷键说明

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