qwbm_book.asp

来自「管理员可以后台设置是否需要审核」· ASP 代码 · 共 373 行

ASP
373
字号
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%><!--#include file="qwbm_conn.asp"--><!--#include file="qwbm_cheack.asp"--><%
if request("action")="shen" then
	ssql="select * from qwbmbook where id="&request("id")
	set srs=server.CreateObject("adodb.recordset")
	srs.open ssql,conn,1,3
		if request("shenhe")=1 then
		   srs("shenhe")=0
		else
		   srs("shenhe")=1
		end if
	srs.update
	srs.close
	set srs=nothing
	response.redirect ("qwbm_book.asp")
	response.end()
end if

objasp = trim(request("asp"))

if objasp="allysh" then
	ddx=Request("adid")
	if (ddx = "") then
		call errbox("请选择审核的条目","qwbm_book.asp","","","")
	else
			dddSQL="Update [book] set shenhe=1 where id in ("&ddx&")"
			conn.Execute (dddSQL)
			response.redirect "qwbm_book.asp?page="&request("page")&""
			response.end
	end if
end if

if objasp="allnsh" then
	ddx=Request("adid")
	if (ddx = "") then
		call errbox("请选择不审核的条目","qwbm_book.asp","","","")
	else
			dddSQL="Update [book] set shenhe=0 where id in ("&ddx&")"
			conn.Execute (dddSQL)
			response.redirect "qwbm_book.asp?page="&request("page")&""
			response.end
	end if
end if

if objasp="alldel" then	
	dde=Request("adid")
	if (dde = "") then
		call errbox("请选择要删除的条目","qwbm_book.asp","","","")
	else
		dddSQL="Delete * from [book] where id in ("&dde&")"
		conn.Execute (dddSQL)
		response.redirect "qwbm_book.asp?page="&request("page")&""
		response.end
	end if
end if

if request("action")="bookhui" then
	
	dim name,liuyan,hui,huitime,shenhe
	
	name=trim(request("name"))
	liuyan=replacehtml(trim(request("liuyan")))
	hui=replacehtml(trim(request("hui")))
	huitime=trim(request("huitime"))
	shenhe=trim(request("shenhe"))
	if shenhe="" then
	shenhe=0
	end if
	
		phsql="select * from qwbmbook where id="&request("id")
		set phrs=server.createobject("adodb.recordset")
		phrs.open phsql,conn,1,3
			phrs("name")=name
			phrs("liuyan")=liuyan
			phrs("hui")=hui	
			phrs("huitime")=huitime
			phrs("shenhe")=shenhe
		phrs.update		
		phrs.close
		set phrs=nothing
		response.write "<script>alert(""回复留言成功"");window.location='qwbm_book.asp';</script>"	
		response.end()

end if

if request("action")="del" then
	dsql="delete * from qwbmbook where id="&request("id")
	set drs=server.createobject("adodb.recordset")
	drs.open dsql,conn,1,3
	
	drs.update
	response.redirect("qwbm_book.asp")
end if
%><!--
'☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
'★                                                                  ★
'☆                深山行者文章管理系统V1.0版本                      ☆
'★                                                                  ★
'☆  版权所有: http://www.qwbm.com                                   ☆
'★                                                                  ★
'☆  程序制作: 深山行者                                              ☆
'★            http://www.qwbm.com                                   ★
'☆            QQ:565449214                                          ☆
'★                                                                  ★
'☆                                                                  ☆
'★  主页地址: http://www.qwbm.com    深山行者个人网站               ★
'★                                                                  ★
'☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>深山后台留言管理页面</title>
<link rel="stylesheet" type="text/css" href="skin/01/images/css.css">
<script language="javascript" type="text/javascript" src="js/js.js"></script>
</head>

<body>
<%if request("action")="hui" then%>
<%
hsql="select * from qwbmbook where id="&request("id")
set hrs=server.CreateObject("adodb.recordset")
hrs.open hsql,conn,1,1
if hrs.eof and hrs.bof then
response.Write ""
else
%>
<div class="divm"><strong><a href="qwbm_book.asp"><span class="tdf4">取消添加回复,返回管理页面</span></a></strong><div class="divml"></div><div class="divmr">留言回复页面</div></div>

<form name="form2" method="post" action="?action=bookhui&id=<%=request("id")%>">
<table cellpadding="0" cellspacing="1" class="table1">
  <tr>
    <td class="td1">网友大名:</td>
    <td class="td2"><input name="name" type="text" class="input" size="40" id="name" value="<%=hrs("name")%>"></td>
  </tr>
  <tr>
    <td class="td1">网友seid:</td>
    <td class="td2"><input name="sessid" type="text" class="input" size="40" id="sessid" value="<%=hrs("sessid")%>"></td>
  </tr>
  <tr>
    <td class="td1">网友 IP:</td>
    <td class="td2"><input name="ip" type="text" class="input" size="40" id="ip" value="<%=hrs("ip")%>"></td>
  </tr>
  <tr>
    <td class="td1">评论时间:</td>
    <td class="td2"><input name="liuyantime" type="text" class="input" size="40" id="liuyantime" value="<%=hrs("liuyantime")%>"></td>
  </tr>
  <tr>
    <td class="td1">评论内容:</td>
    <td class="td2"><textarea name="liuyan" cols="60" rows="6" class="textarea" id="input_text"><%=relasehtml(hrs("liuyan"))%></textarea></td>
  </tr>
  <tr>
    <td class="td1">回复时间:</td>
    <td class="td2"><input name="huitime" type="text" class="input" size="40" id="hui" value="<%=now()%>"></td>
  </tr>
  <tr>
    <td class="td1">回复内容:</td>
    <td class="td2"><textarea name="hui" cols="60" rows="6" class="textarea" id="input_text"><%=relasehtml(hrs("hui"))%></textarea></td>
  </tr>
  <tr>
    <td class="td1">是否审核:</td>
    <td class="td2"><input name="shenhe" type="checkbox" class="Input" id="shenhe" value="1" <%if hrs("shenhe")<>"" then%>checked<%end if%>></td>
  </tr>
  <tr>
    <td class="td1">&nbsp;</td>
    <td class="td2"><input name="Submit" type="submit" class="submit1" value="提交"> <input name="Submit2" type="reset" class="submit1" value="重置"></td>
  </tr>
</table>
</form>
<%end if
hrs.close
set hrs=nothing%>
<%
response.End()
end if%>

<%
sql="select * from qwbmbook order by id desc"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
%>
<div class="divbox1">
	暂时无任何单文章 &gt;&gt; <a href="javascript:history.back(1)"><span class="tdf1">返回上一页</span></a>
</div>
<%else
  Dim page,recordsperpage
  recordsperpage=15
  page=Trim(Request.QueryString("page"))
  rs.Pagesize=recordsperpage
  If Not IsEmpty(page) Then
    If Not IsNumeric(page) Then
	  page=1
	Else 
	page=Clng(page)
	End If
	If page>=rs.Pagecount Then
	  page=rs.Pagecount
	Elseif page<=0 Then
	  page=1
	Else 
	  rs.AbsolutePage=page
	End If
  Else 
  page=1
  End If
 rs.AbsolutePage=page
%>
<div class="divm"><strong>共 <font style="color:red;font-size:16px;"><b><%=rs.Recordcount%></b></font> 条留言</strong>
  <div class="divml"></div><div class="divmr">留言管理页面</div>
</div>
<form name="form" method="Post" action="?action=deldel" onSubmit="return ConfirmDel();">  
<table cellpadding="0" class="table2">
	<tr>
		<td class="toptd1" width="36">选择</td>
		<td class="toptd1" width="42">ID</td>
		<td class="toptd1" width="37">性别</td>
		<td width="214" class="toptd1">留言作者</td>
		<td width="214" class="toptd1">留言时间</td>
		<td width="53" class="toptd1">预览</td>
		<td width="101" class="toptd1">管理</td>
	</tr>
	<%Do While rs.Eof=False and recordsperpage>0%>
	<tr class="tr1" onMouseOver="this.className='tr2';" onMouseOut="this.className='tr1';">
	  <td class="td7" width="36"><input onClick="Checked(form)" type="checkbox" name="adid"  value='<%=cstr(rs("ID"))%>' /></td>
	  <td class="td8" width="42"><%=rs("id")%></td>
	  <td class="td7" width="37"><%if rs("xinb")="w" then
			  response.write "男"
			  elseif rs("xinb")="m" then
			  response.write "女"
			  end if%></td>
		<td class="td8"><%=rs("name")%></td>
		<td class="td8"><%=rs("liuyantime")%></td>
		<td class="td7"><a href="javascript:newsShowHide('news<%=rs("id")%>');">预览</A></td>
		<td class="td7">
		<a href="?action=shen&shenhe=<%=rs("shenhe")%>&id=<%=rs("id")%>">
		<%if rs("shenhe")=1 then
			response.write "<span class='sh2'>审核</span>"
			else
			response.write "<span class='sh1'>未审</span>"
			end if%></a>
		<a href="?action=hui&id=<%=rs("id")%>">
		<%if rs("hui")<>"" then
			response.write "<span class='zd2'>回复</span>"
		else
			response.write "<span class='zd1'>未回</span>"
		end if%></a>
		<a href="?action=del&id=<%=rs("id")%>" onclick='return confirm("真的要删除吗?删除之后将无法恢复\n\n当前作者:<%=rs("name")%>");'>删除</a></td>
	</tr>
	<tr id="news<%=rs("id")%>" style="display:none;">
	  <td colspan="7" class="td11">
		<table class="table3" cellpadding="0">
			<tr>
				<td width="12%" class="td9">姓名:</td>
				<td width="74%" class="td10"><%=rs("name")%></td>
			    <td width="14%" class="td10"><a onClick="newsShowHide('news<%=rs("id")%>')" href="#">关闭</a></td>
			</tr>
			<tr>
				<td class="td9">来自:</td>
				<td class="td10"><%=rs("laizi")%></td>
			    <td rowspan="5" align="center" valign="middle" class="td10"><img src="../images/tu/<%=rs("toux")%>" alt="<%=rs("name")%>" width="90" height="90" /></td>
			</tr>
			<tr>
				<td class="td9">Email:</td>
				<td class="td10"><a target="_blank" href="mailto:<%=rs("email")%>"><%=rs("email")%></a></td>
		    </tr>
			<tr>
				<td class="td9">QQ:</td>
				<td class="td10"><a href="tencent://message/?uin=<%=rs("qicq")%>&amp;Site=客服 1 号&amp;Menu=yes"><img border="0" SRC='http://wpa.qq.com/pa?p=1:<%=rs("qicq")%>:10' alt="点击这里给我发消息"><%=rs("qicq")%></a></td>
		    </tr>
			<tr>
				<td class="td9">主页:</td>
				<td class="td10"><a href="<%=rs("web")%>" target="_blank"><%=rs("web")%></a></td>
		    </tr>
			<tr>
				<td class="td9">留言内容:</td>
				<td class="td10"><%=rs("liuyan")%></td>
		    </tr>
			<tr>
				<td class="td9">留言时间:</td>
				<td colspan="2" class="td10"><%=rs("liuyantime")%></td>
			</tr>
			<tr>
				<td class="td9">回复内容:</td>
				<td colspan="2" class="td10"><%=rs("hui")%></td>
			</tr>
			<tr>
				<td class="td9">回复时间:</td>
				<td colspan="2" class="td10"><%=rs("huitime")%></td>
			</tr>
			<tr>
				<td class="td9">审核:</td>
				<td colspan="2" class="td10"><%if rs("hui")<>"" then
						response.write "<span class='zd2'>回复</span>"
					else
						response.write "<span class='zd1'>未回</span>"
					end if%></td>
			</tr>
		</table>
	  </td>
  </tr><%  recordsperpage=recordsperpage-1'
  rs.MoveNext
  Loop%>
  <tr class="toptd2">
    <td class="td7"><input name="chkAll" type="checkbox" id="chkAll" onClick="CheckAll(this.form)" value="checkbox" /></td>
    <td colspan="3" class="td12">
		<label for="chkAll"><span class="cheack1">全部选择</span></label>---
		<span class="cheack2" onClick="allobject('您至少选择 1 条要删除的信息!','确定要全部删除当前选择的信息吗?\n\n此操作确认后不可以再恢复!','?asp=alldel')">全部删除</span>
		<span class="cheack3" onClick="allobject('您至少选择 1 条要审核的信息!','确定要审核当前选择的信息吗?\n\n此操作确认后不可以再恢复!','?asp=allysh')">全部审核</span>
		<span class="cheack4" onClick="allobject('您至少选择 1 条要打算不审核的信息!','确定要不审核当前选择的信息吗?\n\n此操作确认后不可以再恢复!','?asp=allnsh')">全部不审核</span>	</td>
    <td colspan="3" class="td13">&nbsp;</td>
  </tr>
</table>


<table cellspacing="1" cellpadding="0" class="page">
  <tr class="pagetr">
    <td class="pagetd1"><%If page<=1 Then %>
      [首页][上一页]
      <%Else%>
        <a href="<%=filepath%>?page=<%=1%>">[首页]</a> 
		<a href="<%=filepath%>?page=<%=page-1%>">[上一页]</a>
        <%End If%>
        <%If page>=rs.Pagecount Then%>
      [下一页][尾页]
      <%Else%>
      <a href="<%=filepath%>?page=<%=page+1%>">[下一页]</a> 
	  <a href="<%=filepath%>?page=<%=rs.Pagecount%>">[尾页]</a>
    <%End If%> 
	</td>
    <td class="pagetd2">[页次:<font color="red"><b><%=page%></b></font>/<%=rs.Pagecount%>页][共<font color="red"><b><%=rs.Recordcount%></b></font>篇 <font color="red"><b><%=rs.Pagesize%></b></font>篇/每页] </td>
    <td class="pagetd3">
<form method="get">
	<select name="page" class="buttonstyle" onChange="jump_page(this.value)">
      <%
For i = 1 To rs.Pagecount
If i=page Then
  Response.Write"<option selected value="&i&">"&"第"&i&"页"&"</option>"
  Else
  Response.Write"<option value="&i&">"&"第"&i&"页"&"</option>"
End If
Next  
%>
    </select>
</form></td>
  </tr>
</table>

<%
rs.close
set rs=nothing%>
<%
if request("action")="deldel" then
	dim dde
	dde=Request("AllID")
	if (dde = "") then
	Response.Write "<script>window.alert('请选择要删除的条目!!!!');window.location='qwbm_book.asp';</script>"
	Response.End
	else
			dddSQL="Delete * from [book] where id in ("&dde&")"
			conn.Execute (dddSQL)
			response.redirect ThisFileName&"?Result=批量删除信息成功!"
	end if
end if%>

<%
end if
conn.close
set conn=nothing
%>
</body>
</html>

⌨️ 快捷键说明

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