review.asp
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:12k
源码类别:

数据库编程

开发平台:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../FS_Inc/Const.asp" -->
  3. <!--#include file="../FS_InterFace/MF_Function.asp" -->
  4. <!--#include file="../FS_Inc/Function.asp" -->
  5. <!--#include file="lib/strlib.asp" -->
  6. <!--#include file="lib/UserCheck.asp" -->
  7. <!--#include file="../FS_Inc/Func_Page.asp" -->
  8. <%
  9. if Trim(Request.QueryString("Url"))<>"" then
  10. response.Write request.QueryString("Url")&"-" &request.QueryString("type")
  11. response.end
  12. end if
  13. if request("Action")="del" then
  14. if Request("id")="" then
  15. strShowErr = "<li>错误的参数!</li>"
  16. Response.Redirect("lib/error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  17. Response.end
  18. else
  19. User_Conn.execute("Delete from FS_ME_Review where ReviewID in ("&NoSqlHack(Request("id"))&")")
  20. strShowErr = "<li>删除成功!</li>"
  21. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../Review.asp")
  22. Response.end
  23. end if
  24. end if
  25. if request("Action")="Lock" then
  26. if Request("id")="" then
  27. strShowErr = "<li>错误的参数!</li>"
  28. Response.Redirect("lib/error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  29. Response.end
  30. else
  31. User_Conn.execute("Update FS_ME_Review set islock=1 where ReviewID in ("&NoSqlHack(Request("id"))&")")
  32. strShowErr = "<li>锁定成功!</li>"
  33. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../Review.asp")
  34. Response.end
  35. end if
  36. end if
  37. if request("Action")="UnLock" then
  38. if Request("id")="" then
  39. strShowErr = "<li>错误的参数!</li>"
  40. Response.Redirect("lib/error.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=")
  41. Response.end
  42. else
  43. User_Conn.execute("Update FS_ME_Review set islock=0 where ReviewID in ("&NoSqlHack(Request("id"))&")")
  44. strShowErr = "<li>解琐成功!</li>"
  45. Response.Redirect("lib/Success.asp?ErrCodes="&Server.URLEncode(strShowErr)&"&ErrorUrl=../Review.asp")
  46. Response.end
  47. end if
  48. end if
  49. Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo,strpage,rs,i
  50. int_RPP=20 '设置每页显示数目
  51. int_showNumberLink_=5 '数字导航显示数目
  52. showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
  53. str_nonLinkColor_="#999999" '非热链接颜色
  54. toF_="<font face=webdings title=""首页"">9</font>"   '首页 
  55. toP10_=" <font face=webdings title=""上十页"">7</font>" '上十
  56. toP1_=" <font face=webdings title=""上一页"">3</font>" '上一
  57. toN1_=" <font face=webdings title=""下一页"">4</font>" '下一
  58. toN10_=" <font face=webdings title=""下十页"">8</font>" '下十
  59. toL_="<font face=webdings title=""最后一页"">:</font>"
  60. strpage=request("page")
  61. if len(strpage)=0 Or strpage<1 or trim(strpage)=""Then:strpage="1":end if
  62. %>
  63. <html xmlns="http://www.w3.org/1999/xhtml">
  64. <title>User Manage Center-网站内容管理系统</title>
  65. <meta name="keywords" content="风讯cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,风讯网站内容管理系统">
  66. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  67. <meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
  68. <link href="images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
  69. <head>
  70. </head>
  71. <body>
  72. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  73.   <tr>
  74.     <td>
  75.       <!--#include file="top.asp" -->
  76.     </td>
  77.   </tr>
  78. </table>
  79. <table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
  80.     <tr class="back"> 
  81.       <td   colspan="2" class="xingmu" height="26"> <!--#include file="Top_navi.asp" -->
  82.     </td>
  83.     </tr>
  84.     <tr class="back"> 
  85.       <td width="18%" valign="top" class="hback"> <div align="left"> 
  86.           <!--#include file="menu.asp" -->
  87.         </div></td>
  88.       <td width="82%" valign="top" class="hback">
  89.   <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  90.         <tr class="hback"> 
  91.           <td  valign="top">你的位置:<a href="../">网站首页</a> &gt;&gt; <a href="main.asp">会员首页</a> 
  92.             &gt;&gt; <a href="Review.asp">评论管理</a> &gt;&gt; </td>
  93.         </tr>
  94.         <tr class="hback"> 
  95.           <td  valign="top"><a href="Review.asp">全部评论</a>┆<a href="Review.asp?type=0">新闻评论</a>┆<%if IsExist_SubSys("DS") Then%><a href="Review.asp?type=1">下载评论</a>┆<%End if%><%if IsExist_SubSys("MS") Then%><a href="Review.asp?type=2">商品评论</a>┆<%end if%><%if IsExist_SubSys("HS") Then%><a href="Review.asp?type=3">房产评论</a>┆<%end if%><%if IsExist_SubSys("SD") Then%><a href="Review.asp?type=4">供求评论</a>┆<%end if%><a href="Review.asp?type=5">日记评论</a>┆<a href="Review.asp?type=6">相册评论</a></td>
  96.         </tr>
  97.       </table>
  98.      
  99.         
  100.       <table width="98%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
  101.         <form name="myForm" method="post" action="">
  102.   <tr> 
  103.             <td width="6%" class="hback_1"><div align="center"> 
  104.                 <input name="chkall" type="checkbox" id="chkall" onClick="CheckAll(this.form);" value="checkbox" title="点击选择所有或者撤消所有选择">
  105.               </div></td>
  106.             <td width="27%" class="hback_1"><div align="left"><strong>标题</strong></div></td>
  107.             <td width="14%" class="hback_1"><div align="center"><strong>类型</strong></div></td>
  108.             <td width="10%" class="hback_1"><div align="center"><strong>被评论信息</strong></div></td>
  109.             <td width="17%" class="hback_1"><div align="center"><strong>日期</strong></div></td>
  110.             <td width="6%" class="hback_1"><div align="center"><strong>状态</strong></div></td>
  111.             <td width="5%" class="hback_1"><strong>通过</strong></td>
  112.             <td width="15%" class="hback_1"><strong>操作</strong></td>
  113.           </tr>
  114.           <%
  115.    dim o_type
  116.    select case NoSqlHack(Request.QueryString("type"))
  117. case "1"
  118. o_type = " and ReviewTypes=1"
  119. case "2"
  120. o_type = " and ReviewTypes=2"
  121. case "3"
  122. o_type = " and ReviewTypes=3"
  123. case "4"
  124. o_type = " and ReviewTypes=4"
  125. case "5"
  126. o_type = " and ReviewTypes=5"
  127. case "6"
  128. o_type = " and ReviewTypes=6"
  129. case "0"
  130. o_type = " and ReviewTypes=0"
  131. case else
  132. o_type = ""
  133. end select
  134. set rs = Server.CreateObject(G_FS_RS)
  135. rs.open "select * from FS_ME_Review where UserNumber='"& Fs_User.UserNumber&"' "& o_type &" order by Addtime desc,ReviewID desc",User_Conn,1,3
  136. if rs.eof then
  137.    rs.close
  138.    set rs=nothing
  139.    set conn=nothing
  140.    set user_conn=nothing
  141.    set fs_user=nothing
  142.    Response.Write"<tr  class=""hback""><td colspan=""8""  class=""hback"" height=""40"">没有记录。</td></tr>"
  143. else
  144. rs.PageSize=int_RPP
  145. cPageNo=NoSqlHack(Request.QueryString("Page"))
  146. If cPageNo="" Then cPageNo = 1
  147. If not isnumeric(cPageNo) Then cPageNo = 1
  148. cPageNo = Clng(cPageNo)
  149. If cPageNo<=0 Then cPageNo=1
  150. If cPageNo>rs.PageCount Then cPageNo=rs.PageCount 
  151. rs.AbsolutePage=cPageNo
  152. for i=1 to rs.pagesize
  153. if rs.eof Then exit For 
  154.   %>
  155.           <tr  onMouseOver=overColor(this) onMouseOut=outColor(this)> 
  156.             <td class="hback"><div align="center"> 
  157.                 <input name="id" type="checkbox" id="id" value="<%=rs("ReviewID")%>">
  158.               </div></td>
  159.             <td class="hback" id=item$pval[CatID]) style="CURSOR: hand"  onmouseup="opencat(rid<%=rs("ReviewID")%>);" language=javascript><%=rs("title")%></td>
  160.             <td class="hback"><div align="center">
  161. <%'0为新闻评论,1为下载评论,2为商品,3为房产评论,4为供求评论,5日记,6相册
  162. select case rs("ReviewTypes")
  163. case 0
  164. response.Write"<a href=Review.asp?type=0>新闻评论</a>"
  165. case 1
  166. response.Write"<a href=Review.asp?type=1>下载评论</a>"
  167. case 2
  168. response.Write"<a href=Review.asp?type=2>商品评论</a>"
  169. case 3
  170. response.Write"<a href=Review.asp?type=3>房产评论</a>"
  171. case 4
  172. response.Write"<a href=Review.asp?type=4>供求评论</a>"
  173. case 5
  174. response.Write"<a href=Review.asp?type=5>日志评论</a>"
  175. case 6
  176. response.Write"<a href=Review.asp?type=6>相册评论</a>"
  177. case else
  178. response.Write"<a href=Review.asp>-</a>"
  179. end select
  180. %></div></td>
  181.             <td class="hback"><div align="center">
  182. <%'0为新闻评论,1为下载评论,2为商品,3为房产评论,4为供求评论,5日记,6相册
  183. select case rs("ReviewTypes")
  184. case 0
  185. response.Write"<a href=Public_info.asp?type=NS&Url="&rs("InfoID")&" target=_blank>查看</a>"
  186. case 1
  187. response.Write"<a href=Public_info.asp?type=DS&Url="&rs("InfoID")&" target=_blank>查看</a>"
  188. case 2
  189. response.Write"<a href=Public_info.asp?type=MS&Url="&rs("InfoID")&" target=_blank>查看</a>"
  190. case 3
  191. response.Write"<a href=Public_info.asp?type=HS&Url="&rs("InfoID")&" target=_blank>查看</a>"
  192. case 4
  193. response.Write"<a href=Public_info.asp?type=SD&Url="&rs("InfoID")&" target=_blank>查看</a>"
  194. case 5
  195. response.Write"<a href=Public_info.asp?type=LS&Url="&rs("InfoID")&" target=_blank>查看</a>"
  196. case 6
  197. response.Write"<a href=Public_info.asp?type=PH&Url="&rs("InfoID")&" target=_blank>查看</a>"
  198. case else
  199. end select
  200. %>
  201. </div></td>
  202.             <td class="hback"><div align="center"><%=rs("AddTime")%></div></td>
  203.             <td class="hback"><div align="center"> 
  204.                 <%if rs("isLock")=1 then:response.Write"<span class=tx>锁定</span>":else:response.Write"开放":end if%>
  205.               </div></td>
  206.             <td class="hback"> 
  207.               <div align="center"><b><%if rs("AdminLock")=1 then:response.Write"<span class=tx>×</span>":else:response.Write"√":end if%></b></div>
  208.             </td>
  209.             <td class="hback"><div align="center"><a href="Review.asp?Action=del&id=<%=rs("ReviewID")%>" onClick="{if(confirm('确定要删除吗?')){return true;}return false;}">删除</a>┆<a href="Review.asp?Action=UnLock&id=<%=rs("ReviewID")%>">解锁</a>┆<a href="Review.asp?Action=Lock&id=<%=rs("ReviewID")%>" onClick="{if(confirm('确定锁定评论吗??n锁定后将不能显示')){return true;}return false;}">锁定</a></div></td>
  210.           </tr>
  211.           <tr  class="hback" id="rid<%=rs("ReviewID")%>" style="display:none"> 
  212.             <td height="40"><div align="center">内容:</div></td>
  213.             <td height="40" colspan="7"><%=rs("Content")%></td>
  214.           </tr>
  215.           <%
  216.   rs.movenext
  217.   next
  218.   %>
  219.           <tr  class="hback"> 
  220.             <td colspan="8"><div align="right"> 
  221.                 <%
  222. response.Write "<p>"&  fPageCount(rs,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo)
  223. %>
  224.                 <input name="Action" type="hidden" id="Action">
  225.                 <input type="button" name="Submit" value="删除"  onClick="document.myForm.Action.value='del';{if(confirm('确定清除您所选择的记录吗?')){this.document.myForm.submit();return true;}return false;}">
  226.                 <input type="button" name="Submit2" value="批量解锁"  onClick="document.myForm.Action.value='UnLock';{if(confirm('确定解锁评论吗')){this.document.myForm.submit();return true;}return false;}">
  227.                 <input name="Submit3" type="button"  onClick="document.myForm.Action.value='Lock';{if(confirm('确定锁定评论吗??n锁定后将不能显示')){this.document.myForm.submit();return true;}return false;}" value="批量锁定">
  228.               </div></td>
  229.           </tr>
  230.           <% 
  231.   rs.close:set rs=nothing
  232.   end if
  233.   %>
  234.         </form>
  235.       </table>
  236.     </td>
  237.     </tr>
  238.     <tr class="back"> 
  239.       <td height="20"  colspan="2" class="xingmu"> <div align="left"> 
  240.           <!--#include file="Copyright.asp" -->
  241.         </div></td>
  242.     </tr>
  243. </table>
  244. </body>
  245. </html>
  246. <script language="JavaScript" type="text/JavaScript">
  247. function CheckAll(form)  
  248.   {  
  249.   for (var i=0;i<form.elements.length;i++)  
  250.     {  
  251.     var e = myForm.elements[i];  
  252.     if (e.name != 'chkall')  
  253.        e.checked = myForm.chkall.checked;  
  254.     }  
  255. }
  256. </script>
  257. <%
  258. Set Fs_User = Nothing
  259. %>
  260. <!--Powsered by Foosun Inc.,Product:FoosunCMS V4.0系列-->