gusucode.com > ASP+ACCESS中学网站设计与实现(论文+源代码+开题报告+任务书) > ASP+ACCESS中学网站设计与实现(论文+源代码+开题报告+任务书)\ASP001中学网站设计与实现\zxweb\admin\AddNews3_submit.asp

    <!--#include file=conn.asp -->
<!--#include file=session.asp-->
<%
Title=replace(trim(Request.Form("Title")),"'","''")
if Title="" then 
%>
<script language=javascript>
   history.back()
   alert("请填写新闻标题!")
</script> 
<%
Response.End
end if
Author=replace(trim(Request.Form("Author")),"'","''")
Original=replace(trim(Request.Form("Original")),"'","''")

Content=replace(trim(Request.Form("Content")),"'","''")
if Content="" then 
%>
<script language=javascript>
   history.back()
   alert("请输入新闻内容!")
</script> 
<%
Response.End
end if

BigClassID=Request.Form("BigClassID")
if BigClassID=0 then 
%>
<script language=javascript>
   history.back()
   alert("请选择该新闻所属的大类,如果系统中还没有新闻大类的话,请在《大类管理》中添加新类别!")
</script> 
<%
Response.End
end if

SmallClassID=Request.Form("SmallClassID")
if SmallClassID=0 then 
%>
<script language=javascript>
   history.back()
   alert("请选择该新闻所属的小类,如果系统中还没有新闻小类的话,请在《小类管理》中添加新类别!")
</script> 
<%
Response.End
end if


sql="INSERT INTO News (Title,Author,Original,Content,BigClassID,SmallClassID,UpdateTime) VALUES "
sql=sql & "(" & "'"& title & "'" & ","
sql=sql & "'"& Author &"'"&","
sql=sql & "'"& Original &"'"&","
sql=sql & "'"& Content &"'"&","
sql=sql & BigClassID &","
sql=sql & SmallClassID &","
sql=sql & "'" & Now() &"')"
conn.Execute (sql)
conn.close
set conn=nothing

%>

<html>

<head>
<meta http-equiv="refresh" content="1;url=AddNews1.asp">
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/bodystyle.css" rel="stylesheet" type="text/css">
</head>

<body>

<p> </p>
<table border="0" width="450" align=center>
  <tr>
    <td width="100%"><b>增加新闻</b></td>
  </tr>
  <tr>
    <td width="100%">
      <hr size="1">
    </td>
  </tr>
  <tr>
    <td width="100%">已经添加新的新闻!<BR>系统将在3秒钟后自动返回!</td>
  </tr>
  <tr>
    <td width="100%"> </td>
  </tr>
</table>
</body>

</html>