<%
rem 按留言本方式查看

rs.open exec,conn,1,1

do until rs.eof %>
<table border="0" style="table-layout:fixed" width="520" cellspacing="0" cellpadding="3" bordercolorlight="#000000" bordercolordark="#CCFFCC" align="center" class="table004">
 <tr>
 <td class=table003>
	 <table width=100% border=0 cellspacing=0 cellpadding=2 style="table-layout:fixed;word-break:break-all">
		 <tr>
		  <td width="25"> 
			<%
			if rs("istop")=1 then
				response.write "<img border=0 src=images/istop.gif align=absmiddle alt=固顶>" 
			elseif rs("jh")=1 then
				response.write "<img border=0 src=images/jh.gif align=absmiddle alt=精华>" 
			elseif rs("islock") then
				response.write "<img border=0 src=images/islock.gif align=absmiddle alt=锁定>" 
			else
				response.write "<img align=absmiddle src=images/plus.gif>"
			end if
			%>
		  </td>
		  <td width="*"  class="jnfont5" >
		  	<img border="0" src="images/<%=rs("pic")%>" align=absmiddle>
		  	<%
		  	response.write funKillword(rs("title"))
		  	if not showFace then
		  		userNameNoFace rs("name") ,rs("bl"),isMaster(rs("name"))
		  	end if
		  	%>
		  </td>
		  <td width="210" align=right > 
			 <img align=absmiddle src=images/reply.gif><a href="show.asp?id=<%=rs("id")%>#re">回复</a> 
			 <%
			 userEmail(rs("email"))
			 userIcq(rs("icq"))
			 userMsn(rs("msn"))
			 userQQ(rs("qq"))
			 userUrl(rs("url"))
			 %>&nbsp;
		  </td>
		 </tr>
	 </table>
 </td>
 </tr>
 <tr> 
  <td class="table001" align="center" > 
	<table border="0" width="100%" cellspacing="0" cellpadding="2" style="table-layout:fixed">
		<tr> 
		<%
		if showFace then
			userNameFace rs("name"),rs("face"),rs("male"),rs("bl"),isMaster(rs("name"))
		end if
		%>
		
		<td valign=top class="jnfont3" style="letter-spacing:1px;line-height:140%">
		<%
		response.write ubbcode(rs("nei"))
		
		if not isnull(rs("re_name")) then
			%>
			  <table width=98% align=right class=table002 cellpadding="5" cellspacing="0">
			   <tr>
				<td width="450"> <b>最后回复：</b><img src=images/<%=rs("re_pic")%> align=absmiddle> 
				 <%=funKillword(rs("re_title"))%></td>
				<td width=150> 回复人： 
			<% response.write rs("re_name")
				if rs("re_bl")=1 then
					if isMaster(rs("re_name")) then
						response.write "<img border=0 src=images/bz.gif title=版主>"
					else
						response.write "<img border=0 src=images/bl.gif title=注册用户>"
					end if
				end if%>
				</td>
			   </tr>
			   <tr>
				<td colspan=2 style="line-height:140%"><%=ubbcode(rs("re_nei"))%> </td>
			   </tr>
			  </table>
			  <%
		end if %>
		
		
		 </td>
		</tr>
	</table>
	
	<table width=100% >
		<tr> 
		 <td width="45%" class="jnfont6">
			<img align=absmiddle src=images/reply.gif>
			<% if rs("hf")>0 then %>
			<a href="show.asp?id=<%=rs("id")%>">查看全部回复</a>(<%=rs("hf")%>)
			<% else %>
			<a href="show.asp?id=<%=rs("id")%>#re">回复该留言</a>
			<% end if
			call reLink(rs("id"),rs("hf"))
			%>
		 </td>
		 <td width="37%" align="right" class="jnfont6"> [ 发表时间：<%=rs("t")%> ]
		 </td>
		 <td width="18%" align="right"> 
			<% if theUser.reged then %>
			<a href="edit.asp?id=<%=rs("id")%>"><img src="images/edit.gif" width="13" height="15" border="0" alt="编辑"></a>
			<% else %>
			<img src="images/edit-gray.gif" width="13" height="15" border="0" alt="编辑">
			<% end if
			if theUser.master then %>
				<a href="admin_post.asp?id=<%=rs("id")%>"><img border="0" src="images/gl.gif" width="16" height="16" alt="管理"></a>
				<% userIp rs("ip"),rs("comefrom") %>
				<input type="checkbox" name="id" value="<%=rs("id")%>" >
			<% else %>
				<img border="0" src="images/gl-gray.gif" width="16" height="16" alt="管理">
				<img src=images/ip.gif align=absmiddle alt="ＩＰ:☆保密☆&#13;&#10;来源:☆保密☆">
			<% end if %>
			<a href="#"><img src="images/gotop.gif" width="15" height="15" border="0" alt="返上"></a> 
		 </td>
		</tr>
   	</table>
  </td>
 </tr>
</table>
<br>
<%
	rs.movenext
loop
if isobject(rs1) then
	rs1.close
	set rs1=nothing
end if
rsclose()
connclose()

sub reLink(id,num)
	dim reperpage,pagenum,linknum
	linknum=5
	reperpage=rcperpage1
	if num<=reperpage then
		exit sub
	end if
	pagenum=int((num-1)/reperpage)+1
	if pagenum<=linknum then
		for i=1 to pagenum
			response.write "<a href=show.asp?id="
			response.write id
			response.write "&page="
			response.write i
			response.write ">"
			response.write i
			response.write "</a> "
		next
	else
		for i=1 to linknum-2
			response.write "<a href=show.asp?id="
			response.write id
			response.write "&page="
			response.write i
			response.write ">"
			response.write i
			response.write "</a> "
		next
		response.write "... <a href=show.asp?id="
		response.write id
		response.write "&page="
		response.write pagenum
		response.write ">"
		response.write pagenum
		response.write "</a> "
	end if
end sub
%>