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

📄 special_edit.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 Special_Edit
KSCls.Execute()
Set KSCls = Nothing

Class Special_Edit
        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(0, "KMSP10002") Then Call KSCMS.ReturnErr(0, "")        '编辑专题权限检查
			
			Dim SpecialRS, SpecialSql, TemplateRS, TemplateSql, ID, Page
			
			Page = KSCMS.G("Page")
			ID = Trim(KSCMS.G("SpecialID"))
			If KSCMS.G("Action") = "EditSpecial" Then
				 Dim TempObj, ChannelID, FolderID, SpecialName, SpecialEName, TemplateID, FsoSpecialIndex, SpecialAddDate, SpecialNote
					 ChannelID = KSCMS.G("ChannelID")
					 FolderID = KSCMS.G("FolderID")
					 SpecialName = Replace(Replace(KSCMS.G("SpecialName"), """", ""), "'", "")
					 TemplateID = KSCMS.G("TemplateID")
					 FsoSpecialIndex = KSCMS.G("FsoSpecialIndex")
					 SpecialNote = Trim(KSCMS.G("SpecialNote"))
					 
				 If SpecialName <> "" Then
					If Len(SpecialName) >= 100 Then
						Call KSCMS.AlertHistory("专题名称不能超过50个字符!", -1)
						Exit Sub
					End If
				 Else
					Call KSCMS.AlertHistory("请输入专题名称!", -1)
					Exit Sub
				 End If
				 
				  Set SpecialRS = Server.CreateObject("adodb.recordset")
				  SpecialRS.Open "Select SpecialName From KS_Special Where ID<>'" & ID & "' And SpecialName='" & SpecialName & "'", Conn, 1, 1
				  If Not SpecialRS.EOF Then
					SpecialRS.Close
					Response.Write ("<script>alert('对不起,专题名称已存在!');location.href='Special_Edit.asp?SpecialID=" & ID & "' ;</script>")
				  Else
					SpecialRS.Close
					SpecialSql = "select * from KS_Special Where ID='" & ID & "'"
					SpecialRS.Open SpecialSql, Conn, 1, 3
					SpecialRS("ChannelID") = ChannelID
					SpecialRS("FolderID") = FolderID
					SpecialRS("SpecialName") = SpecialName
					SpecialRS("TemplateID") = TemplateID
					SpecialRS("FsoSpecialIndex") = FsoSpecialIndex
					SpecialRS("SpecialNote") = SpecialNote
					SpecialRS.Update
					SpecialRS.Close
					Set SpecialRS = Nothing
				   Response.Write ("<script>alert('专题修改成功!');window.close();</script>")
				 End If
			Else
			   Set SpecialRS = Conn.Execute("Select * From KS_Special Where ID='" & ID & "'")
			   If SpecialRS.EOF And SpecialRS.BOF Then
			   Else
					 ChannelID = SpecialRS("ChannelID")
					 FolderID = SpecialRS("FolderID")
					 SpecialName = SpecialRS("SpecialName")
					 SpecialEName = SpecialRS("SpecialEName")
					 TemplateID = SpecialRS("TemplateID")
					 SpecialAddDate = SpecialRS("SpecialAddDate")
					 SpecialNote = SpecialRS("SpecialNote")
					 FsoSpecialIndex = SpecialRS("FsoSpecialIndex")
			   End If
			   SpecialRS.Close
			   Set SpecialRS = Nothing
			End If
			
			Response.Write "<html>"
			Response.Write "<head>"
			Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>"
			Response.Write "<link href='../Inc/ModeWindow.css' rel='stylesheet'>"
			Response.Write "<script language='JavaScript' src='../JS/Common.js'></script>"
			Response.Write "<title>编辑专题</title>"
			Response.Write "</head>"
			Response.Write "<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>"
			Response.Write "  <form action='Special_Edit.asp'  name='SpecialForm' method='post'>"
			Response.Write "    <input type='hidden' name='page' value='" & Page & "'>"
			Response.Write "    <input type='hidden' value='1' name='channelID'>"
			Response.Write "    <input name='Action' type='hidden' id='Action' value='EditSpecial'>"
			Response.Write "    <input type='hidden' value='" & ID & "' name='SpecialID'>"
			Response.Write "  <table width='99%' border='0' align='center' cellpadding='0' cellspacing='0'>"
			 Response.Write "   <tr>"
			 Response.Write "     <td>"
			 Response.Write "     <FIELDSET align=center>"
			Response.Write "  <LEGEND align=left>编辑专题</LEGEND>"
			Response.Write "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
			Response.Write "    <tr>"
			Response.Write "      <td height='35'><div align='center'>所属频道</div></td>"
			Response.Write "      <td width='533'>"
			 Response.Write "       <select name='FolderID' style='width:200;border-style: solid; border-width: 1'>"
					 
					 Dim FolderName, TempStr
					  Dim FolderRS
					 Set FolderRS = Server.CreateObject("ADODB.Recordset")
					TempStr = "<option value=0>--请选择--</option>"
					  FolderRS.Open "Select ID,FolderName From KS_Class Where TN='0' And ChannelID=1 And DelTF=0 Order BY ChannelID,FolderOrder", Conn, 1, 1
					If Not FolderRS.EOF Then
					  Do While Not FolderRS.EOF
						FolderName = Trim(FolderRS(1))
						 If FolderID = Trim(FolderRS(0)) Then
						   TempStr = TempStr & "<option value=" & FolderRS(0) & " Selected>" & FolderName & "</option>"
						 Else
						   TempStr = TempStr & "<option value=" & FolderRS(0) & ">" & FolderName & "</option>"
						 End If
						 FolderRS.MoveNext
					  Loop
					End If
					FolderRS.Close
					Set FolderRS = Nothing
					Response.Write TempStr
					
			 Response.Write "       </select></td>"
			 Response.Write "   </tr>"
			Response.Write "    <tr>"
			Response.Write "      <td width='188' height='35'> <div align='center'>专题名称</div></td>"
			Response.Write "      <td> <input name='SpecialName' type='text' id='SpecialName' style='border-style: solid; border-width: 1' value='" & SpecialName & "' size='30'>"
			Response.Write "        概况情说明文字 </td>"
			Response.Write "    </tr>"
			Response.Write "    <tr>"
			Response.Write "      <td height='35'> <div align='center'>英文名称</div></td>"
			Response.Write "     <td><input name='SpecialEName' type='text' disabled=true id='SpecialEName' style='border-style: solid; border-width: 1' value='" & SpecialEName & "' size='30'>"
			Response.Write "        不能改 </td>"
			Response.Write "    </tr>"
			Response.Write "    <tr>"
			Response.Write "      <td height='35'> <div align='center'>专题模板</div></td>"
			Response.Write "      <td><select name='TemplateID'  style='border-style: solid; border-width: 1'>"
					
					Set TemplateRS = Server.CreateObject("ADODB.RECORDSET")
						TemplateSql = "Select TemplateName,TemplateID,IsDefault From KS_Template Where TemplateType=6 Order By TemplateID" '2栏目模板
						TemplateRS.Open TemplateSql, Conn, 1, 1
						If TemplateRS.EOF And TemplateRS.BOF Then
						 Response.Write ("<option value=0>请先添加专题页模板</option>")
						Else
						 Do While Not TemplateRS.EOF
						   If TemplateID = TemplateRS("TemplateID") Then
							 Response.Write ("<option value=" & TemplateRS("TemplateID") & " selected>" & TemplateRS("TemplateName") & "</option>")
						  Else
							If TemplateRS("IsDefault") = 1 Then
							 Response.Write ("<option value=" & TemplateRS("TemplateID") & " selected>" & TemplateRS("TemplateName") & "</option>")
						   Else
							 Response.Write ("<option value=" & TemplateRS("TemplateID") & ">" & TemplateRS("TemplateName") & "</option>")
						   End If
						  End If
						 TemplateRS.MoveNext
						 Loop
						End If
						TemplateRS.Close
						
			Response.Write "        </select>"
			Response.Write "      </td>"
			Response.Write "    </tr>"
			Response.Write "    <tr>"
			Response.Write "      <td height='35' align='center'>生成专题页的文件名 </td>"
			Response.Write "      <td><select name='FsoSpecialIndex' style='border-style: solid; border-width: 1'>"
			Response.Write "         <option value='Index.html' selected>Index.html</option>"
			Response.Write "          <option value='Index.htm'>Index.htm</option>"
			Response.Write "        <option value='Index.shtm'>Index.shtm</option>"
			Response.Write "         <option value='Index.shtml'>Index.shtml</option>"
			Response.Write "          <option value='Index.asp'>Index.asp</option>"
			Response.Write "         <option value='" & FsoSpecialIndex & "' selected>" & FsoSpecialIndex & "</option>"
			Response.Write "       </select></td>"
			Response.Write "   </tr>"
			Response.Write "    <tr>"
			Response.Write "      <td height='35'> <div align='center'>添加时间</div></td>"
			
			Response.Write "      <td><input name='SpecialAddDate' disabled=true type='text' id='SpecialAddDate' value='" & SpecialAddDate & "' size='30' style='border-style: solid; border-width: 1'>"
			Response.Write "      </td>"
			Response.Write "    </tr>"
			Response.Write "   <tr>"
			Response.Write "     <td height='35'> <div align='center'>简要说明</div></td>"
			Response.Write "     <td><textarea name='SpecialNote' rows='8' id='SpecialNote' style='width:80%;border-style: solid; border-width: 1'>" & SpecialNote & "</textarea></td>"
			Response.Write "    </tr>"
			Response.Write "</table>"
			Response.Write "          </FIELDSET>"
			Response.Write "       </td>"
			Response.Write "    </tr>"
			Response.Write "    </table>"
			Response.Write "  <table width='100%' height='30' border='0' cellpadding='0' cellspacing='0'>"
			Response.Write "    <tr>"
			Response.Write "      <td height='40' align='center'>"
			Response.Write "        <input type='button' name='Submit' Onclick='CheckForm()' value=' 修 改 '>"
			Response.Write "        <input type='button' name='Submit2' onclick='window.close()' value=' 取 消 '>"
			Response.Write "      </td>"
			Response.Write "    </tr>"
			Response.Write "  </table>"
			Response.Write "  </form>"
			Response.Write "</body>"
			Response.Write "</html>"
			Response.Write "<Script Language='javascript'>"
			Response.Write "<!--" & vbCrLf
			Response.Write "function CheckForm()" & vbCrLf
			Response.Write "{ var form=document.SpecialForm;" & vbCrLf
			Response.Write "    if (form.FolderID.value==0)" & vbCrLf
			Response.Write "    {"
			Response.Write "     alert('请选择一个专题!');" & vbCrLf
			Response.Write "     form.FolderID.focus();" & vbCrLf
			Response.Write "    return false;" & vbCrLf
			Response.Write "    }" & vbCrLf
			Response.Write "   if (form.SpecialName.value=='')" & vbCrLf
			Response.Write "    {" & vbCrLf
			Response.Write "     alert('请输入专题名称!');" & vbCrLf
			Response.Write "     form.SpecialName.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>"
			
			End Sub
End Class
%>

⌨️ 快捷键说明

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