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

📄 addnews2.asp

📁 为了开发出适用于中小型企业的通用人才管理软件。对于已备电脑等硬件设备而无人才管理软件的企业更能带来更高的收益。此人才管理软件主要应用了DELPHI 7和SQL。解决企业管理中的员工管理
💻 ASP
字号:
<%@ Language=VBScript %>
<% If Session(strCookieURL & "www.3rom.com") = "1369852475213" and Session("count")<10 Then %> 
<!--#INCLUDE FILE="inc_Conn.asp" -->
<!--#INCLUDE FILE="inc_Function.asp" -->
<%
Dim strClass,strTitle,strContent,strAuthor,strFreind,strLink,strImage
Dim strAdminID,strPost_IP
Dim strErr,strSql
Dim strMsg

strErr=0

If Request.Querystring("active")="DoIt" Then

strClass=chk(Request.form("Class"))
strTitle=chk(Request.form("Title"))
strContent=chk(Request.form("Content"))
strAuthor=chk(Request.form("Author"))
strFreind=chk(Request.form("Freind"))
strLink=chk(Request.form("Link"))
strImage=chk(Request.form("Image"))
strPost_IP=Request.ServerVariables("Remote_Addr")
strAdminID=Session("AdminID")



If strClass=0 Then strErr=strErr+1:strMsg=strMsg&"请选择类别"&"<br>"
If strTitle="" Then strErr=strErr+1:strMsg=strMsg&"请输入新闻标题"&"<br>"
If strContent="" Then strErr=strErr+1:strMsg=strMsg&"请输入新闻内容"&"<br>"
If strTitle="" Then strErr=strErr+1:strMsg=strMsg&"请输入作者"&"<br>"
If strFreind="" Then strFreind="本站原创新闻":strLink=""
If strFreind<>"本站原创新闻" and strLink="" Then strErr=strErr+1:strMsg=strMsg&"请输入新闻出处链接"&"<br>"

If strErr=0 Then

        strSql="Insert into News(News_Class,News_Title,News_Author,News_Content,News_Freind,News_Link,News_Image,News_Post_IP,News_Post_Time,News_AdminID)"
	strSql=strSql & "Values("
	strSql=strSql & "'" & strClass & "',"
	strSql=strSql & "'" & strTitle & "',"
	strSql=strSql & "'" & strAuthor & "',"
	strSql=strSql & "'" & strContent & "',"
	strSql=strSql & "'" & strFreind & "',"
	strSql=strSql & "'" & strLink & "',"
	strSql=strSql & "'" & strImage & "',"
	strSql=strSql & "'" & strPost_IP & "',"
	strSql=strSql & "'" & Now() & "',"
	strSql=strSql & "'" & strAdminID & "')"
              
	MyCon.execute(strSql)
	
	If MyCon.errors.count>0 Then
	strErr=strErr+1
	strMsg=strMsg& "写入数据库出错" & "<br>"
	Call Mywrite()
	Else
	Session("Title") = strTitle
	Response.redirect "AddNews3.asp"
	End If

	
Else
call Mywrite()
End If

End If

%>

<%Sub Mywrite() %>
<HTML>
<HEAD>
<title>AddNews2</title>
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb2312">
</HEAD>
<BODY bgcolor="#D6D3CE">
<div align="center">
  <center>
  <table border="1" width="75%" cellspacing="0" cellpadding="0">
    <tr>
      <td width="100%">产生<%=strErr%>条输入错误</td>
    </tr>
    <tr>
      <td width="100%" valign="top" align="center"><%=strMsg%></td>
    </tr>
    <tr>
      <td width="100%" align="center"><a href="javascript:history.go(-1)">返回修正错误</a>&nbsp; 
        <a href="Index.asp">返回管理</a></td>
    </tr>
  </table>
  </center>
</div>
</BODY>
</HTML>
<% End Sub %>

<%
MyCon.close
set MyCon=Nothing
%>
<% 
Else
Response.redirect "Login.asp"
End If
%>

⌨️ 快捷键说明

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