📄 admin_getphoto.asp
字号:
<!--#include file="Inc/Const.asp"-->
<!--#include file="../Inc/Cl_ClsCollect.asp"-->
<!--#include file="../Inc/Cl_Function_Collect.asp"-->
<%
'========================================
' Edit by GDWneo
' Last modify at 9:22 2007-9-6
'========================================
'--自定义变量
Dim SqlItem,RsItem,ModuleName
Dim ItemID,ItemName,WebName,WebUrl,ClassID,SpecialID,Encoding,ItemDemo,LoginType,LoginUrl,LoginPostUrl,LoginUser,LoginPass,LoginFalse,ListStr,radio,LPsString,LPoString,ListPaingStr2 ,ListPaingID1,ListPaingID2,ListPaingStr3,Passed,SaveFiles,CollecOrder,ListPaingType,Flag,ListUrl,ItemCollecDate,LsString,LoString,HsString,HoString,imhstr,imostr,x_tp,Script_Iframe,Script_Object,Script_Script,Script_Div,Script_Class,Script_Table,Script_Tr,Script_Span,Script_Img,Script_Font,Script_A,Script_Html,Script_Td,Stars,InfoPoint,radioid,Hits,SaveFileUrl,HttpUrlStr,FilterType,CollecNewsNum,Timing,picpath,strReplace,IncludePic,UploadFiles,Downlist_s,Downlist_o,DownUrl_s,DownUrl_o
Dim Thumb_WaterMark,Thumbs_Create,DownUrls
Dim TsString,ToString,CsString,CoString,DateType,DsString,DoString,UpDateTime,AuthorType,AsString,AoString,AuthorStr,CopyFromType,FsString,FoString,CopyFromStr,KeyType,KsString,KoString,KeyStr,NewsPaingType,NPsString,NPoString,NewsPaingStr,NewsPaingHtml,Author,NewsUrlPaing_s,NewsUrlPaing_o
Dim PicUrls,ListTypeCode,ListTypeUrlCode,TypeUrlArray,TypeNewsUrl,NewsTypeCode
Dim CopyFrom,Key,SqlF,RSF,Arr_Filters,strInstallDir,ChannelDir
Dim photourls,photourlo,PhotoPaingType,PhotoType_s,PhotoType_o,PhotoLurl_s,PhotoLurl_o,Phototypefy_s,Phototypefy_o,Phototypefyurl_s,Phototypefyurl_o,Phototypeurl_s,Phototypeurl_o,Title,Content
dim UpDateType,SavefilePath
dim temp_Fields
Dim tClass,tSpecial,MaxPerPage,Allpage,ItemNum,iItem,NewsArrayCode,NewsArray,Testi,HttpUrlType,UrlTest,NewsCode,NewsUrl,NewsPaingNext,NewsPaingNext_Code,TypeArray_Url
dim Newsimage,Newsim
Dim i_Channel,i_Class,i_Special,tmpDepth,ArrShowLine(20)
Dim ClassName,SpecialName,Item_add,action,action1,ListCode
Dim rs_num,PicpathTemp
Dim PaginationType,MaxCharPerPage,InfoGroup
ModuleID=Cl.GetClng(CGet.G("ModuleID"))
ModuleID=3
OpenConn_C
Response.Write(Trim(Request.Form("DClassID")))
ItemID=CGet.G("ItemID")
action=CGet.G("action")
action1=CGet.G("action1")
Dim CjName : CjName=CGet.GetItemConfig("CjName",ModuleID)
Dim CJFileName : CJFileName = CGet.GetItemConfig("FileName",ModuleID)
'----------------------------------------------------------------------------------------------------------------------------
Call CGet.Show_Top()
If action="edit" Or action1="edit" Or action="s1" And action1<>"add" Or action="s2" And action1<>"add" Then
Response.Write "<table width=""100%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""1"" class=""Border"">"
Response.Write "<tr class=""tdbg"">"
Response.Write "<td width=""65"" height=""30"" ><strong>管理导航:</strong></td>"
Response.Write "<td height=""30"" > <font color=red><a href=?action=edit&ItemID="& ItemID &">基本设置</a></font> >> <a href=?action=s1&ItemID="& ItemID &">列表设置</a> >> <a href=?action=s2&ItemID="& ItemID &">正文设置</a> >> <a href=?action=demo&ItemID="& ItemID &">采样测试</a> </td>"
Response.Write "</tr></table>"
End If
Select Case action
Case "config":config'采集基本设置
Case "add":addnew1'初步
Case "edit":addnew1'初步
Case "s1":setup1
Case "s2":setup2
Case "demo":demo
Case "copy":copy
Case "Del":Del
Case else:Show_Manage
End Select
Call CloseConn_C()
footer
'=================================
'采集项目管理
'=================================
Sub Show_Manage
Dim MaxPerPage
MaxPerPage=CGet.GetItemConfig("MaxPerPage",ModuleID)
IF MaxPerPage=0 Then MaxPerPage=10
%>
<script language=javascript>
function unselectall(thisform){
if(thisform.chkAll.checked){
thisform.chkAll.checked = thisform.chkAll.checked&0;
}
}
function CheckAll(thisform){
for (var i=0;i<thisform.elements.length;i++){
var e = thisform.elements[i];
if (e.Name != "chkAll"&&e.disabled!=true)
e.checked = thisform.chkAll.checked;
}
}
</script>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="Border" >
<tr>
<td height="22" colspan="2" class="title"> <div align="center"><strong>项 目 管 理</strong></div></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#cccccc" class="Border">
<form name="myform" method="POST" action="<%= CJFileName %>">
<tr class="title">
<td width="33" height="22" align="center">选择</td>
<td width="160" align="center">项目名称</td>
<td width="100" align="center">所属频道</td>
<td width="120" height="22" align="center">所属栏目</td>
<td width="120" align="center">所属专题</td>
<td width="32" align="center">状态</td>
<td width="180" height="22" align="center">上次采集</td>
<td width="160" height="22" align="center">操作</td>
</tr>
<%
If CGet.G("page")<>"" Then
CurrentPage=Cint(CGet.G("Page"))
Else
CurrentPage=1
End If
Dim SqlTemp
ClassID=Cl.GetClng(CGet.G("DclassID"))
If ClassID=0 Then
SqlTemp=""
Else
SqlTemp=" And ClassID='" &ClassID&"'"
End if
Set RsItem=server.createobject("adodb.recordset")
SqlItem="Select * from Item where ModuleID="& ModuleID &" "& SqlTemp &" order by ItemID DESC"
RsItem.open SqlItem,Conn_C,1,1
If Not RsItem.Eof Then
RsItem.PageSize=MaxPerPage
Allpage=RsItem.PageCount
If Currentpage>Allpage Then Currentpage=1
ItemNum=RsItem.RecordCount
RsItem.MoveFirst
RsItem.AbsolutePage=CurrentPage
iItem=0
Do While Not RsItem.Eof
ItemID=RsItem("ItemID")
ItemName=RsItem("ItemName")
WebName=RsItem("WebName")
ChannelID=RsItem("ChannelID")
ClassID=RsItem("ClassID")
SpecialID=RsItem("SpecialID")
ListStr=RsItem("ListStr")
ListPaingType=RsItem("ListPaingType")
ListPaingStr2=RsItem("ListPaingStr2")
ListPaingID1=RsItem("ListPaingID1")
ListPaingID2=RsItem("ListPaingID2")
ListPaingStr3=RsItem("ListPaingStr3")
Flag=RsItem("Flag")
If ListPaingType=0 Then
ListUrl=ListStr
ElseIf ListPaingType=1 Then
ListUrl=Replace(ListPaingStr2,"{$ID}",CStr(ListPaingID1))
ElseIf ListPaingType=2 Then
If Instr(ListPaingStr3,"|")>0 Then
ListUrl=Left(ListPaingStr3,Instr(ListPaingStr3,"|")-1)
Else
ListUrl=ListPaingStr3
End If
End If
%>
<tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'" style="padding: 0px 2px; " >
<td width="33" height="22" align="center">
<input type="checkbox" value="<%=ItemID%>" name="ItemID" ></td>
<td width="160" align="center"><a href="<%=ListStr%>" target="_bank"><%=ItemName%></a></td>
<td width="100" align="center"><%=ShowChannel_Name(ChannelID)%></td>
<td width="120" align="center"><%=ShowClass_Name(ChannelID,ClassID)%></td>
<td width="120" align="center"><select style="width:120px;"><%=ShowSpecial_Name(ChannelID,SpecialID)%></select></td>
<td width="32" align="center"> <b>
<%If Flag=True Then
Response.write "<font color=green>√</font>"
Else
Response.write "<font color=red>×</font>"
End If
%>
</b> </td>
<td width="160" align="center">
<%
Set Rs=Conn_C.execute("Select Top 1 CollecDate From Histroly Where ItemID=" & ItemID & " Order by HistrolyID desc")
If Not Rs.Eof Then
ItemCollecDate=rs("CollecDate")
Else
ItemCollecDate=""
End If
Set Rs=Nothing
If ItemCollecDate<>"" Then
Response.Write "<font color=""#FF0000"">"& ItemCollecDate &"</font>"
Else
Response.Write "尚无记录"
End If
%></td>
<td width="192" align="center"><a href=<%= CJFileName %>?Action=copy&ItemID=<%=ItemID%>&ModuleID=<%= ModuleID %>>复制</a> <a href=<%= CJFileName %>?Action=edit&ItemID=<%=ItemID%>&ModuleID=<%= ModuleID %>>编辑</a> <a href=Admin_Collection.asp?ItemID=<%=ItemID%>&ItemNum=1&ListNum=1&NewsSuccesNum=0&NewsFalseNum=0&ImagesNumAll=0&NewsNum_i=0>采集</a> <a href=<%= CJFileName %>?action=demo&ItemID=<%=ItemID%>&ModuleID=<%= ModuleID %>>测试</a> <a href=<%= CJFileName %>?Action=Del&ItemID=<%=ItemID%>&ModuleID=<%= ModuleID %> onClick='return confirm("确定要删除此项目吗?请您慎重选择!这将删除该项目的项目信息,历史记录及过滤信息 3 个项目类型数据。");'>删除</a> </td>
</tr>
<%
iItem=iItem+1
If iItem>=MaxPerPage Then Exit Do
RsItem.MoveNext
Loop
%>
<tr class="tdbg">
<td colspan=8 height="30" >
<input name="Action" type="hidden" value="Del">
<input name="chkAll" type="checkbox" id="chkAll" onClick=CheckAll(this.form) value="checkbox" >
全选 </td>
</tr>
<tr class="tdbg">
<td colspan=8 height="30" align=center><input name="Del" type="submit" class="lostfocus" value="快速采集">
<input name="Del" type="submit" class="lostfocus" value="稳定采集">
<input name="Del" type="submit" class="lostfocus" onClick='return confirm("确定要删除选中的项目吗?请您慎重选择!这将删除该项目的项目信息,历史记录及过滤信息 3 个项目类型数据。");' value=" 删 除 ">
<input name="Del" type="submit" class="lostfocus" onClick='return confirm("您真的要确定要清空所有项目吗?这将彻底格式化采集数据库的所有信息,请您先备份再选择!!!");' value="清空所有记录">
</td>
</tr>
<%Else%>
<tr class="tdbg">
<td colspan='8' class="tdbg" align="center"><br>
系统中暂无采集项目!</td>
</tr>
<%End If
RsItem.Close
Set RsItem=Nothing
%>
</form>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="Border" >
<tr>
<td height="22" colspan="2" class="tdbg">
<%
Response.write Cl.ShowPage(CJFileName,ItemNum,MaxPerPage,"个","项目")
%>
</td>
</tr>
</table>
<%
End Sub
'==========================================
'采集基本设置
'==========================================
Sub config()
If CGet.G("config")="save" Then
SqlItem="Select top 1 Dir,MaxFileSize,FileExtName,Timeout,MaxPerPage from ModuleInfo where ID=" &ModuleID
Set Rs=server.CreateObject("adodb.recordset")
Rs.Open SqlItem,Conn_C,3,3
rs("Timeout")=Cl.GetClng(CGet.G("Timeout"))
rs("Dir")=CGet.G("Dir")
rs("MaxFileSize")=Cl.GetClng(CGet.G("MaxFileSize"))
rs("FileExtName")=CGet.G("FileExtName")
rs("MaxPerPage")=Cl.GetClng(CGet.G("MaxPerPage"))
Rs.UpDate
Rs.Close
set rs=nothing
response.write "<script>alert('修改成功!');</script>"'关闭窗口
config_main()
Else
config_main()
End If
End Sub
Sub config_main()
set rs = Conn_C.execute("Select top 1 Dir,MaxFileSize,FileExtName,Timeout,MaxPerPage from ModuleInfo where ID=" & ModuleID)
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="Border">
<tr class='tdbg'>
<th height="22" colspan="2" align="center" ><strong>采 集 集 基 本 设 置</strong></th>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="Border">
<form action="?action=config&config=save" method="post">
<tr class="tdbg">
<td width="20%" height="20" align="right"><STRONG>采集超时设置:</STRONG></td>
<td><input name="Timeout" type="text" class="lostfocus" value="<%= rs("Timeout") %>" size="10" maxlength="9">
<STRONG>秒</STRONG> <font color="Blue">* 默认64秒 如果128K的数据64秒还下载不完(按每秒2K保守估算),则超时。</font></td>
</tr>
<tr class="tdbg">
<td height="20" align="right"><STRONG>项目行数设置:</STRONG></td>
<td><input name="MaxPerPage" type="text" class="lostfocus" value="<%= rs("MaxPerPage") %>" size="10" maxlength="9">
<strong>条</strong> <font color="Blue">* 采集项目管理显示条数,设0为10条。</font></td>
</tr>
<tr class="tdbg">
<td width="20%" height="20" align="right"><STRONG>允许下载的图片大小:</STRONG></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -