<!--#include file = admin_chk.asp -->
<!--#include file="admin_conn.asp"-->

<%
function HTMLEncode2(fString)
	fString = Replace(fString, CHR(13), "")
	fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
	fString = Replace(fString, CHR(10), "<BR>")
	HTMLEncode2 = fString
end function
dim action
action=request.QueryString("action")
select case action
case "savegongao" 
set rs=server.CreateObject("adodb.recordset")
rs.open "select gonggao from shopsetup",conn,1,3
rs("gonggao")=htmlencode2(trim(request("gonggao")))
rs.update
set rs=nothing
response.Write "<script language=javascript>alert('公告修改成功！');history.go(-1);</script>"
response.End
end select
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="page.css" rel="stylesheet" type="text/css">
</head>

<body>
<br><table width="96%" border="0" align="center" cellpadding="1" cellspacing="1" id="Table1" bgcolor="#CCCCCC">
  <tr> 
    <td height="16" bgcolor="f1f1f1"> 
      <div align="center"><font color="#000000">更改首页公告</font></div>
    </td>
  </tr>
  <tr> 
    <td height="200" bgcolor="#FFFFFF"> 
      <form name="form1" method="post" action="gonggao.asp?action=savegongao" id="Form1">
        <div align="center"><font color="#FF0000">声明：此信息为首页公告，请及时更新，支持HTML代码。</font></div>
        <table width="80%" border="0" align="center" cellpadding="3" cellspacing="0" id="Table2">
          <tr> 
            <td> 
              <div align="center"> 
                <textarea name="gonggao" cols="60" rows="10" id="Textarea1" class="wenbenkuang"><%set rs=server.CreateObject("adodb.recordset")
                rs.Open "select gonggao from shopsetup",conn,1,1
                response.Write trim(rs("gonggao"))
                rs.Close
                set rs=nothing
                %></textarea>
              </div>
            </td>
          </tr>
          <tr> 
            <td height="20"> 
              <div align="center"> 
                <input type="submit" name="Submit" value="提 交" id="Submit1" class="go-wenbenkuang">
                &nbsp;&nbsp; 
                <input type="reset" name="Submit2" value="恢 复" id="Reset1" class="go-wenbenkuang">
              </div>
            </td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
</table>

</body>
</html>
 
