<%response.buffer=true%>
<!--#include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>潮南社区</title>
<LINK 
href="css.css" type=text/css rel=stylesheet>
</head>
<body>
<!--#include file="top.asp"-->



<%  
username=Request.Cookies("esung")("username")
    password=Request.Cookies("esung")("password")
    
    username=Request.Cookies("esung")("username")
    password=Request.Cookies("esung")("password")
  set rs1=server.createobject("adodb.recordset")
    sql="select * from member where username='" &username& "'  "
    rs1.open sql,conn,1,1
    if  rs1.eof then
response.write"<script language='javascript'>alert('用户名密码错误！')</script>"
response.write "<script language='javascript'>history.back(-1)</script>"
response.end
end if
  if password<>rs1("password") then
  response.write"<script language='javascript'>alert('用户名密码错误！')</script>"
response.write "<script language='javascript'>history.back(-1)</script>"
response.end
end if

if username="" or password="" then
    response.redirect"login.asp"
    end if
id=request.querystring("id")

if id="" or  not isnumeric(id) then
response.write"<script language='javascript'>alert('错误的请求！')</script>"
response.write "<script language='javascript'>history.back(-1)</script>"
response.end 
end if  
set editreco=server.createobject("adodb.recordset")
    sqlstr="select * from book where id=" &id
    editreco.open sqlstr,conn,1,1
if editreco("username")<>username then
response.write"<script language='javascript'>alert('只有作者本人才能编辑该帖子！')</script>"
response.write "<script language='javascript'>history.back(-1)</script>"
response.end
end if%>
   


<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="8" background="images/left.gif">&nbsp;</td>
    <td valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="0">
        <tr> 
          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height=6></td>
              </tr>
            </table>
            <table width="754" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width=6 height=6><img src="images/index_2.gif" width="6" height="6"></td>
                      <td width="742" background="images/index_3.gif"></td>
                      <td width=6> <div align="right"><img src="images/index_1.gif" width="6" height="6"></div></td>
                    </tr>
                  </table>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width=1 bgcolor="C6C3C4"></td>
                      <td height=6 bgcolor="FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="8">
                          <tr>
                            <td><img src="images/Order_26.gif" width="10" height="10"> 
                              <a href=index.asp>潮南社区</a>  →<a href=list.asp?bid=<%=request.querystring("bid")%>><%=request.querystring("name")%></a>→        
                              编辑帖子 </td>                                                                         
                          </tr>                                                                         
                        </table></td>                                                                                                     
                      <td width=1 bgcolor="C6C3C4"></td>                                                                                                     
                    </tr>                                                                                                     
                  </table>                                                                                                     
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">                                                                                                     
                    <tr>                                                                                                      
                      <td width=5 height=5><img src="images/left_data_4.gif" width="5" height="5"></td>                                                                                                     
                      <td width="742" background="images/left_data_6.gif"></td>                                                                                                     
                      <td width=5> <div align="right"><img src="images/left_data_5.gif" width="5" height="5"></div></td>                                                                                                     
                    </tr>                                                                                                     
                  </table></td>                                                                                                     
              </tr>                                                                                                     
            </table>                                                                                                     
            <br>                                                        
            <div align="center">                                                      
              <center> 
                <table width="90%" border="0" cellpadding="0" cellspacing="1" bgcolor="f6f6f6"><form method="post" action="save_post_edit.asp?id=<%=editreco("id")%>"  name="esung">
                  <tr bgcolor="#FFFFFF"> 
                    <TD width="35%" height=30 align="left">&nbsp;<B>帖子主题：</B></TD>
                    <TD width="102%"><b><%=editreco("title")%></b> </TD>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <input type="hidden" name="url" value="<%=request.serverVariables("Http_REFERER")%> ">
                    <TD width="35%" height=50 align="left"> <P                                                           
      style="LINE-HEIGHT: 150%; MARGIN-LEFT: 5px; MARGIN-TOP: 5px"><B>你的表情：</B> 
                        <BR>
                        ·放在帖子前面。</P></TD>
                    <TD width="102%"> <input type="radio" name="faceimg" value="07" checked> 
                      <img src="images/01.gif" width="15" height="15"> <input type="radio" name="faceimg" value="02"> 
                      <img src="images/02.gif" width="15" height="15"> <input type="radio" name="faceimg" value="03"> 
                      <img src="images/03.gif" width="15" height="15"> <input type="radio" name="faceimg" value="04"> 
                      <img src="images/04.gif" width="15" height="15"> <input type="radio" name="faceimg" value="05"> 
                      <img src="images/05.gif" width="15" height="15"> <input type="radio" name="faceimg" value="06"> 
                      <img src="images/06.gif" width="15" height="15"><BR> <input type="radio" name="faceimg" value="07"> 
                      <img src="images/07.gif" width="15" height="15"> <input type="radio" name="faceimg" value="08"> 
                      <img src="images/08.gif" width="15" height="15"> <input type="radio" name="faceimg" value="09"> 
                      <img src="images/09.gif" width="15" height="15"> <input type="radio" name="faceimg" value="10"> 
                      <img src="images/10.gif" width="15" height="15"> <input type="radio" name="faceimg" value="11"> 
                      <img src="images/11.gif" width="15" height="15"> <input type="radio" name="faceimg" value="12"> 
                      <img src="images/12.gif" width="15" height="15"> </TD>
                  </tr>
                  <tr bgcolor="#FFFFFF"> 
                    <TD width="35%" height=250 align="left" vAlign=top><BR> <B>&nbsp;帖子内容:</b> 
                      <BR>
                      ·HTML标签： 不可用<BR>
                      ·UBB标签： 可用<BR>
                      ·贴图标签： 可用<BR>
                      ·Flash标签：可用<BR>
                      ·表情字符转换：可用<BR>
                      ·上传图片：可用<BR> <BR> <SCRIPT>                                                        
function emoticon(theSmilie){                                                        
document.esung.body.value +=theSmilie + '';                                                        
document.esung.body.focus();                                                        
}                                                        
</SCRIPT> <SCRIPT src="ybbcode.js"></SCRIPT> </TD>
                    <TD width="102%" vAlign=center> <p align="center"> 
                        <IFRAME name=ad                                                           
            src="upload.asp" frameBorder=0                                                           
            width="100%" scrolling=no height=25></IFRAME>
                        <BR>
                        <IMG onclick=fly() alt=飞行字 src="images/fly.gif" border=0> 
                        <IMG onclick=move() alt=移动字                                                             
      src="images/move.gif" border=0> <IMG                                                             
      onclick=light() alt=发光字 src="images/glow.gif" border=0> <IMG onclick=ying() alt=阴影字                                                             
      src="images/shadow.gif" border=0> <IMG                                                             
      onclick=image() alt=图片 src="images/image.gif" border=0> <IMG onclick=Cswf() alt=Flash图片                                                             
      src="images/swf.gif" border=0> <IMG onclick=Cdir() alt=Shockwave文件 src="images/Shockwave.gif" border=0> 
                        <IMG onclick=Crm() alt=realplay视频文件                                                             
      src="images/rm.gif" border=0> <IMG onclick=Cwmv() alt="Media Player视频文件" src="images/mp.gif" border=0>文字大小： 
                        <select onchange=ybbsize(this.options[this.selectedIndex].value) name=a style="font-size: 9pt">
                          <OPTION value=1>1</OPTION>
                          <OPTION value=2>2</OPTION>
                          <OPTION value=3>3</OPTION>
                          <OPTION value=4>4</OPTION>
                        </SELECT>
                        <span lang=zh-cn>颜色： 
                        <select onchange=COLOR(this.options[this.selectedIndex].value) name="111" style="font-size: 9pt">
                          <option style='COLOR:000000;BACKGROUND-COLOR:000000' value=000000>黑色</option>
                          <option style='COLOR:FFFFFF;BACKGROUND-COLOR:FFFFFF' value=FFFFFF>白色</option>
                          <option style='COLOR:008000;BACKGROUND-COLOR:008000' value=008000>绿色</option>
                          <option style='COLOR:800000;BACKGROUND-COLOR:800000' value=800000>褐色</option>
                          <option style='COLOR:808000;BACKGROUND-COLOR:808000' value=808000>橄榄色</option>
                          <option style='COLOR:000080;BACKGROUND-COLOR:000080' value=000080>深蓝色</option>
                          <option style='COLOR:800080;BACKGROUND-COLOR:800080' value=800080>紫色</option>
                          <option style='COLOR:808080;BACKGROUND-COLOR:808080' value=808080>灰色</option>
                          <option style='COLOR:FFFF00;BACKGROUND-COLOR:FFFF00' value=FFFF00>黄色</option>
                          <option style='COLOR:00FF00;BACKGROUND-COLOR:00FF00' value=00FF00>浅绿色</option>
                          <option style='COLOR:00FFFF;BACKGROUND-COLOR:00FFFF' value=00FFFF>浅蓝色</option>
                          <option style='COLOR:FF00FF;BACKGROUND-COLOR:FF00FF' value=FF00FF>粉红色</option>
                          <option style='COLOR:C0C0C0;BACKGROUND-COLOR:C0C0C0' value=C0C0C0>银白色</option>
                          <option style='COLOR:FF0000;BACKGROUND-COLOR:FF0000' value=FF0000>红色</option>
                          <option style='COLOR:0000FF;BACKGROUND-COLOR:0000FF' value=0000FF>蓝色</option>
                          <option style='COLOR:008080;BACKGROUND-COLOR:008080' value=008080>蓝绿色</option>
                        </select>
                        <BR>
                        &nbsp; 
                        <textarea name="body" cols="70" rows="15" class="textbox_shiixian_hui"><%=editreco("body")%></textarea>
                        <center>
                          <input name="send" type="submit" class="button" value="修 改" >
                          <input name="reset" type="reset" class="button" value="重 写 " >
                          <input name="return" type="button" class="button" onclick="javascript:history.go(-1)" value="返 回 " >
                        </center>
                        </span> </tr>
                </table>                                                                                                      
              </center>                                                         
            </div>                                                         
          </td>                                                                                                      
        </tr>                                                                                                      
      </table>                                                                                                       
      <!--#include file="down.asp"-->                                                                                                      
    </td>                                                                                                      
    <td width="8" background="images/right.gif">&nbsp;</td>                                                                                                      
  </tr>                                                                                                      
</table>                                                                                                      
</body>                                                                                                      
</html>                                                                                                      
