<!--#include file=CONN.ASP-->
<!--#include file=cookies.asp-->
<%
dim flag
flag=request.cookies("foxwww")("fox")
if flag<9 then
response.Write "<script LANGUAGE='javascript'>alert('你目前的级别不允许此操作！');history.go(-1);</script>"
response.end
end if

if flag=10 then
response.Write "<script LANGUAGE='javascript'>alert('您只是后台测试员，请注意身份！');window.location='right.asp';</script>"
response.end
end if%>
<title>增加公告</title>
<link rel="stylesheet" type="text/css" href="images/fox.css">
<style type="text/css">
<!--
body {
	background-color: #CCCC99;
}
.style1 {color: #FF0000}
-->
</style>
<%
	dim sql
	dim rs
	dim id,ok,biaoti,neirong,zhu
    id=request("id")
function HTMLEncode(fString)
if not isnull(fString) then
    fString = replace(fString, ">", "&gt;")
    fString = replace(fString, "<", "&lt;")
    fString = Replace(fString, CHR(32), "&nbsp;")
    fString = Replace(fString, CHR(9), "&nbsp;")
    fString = Replace(fString, CHR(34), "&quot;")
    fString = Replace(fString, CHR(39), "&#39;")
    fString = Replace(fString, CHR(13), "")
    fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
    fString = Replace(fString, CHR(10), "<BR> ")
    'fString=ChkBadWords(fString)
    HTMLEncode = fString
end if
end function
	set rs=server.createobject("adodb.recordset")
	sql="select * from [FOX_gonggao] where id="&cstr(id)
	rs.open sql,conn,1,3
    if request("ok")=1 then
    rs("biaoti")=request("biaoti")
    rs("neirong")=request("neirong")
    rs("zhu")=request("zhu")
    rs("data")=now()
    rs.update
    response.write "<font size=2>修改成功!</font><br>"
    response.end
    else
%>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
  <tr>
    <td width="78%">
  <div align="center">
    <center>
  <table width="100%" height="393" border="1" cellpadding="2" bordercolor="#F7F7F7">
    <FORM name=theForm method=POST action=editGONGGAO.ASP?ok=1&id=<%=request("id")%>>
    <tr bgcolor="#BDBEDE">
                      <td width="517" height="28" colspan="2" style="border-style: solid; border-width: 1" bgcolor="#CC3300">
                      <p class="style1" style="MARGIN-LEFT: 6px">
                <span style="font-size: 9pt"><font size="2">&nbsp;</font><font color="#FFFFFF">修改首页公告</font></span></td>
              </tr>
    <tr>
                      <td bgColor="#f7f7f7" height="43" width="90" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium; border-top-style: solid; border-top-width: 1" align="center">
                      <span style="FONT-SIZE: 12px">
                      标题：</span></td>
                      <td bgColor="#f7f7f7" height="43" width="492" style="border-left-style: none; border-left-width: medium; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1">
                      <p align="left">
                      <span style="FONT-SIZE: 12px">
                      <input name="biaoti" style="BACKGROUND-COLOR: #eeeeee; BORDER-BOTTOM: 1px solid #FFFFFF; BORDER-LEFT: 1px solid #a2a2a2; BORDER-RIGHT: 1px solid #ffffff; BORDER-TOP: 1px solid #a2a2a2; COLOR: #333333; tabIndex="1" value="<%=HTMLEncode(rs("biaoti"))%>" size="32" maxlength="50">&nbsp; 
						颜色：<input name="zhu" style="BACKGROUND-COLOR: #eeeeee; BORDER-BOTTOM: 1px solid #FFFFFF; BORDER-LEFT: 1px solid #a2a2a2; BORDER-RIGHT: 1px solid #ffffff; BORDER-TOP: 1px solid #a2a2a2; COLOR: #333333; tabIndex="1" value="<%=rs("zhu")%>" size="12" maxlength="50"></span></td>
              </tr>
    <tr>
                      <td bgColor="#f7f7f7" height="283" width="90" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium" align="center">
                      <span style="FONT-SIZE: 12px">
                      内容：</span></td>
                      <td bgColor="#f7f7f7" height="283" style="border-left-style: none; border-left-width: medium; border-right-style: solid; border-right-width: 1">
                      <p align="left">
                      <span style="FONT-SIZE: 12px">
                      <textarea rows="21" name="neirong" cols="64" style="BACKGROUND-COLOR: #eeeeee; BORDER-BOTTOM: #FFFFFF 1px solid; BORDER-LEFT: #a2a2a2 1px solid; BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #a2a2a2 1px solid; COLOR: #333333; FONT-SIZE: 9pt;"><%=rs("neirong")%></textarea></span></td>
              </tr>
    <tr valign="middle" bgcolor="#eeeeee">
                <td height="27" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1" colspan="2"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td><div align="center">
                      <input type="submit" value="确认修改" name="B1">
                    </div></td>
                    <td><div align="center">
                      <input type="reset" value="取消修改" name="B1">
                    </div></td>
                  </tr>
                </table></td>
              </tr>
			  <%
    end if
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing
%>
</form>
  </table>
    </center>
  </div>
    </td>
  </tr>
</table></body></html>