down_originadd.asp

来自「SK信息采集2.0功能介绍: 1.可针对任何静态网页,动态网页进行采集。包括h」· ASP 代码 · 共 335 行 · 第 1/2 页

ASP
335
字号
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Option Explicit%>
<!--#include file="../../Conn.asp"-->
<!--#include file="../../SysCls/KS_CommonCls.asp"-->
<!--#include file="../Inc/Session.asp"-->
<%
'===================================================================================================================
'软件名称:科汛网站管理系统
'当前版本:科汛网站管理系统 V2.2 SP2 Free
'Copyright (C) 2006-2008 Kesion.Com  All rights reserved.
'产品咨询QQ:9537636,41904294
'技术支持QQ:111394,54004407 
'程序版权:科汛网络
'程序开发:科汛网络开发组(总策划:林文仲)
'E-Mail  :kesioncms@hotmail.com webmaster@kesion.com
'官方网站:http://www.kesion.com  
'演示站点:http://test.kesion.com 
'郑重声明:
'    ①、免费版本请在程序首页保留版权信息,并做上本站LOGO友情连接,商业版本无此要求;
'    ②、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息;
'    ③、科汛网络保留此软件的法律追究权利
'===================================================================================================================
Dim KSCls
Set KSCls = New Down_OriginAdd
KSCls.Execute()
Set KSCls = Nothing

Class Down_OriginAdd
        Private KSCMS
		Private Sub Class_Initialize()
		  Set KSCMS=New CommonCls
		End Sub
        Private Sub Class_Terminate()
		 Call KSCMS.CloseConn()
		 Set KSCMS=Nothing
		End Sub
		'主体部分
		Public Sub Execute()
		
		 If Not KSCMS.ReturnPowerResult(2, "KMP20002") Then
			  Call KSCMS.ReturnErr(1, "")
			  Exit Sub
		 End If
		 
		Dim Action, OriginName, ChannelID, ID, Page, Contact, Telphone, UnitName, UnitAddress, Zip, Email, QQ, HomePage, Note, OriginType
		Dim OriginRS, OriginSql
		
		 Action = Request("Action")
		  
		 ID = Request("ID")
		 Page = Request("Page")
		 OriginName = Replace(Replace(Trim(Request.Form("OriginName")), "'", ""), """", "")
		 ChannelID = Request.Form("ChannelID")
		 Contact = Trim(Request.Form("Contact"))
		 Telphone = Trim(Request.Form("Telphone"))
		 UnitName = Trim(Request.Form("UnitName"))
		 UnitAddress = Trim(Request.Form("UnitAddress"))
		 Zip = Trim(Request.Form("Zip"))
		 Email = Trim(Request.Form("Email"))
		 QQ = Trim(Request.Form("QQ"))
		 HomePage = Trim(Request.Form("HomePage"))
		 Note = Trim(Request.Form("Note"))
		 OriginType = CInt(Request.Form("OriginType"))
		
		If Action = "AddSave" Then
		 If OriginName = "" Then
		 Call KSCMS.AlertHistory("请输入来源名称!", -1)
		 Set KSCMS = Nothing
		 Response.End
		 End If
		 Set OriginRS = Server.CreateObject("ADODB.RECORDSET")
		 OriginSql = "Select * From [KS_Origin] Where OriginName='" & OriginName & "' And ChannelID=" & ChannelID & " And OriginType=0"
		 OriginRS.Open OriginSql, conn, 3, 3
		 If OriginRS.EOF And OriginRS.BOF Then
		  OriginRS.AddNew
		  OriginRS("ID") = Year(Now) & Month(Now) & Day(Now) & KSCMS.MakeRandom(5)
		  OriginRS("OriginName") = OriginName
		  OriginRS("ChannelID") = ChannelID
		  OriginRS("Contact") = Contact
		  OriginRS("Telphone") = Telphone
		  OriginRS("UnitName") = UnitName
		  OriginRS("UnitAddress") = UnitAddress
		  OriginRS("Zip") = Zip
		  OriginRS("Email") = Email
		  OriginRS("QQ") = QQ
		  OriginRS("HomePage") = HomePage
		  OriginRS("Note") = Note
		  OriginRS("OriginType") = OriginType
		  OriginRS("AddDate") = Now()
		  OriginRS.Update
		 Response.Write ("<Script> if (confirm('来源增加成功,继续添加吗?')) { location.href='Down_OriginAdd.asp';} else{location.href='Down_OriginList.asp';parent.frames['BottomFrame'].location.href='../Split.asp?OpStr=图片管理中心 >> 来源管理&ButtonSymbol=DownOriginPAGE';}</script>")
		 Else
		   Call KSCMS.AlertHistory("数据库中已存在该来源名称!", -1)
		   Set KSCMS = Nothing
		   Response.End
		 End If
		 OriginRS.Close
		ElseIf Request("Action1") = "EditSave" Then
		 If OriginName = "" Then
		   Call KSCMS.AlertHistory("请输入来源名称!", -1)
		   Set KSCMS = Nothing
		   Response.End
		 End If
		 Set OriginRS = Server.CreateObject("ADODB.RECORDSET")
		  OriginSql = "Select * From [KS_Origin] Where ID='" & ID & "'"
		  OriginRS.Open OriginSql, conn, 1, 3
		  OriginRS("OriginName") = OriginName
		  OriginRS("ChannelID") = ChannelID
		  OriginRS("Contact") = Contact
		  OriginRS("Telphone") = Telphone
		  OriginRS("UnitName") = UnitName
		  OriginRS("UnitAddress") = UnitAddress
		  OriginRS("Zip") = Zip
		  OriginRS("Email") = Email
		  OriginRS("QQ") = QQ
		  OriginRS("HomePage") = HomePage
		  OriginRS("Note") = Note
		  OriginRS.Update
		  OriginRS.Close
		 Response.Write ("<form name=""split"" action=""../split.asp"" method=""GET"" target=""BottomFrame"">")
		 Response.Write ("<input type=""hidden"" name=""OpStr"" value=""图片管理中心 >> <font color=red>来源管理</font>"">")
		 Response.Write ("<input type=""hidden"" name=""ButtonSymbol"" value=""DownOriginPage""></form>")
		 Response.Write ("<script language=""JavaScript"">document.split.submit();</script>")
		 Call KSCMS.Alert("来源修改成功!", "Down_OriginList.asp?Page=" & Page)
		End If
		
		Response.Write "<html>"
		Response.Write "<head>"
		Response.Write "<meta http-equiv='Content-Type' content='text/html; chaRSet=gb2312'>"
		Response.Write "<title>来源管理</title>"
		Response.Write "<link href='../Inc/Admin_Style.CSS' rel='stylesheet' type='text/css'>"
		Response.Write "<script language='JavaScript' src='../JS/Common.js'></script>"
		Response.Write "</head>"
		Response.Write "<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>"
		
		 If Action = "Edit" Then
		 Set OriginRS = Server.CreateObject("ADODB.RECORDSET")
		 OriginSql = "Select * From [KS_Origin] Where ID='" & ID & "'"
		 OriginRS.Open OriginSql, conn, 1, 1
		 If Not OriginRS.EOF Then
		 OriginName = Trim(OriginRS("OriginName"))
		 ChannelID = OriginRS("ChannelID")
		 Contact = Trim(OriginRS("Contact"))
		 Telphone = Trim(OriginRS("Telphone"))
		 UnitName = Trim(OriginRS("UnitName"))
		 UnitAddress = Trim(OriginRS("UnitAddress"))
		 Zip = Trim(OriginRS("Zip"))
		 Email = Trim(OriginRS("Email"))
		 QQ = Trim(OriginRS("QQ"))
		 HomePage = Trim(OriginRS("HomePage"))
		 Note = Trim(OriginRS("Note"))
		
		 End If
		 
		Response.Write "<table width='100%' height='25' border='0' cellpadding='0' cellspacing='1' bgcolor='#efefef'>"
		Response.Write "  <tr>"
		Response.Write "    <td class='sort'><div align='center'><font color='#990000'>编辑来源</font></div></td>"
		Response.Write "  </tr>"
		Response.Write "</table><br><br><br>"
		Response.Write "<table width='80%' border='0' align='center' cellpadding='0' cellspacing='0' style='border-collapse: collapse'>"
		Response.Write "  <form  action='Down_OriginAdd.asp' method='post' name='OrigDownrm' onsubmit='return(CheckForm())'>"
		Response.Write "   <tr>"
		Response.Write "      <td width='230' height='25' align='right' nowrap>来源名称:</td>"
		Response.Write "      <td width='21' height='30' align='right' nowrap> <div align='center'></div></td>"
		Response.Write "      <td width='409' height='25' nowrap><b>"
		Response.Write "        <input name='OriginName' type='text' id='OriginName' value='" & OriginName & "' style='width:200;border-style: solid; border-width: 1'>"
		Response.Write "        </b>* </td>"
		Response.Write "      <td width='134' nowrap>&nbsp;</td>"

⌨️ 快捷键说明

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