<!--#include file="byshop_conn.asp"-->
<!--#include file="session.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<%dim action
action=request.QueryString("action")%>
<div align="center">
<table cellpadding="3" cellspacing="1" border="1" width="100%" class="tableBorder" style="border-collapse: collapse" bordercolor="#C0C0C0">
  <tr align="center"> 
    <td  class="forumRowHighlight" width=25% bgcolor="#F7F7F7"> <a href="sell2review.asp?action=all"><%if action="all" then %><font  color="#FF0000"><% end if%>所有评论</a></td>
    <td  class="forumRowHighlight"  width=25% bgcolor="#F7F7F7"><a href="sell2review.asp?action=pass"><%if action="pass" then %><font  color="#FF0000"><% end if%>通过审核评论</font></a></td>
    <td  class="forumRowHighlight"  width=25% bgcolor="#F7F7F7"><a href="sell2review.asp?action=wait"><%if action="wait" then %><font  color="#FF0000"><% end if%>待审核评论</font></a></td>
    <td  class="forumRowHighlight"  width=25% bgcolor="#F7F7F7"><a href="sell2review.asp?action=fall"><%if action="fall" then %><font  color="#FF0000"><% end if%>未通过评论</font></a></td>
  </tr>
</table>
</div>
<br>
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="tableBorder" align=center>

      <form name="form1" method="post" action="">    <tr> 
      <td colspan="4"> <%'开始分页
				Const MaxPerPage=20 
   				dim totalPut   
   				dim CurrentPage
   				dim TotalPages
   				dim j
   				dim sql
    				if Not isempty(request("page")) then
      				currentPage=Cint(request("page"))
   				else
      				currentPage=1
   				end if 
				set rs=server.CreateObject("adodb.recordset")
		  select case action
		  case "all"
		  rs.open "select * from pl where class=3 order by pinglundate  desc",conn,1,1
		   case "pass"
		  rs.open "select * from pl where class=3 and shenghe=1 order by pinglundate  desc",conn,1,1
		  case "wait"
		  rs.open "select * from pl where class=3 and shenghe =0 order by pinglundate desc",conn,1,1
		  case "fall"
		  rs.open "select * from pl where class=3 and shenghe =-1 order by pinglundate desc",conn,1,1
		   end select
				if err.number<>0 then
				response.write "数据库中无数据"
				end if
				if rs.eof And rs.bof then
%>

			<table width="100%" border="1" cellspacing="1" cellpadding="3" bordercolor="#C0C0C0" style="border-collapse: collapse">
          <th colspan="5" bgcolor="#E8F1FF"> 
			<p align="center">二手房求租- 评论管理
          </th>
          <tr> 
            <td width="30%" class="forumRowHighlight" bgcolor="#F7F7F7"> <div align="center">
				<strong style="font-weight: 400"><span lang="zh-cn">信息名称</span></strong></div></td>
            <td width="18%" class="forumRowHighlight" bgcolor="#F7F7F7"> <div align="center">
				<strong style="font-weight: 400">笔名</strong></div></td>
            <td width="14%" class="forumRowHighlight" bgcolor="#F7F7F7"> 
			<p align="center">审核状态</td>
            <td width="25%" class="forumRowHighlight" bgcolor="#F7F7F7"> <div align="center">
				<strong style="font-weight: 400">
				评论时间</strong></div></td>
            <td width="10%" class="forumRowHighlight" bgcolor="#F7F7F7"> <div align="center">
				<strong style="font-weight: 400">
				操 作</strong></div></td>
          </tr>
          <tr> 
            <td class="forumRowHighlight" bgcolor="#F7F7F7"> 　</td>
            <td class="forumRowHighlight" bgcolor="#F7F7F7"> <div align="center"> 
              
				<div align="center"> 

              没有信息</div> 
              
              </div></td>
            <td class="forumRowHighlight" bgcolor="#F7F7F7"> <div align="center"> 
              </div></td> 
            <td class="forumRowHighlight" bgcolor="#F7F7F7"> 
			<p align="center"></td> 
			<td class="forumRowHighlight" bgcolor="#F7F7F7"> <div align="center"> 
                　</div></td>
          </tr>

          <tr> 
            <td height="30" colspan="5" class="forumRowHighlight" bgcolor="#F7F7F7"> <div align="center"> 

                            </div></td>
          </tr>
        </table></table><%
   				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,"sell2review.asp"
       				else
          				if (currentPage-1)*MaxPerPage<totalPut then
            				rs.move  (currentPage-1)*MaxPerPage
            				dim bookmark
            				bookmark=rs.bookmark
            				showContent
             				showpage totalput,MaxPerPage,"sell2review.asp"
        				else
	        				currentPage=1
           					showContent
           					showpage totalput,MaxPerPage,"sell2review.asp"
	      				end if
	   				end if
   				   				end if

   				sub showContent
       			dim i
	   			i=0
			%> 
		<div align="center">
			<table width="100%" border="1" cellspacing="1" cellpadding="3" bordercolor="#D1D1D1" style="border-collapse: collapse">
          <th colspan="5" bgcolor="#E8F1FF"> 
			<p align="center">二手房求租- 评论管理
          </th>
          <tr> 
            <td width="30%" class="forumRowHighlight" bgcolor="#F7F7F7"> <div align="center">
				<strong style="font-weight: 400"><span lang="zh-cn">信息名称</span></strong></div></td>
            <td width="18%" class="forumRowHighlight" bgcolor="#F7F7F7"> <div align="center">
				<strong style="font-weight: 400">笔名</strong></div></td>
            <td width="14%" class="forumRowHighlight" bgcolor="#F7F7F7"> 
			<p align="center">审核状态</td>
            <td width="25%" class="forumRowHighlight" bgcolor="#F7F7F7"> <div align="center">
				<strong style="font-weight: 400">
				评论时间</strong></div></td>
            <td width="10%" class="forumRowHighlight" bgcolor="#F7F7F7"> <div align="center">
				<strong style="font-weight: 400">
				操 作</strong></div></td>
          </tr>
          <%  
		 
		  do while not rs.eof%>
          <tr> 
            <td class="forumRowHighlight" bgcolor="#F7F7F7"> <div align="center"> 
               
               <%
               Set rs7= Server.CreateObject("ADODB.Recordset")
               sql7="select * from sell2 where  id=" &rs("pinlunid")
               
		rs7.open sql7,conn,1,1
		if rs7.eof then
		response.write "该信息已删除"
		else
		
		%>
		<a href=../sell/sellinfo.asp?id=<%=rs7("id")%> target=_blank>
			<%	response.write rs7("address")&"</a>"
		rs7.close
		end if
			%>
              </div></td>
            <td class="forumRowHighlight" bgcolor="#F7F7F7"> <div align="center"> 
              	<%response.write "<a href=""javascript:;"" onClick=""javascript:window.open('review.asp?id="&rs("pinglunid")&"','pinglun','width=300,height=400,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=no');return false;"" title="&trim(rs("nickName"))&">"&trim(rs("nickName"))&"</a>"
                %>
              </div></td>
            <td class="forumRowHighlight" bgcolor="#F7F7F7"> <div align="center"> 
               	<%
	
               
		if rs("shenghe") =1 then
		response.write "(通过)"
		end if
			if rs("shenghe") =0 then
		response.write "<font color=#FF0000>(等待)</font>"
		end if
		if rs("shenghe") =-1 then
		response.write "(未通过)"
		end if

		
               %> </div></td> 
            <td class="forumRowHighlight" bgcolor="#F7F7F7"> 
			<p align="center">　<%=rs("pinglundate")%></td> 
			<td class="forumRowHighlight" bgcolor="#F7F7F7"> <div align="center"> 
                <input name="shenhe" type="checkbox" id="shenhe" value="<%=rs("pinglunid")%>" class="input1">
              </div></td>
          </tr>
          <%i=i+1
		  if i>=MaxPerPage then Exit Do
		  rs.movenext
		  loop
		  rs.close
		  set rs=nothing
		  %>
          <tr> 
            <td height="30" colspan="5" class="forumRowHighlight" bgcolor="#F7F7F7"> <div align="center"> 
                <%if action="wait" then%>
                <input type="submit" name="Submit" value="通过审核" onClick="this.form.action='Savereview.asp?action=shenhe';this.form.submit()">
                <%end if%>&nbsp;&nbsp; 
                <input  type="button" name="Submit2" value="删 除" onClick="this.form.action='Savereview.asp?action=del';this.form.submit()">
                &nbsp;&nbsp;全选 
                <input type="checkbox" name="checkbox" value="Check All" onClick="mm()" class="input1">
              </div></td>
          </tr>
        </table>
        </div>
         
			</td>
		</tr>
    </form>
</table>
</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  
			%>
 <br>
 <div align="center">
 <table cellpadding="3" cellspacing="1" border="1" width="100%" class="tableBorder" bordercolor="#C0C0C0" style="border-collapse: collapse">
   <tr> 
	<th class="tableHeaderText" colspan=6 bgcolor="#E8F1FF">其它操作</th>	
   </tr>
   <tr> 
    <td class="forumRowHighlight" align=center bgcolor="#F7F7F7">删除一周前未审核评论 &nbsp; <input  type="submit" name="Submit4" value="确 认" onClick="if(confirm('您确定这样操作吗?')) location.href='Savesell2review.asp?action=delzhou';else return;"> </td>
    <td class="forumRowHighlight" align=center bgcolor="#F7F7F7">删除所有未审核评论 &nbsp;<input  type="submit" name="Submit4" value="确 认" onClick="if(confirm('您确定这样操作吗?')) location.href='Savesell2review.asp?action=delall';else return;"> </td>
  </tr>
</table>
</div>
</body>
</html> 
  