📄 down_authoradd.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 Down_AuthorAdd
KSCls.Execute()
Set KSCls = Nothing
Class Down_AuthorAdd
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()
on error resume next
Dim Action, OriginName, ChannelID, ID, Page, Sex, Birthday, Telphone, UnitName, UnitAddress, Zip, Email, QQ, HomePage, Note, OriginType
Dim OriginRS, OriginSql
Action = KSCMS.G("Action")
If Not KSCMS.ReturnPowerResult(3, "KMD20003") Then
Call KSCMS.ReturnErr(1, "")
Exit Sub
End If
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 = Trim(KSCMS.G("QQ"))
HomePage = Trim(KSCMS.G("HomePage"))
Note = Trim(KSCMS.G("Note"))
OriginType = CInt(KSCMS.G("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=1"
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("Sex") = Sex
If Birthday <> "" Then
OriginRS("Birthday") = Birthday
End If
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
Set conn = Nothing
Response.Write ("<Script> if (confirm('作者增加成功,继续添加吗?')) { location.href='Down_AuthorAdd.asp';} else{location.href='Down_AuthorList.asp';parent.frames['BottomFrame'].location.href='../Split.asp?OpStr=图片管理中心 >> 作者管理&ButtonSymbol=DownAuthorPAGE';}</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 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("Sex") = Sex
If Birthday <> "" Then
OriginRS("Birthday") = Birthday
End If
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=""DownAuthorPage""></form>")
Response.Write ("<script language=""JavaScript"">document.split.submit();</script>")
Call KSCMS.Alert("作者修改成功!", "Down_AuthorList.asp?Page=" & Page)
Set conn = 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 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")
Sex = Trim(OriginRS("Sex"))
Birthday = Trim(OriginRS("Birthday"))
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_AuthorAdd.asp' method='post' name='AuthorForm' 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>"
Response.Write " <td height='25' align='right' nowrap>所属系统:</td>"
Response.Write " <td height='30' align='right' nowrap> </td>"
Response.Write " <td height='25' nowrap> " & KSCMS.ReturnChannelList(ChannelID, False) & "</td>"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -