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

    <!--#include file="hs.asp"-->
<%
on error resume next
id=request("id")
sql="select*from zwggao where id="&id&" and ltbh='"&ltbh&"'"
set rs=conn.execute(sql)
if request("act")=empty then
%>
<form action="ggxg.asp?act=xg&id=<%=id%>" method=post>
<table cellpadding="0" cellspacing="0" width="399" style="border: 1px solid #3399FF" height="356" align="left">
	<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" value="<%=rs("cnggtitle")%>"></span></font></td>
	</tr>
	<tr>
		<td height="289">
		<p align="center"><textarea rows="20" name="cncount" cols="50"><%=rs("cncount")%></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>
</form>
<%
rs.close
set rs=nothing
else '数据修改

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"))

sqlxg="update zwggao set cnggtitle='"&cnggtitle&"',cncount='"&cncount&"' where id="&id&" and ltbh='"&ltbh&"'"
conn.execute(sqlxg)
%>
<script language=vbscript>
<!--
window.alert"修改成功!"
window.close
-->
</script>
<%
end if
%>
<%dbclose%>