📄 article_editoradd.asp
字号:
<%@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 Article_EditorAdd
KSCls.Execute()
Set KSCls = Nothing
Class Article_EditorAdd
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(1, "KMA20004") Then
Call KSCMS.ReturnErr(1, "")
Exit Sub
End If
Dim Action, OriginName, ChannelID, ID, Page, Sex, Birthday, Telphone, UnitName, UnitAddress, Zip, Email, QQ, HomePage, Note, OriginType
Dim EditorRS, EditorSql
Action = KSCMS.G("Action")
ID = KSCMS.G("ID")
Page = KSCMS.G("Page")
OriginName = Trim(KSCMS.G("OriginName"))
ChannelID = KSCMS.G("ChannelID")
Sex = Trim(KSCMS.G("Sex"))
Birthday = KSCMS.G("Birthday")
Telphone = Trim(KSCMS.G("Telphone"))
UnitName = Trim(KSCMS.G("UnitName"))
UnitAddress = Trim(KSCMS.G("UnitAddress"))
Zip = Trim(KSCMS.G("Zip"))
Email = Trim(KSCMS.G("Email"))
QQ = KSCMS.G("QQ")
HomePage = KSCMS.G("HomePage")
Note = KSCMS.G("Note")
OriginType =KSCMS.G("OriginType")
If Action = "AddSave" Then
If OriginName = "" Then
Call KSCMS.AlertHistory("请输入姓名!", -1)
Set KSCMS = Nothing
Response.End
End If
Set EditorRS = Server.CreateObject("ADODB.RECORDSET")
EditorSql = "Select * From [KS_Origin] Where OriginName='" & OriginName & "' And ChannelID=" & ChannelID & " And OriginType=2"
EditorRS.Open EditorSql, conn, 3, 3
If EditorRS.EOF And EditorRS.BOF Then
EditorRS.AddNew
EditorRS("ID") = Year(Now) & Month(Now) & Day(Now) & KSCMS.MakeRandom(5)
EditorRS("OriginName") = OriginName
EditorRS("ChannelID") = ChannelID
EditorRS("Sex") = Sex
If Birthday <> "" Then
EditorRS("Birthday") = Birthday
End If
EditorRS("Telphone") = Telphone
EditorRS("UnitName") = UnitName
EditorRS("UnitAddress") = UnitAddress
EditorRS("Zip") = Zip
EditorRS("Email") = Email
EditorRS("QQ") = QQ
EditorRS("HomePage") = HomePage
EditorRS("Note") = Note
EditorRS("OriginType") = OriginType
EditorRS("AddDate") = Now()
EditorRS.Update
Set conn = Nothing
Response.Write ("<Script>if(confirm('责任编辑增加成功,继续添加吗?')) { location.href='Article_EditorAdd.asp';} else{location.href='Article_EditorList.asp';parent.frames['BottomFrame'].location.href='../Split.asp?OpStr=文章管理中心 >> 责任编辑管理&ButtonSymbol=EDITORPAGE';}</script>")
Else
Call KSCMS.AlertHistory("数据库中已存在该责任编辑!", -1)
Set KSCMS = Nothing
Response.End
End If
EditorRS.Close
ElseIf KSCMS.G("Action1") = "EditSave" Then
If OriginName = "" Then
Call KSCMS.AlertHistory("请输入姓名!", -1)
Set KSCMS = Nothing
Response.End
End If
Set EditorRS = Server.CreateObject("ADODB.RECORDSET")
EditorSql = "Select * From [KS_Origin] Where ID='" & ID & "'"
EditorRS.Open EditorSql, conn, 1, 3
EditorRS("OriginName") = OriginName
EditorRS("ChannelID") = ChannelID
EditorRS("Sex") = Sex
If Birthday <> "" Then
EditorRS("Birthday") = Birthday
End If
EditorRS("Telphone") = Telphone
EditorRS("UnitName") = UnitName
EditorRS("UnitAddress") = UnitAddress
EditorRS("Zip") = Zip
EditorRS("Email") = Email
EditorRS("QQ") = QQ
EditorRS("HomePage") = HomePage
EditorRS("Note") = Note
EditorRS.Update
EditorRS.Close
Set conn = Nothing
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=""EditorPage""></form>")
Response.Write ("<script language=""JavaScript"">document.split.submit();</script>")
Call KSCMS.Alert("责任编辑修改成功!", "Article_EditorList.asp?Page=" & Page)
Set EditorRS = Nothing
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 EditorRS = Server.CreateObject("ADODB.RECORDSET")
EditorSql = "Select * From [KS_Origin] Where ID='" & ID & "'"
EditorRS.Open EditorSql, conn, 1, 1
If Not EditorRS.EOF Then
OriginName = Trim(EditorRS("OriginName"))
ChannelID = EditorRS("ChannelID")
Sex = Trim(EditorRS("Sex"))
Birthday = Trim(EditorRS("Birthday"))
Telphone = Trim(EditorRS("Telphone"))
UnitName = Trim(EditorRS("UnitName"))
UnitAddress = Trim(EditorRS("UnitAddress"))
Zip = Trim(EditorRS("Zip"))
Email = Trim(EditorRS("Email"))
QQ = Trim(EditorRS("QQ"))
HomePage = Trim(EditorRS("HomePage"))
Note = Trim(EditorRS("Note"))
EditorRS.Close
Set EditorRS = Nothing
Set conn = Nothing
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='Article_EditorAdd.asp' method='post' name='EditorForm' 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> </td>"
Response.Write " </tr>"
Response.Write " <tr>"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -