📄 collectstart.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
option explicit
Response.Buffer = True
Server.ScriptTimeOut=10
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="inc/clsCache.asp"-->
<%
Dim ProjectID
Dim FoundErr,ErrMsg
Dim SqlProject,RsProject
Dim Arr_Project,Arr_Histroy,ProjectCache
Dim CacheTemp
FoundErr=False
CacheTemp=Lcase(trim(request.ServerVariables("SCRIPT_NAME")))
CacheTemp=left(CacheTemp,instrrev(CacheTemp,"/"))
CacheTemp=replace(CacheTemp,"\","_")
CacheTemp=replace(CacheTemp,"/","_")
CacheTemp="trsoft" & CacheTemp
ProjectID=Request.QueryString("ProjectID")
if ProjectID="" then
FoundErr=True
ErrMsg=ErrMsg &"<br>项目编号错误!"
end if
if FoundErr<>True then
Call SetCache()
If FoundErr<>True Then
Session("ListNum")=1
Session("InfoSuccessNum")=0
Session("InfoFalseNum")=0
Session("ArticleID")=0
ErrMsg="<meta http-equiv=""refresh"" content=""3;url=collectinfo.asp"">"
end If
end If
if FoundErr=True then
Call WriteErrMsg(ErrMsg)
else
Call Main()
end If
'关闭数据库链接
Call CloseConn()
Call CloseConnHistroy()
Sub SetCache()
'项目信息
SqlProject ="select * from Project where ProjectID ="&ProjectID
Set RsProject=Server.CreateObject("adodb.recordset")
RsProject.Open SqlProject,ConnHistroy,1,1
If Not RsProject.Eof Then
Arr_Project=RsProject.GetRows()
End If
RsProject.Close
Set RsProject=Nothing
Set ProjectCache=new clsCache
ProjectCache.name=CacheTemp & "Project"
Call ProjectCache.clean()
If IsArray(Arr_Project)=True Then
ProjectCache.add Arr_Project,Dateadd("n",1000,now)
Else
FoundErr=True
ErrMsg=ErrMsg & "<br>发生意外错误!"
End If
'历史记录
SqlProject ="select NewsUrl,Title,CollectionTime,Result from Histroy"
Set RsProject=Server.CreateObject("adodb.recordset")
RsProject.Open SqlProject,ConnHistroy,1,1
If Not RsProject.Eof Then
Arr_Histroy=RsProject.GetRows()
End If
RsProject.Close
Set RsProject=Nothing
ProjectCache.name=CacheTemp & "histroy"
Call ProjectCache.clean()
If IsArray(Arr_Histroy)=True Then
ProjectCache.add Arr_Histroy,Dateadd("n",1000,now)
End If
set ProjectCache=nothing
End Sub
Sub Main
%>
<html>
<head>
<title>通用信息采集系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css/style.css">
<style type="text/css">
<!--
.STYLE1 {
color: #000000;
font-weight: bold;
}
.STYLE2 {color: #FF0000}
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<th height="22" colspan="2" align="center"><span class="STYLE1">采 集 项 目 管 理</span></th>
</tr>
</table>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
<tr>
<td width="65" height="30"><strong>管理导航:</strong></td>
<td height="30"><a href="collectionmanage.asp">管理首页</a> >> 新闻采集 >> 初始化数据</td>
</tr>
</table>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder" >
<tr>
<td height="100" colspan="2" align=center>
<br>
欢迎使用通用信息采集系统,正在初始化数据,请稍后...
<br><br>
<%=ErrMsg%>
</td>
</tr>
</table>
</body>
</html>
<%End Sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -