28,391
社区成员
发帖
与我相关
我的任务
分享
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="conn.asp"-->
<%
dim xianhe
xianhe=session("xianhe")
if xianhe="" then
response.Redirect"xh_login.asp"
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>录入新闻</title>
</head>
<body>
<p> </p>
<form action="save.asp" method="post" name="form1">
<!--#include file="../head.asp"-->
<table width="900" border="0" align="center" cellspacing="0">
<tr>
<td colspan="2" align="center" bgcolor="#DAE1E9"><h2>新闻录入</h2></td>
</tr>
<tr>
<td width="310" align="right">新闻标题:</td>
<td width="586" align="left"><input name="title" type="text" id="title" size="35" /></td>
</tr>
<tr>
<td align="right">录入时间:</td>
<td align="left"><%=now()%></td>
</tr>
<tr>
<td height="105" align="right">新闻内容:</td>
<td align="left"><textarea name="content" id="content" cols="50" rows="7"></textarea></td>
</tr>
<tr>
<td align="right">编写员:</td>
<td align="left"><input name="wname" type="text" id="wname" size="10" /></td>
</tr>
</table>
<table width="900" border="0" align="center" cellspacing="0">
<tr>
<td align="center"><input type="submit" name="button" id="button" value="提交" />
<input type="reset" name="button2" id="button2" value="重新输入" /></td>
</tr>
</table>
<!--#include file="../end.asp"-->
</form>
</body>
</html>
<!--#include file="conn.asp"-->
<%
dim xianhe
xianhe=session("xianhe")
if xianhe="" then
response.Redirect "login.asp"
end if
%>
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from fbnew"
rs.open sql,db,1,3
rs.addnew
rs("title")=trim(request.Form("title"))
rs("wname")=trim(request.Form("wname"))
rs("content")=server.HTMLEncode(request.Form("content")
rs("xwcount")=0
rs("xtime")=now()
rs.update
rs.close
db.close
set rs=noting
set db=noting
response.Redirect "add.asp"
%>
<%
set db=server.CreateObject("adodb.connection")
db.open "DBQ="&server.MapPath("../new.mdb")&";driver={microsoft access driver (*.mdb)}"
%>