<%response.buffer=true%>
<!--#include file="../fuction.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="../webconfig.asp"-->

<body topmargin="0" leftmargin="0">
<!--#include file="../webtop.asp"-->
<table width="1000" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
  <tr>
    <td width="20"></td>
    <td valign="bottom"><img src="<%=weburl%>images/arrow01.gif" width="11" height="11" /> Your present position: <a href="<%=weburl%>"><%=webname%></a> -> <span class="table-shangxia"><span class="b14"><a href=index.asp><%=bbsname%></a> → <a href=list.asp?bid=<%=bid%>><%=bidname%></a>→ 编辑帖子</span></span></td>
    <td valign="bottom"></td>
  </tr>
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
</table>
<!--#include file="top.asp"-->

<% 

 username=nosql(session("username"))
 password=nosql(session("userpassword"))
   
    if username="" or password="" then
    response.redirect"login.asp"
    end if
bid=int(Request.querystring("bid"))
sql="select * from board where bid="&bid&""
Set Rs=Conn.Execute(sql)
bidname=rs("bidname")

sql="select * from shop_user where username='"&username&"'"
Set Rs=Conn.Execute(sql)
bbs_manbid=rs("manbid")
rs.close
id=int(request.querystring("id"))
set editreco=server.createobject("adodb.recordset")
sqlstr="select * from book where id=" &id
editreco.open sqlstr,conn,1,1
if editreco("username")<>username and session("manbid")<>20000  and bbs_manbid <> bid then
response.write"<script language='javascript'>alert('只有作者本人才能编辑该帖子！')</script>"
response.write "<script language='javascript'>history.back(-1)</script>"
response.end
end if%>
   



<table width="900" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td>
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td valign="top">
            <p>&nbsp;</p>
            <form method="post" action="save_post_edit.asp?id=<%=editreco("id")%>"  name="esung" onSubmit="return CheckForm(this);">
              <table width="745" height="401" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="999999">
                <tr bgcolor="CCCCCC">
                  <input name="body" type="hidden" value='<%=server.htmlencode(editreco("body"))%>'>
                  <TD width="146" height=26 align="left">&nbsp;<B>帖子主题：</B></TD>
                  <TD width="589" height="26"> <input name="title" type="text" id="title" value="<%=editreco("title")%>" size="50" maxlength="48"></TD>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <input type="hidden" name="url" value="<%=request.serverVariables("Http_REFERER")%> ">
                  <TD width="146" height=53 align="left" bgcolor="F7FEFF">
                    <P                                                                           
      style="LINE-HEIGHT: 150%; MARGIN-LEFT: 5px; MARGIN-TOP: 5px"><B>你的表情：</B> <BR>
          ·放在帖子前面。</P></TD>
                  <TD width="589" height="53">
                    <%For I=1 to 57%>
                    <input type="radio" name="faceimg" value="<%=i%>" checked>
                    <img src="images/Mood/<%=i%>.gif" width="20" height="20">
                    <%                                 
Next                                 
%>
                  </TD>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <TD width="146" height=287 align="left" vAlign=top bgcolor="F7FEFF"><BR>
                      <B>&nbsp;帖子内容:</b> <BR>
        ·HTML标签： 不可用<BR>
        ·UBB标签： 可用<BR>
        ·贴图标签： 可用<BR>
        ·Flash标签：可用<BR>
        ·表情字符转换：可用<BR>
        ·上传图片：可用<br>
        <br>
        · <a href="javascript:CheckLength();">查看内容长度</a> <BR>
        <BR>                  </TD>
                  <TD width="589" vAlign=center height="287">
                    <p align="center">
                      <SCRIPT src="post.js"></SCRIPT>
                      <BR>
                </tr>
                <TR>
                  <TD width="146" height="27" bgcolor="F7FEFF"></TD>
                  <TD width="589" height="27" bgcolor="F7FEFF">
                    <p align="center">
                      <input name="submit1" type="submit" class="go-wenbenkuang" value="修 改" >
&nbsp;
          <input name=preview type="Button" value="预 览" onClick="Gopreview()" class="go-wenbenkuang">
&nbsp;
          <input name="return" type="button" class="go-wenbenkuang" onClick="javascript:history.go(-1)" value="返 回" >
                  </TD>
                </TR>
              </table>
            </form>
            <form name=preview action=view.asp method=post target=preview_page>
              <input name="body" type="hidden">
          </form>            <p>&nbsp;</p></td>
        </tr>
    </table></td>
  </tr>
</table>
<!--#include file="../copyright.asp"-->             