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

📄 refreshindex.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="../../SysCls/KS_RefreshCls.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 RefreshIndex
KSCls.Execute()
Set KSCls = Nothing

Class RefreshIndex
        Private KSCMS,KSRObj
		Private SaveFilePath
		Private InstallDir
		Private FileContent
        Private ReturnInfo
		Private ErrFlag
		Private Domain
		Private IndexFile
		Private StartRefreshTime
		Private Sub Class_Initialize()
		  Set KSCMS=New CommonCls
		  Set KSRObj=New Refresh
		End Sub
        Private Sub Class_Terminate()
		 Call KSCMS.CloseConn()
		 Set KSRObj=Nothing
		 Set KSCMS=Nothing
		End Sub
		Sub Execute()
		  With Response
		  If Not KSCMS.ReturnPowerResult(0, "KMRF10001") Then          '检查是否有发布站点首页的权限
		   .Write ("<script>parent.frames['BottomFrame'].location.href='javascript:history.back();';</script>")
		   Call KSCMS.ReturnErr(1, "")
		   Exit Sub
		   .End
		  End If
		 If Split(KSCMS.GetConfig("FsoIndex"),".")(1)="asp" Then Call KSCMS.AlertHistory("科汛系统提醒您:\n\n1、站点首页没有启用生成静态HTML功能\n\n2、请到系统设置->基本信息设置启用生成静态Html功能",-1):Exit Sub
		   StartRefreshTime = Timer()
		   Application(Cstr(KSCMS.SiteSN & "RefreshType")) = "INDEX" '设置刷新类型,以便取得当前位置导航等
		   Application(Cstr(KSCMS.SiteSN & "RefreshFolderID")) = "0" '设置当前刷新目录ID 为"0" 以取得通用标签
		   Domain = KSCMS.GetDomain
		  InstallDir = KSCMS.GetConfig("InstallDir")
		  IndexFile = KSCMS.GetConfig("FsoIndex")
			SaveFilePath = InstallDir & IndexFile
			FileContent = KSRObj.LoadTemplate(9999)
			If FileContent = "" Then
			  ReturnInfo = "数据库中找不到首页模板"
			  ErrFlag = True
			  Call Main
			  .End
			Else
			  On Error Resume Next
			  FileContent = KSRObj.ReplaceGeneralLabelContent(FileContent)  '替换通用标签 如{$GetWebmaster}
			  FileContent = KSRObj.ReplaceLableFlag(KSRObj.ReplaceAllLabel(FileContent)) '替换函数标签
			  '如果采用根相对路径,则替换绝对路径为根相对路径
			  FileContent = KSRObj.ReplaceRA(FileContent, "")
			  If Err Then
			   ReturnInfo = Err.Description
			   ErrFlag = True
				 Err.Clear
				Call Main
				.End
			  End If
			  Call KSRObj.FSOSaveFile(KSRObj.Published() & FileContent, SaveFilePath)
			  If Err Then
				ReturnInfo = Err.Description
				ErrFlag = True
				 Err.Clear
				Call Main
				.End
			  End If
			  ReturnInfo = "网站首页发布成功"
			  ErrFlag = False
			  Call Main
			End If
		 End With
		End Sub
		Sub Main()
			With Response	  
		        .Write "<html>"
				.Write ("<head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'>")
				.Write ("<title>网站首页发布管理</title></head>")
				.Write ("<link rel='stylesheet' href='../Inc/Admin_Style.CSS'>")
				.Write ("<body topmargin='0' leftmargin='0' oncontextmenu='return false;'>")
				If KSCMS.G("RefreshFlag")<>"Info" Then
				.Write ("<table width='100%' border='0' cellpadding='0' cellspacing='0'>")
				.Write ("  <tr>")
				.Write ("    <td height='25' class='sort'>")
				.Write ("      <div align='center'><strong>发布网站首页</strong></div></td>")
				.Write ("</tr>")
				.Write ("</table>")
				.Write ("<table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td>&nbsp;</td></tr>")
				.Write ("  <tr><td>&nbsp;</td></tr>")
				.Write ("  <tr>")
				.Write ("    <td height='50'><div align='center'><br>")
					   .Write ReturnInfo & "!总费时:<font color=red>" & Left((Timer() - StartRefreshTime), 4) & "</font>秒</div></td>"
				.Write ("</tr><tr><td><div align='center'>")
				.Write ("        <table width='100%' border='0' cellspacing='0' cellpadding='0'>")
				.Write ("          <tr><td width='50%' height='25'><div align='right'>操作结果:</div></td>")
				.Write ("            <td width='50%' height='25'>")
						   
						   If ErrFlag = False Then
							.Write ("成功")
							Else
							.Write ("失败")
							End If
				.Write ("            </td></tr><tr><td height='25'> <div align='right'>当前时间:</div></td><td height='25'> " & Now & "</td></tr>")
						 
						 If ErrFlag = False Then
				.Write ("          <tr><td height='25'><div align='right'>点击浏览:</div></td>")
				.Write ("           <td height='25'><font color='#FF0000'> <a href='" & Domain & IndexFile & "' target='_blank'>浏览首页</a></font>")
				.Write ("            </td></tr>")
						  End If
				.Write ("        </table></div></td></tr></table>")
			 Else
				.Write ("<table width='67%' align='center' border='0' cellpadding='0' cellspacing='0'>")
				.Write ("  <tr>")
				.Write ("    <td height='25'>")
				.Write ("      <div ><li><strong>" & ReturnInfo & "</strong><font color='#FF0000'> <a href='" & Domain & IndexFile & "' target='_blank'>" & Domain & IndexFile &"</a></font></li></div></td>")
				.Write ("</tr>")
				.Write ("</table>")
			 End If
			 .Write    ("</body></html>")
		End With
		End Sub
End Class
%>

⌨️ 快捷键说明

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