⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 add_form.asp

📁 与asp相关的技术 如数据库和网页设计 很有用的哦
💻 ASP
字号:
<%	if session("user_type")<>"S" then
		response.redirect "../../../index.asp"
	end if
%>

<!--#INCLUDE FILE="../../../system/odbc_connection.asp"-->
<HTML>
	<head>
		<title>添加消息</title>
		<link rel="stylesheet" href="../../../system/all.css">
		<script language="JAVASCRIPT">
		<!--
		function Trim(str){
		  while (str !="" && str.charAt(0) == " ") str = str.substring(1,str.length);
		  while (str !="" && str.charAt(str.length-1) == " ") str = str.substring(0,str.length-1);
		  return str;
		}
		function check_Null(){
			if (Trim(document.form1.subject_id.value)=="-999"){
				alert("请选择子类别!");
				return false;
			}
			if (Trim(document.form1.file_name.value)==""){
				alert("题目不能为空!");
				return false;
			}
			return true;
		}
		function touser2_OnChange(){
			document.form1.to_user_1.value=document.form1.to_user_2.value;
		}
		function touser1_OnChange(){
			document.form1.to_user_2.value="";
		}


		// -->
		</script>
	</head>
<body>
	<%
		dim user_id
		user_id=session("user_id")
	%>
	<h4 >&nbsp&nbsp添加新文档</h4>
	<center>
		<table border='0' width='80%' cellspacing='0' bordercolorlight='#000000' bordercolordark='#FFFFFF'  cellpadding='0' height="114">
		<tr bgcolor=#FFFFCC>
		<td>
	<TABLE border="0" width=100%>
		<form METHOD="POST" ACTION="add.asp?theuser_name='<%=user_id%>&theuser_name2=s" name=form1 onsubmit="javascript: return check_Null();">
			<tr><td></td>
			<td>
				
				<input name="to_user_1" type="hidden" size="10" value="ALL" onChange="touser1_OnChange();">
				<input name="to_user_2" type="hidden" size="10" value="ALL" >
			</td></tr>
			
			<tr><td>子类别:</td>
			<td>
				<select name="subject_id" >
					<%
					response.write "<option value='-999'>--请选择--</option>"
					'依次读出子类别
					sql="select * from reference_board where lesson_id='" & session("lesson_id") & "'"
					set rs=db.execute(sql)
					do while not rs.eof
						if session("subject_id")="ALL" then
							response.write "<option  value='"& rs("id") & "' >"& rs("subject_name") &"</option>"
						elseif rs("id")=int(session("subject_id")) then
							response.write "<option  value='"& rs("id") & "'  selected>"& rs("subject_name") &"</option>"
						else
							response.write "<option  value='"& rs("id") & "' >"& rs("subject_name") &"</option>"
						end if
						rs.movenext
					loop
					response.write "<option value='0'>其它</option>"
					%>
				</select>
			</td></tr>

			<tr><td>名&nbsp称:</td><td><input type="text" name="file_name" size="40">** </td></tr>
			<tr><td>网&nbsp址:</td><td><input type="text" name="URL" size="60" value="http://"> </td></tr>
			<tr><td>作&nbsp者:</td><td><input type="text" name="author" size="20"> </td></tr>
			<tr><td>摘&nbsp要:</td><td><Textarea name="abstract" Rows=4 Cols=60 WRAP=SOFT></TextArea></td></tr>
			<tr><td>关键字:</td><td><input type="text" name="keywords" size="30">(中间用逗号隔开) </td></tr>
			<tr><td>来源:</td><td><input type="text" name="magazine" size="30"> </td></tr>
			<tr>
				<td>附件</td>
				<td>
					<input type="radio" name="append" value="Y" checked>需要
					<input type="radio" name="append" value="N"  >不需要 (如需要,请准备您的附件)
				</td>
			</tr>
	</table>
	</td>
	</tr>
	</table>
	<p>
	<input TYPE="submit" VALUE=" 提交 " Size="20" class="buttonstyle">	
	</center>
</form>
</body>
</HTML>

⌨️ 快捷键说明

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