📄 add_note.asp
字号:
<%
if session("username")="" or session("usertype")="" then
response.Write"<script>"
response.Write"parent.location.href='default.asp';"
response.Write"</script>"
end if
%>
<!--#include file="conn.asp"-->
<%
if request("action")="add" then
set rs=server.CreateObject("adodb.recordset")
sql="select * from net_note order by id desc"
rs.open sql,conn,3,2
rs.addnew
rs("title")=request("title")
rs("type")=request("type")
rs("address")=request("source")
rs("datetime")=request("datetime")
rs("content")=request("content")
rs("up")=request("up")
rs("times")=100
rs.update
rs.close
response.Write("<script>")
response.Write("alert('添加成功!');")
response.Write("window.location.href='add_note.asp';")
response.Write("</script>")
response.End()
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加信息</title>
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<TABLE cellSpacing=0 cellPadding=0 width=100% align=center border=0>
<TR>
<TD style="HEIGHT: 16px"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="77%"><SPAN class=heading>添加公告提示</SPAN> </td>
</tr>
</table></TD>
</TR>
<TR>
<TD height=12 colSpan=2><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td bgcolor="#CCCCCC" height="1"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></TD>
</TR>
<TR>
<TD height="140" colSpan=2 vAlign=top> <div align="center">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#DBDBDB"> <table width="100%" border="0" cellspacing="1" cellpadding="0">
<form method="post" name="post" action="add_note.asp?action=add">
<tr>
<td width="15%" height="25" bgcolor="#FFFFFF"> <div align="right">信息标题:</div></td>
<td width="1%" rowspan="7" background="images/gline.gif" bgcolor="#FFFFFF"><img src="images/gline.gif" width="8" height="27"></td>
<td width="84%" bgcolor="#FFFFFF"> <input name="title" type="text" class=input_main id="title" style="width:320px;"></td>
</tr>
<tr>
<td height="25" align="right" bgcolor="#FFFFFF">信息显示:</td>
<td bgcolor="#FFFFFF"><input type="radio" name="up" value="1">
重要
<input name="up" type="radio" value="0" checked>
一般</td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"> <div align="right">信息类别:</div></td>
<td bgcolor="#FFFFFF"> <select name="type" id="type" style="clip:rect(1 84 19 1);magin:-2;width:100;backgroud:#fffff9">
<option value="1" selected>最新公告</option>
<option value="0">滚动提示</option>
</select> </td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"> <div align="right">发布时间:</div></td>
<td bgcolor="#FFFFFF"><input name="datetime" type="text" id="datetime" class=input_main value="<%=date()%>" readonly>
<a href="#SelectDate" onClick="javascript:window.open('schtime.asp?form=post&field=datetime','','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=190,height=160,top=60,left=150');">
<img border="0" src="images/date_picker.gif" width="50" height="17" name="times"></a>
( <font color="#FF0000">点击调用日历 </font>)</td>
</tr>
<tr>
<td height="25" bgcolor="#FFFFFF"> <div align="right">信息来源:</div></td>
<td bgcolor="#FFFFFF"><input name="source" type="text" id="source" class=input_main value="<%=session("username")%>" size="45">
</td>
</tr>
<tr>
<td height="151" valign="top" bgcolor="#FFFFFF"> <div align="right">介绍内容:</div></td>
<td align="left" valign="top" bgcolor="#FFFFFF" colSpan=2>
<textarea name="content" style="width:480; height:165" id="content" class="sub"></textarea>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> </td>
<td height="25" bgcolor="#FFFFFF"> <div align="center">
<input type="submit" name="Submit" value="提 交" class=sub onClick="return subclick();">
<input type="reset" name="reset" value="重 置" class=sub>
</div></td>
</tr>
</form>
</table></td>
</tr>
</table>
</div></TD>
</TR>
</TABLE>
</body>
</html>
<SCRIPT LANGUAGE="JavaScript">
<!--
function subclick()
{
if (post.title.value =="")
{
alert("标题不能为空!");
post.title.focus();
return (false);
}
if (post.source.value =="")
{
alert("请填写信息来源!");
post.source.focus();
return (false);
}
}
//-->
</SCRIPT>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -