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

📄 b2b_glshpl.asp

📁 信运网店系统是一套功能完善、简洁美观
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
if session("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
else
if request.cookies("Buy2Buy")("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
end if
end if
'限制添加权限管理员
if session("rank")=2 then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('您的管理权限未达到此操作等级!');history.go(-1);</script>"
response.End
end if
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%dim action
action=FormatSQL(SafeRequest("action",0))
%>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.STYLE1 {color: #000000;
	font-weight: bold;
}
.STYLE2 {color: #FF0000}
-->
</style>
<table width="99%" border="5" align="center" cellpadding="5" cellspacing="5" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
  <tr> 
    <td height="20" colspan="2" background="images/topbg.gif"><span class="STYLE1"><img src="images/pic5.gif" width="28" height="22" align="absmiddle" />您现在所在的位置是: <a href="adminhelp.asp">管理首页</a> -&gt; <span class="STYLE2">商品评论管理</span></span></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td height="20" align="center" background="images/topbg.gif"><a href="b2b_glshpl.asp?action=no"><strong>未审核的评论</strong></a></td>
    <td align="center" background="images/topbg.gif"><a href="b2b_glshpl.asp?action=yes"><strong>已审核的评论</strong></a></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <form name="form1" method="post" action="">
      <td height="200" colspan="2"> 
        <%
				Const MaxPerPage=20 
   				dim totalPut   
   				dim CurrentPage
   				dim TotalPages
   				dim j
   				dim sql
    				if Not isempty(SafeRequest("page",1)) then
      				currentPage=Cint(SafeRequest("page",1))
   				else
      				currentPage=1
   				end if 
				set rs=server.CreateObject("adodb.recordset")
		  select case action
		  case "no"
		  rs.open "select product.name,product.id,review.reviewid,review.reviewcontent,review.ipaddr,review.reviewdtm from review,product where product.id=review.id and review.audit=0",conn,1,1
		  case "yes"
		  rs.open "select product.name,product.id,review.reviewid,review.reviewcontent,review.ipaddr,review.reviewdtm from review,product where product.id=review.id and review.audit=1",conn,1,1
		  end select
				if err.number<>0 then
				response.write "数据库中暂时无数据"
				end if
				if rs.eof And rs.bof then
       			Response.Write "<p align='center' class='contents'> 目前还没有任何评论!</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,"admincomment.asp"
       				else
          				if (currentPage-1)*MaxPerPage<totalPut then
            				rs.move  (currentPage-1)*MaxPerPage
            				dim bookmark
            				bookmark=rs.bookmark
            				showContent
             				showpage totalput,MaxPerPage,"admincomment.asp"
        				else
	        				currentPage=1
           					showContent
           					showpage totalput,MaxPerPage,"admincomment.asp"
	      				end if
	   				end if
   				   				end if

   				sub showContent
       			dim i
	   			i=0

			%>
        <table width="96%" border="2" align="center" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#CCCCCC">
          <tr bgcolor="#F7F7F7">
            <td width="17%" height="25" align="center" background="images/topbg.gif"><strong>评论商品名称</strong></td>
            <td width="33%" height="25" align="center" background="images/topbg.gif"><strong>评论正文</strong></td>
            <td width="19%" height="25" align="center" background="images/topbg.gif"><strong>评论时间</strong></td>
            <td width="11%" height="25" align="center" background="images/topbg.gif"><strong>来访IP</strong></td>
            <td width="10%" height="25" align="center" background="images/topbg.gif"><strong>操 作</strong></td>
            <td width="10%" height="25" align="center" background="images/topbg.gif"><strong>回 复</strong></td>
          </tr>
          <%  
		 
		  do while not rs.eof%>
          <tr bgcolor="#FFFFFF" align="center">
            <td height="25"><%if len(rs("name"))>20 then
			response.write "<a href=../b2b_cpinfo.asp?id="&rs("id")&" target=_blank>"&left(trim(rs("name")),18)&"...</a>"
			else
			response.write "<a href=../b2b_cpinfo.asp?id="&rs("id")&" target=_blank>"&trim(rs("name"))&"</a>"
			end if
			%>            </td>
            <td height="25"><% if len(rs("reviewcontent"))>20 then
			response.write "<a href=# onClick=""javascript:window.open('b2b_cm.asp?id="&rs("reviewid")&"','','width=310,height=190,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"" title="&trim(rs("reviewcontent"))&">"&left(trim(rs("reviewcontent")),18)&"...</a>"
			else
			response.write "<a href=# onClick=""javascript:window.open('b2b_cm.asp?id="&rs("reviewid")&"','','width=310,height=190,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"" title="&trim(rs("reviewcontent"))&">"&trim(rs("reviewcontent"))&"</a>"
			end if%>            </td>
            <td height="25"><%=rs("reviewdtm")%></td>
            <td height="25"><%=rs("ipaddr")%></td>
            <td height="25"><input name="audit" type="checkbox" id="audit" value="<%=rs("reviewid")%>">            </td>
            <td height="25"><a href=b2b_repl.asp?id=<%=rs("reviewid")%>><img src="images/pic13.gif" width="20" height="15" border="0" align="absmiddle" />回 复</a></td>
          </tr>
          <%i=i+1
		  if i>=MaxPerPage then Exit Do
		  rs.movenext
		  loop
		  rs.close
		  set rs=nothing
		  %>
          <tr bgcolor="#FFFFFF">
            <td height="30" colspan="6" align="center"><%if action="no" then%>
                <input name="Submit" type="submit" class="input_bot" onClick="this.form.action='b2b_cs.asp';this.form.submit()" value="通过审核">
                <%end if%>
&nbsp;
      <input name="Submit2" type="button" class="input_bot" onClick="this.form.action='b2b_cs.asp';this.form.submit()" value="删 除">
&nbsp;&nbsp;全选
      <input type="checkbox" name="checkbox" value="Check All" onClick="mm()">            </td>
          </tr>
        </table>
        <%  
				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&"?action="&action&">"  
				Response.Write "<p align='center' class='contents'> "  
				If CurrentPage<2 Then  
					Response.Write "<font class='contents'>首 页 上一页</font> "  
				Else  
					Response.Write "<a href="&filename&"?page=1&action="&action&" class='contents'>首 页</a> "  
					Response.Write "<a href="&filename&"?page="&CurrentPage-1&"&action="&action&" class='contents'>上一页</a> "  
				End If
				
				If n-currentpage<1 Then  
					Response.Write "<font class='contents'>下一页 末 页</font>"  
				Else  
					Response.Write "<a href="&filename&"?page="&(CurrentPage+1)&"&action="&action&" class='contents'>"  
					Response.Write "下一页</a> <a href="&filename&"?page="&n&"&action="&action&" class='contents'>末 页</a>"  
				End If  
					Response.Write "<font class='contents'> 页次:</font><font class='contents'>"&CurrentPage&"</font><font class='contents'>/"&n&"页</font> "  
					Response.Write "<font class='contents'> 共有"&totalnumber&"条记录 " 
					Response.Write "<font class='contents'>" 
					Response.Write "</form>"  
				End Function  
			%>
      </td>
    </form>
  </tr>
</table>
<br>
<table width="99%" border="5" align="center" cellpadding="5" cellspacing="5" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
  <tr> 
    <td height="20" background="images/topbg.gif" bgcolor="#F7F7F7"><span class="STYLE1"><img src="images/pic5.gif" width="28" height="22" align="absmiddle" />您现在所在的位置是: <a href="adminhelp.asp">管理首页</a> -&gt; <span class="STYLE2">商品评论删除操作</span></span></td>
  </tr>
  <tr> 
    <td height="88" bgcolor="#FFFFFF"> 
      <table width="90%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#F7F7F7">
        <tr align="center">  
          <td height="20" bgcolor="#FFFFFF" >删除一周前未审核评论 &nbsp; <input name="Submit4" type="submit" class="input_bot" onClick="if(confirm('您确定这样操作吗?')) location.href='b2b_savecom.asp?action=delzhou';else return;" value="确 认"> 
          </td>
        </tr>
        <tr align="center"> 
          <td height="16" bgcolor="#FFFFFF" >删除所有未审核评论 &nbsp;&nbsp;&nbsp;
            <input name="Submit4" type="submit" class="input_bot" onClick="if(confirm('您确定这样操作吗?')) location.href='b2b_savecom.asp?action=delall';else return;" value="确 认"> 
          </td>
        </tr>
      </table></td>
  </tr>
</table>

</body>
</html>
<script language=javascript>
function mm()
{
   var a = document.getElementsByTagName("input");
   if(a[0].checked==true){
   for (var i=0; i<a.length; i++)
      if (a[i].type == "checkbox") a[i].checked = false;
   }
   else
   {
   for (var i=0; i<a.length; i++)
      if (a[i].type == "checkbox") a[i].checked = true;
   }
}
</script>

⌨️ 快捷键说明

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