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

📄 article_keywordadd.asp

📁 SK信息采集2.0功能介绍: 1.可针对任何静态网页,动态网页进行采集。包括htm,html,shtml,ASP,ASPX,JSP,PHP等。 2.增加自定文件采集.用户可采集网页中的所有文件.
💻 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_KeyWordAdd
KSCls.Execute()
Set KSCls = Nothing

Class Article_KeyWordAdd
        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()
			  Dim Action, KeyWordText, ChannelID, ID, Page
			  Dim KeyRS, KeySql
			  
			  
			  If Not KSCMS.ReturnPowerResult(1, "KMA20001") Then        '文章关键字管理权限检查
				  Call KSCMS.ReturnErr(1, "")
				  Exit Sub
			  End If
			  
			  Action = KSCMS.G("Action")
			  ID = KSCMS.G("ID")
			  Page = KSCMS.G("Page")
			  
			  If Action = "AddSave" Then
			  KeyWordText = KSCMS.G("KeyWordText")
			  If KeyWordText = "" Then
			   Call KSCMS.AlertHistory("请输入关键字!", -1)
			  End If
			 ChannelID = KSCMS.G("ChannelID")
			 Set KeyRS = Server.CreateObject("ADODB.RECORDSET")
			 KeySql = "Select * From [KS_KeyWords] Where KeyText='" & KeyWordText & "' And ChannelID=" & ChannelID
			 KeyRS.Open KeySql, conn, 3, 3
			 If KeyRS.EOF And KeyRS.BOF Then
			  KeyRS.AddNew
			  KeyRS("ID") = Year(Now) & Month(Now) & Day(Now) & KSCMS.MakeRandom(5)
			  KeyRS("KeyText") = KeyWordText
			  KeyRS("ChannelID") = ChannelID
			  KeyRS("AddDate") = Now()
			  KeyRS.Update
			 Response.Write ("<Script> if (confirm('关键字增加成功,继续添加吗?')) { location.href='Article_KeyWordAdd.asp';} else{location.href='Article_KeyWordList.asp';parent.frames['BottomFrame'].location.href='../Split.asp?OpStr=文章管理中心 >> 关键字管理&ButtonSymbol=KeyWordPAGE';}</script>")
			 Else
			 Call KSCMS.AlertHistory("数据库中已存在该关键字!", -1)
			 Set KSCMS = Nothing
			 Response.End
			 End If
			 KeyRS.Close
			ElseIf KSCMS.G("Action1") = "EditSave" Then
			 KeyWordText = KSCMS.G("KeyWordText")
			 If KeyWordText = "" Then
			 Call KSCMS.AlertHistory("请输入关键字!", -1)
			 End If
			 ChannelID = KSCMS.G("ChannelID")
			 Set KeyRS = Server.CreateObject("ADODB.RECORDSET")
			  KeySql = "Select * From [KS_KeyWords] Where ID<>'" & ID & "' AND KeyText='" & KeyWordText & "' And ChannelID=" & ChannelID
			 KeyRS.Open KeySql, conn, 1, 1
			 If KeyRS.EOF And KeyRS.BOF Then
			  KeyRS.Close
			  KeySql = "Select * From [KS_KeyWords] Where ID='" & ID & "'"
			  KeyRS.Open KeySql, conn, 1, 3
			  KeyRS("KeyText") = KeyWordText
			  KeyRS("ChannelID") = ChannelID
			  KeyRS.Update
			  KeyRS.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=""KeyWordPage""></form>")
			 Response.Write ("<script language=""JavaScript"">document.split.submit();</script>")
			 Call KSCMS.Alert("关键字修改成功!", "Article_KeyWordList.asp?Page=" & Page)
			 Else
			  KeyRS.Close
			  Call KSCMS.AlertHistory("数据库中已存在该关键字!", -1)
			 End If
			End If
			
			Response.Write "<html>" & vbCrLf
			Response.Write "<head>" & vbCrLf
			Response.Write "<meta http-equiv='Content-Type' content='text/html; chaRSet=gb2312'>" & vbCrLf
			Response.Write "<title>关键字</title>" & vbCrLf
			Response.Write "<link href='../Inc/Admin_Style.CSS' rel='stylesheet' type='text/css'>" & vbCrLf
			Response.Write "</head>"
			Response.Write "<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>" & vbCrLf
			 
			 If Action = "Edit" Then
			 Set KeyRS = Server.CreateObject("ADODB.RECORDSET")
			 KeySql = "Select * From [KS_KeyWords] Where ID='" & ID & "'"
			 KeyRS.Open KeySql, conn, 1, 1
			 If Not KeyRS.EOF Then
			 KeyWordText = KeyRS("KeyText")
			 ChannelID = KeyRS("ChannelID")
			 End If
			
			Response.Write "<table width='100%' height='25' border='0' cellpadding='0' cellspacing='1' bgcolor='#efefef'>" & vbCrLf
			Response.Write "  <tr>" & vbCrLf
			Response.Write "    <td class='sort'><div align='center'><font color='#990000'>编辑关键字</font></div></td>" & vbCrLf
			Response.Write "  </tr>" & vbCrLf
			Response.Write "</table>" & vbCrLf
			Response.Write "<br>" & vbCrLf
			Response.Write "<br>" & vbCrLf
			Response.Write "<table width='45%' border='0' align='center' cellpadding='0' cellspacing='0' style='border-collapse: collapse'>" & vbCrLf
			Response.Write "  <form  action='' method='post' name='KeyWordForm' onsubmit='return(CheckForm())'>" & vbCrLf
			Response.Write "    <tr>" & vbCrLf
			Response.Write "      <td height='10' colspan='3' align='right'>&nbsp;</td>" & vbCrLf
			Response.Write "    </tr>" & vbCrLf
			Response.Write "    <tr>" & vbCrLf
			Response.Write "      <td width='23%' align='right' nowrap>关键字:</td>" & vbCrLf
			Response.Write "      <td width='20' height='30' align='right' nowrap> <div align='center'></div></td>" & vbCrLf
			Response.Write "      <td width='74%' height='30' nowrap><b>" & vbCrLf
			Response.Write "        <input name='KeyWordText' type='text' id='KeyWordText' value='" & KeyWordText & "' style='width:200;border-style: solid; border-width: 1'>" & vbCrLf
			Response.Write "        </b>* </td>" & vbCrLf
			Response.Write "    </tr>" & vbCrLf
			Response.Write "    <tr>" & vbCrLf
			Response.Write "      <td align='right' nowrap>所属系统:</td>" & vbCrLf
			Response.Write "      <td width='20' height='30' align='right' nowrap> <div align='center'></div></td>" & vbCrLf
			Response.Write "      <td height='30' nowrap>" & KSCMS.ReturnChannelList(ChannelID, False) & "</td>" & vbCrLf
			Response.Write "    </tr>" & vbCrLf
			Response.Write "    <input type='hidden' value='EditSave' name='Action1'>" & vbCrLf
			Response.Write "    <input type='hidden' value='" & ID & "' name='ID'>" & vbCrLf
			Response.Write "    <input type='hidden' value='" & Page & "' name='Page'>" & vbCrLf
			Response.Write "  </form>" & vbCrLf
			Response.Write "</table>" & vbCrLf
			 Else
			Response.Write "<table width='100%' height='25' border='0' cellpadding='0' cellspacing='1' bgcolor='#efefef'>" & vbCrLf
			Response.Write "  <tr>" & vbCrLf
			Response.Write "    <td class='sort'><div align='center'><font color='#990000'>新增关键字</font></div></td>" & vbCrLf
			Response.Write "  </tr>" & vbCrLf
			Response.Write "</table>" & vbCrLf
			Response.Write "<br>" & vbCrLf
			Response.Write "<br>" & vbCrLf
			Response.Write "<table width='45%' border='0' align='center' cellpadding='0' cellspacing='0' style='border-collapse: collapse'>" & vbCrLf
			Response.Write " <form  action='' method='post' name='KeyWordForm' onsubmit='return(CheckForm())'>" & vbCrLf
			Response.Write "    <tr>" & vbCrLf
			Response.Write "      <td height='10' colspan='3' align='right'>&nbsp;</td>" & vbCrLf
			Response.Write "    </tr>" & vbCrLf
			Response.Write "    <tr>" & vbCrLf
			Response.Write "      <td width='23%' align='right' nowrap>关键字:</td>" & vbCrLf
			Response.Write "      <td width='20' height='30' align='right' nowrap> <div align='center'></div></td>" & vbCrLf
			Response.Write "      <td width='74%' height='30' nowrap><b>" & vbCrLf
			Response.Write "        <input name='KeyWordText' type='text' id='KeyWordText' style='width:200;border-style: solid; border-width: 1'>" & vbCrLf
			Response.Write "        </b>* </td>" & vbCrLf
			Response.Write "    </tr>"
			Response.Write "    <tr>" & vbCrLf
			Response.Write "      <td align='right' nowrap>所属系统:</td>" & vbCrLf
			Response.Write "      <td width='20' height='30' align='right' nowrap> <div align='center'></div></td>" & vbCrLf
			Response.Write "      <td height='30' nowrap>" & KSCMS.ReturnChannelList(1, False) & "</td>" & vbCrLf
			Response.Write "    </tr>" & vbCrLf
			Response.Write "    <input type='hidden' value='AddSave' name='Action'>" & vbCrLf
			Response.Write "  </form>" & vbCrLf
			Response.Write "</table>" & vbCrLf
			
			End If
			Response.Write "<Script Language='javascript'>" & vbCrLf
			Response.Write "<!--" & vbCrLf
			Response.Write "function CheckForm()" & vbCrLf
			Response.Write "{ var form=document.KeyWordForm;" & vbCrLf
			Response.Write "   if (form.KeyWordText.value=='')" & vbCrLf
			Response.Write "    {" & vbCrLf
			Response.Write "     alert('请输入关键字!');" & vbCrLf
			Response.Write "     form.KeyWordText.focus();" & vbCrLf
			Response.Write "     return false;" & vbCrLf
			Response.Write "    }" & vbCrLf
			Response.Write "    form.submit();" & vbCrLf
			Response.Write "    return true;" & vbCrLf
			Response.Write "}" & vbCrLf
			Response.Write "//-->" & vbCrLf
			Response.Write "</Script>" & vbCrLf
			Response.Write "</body>" & vbCrLf
			Response.Write "</html>" & vbCrLf
			End Sub
End Class
%>

⌨️ 快捷键说明

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