<!-- #include file="common.asp"-->
<!-- #include file="admcomm.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="description" content="网吧留言本">
<meta name="keywords" content="网吧留言本" >
<title><%=GBName%></title>
<link href="<%=GBCss%>/common.css" rel="stylesheet" type="text/css">
<link href="commcss.css" rel="stylesheet" type="text/css">
<script src="common.js" language="JavaScript" type="text/JavaScript"></script>
</head>

<body>
<%Call AdmPageTop()%>
<div class="bline"></div>
<%
  Dim SearchKeyword
  SearchKeyword = Request("keyword")
%>
<div id="SearchBar" style="width:100%;padding-top:5px;background-color:#FFF;">
  <form method="post" action="GuestDetailAdm.asp?GID=<%=Request("GID")%>&ipn=<%=Request("ipn")%>" style="margin:0;padding:0;border:0;">
    <li style="height:20px;"> 搜索回复：
      <input id="keyword" name="keyword" value="<%=SearchKeyword%>" class="input_common" style="width:200px;" />
      <input type="submit" value="搜索" class="button_common" />
    </li>
  </form>
</div>
<div class="bline"></div>
<%
  Set rs=Server.CreateObject("ADODB.Recordset")
  sqlstr="select top 1 * from guest where id="&Trim(Request("GID"))
  rs.open sqlstr,conn,1,3
%>
<%Call GuestArea(2,0,"GuestDetailAdm.asp",RepEnabled,False)%>
<%
  rs.Close
  Set rs=Nothing
%>
<%
  On Error Resume Next
  Dim rname,rsex,raddr,rmail,rpage,roicq,rhead,rtitl,rcont,rtime,rip,rrepflag,recont
  Set rsb=Server.CreateObject("ADODB.Recordset")
  If SearchKeyword <> "" Then
  	sqlstr="select * from reply where GuestID="&Trim(Request("GID"))&" and Content like '%"&SearchKeyword&"%' or RName like '%"&SearchKeyword&"%' order by ID ASC"
  Else
  	sqlstr="select * from reply where GuestID="&Trim(Request("GID"))&" order by ID ASC"
  End If
  rsb.Open sqlstr,conn,1,3
  If Err.Number=0 Then
%>
<div id="GuestArea" style="margin:auto;width:99%;text-align:center;background-image:url(<%=GBSkin%>/guest_bg.gif);background-color:#fff;">
  <div id="GContentT" style="margin:auto;height:10px;width:90%;text-align:left"> </div>
  <div id="GContent<%=i%>" style="margin:auto;width:90%;text-align:left">
<%
  TotRsCount	 = rsb.RecordCount	'总记录数
  PerPageRsCount = GBENum			'每页记录数 
  CurrPageNum 	 = Trim( Request("pn") )
  If CurrPageNum = "" Then
	CurrPageNum = 1
	rsb.MoveFirst
  Else
	rsb.Move Clng(CurrPageNum - 1) * PerPageRsCount
  End If 
  
  i = 0
  While i<PerPageRsCount And Not rsb.EOF
	  SubUrl = "&GID="&Request("GID")&"&RID="&rsb("ID")&"&pn="&Request("pn")&"&RetUrl=GuestDetailAdm.asp"
	  recont = rsb("content")
		If VarType(rsb("AudStatus"))=0 Or VarType(rsb("AudStatus"))=1 Then
			AudStatus = ""
		Else
		  If Trim(rsb("AudStatus"))<>"" Then
				AudStatus = Trim(rsb("AudStatus"))
			Else
				AudStatus = ""
			End If
		End If
%>
<p>
<div id="RepArea" class="line_around"> <b style="border-bottom:#ccc 1px solid;color:#f00;">
<%If rsb("RName")="" Then%>匿名<%Else%><%=rsb("RName")%><%End If%></b>&nbsp;
<font style="font-size:10px;"><%=rsb("Date")%>&nbsp;<%=rsb("Time")%></font>
<font style="color:red">&nbsp;<%If rsb("SecReply")=True Then%>|&nbsp;秘密回复<%End If%>&nbsp;|<%If rsb("RNoview")=True Then%>&nbsp;不显示[<a href="RepSetting.asp?op=sview&view=False<%=SubUrl%>">设置显示</a>]<%Else%>&nbsp;显示[<a href="RepSetting.asp?op=sview&view=True<%=SubUrl%>">设置不显示</a>]<%End If%></font>&nbsp;|&nbsp;<a href="RepMod.asp?1=1<%=SubUrl%>">修改</a>&nbsp;|&nbsp;<a href="RepSetting.asp?op=del<%=SubUrl%>">删除</a>&nbsp;|<%If AudStatus="" Or AudStatus="2" Then%>&nbsp;<a href="RepSetting.asp?op=aud&aud=1<%=SubUrl%>">通过</a><%End If%><%If AudStatus="" Or AudStatus="1" Then%>&nbsp;<a href="RepSetting.asp?op=aud&aud=2<%=SubUrl%>">不通过</a><%End If%><br />
<%=ubbcode(recont)%>
</div>
</p>
<%
  rsb.Movenext 
  i=i+1
  Wend 
%>
  </div>
  <div id="GContentB" style="margin:auto;height:10px;width:90%;text-align:left"> </div>
</div>
<div id="SearchBar" style="margin:auto;width:99%;padding-top:5px;background-color:#eee;" class="guest_name">
  <%Call DiPage( TotRsCount, PerPageRsCount, CurrPageNum, "GuestDetailAdm.asp?keyWord="&Request("keyWord")&"&GID="&Request("GID")&"&ipn="&Request("ipn")&"&", "条留言")%>
</div>
<div class="bline"></div>
<div style="margin-top:10px;padding-top:15px;background-image:url(<%=GBSkin%>/line.gif);" class="guest_name">
  <div style="height:30px;"><%=GBCopy%></div>
  <div style="height:30px;">网吧留言本 - 版本:BDXWL-V1.3</div>
</div>
</div>
<%
  End If
  rsb.Close
  Set rsb=Nothing
  conn.Close
  Set conn=Nothing
%>
</body>
</html>