add.asp

来自「与asp相关的技术 如数据库和网页设计 很有用的哦」· ASP 代码 · 共 44 行

ASP
44
字号
<%
if session("user_type")<>"T" then
	response.redirect "../../../../index.asp"
end if
%><% response.buffer=true%>
<!--#INCLUDE FILE="../../../../system/odbc_connection.asp"-->
<% '还需要修改,直接添加好了,就不要显示原来的了%>
<HTML>
<HEAD>
	<title>添加子论坛名 </title>
	<link rel="stylesheet" href="../../../../system/all.css">
</HEAD>

<BODY BGCOLOR="#FFFFFF">
	<h2 align="center">添加子论坛名称</h2>
	<CENTER>
	<form name=form1 method=post action="">
	<TABLE border="0"  width="90%">
		</caption>
		<Tr bgcolor=#e9e9e9 align="center">
			<TD><input name="forumname" type=text  size="20" >(最好字不要太多)</TD>
		</Tr>
	</TABLE>
	<p><input type="submit" name="submit" value="  提  交  " >&nbsp&nbsp<input type=submit name=submit value="  取  消  ">	
	</form>
	</CENTER>
	<%
		If request("submit")="  取  消  " Then
			response.redirect "index.asp?board_id="&board_id
		End If
		if trim(Request("forumname"))<>"" then
		forumname=trim(Request("forumname"))
		sql = "insert into bbs_forum(forumname,forumcount,lesson_id) values('" & forumname & "',0,'" & session("lesson_id") & "')" 
		db.Execute(Sql)
		db.close
		set db=nothing
		'下面自动刷新左边和右边框架
		response.write "<script language='Jscript'> top.frames['bottom'].frames['left'].location.reload(); </script>"
		response.write "<script language='Jscript'> top.frames['bottom'].frames['main'].location.replace('index.asp?board_id=" &board_id&"');</script>"
		end if
	%>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?