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

<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');history.go(-1);</script>"
response.End
else
if session("flag")>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
end if
dim newsid
newsid=request.QueryString("id")
 if request.QueryString("action")="save" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_news where newsid="&newsid,conn,1,3
rs("newsname")=trim(request("newsname"))
rs("addname")=trim(request("addname"))
if request("html")="ubb" then
rs("newscontent")=trim(request("newscontent"))
else
rs("newscontent")=ubbcode(trim(request("newscontent")))
end if
rs("adddate")=now()
rs.update
rs.close
set rs=nothing
response.write "<script language=javascript>alert('更改成功！');history.go(-1);</script>"
response.End
end if
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css.css" rel="stylesheet" type="text/css">
<style>
td{font-size:9pt;line-height:120%;color:#353535} 
body{font-size:9pt;line-height:120%} 

a:link          { color: #000000; text-decoration: none }
a:visited       { color: #000000; text-decoration: none }
a:active        { color: #000000; text-decoration: none }
a:hover         { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }
</style>
</head>

<body bgcolor="#799AE1">
<%set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_news where newsid="&newsid,conn,1,1%>
<table width="80%" border="1" cellspacing="0" cellpadding="1" bordercolor="#6699FF" align="center">
  <tr> 
    <td> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td background="../images/back_3.gif" rowspan="2"> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
              <tr> 
                <td class="12v" > 
                  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%">
                    <tr> 
                      <td> 
                        <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#006600">
                          <tr> 
                            <td bgcolor="#FFFFFF"> 
                              <div align="center"><font color="#000000">更改网站新闻</font></div>
                            </td>
                          </tr>
                          <tr> 
                            <td height="168" valign="top" bgcolor="#E8F1FF"> 
                              <form name="form1" method="post" action="newsedit.asp?action=save&id=<%=newsid%>">
                                <br>
                                <table width="80%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
                                  <tr> 
                                    <td width="18%" bgcolor="#E8F1FF" style="PADDING-LEFT: 6px">新闻主题：</td>
                                    <td width="82%" bgcolor="#E8F1FF" style="PADDING-LEFT: 6px"> 
                                      <input name="newsname" type="text" id="newsname" value=<%=trim(rs("newsname"))%>>
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td bgcolor="#E8F1FF" style="PADDING-LEFT: 6px">发 
                                      表 人：</td>
                                    <td bgcolor="#E8F1FF" style="PADDING-LEFT: 6px"> 
                                      <input name="addname" type="text" id="addname" value=<%=trim(rs("addname"))%>>
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td bgcolor="#E8F1FF" style="PADDING-LEFT: 6px">新闻内容：</td>
                                    <td bgcolor="#E8F1FF" style="PADDING-LEFT: 6px"> 
                                      <textarea name="newscontent" cols="36" rows="6" id="newscontent"><%=trim(rs("newscontent"))%></textarea>
                                    </td>
                                  </tr>
                                  <tr> 
                                    <td height="28" colspan="2" bgcolor="#E8F1FF" style="PADDING-LEFT: 6px"> 
                                      <div align="center"> 
                                        <input type="submit" name="Submit" value="提交发表">
                                        &nbsp; 
                                        <input name="html" type="checkbox" id="html" value="ubb" checked>
                                        使用HTML添加，UBB代码将不起作用！</div>
                                    </td>
                                  </tr>
                                </table>
                              </form>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<br>
<!--#include file="copyright.asp"-->
</body>
</html>
