
<%
on error resume next
oabusyname=request.cookies("oabusyname")
oabusyuserid=request.cookies("oabusyuserid")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" then 
	response.write("<script language=""javascript"">")
	response.write("window.top.location.href='../default.asp';")
	response.write("</script>")
	response.end
end if
%> 

<!--#include file="top.asp"-->

<%
dim xxid
xxid=trim(request("id"))
xxid=replace(xxid,"'","")
exec="select * from ly where id=" + CStr(xxid) + " " 
Set RS = Server.CreateObject("ADODB.RecordSet")                        
rs.Open exec, Conn, 1, 2

sd=rs("jh")
y=rs("hits")
y=y+1
rs("hits")=y
rs.update
%>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#64B3D9" >
  <tr>
    <td>
      <table cellpadding=0 cellspacing=0 border=0 width=98% align=center>
        <tr>
	<td width="98" valign="center" height=40><a href="writenew.asp"><img src="images/postnew.gif" width="72" height="21" border="0"></a></td>
    <td width="98"  valign="center"  ><a href="index.asp"><img src="images/votenew.gif" width="72" height="21" border="0"></a></td>
          <td width="98"  valign="center"  ><a href="#point"><img src="images/newreply.gif" width="72" height="21" border="0" alt="回复主题"></a></td>
	<td align=right valign=middle>您是本帖的第 <B><%=rs("hits")%></B> 个阅读者&nbsp; &nbsp; 
      　 </td>
	</tr>
</table>
      <table border="0" width="98%" cellspacing="1" cellpadding="3" bgcolor="#205E7B" align="center">
        <tr bgcolor="#205E7B"> 
          <td colspan="2" height="25" class="td1">&nbsp;&nbsp;<b><font color="#FFFFFF"> 
            <%if rs("jh")=1 then
      response.write"<img src=""images/isbest.gif"" alt=""精华的帖子""> "
      elseif rs("jh")=0 then
      response.write"<img src=""images/folder.gif"" alt=""普通的帖子"">"
      elseif rs("jh")=2 then
	  response.write"<img src=""images/lockfolder.gif"" alt=""锁定的帖子""> "
      end if%>
            标题：<%=rs("title")%></font></b></td>
        </tr>
        <tr> 
          <td bgcolor="#DAEDF5" align="center" valign="top" width="20%"> 
            <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr> 
                <td> 
                  <%if rs("bl")=1 then
              %>
                  <%=rs("user_name")%>&nbsp;<img border="0" src="images/bl.gif"> 
                  <%else%>
                  <%=rs("user_name")%> 
                  <%end if%>
                </td>
              </tr>
            </table>
            <img src="<%=rs("face")%>"> <br>
          </td>
          <td width="80%" bgcolor="#FFFFFF" align="center"> 
            <table width="98%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="58%"><img src="images/oicq.gif" width="45" height="18"> 
                  <a href="<%=rs("url")%>"><img src="images/homepage.gif" width="47" height="18" border="0"></a> 
                  <a href="mailto:<%=rs("email")%>"><img src="images/email.gif" width="45" height="18" border="0"></a> 
                  <img src="images/reply_a.gif" width="45" height="18"> <img src="images/reply.gif" width="45" height="18"> 
                  <img src="images/edit.gif" > </td>
                <td align="right" width="42%"><font color="#808080"><img src="images/ip.gif" align="absmiddle">：<%=rs("t")%> 
                  </font></td>
              </tr>
              <tr> 
                <td height="1" bgcolor="#999999" colspan="2"></td>
              </tr>
            </table>
            <table width="80%" border="0" cellspacing="0" cellpadding="10" align="center"style="TABLE-LAYOUT: fixed">
              <tr> 
                <td width="533" style=""LEFT: 20px; WIDTH: 100%; WORD-WRAP: break-word"> 
                  <p style="line-height: 150%"><br>
                    &nbsp;&nbsp<img border="0" src="title/face<%=rs("pic")%>.gif"><b><font color="#FF0000">标题：</font></b><b><%=rs("title")%></b><br>
                    <br>
                    <%=rs("nei")%></p>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td bgcolor="#92C8E2" align="center" valign="top" width="20%"><img src="images/ip.gif"><%=rs("lyip")%></td>
          <td bgcolor="#92C8E2" width="80%">　</td>
        </tr>
		
		<% exec2="select * from ly where rt=" + CStr(xxid) + " order by id"                                                                                                  
               Set RS2 = Server.CreateObject("ADODB.RecordSet")                        
       rs2.Open exec2, Conn, 1, 2
                                                                                                                                                      
                x=0

page=Request("page")
  if page=0 then
     page=1
  end if
RecordCount = 0 
  do while not rs2.Eof
    RecordCount = RecordCount +1
    rs2.MoveNext 
  loop
  if not RecordCount=0 then
     rs2.MoveFirst
  end if
  pageCount=RecordCount/10
  pageCount=int(pageCount)
  if (RecordCount mod 10)>0 then
     PageCount=PageCount +1
  end if 
if page>pagecount then page=pagecount
do while pos<(page-1)*10                                 
pos=pos+1                                 
rs2.moveNext                                 
loop
x=0
do while x<10 and not rs2.EOF%>
        <tr> 
          <td bgcolor="#DAEDF5" align="center" valign="top" width="20%"> 
            <table width="98%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td> 
                  <%if rs2("bl")=1 then
              %>
                  <%=rs2("user_name")%>&nbsp;<img border="0" src="images/bl.gif"> 
                  <%else%>
                  <%=rs2("user_name")%> 
                  <%end if%>
                </td>
              </tr>
            </table>
            <img src="<%=rs2("face")%>"><br>
          </td>
          <td bgcolor="#FFFFFF" align="right" width="80%"> 
            <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr> 
                <td width="59%"><img src="images/oicq.gif" width="45" height="18"> 
                  <a href="<%=rs2("url")%>"><img src="images/homepage.gif" width="47" height="18" border="0"></a> 
                  <a href="mailto:<%=rs2("email")%>"><img src="images/email.gif" width="45" height="18" border="0"></a> 
                  <img src="images/reply_a.gif" width="45" height="18"> <img src="images/reply.gif" width="45" height="18"> 
                  <img src="images/edit.gif"  align="absmiddle"> </td>
                <td align="right" width="41%"><font color="#808080"><img src="images/ip.gif" align="absmiddle"> 
                  ：<%=rs2("t")%> </font></td>
              </tr>
              <tr> 
                <td height="1" bgcolor="#999999" colspan="2"></td>
              </tr>
            </table>
            <table width="80%" border="0" cellspacing="0" cellpadding="10" align="center"style="TABLE-LAYOUT: fixed">
              <tr> 
                <td width="533" style=""LEFT: 20px; WIDTH: 100%; WORD-WRAP: break-word"> 
                  <p style="line-height: 150%"><br>
                    &nbsp;&nbsp<img border="0" src="title/face<%=rs2("pic")%>.gif"><b><font color="#FF0000">标题：</font></b><b><%=rs2("title")%><%=bz%></b><br>
                    <br>
                    <%=rs2("nei")%></p>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td bgcolor="#92C8E2" align="center" valign="top" width="20%"><img src="images/ip.gif"><%=rs("lyip")%> 
          </td>
          <td bgcolor="#92C8E2" width="80%" align=right>
<%
If oabusyuserlevel <> "最高管理员" Then
%>
<a href="guanli.asp?action=delgt&id=<%=xxid%>&id1=<%=rs2("id")%>">删除</a>
<%else%>
<font color=#666666>删除</font>
<%
end if
%>
</td>
        </tr>
		<% 
x=x+1
rs2.MoveNext 
loop
rs2.close
set rs2=nothing%> 
      </table>
      
      <table width="98%" border="0" align="center" cellspacing="0" cellpadding="3" bgcolor="#205E7B">
        <form method=post action=show.asp>
          <tr> 
            <td width="52%" class=td1>页次： 
              <%if page="" then
              response.write"1" 
              else
               response.write  page
                end if%>
              / <%=pageCount%> 页 帖子数：<%=RecordCount%></td>
            <td width="48%" align="right" class=td1> 
              <%if page=1 then
              response.write"首页" 
              else
               response.write"<a href=show.asp?id="&xxid&"><font color=#ffffff>首页</font></a>"
                end if%>
              <%if page=1 then %>
              上一页 
              <%else%>
              <a href="show.asp?page=<%=page-2%>&id=<%=xxid%>" class="a1">上一页</a> 
              <%end if%>
              <% y=1%>
              <%do while y<pagecount+1%>
              <a href="show.asp?page=<%=y-1%>&id=<%=xxid%>" class=a1><%=y%></a> 
              <%                                                 
y=y+1                                    
loop%>
              <%if cint(page)<>pagecount then %>
              <a href="show.asp?page=<%=page+1%>&id=<%=xxid%>" class="a1">下一页</a> 
              <%else%>
              下一页 
              <%end if%>
              转到: <input type="hidden" name="id" value="<%=xxid%>">
              <input onMouseOver="this.style.backgroundColor = '#E5F0FF'" style="BORDER-RIGHT: #b4b4b4 1px double; BORDER-TOP: #b4b4b4 1px double; BORDER-LEFT: #b4b4b4 1px double; COLOR: #8888aa; BORDER-BOTTOM: #b4b4b4 1px double; BACKGROUND-COLOR: #ffffff" onMouseOut="this.style.backgroundColor = ''" maxlength=3 size=3 name=page value="<%=page%>">
              页 
              <input onMouseOver="this.style.backgroundColor='#FFC864'" style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; COLOR: #000000; BORDER-BOTTOM: 1px solid; HEIGHT: 18px; BACKGROUND-COLOR: #f3f3f3" onMouseOut="this.style.backgroundColor='#f3f3f3'" type=submit value=GO name=submit>
            </td>
          </tr>
        </form>
      </table>
      <table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="20%">　</td>
          <td width="80%" align="right" height="30"><b>管理选项</b>： 
            <%If oabusyuserlevel = "最高管理员" Then

            response.write"<a href=""guanli.asp?action=gd&id="&xxid&" "">固顶</a> | <a href=""guanli.asp?action=jg&id="&xxid&" "">解固</a> | " 
            response.write"<a href=""guanli.asp?action=jh&id="&xxid&" "">精华</a> | <a href=""guanli.asp?action=sd&id="&xxid&" "">锁定</a>" 
            response.write"| <a href=""guanli.asp?action=js&id="&xxid&" "">解锁</a> | <a href=""guanli.asp?action=deltz&id="&xxid&" "">删除</a>"
            response.write"| <a href=""smallpaper.asp"">发布公告</a> "
            else
            response.write"<font color=#666666>固顶 | 解固 | 精华 | 锁定 | 解锁 | 删除 | 发布公告</font>"
            end if%>
           </td>
        </tr>
      </table>
      <br>
      <br><%if sd=2 then
			   response.write "帖子已被锁定，不允许恢复！" 
			   else%>
      <table border="0" width="98%" cellspacing="1" cellpadding="2" bordercolorlight="#999999" bordercolordark="#FFFFFF" bgcolor="#205E7B" align="center">
        <form action="addreply.asp" name="form1" method="post">
       <script language=vbscript>                  
                sub check                  
                if form1.name.value=empty then         
                msgbox "能告诉我你是谁么？"        
                form1.elements(1).focus                  
                else                   
                form1.submit                  
                end if                  
                end sub                             
                </script>
		<tr> 
            <td colspan="2" height="25" class="td1">　　<A name=point class="a1">回复主题：</A> 回复：<%=rs("title")%> 
            </td>
            </tr>
            <tr> 
            <td width="21%" align="center" bgcolor="#DAEDF5">发&nbsp; 表&nbsp; 人：</td>
              <td bgcolor="#DAEDF5">  <%=oabusyname%>

            <input type="hidden" name="name" size="20" class="" value='<%=oabusyname%>' style="border:1 solid #000000">
              <font color="#FF0000">*</font> </td>
</tr>
           <tr> 
            <td width="21%" align="center" bgcolor="#92C8E2">选 择 表 情：</td>
            <td colspan="2" bgcolor="#92C8E2"> 
              <% for i=0 to 17 %>
              <input type="radio" value="<%=(i)%>" name="pic" <%if i=0 then response.write "checked"%>>
              <img src="<%="title/face" &(i) & ".gif"%>" >&nbsp;&nbsp; 
              <%if i>0 and ((i+1) mod 9=0) then response.write "<br>"%>
              <%next%>
            </td>
            </tr>
            <tr> 
            <td width="21%" align="center" bgcolor="#DAEDF5"><img id=idface src="images/01.gif" alt=个人形象代表><br> 
              <select name="face" size=1 onChange="document.images['idface'].src=options[selectedIndex].value;" >
                <option selected value="images/01.gif">用户头像-01 
                <option selected value="images/02.gif">用户头像-02 
                <option selected value="images/03.gif">用户头像-03 
                <option selected value="images/04.gif">用户头像-04 
                <option selected value="images/05.gif">用户头像-05 
                <option selected value="images/06.gif">用户头像-06 
                <option selected value="images/07.gif">用户头像-07 
                <option selected value="images/08.gif">用户头像-08 
                <option selected value="images/09.gif">用户头像-09 
                <option selected value="images/10.gif">用户头像-10 
                <option selected value="images/11.gif">用户头像-11 
                <option selected value="images/12.gif">用户头像-12 
                <option selected value="images/13.gif">用户头像-13 
                <option selected value="images/14.gif">用户头像-14 
                <option selected value="images/15.gif">用户头像-15 
                <option selected value="images/16.gif">用户头像-16 
                <option selected value="images/17.gif">用户头像-17 
                <option selected value="images/18.gif">用户头像-18 
                <option selected value="images/19.gif">用户头像-19 
                <option selected value="images/20.gif">用户头像-20 
              </select>
               </td>
              
            <td valign="top" colspan="2" bgcolor="#DAEDF5">
              <table width="98%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td> 
<textarea name="nei" style="display:none"></textarea>
<IFRAME ID="eWebEditor1" SRC="../editor/ewebeditor.htm?id=nei&style=blue" FRAMEBORDER="0" SCROLLING="no" WIDTH="550" HEIGHT="350"></IFRAME> 


                  </td>
                  <td>    </td>
                </tr>
              </table>
            </td>
            </tr>
          <tr> 
            <td colspan="3"> 
              <p align="center">
<input type="button" value=" 提交 " name="B1" onclick =check()>
               <input type="hidden" name=title size="40"  value=""回复：<%=rs("title")%>">
                
                <input type="reset" value=" 清除 " name="B2" >
               <input type="hidden" name="rtid" value="<%=xxid%>">
            </td>
            </tr></form>
          </table>
     
      <%end if%>
      <br>
    </td>
  </tr>
</table>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#64B3D9">
  <tr>
    <td align="center" height="30" class=td1>
      <%=footer%>
    </td>
  </tr>
</table>
</body>
</html>
