www.gusucode.com > 超文本多用户论坛程序 1.1 > bbs/admin/ggfb.asp

    <!--#include file="hs.asp"-->
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<title>公告发布</title>
</head>
<body topmargin=0>
<form action="ggfb.asp" method=post>
<div align="left">
<table cellpadding="0" cellspacing="0" width="349" style="border: 1px solid #3399FF" height="356" align= center>
	<tr>
		<td height="36" bgcolor="#F1F5FA" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px">
		<font color="#FF0000"><span style="font-size: 12px">&nbsp;公告标题:<input type="text" name="cnggtitle" size="20"></span></font></td>
	</tr>
	<tr>
		<td height="289">
		<p align="center"><textarea rows="20" name="cncount" cols="44">本公告不支持htm和脚本语言!请直接使用文字</textarea></td>
	</tr>
	<tr>
		<td height="29" valign="top">
		<p align="center"><input type="submit" value="提 交" name="B1">
		<input type="reset" value="重 置" name="B2"></td>
	</tr>
</table>
</div>
</form>
</body>
<%
function ReplaceBadChar(strChar)
	if strChar="" then
		ReplaceBadChar=""
	else
		ReplaceBadChar=replace(replace(replace(replace(replace(replace(replace(strChar,"'",""),"*",""),"?",""),"(",""),")",""),"<",""),".","")
	end if
end function

cnggtitle=ReplaceBadChar(request("cnggtitle"))
cncount=ReplaceBadChar(request("cncount"))

if cnggtitle<>empty and cncount<>empty then

sql="insert into zwggao(cnggtitle,cncount,ltbh)values('"&cnggtitle&"','"&cncount&"','"&ltbh&"')"
conn.execute(sql)
%>
<script language=vbscript>
<!--
window.alert"添加成功!"
window.close
-->
</script>
<%
dbclose
end if
%>