📄 massage.asp
字号:
<!--#include file="conn_db.asp"-->
<html>
<head>
<title>发布公告</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css">
<!--
body {
background-image: url(images/bg.gif);
}
-->
</style></head>
<body>
<h4 align="center">发布公告</h4>
<center>
<table border="0" width=400 style="border-collapse:collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<form method="post" action="" name="form1" >
<tr>
<td>主题:</td>
<td width="341"><input type="text" name="title" size="40">
** </td>
</tr>
<tr>
<td>内容:</td>
<td width="341"> <textarea name="articlebody" rows="4" cols="37" wrap="soft"></textarea>
**</td>
</tr>
<tr>
<td>姓名:</td>
<td width="341"><input name="name" type="text" value="admin" size="10"> </td>
</tr>
<tr>
<td>话题</td>
<td><select name="t" id="t">
<option value="学习">学习</option>
<option value="娱乐">娱乐</option>
<option value="健身">健身</option>
</select></td>
</tr>
<tr>
<td></td>
<td width="341"> <input type="submit" value="提交" size="20"></td>
</tr>
</form>
</table>
</center>
<p align=center><a href="admin.asp?page_no=<%=session("page_no")%>" target="_parent">返回首页</a>
<a href="admin.asp" target="_self">
<%
if request("title")<>"" and request("articlebody")<>"" then
layer=1 ' 表示是第一层
parent_id=0 ' 因为是第一层,上一级文章编号设为0
re_num=0 ' 回复数为0
hit_num=0 ' 浏览数为0
' 将文章保存到数据库
db.Execute " insert into article(title,articlebody,name,layer,parent_id,hit_num,t,submit_date) values (" _
& "'" & Request.Form("title") &"', " _
& "'" & Request.Form("articlebody") &"', " _
& "'" & Request.Form("name") &"', " _
& "" & layer &", " _
& "" & parent_id &", " _
& "" & hit_num &", " _
& "'" & Request.Form("t") &"', " _
& "'" & date() & "') "
db.close ' 关闭连接对象
' 保存完毕,重定向回首页
end if
%>
</a>
<p align=center>
<p align=center>
<p align=center>
<p align=center>
<p align=center>
<p align=center>
<p align=center>
<p align=center>Copyright 2006-2008 http://cm86.vicp.net All Rights Reserved
<p align="center"><font color="#E3E9F1" size="6" face="华文行楷">CM 新 闻 发 布 系 统 V 1。0</font> </p>
<p align=center>
<p align=center>
<p align=center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -