📄 sk_getphoto.asp
字号:
Rs.Open Sql,ConnItem,1,1
%>
arr_special[<%=i_Special%>] = new Array("<%=Arr_Channel(0,i_Channel)%>","0","不属于任何专题");
<%
i_Special=i_Special+1
If Not Rs.Eof then
Do While Not Rs.Eof
%>
arr_special[<%=i_Special%>] = new Array("<%=Arr_Channel(0,i_Channel)%>","<%=Rs("SpecialID")%>","<%=Rs("SpecialName")%>");
<%
i_Special=i_Special + 1
Rs.MoveNext
Loop
End if
Rs.Close
Set Rs=Nothing
Next
%>
count_class=<%=i_Class%>;
count_special=<%=i_Special%>;
function changelocation(locationid)
{
document.myform.ClassID.length = 0;
document.myform.SpecialID.length = 0;
var locationid=locationid;
var i;
for (i=0;i < count_class; i++)
{
if (arr_class[i][0] == locationid)
{
document.myform.ClassID.options[document.myform.ClassID.length] = new Option(arr_class[i][2], arr_class[i][1]);
}
}
for (i=0;i < count_special; i++)
{
if (arr_special[i][0] == locationid)
{
document.myform.SpecialID.options[document.myform.SpecialID.length] = new Option(arr_special[i][2], arr_special[i][1]);
}
}
}
</script>
<%
End if
End sub'初步设置完
Sub setup1()'第一步
if Action1="edit" and Action="s1" or Action1="add" then
sk.Err_msg 1
If FoundErr<>True Then
if action1="add" then sk.item_sql "add"
if action1="edit" then sk.item_sql "edit"
End If
If FoundErr<>True and Request.Form("ShowCode")="checkbox" Then
ListCode=GetHttpPage(ListUrl,"GB2312")
If ListCode="$False$" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>在获取:" & ListUrl & "网页源码时发生错误</li>"
End If
End If
End If
If FoundErr=True Then
call WriteErrMsg(ErrMsg)
Else
If Request.Form("ShowCode")="checkbox" Then
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder" >
<tr>
<td height="22" colspan="2" class="title"> <div align="center"><strong>项 目 编 辑 -- 采集目标网站源代码 </strong>
<input type="radio" value="0" name="ShowCodeobt" onClick="ShowCode1.style.display='none';">
隐藏源代码窗口
<input type="radio" value="0" name="ShowCodeobt" checked onClick="ShowCode1.style.display='';">
显示源代码窗口
</div>
</td>
</tr>
<tr class="tdbg" class="tdbg" id="ShowCode1">
<td height="22" colspan="2" bgcolor="f3f3f3" class="tdbg" align="center">
<textarea name="showCode" cols="120" rows="10" class="lostfocus"><%=ListCode%></textarea><br>采集的目标地址 →<a href=<%=ListUrl%> target="_blank"><%=ListUrl%></a> <a href='view-source:<%=ListUrl%>' target='_blank'><font color='blue'>点击查看目标源代码</font></a></td>
</tr>
</table>
<% end if
If action="edit" or action1="edit" or action="s1" and action1<>"add" Then'是否从链接来读数据
Set RsItem=ConnItem.execute("select * from Item where ItemID=" & ItemID)
LsString=RsItem("LsString")
LoString=RsItem("LoString")
HsString=RsItem("HsString")
HoString=RsItem("HoString")
ListUrl=RsItem("ListStr")
imhstr=RsItem("imhstr")
imostr=RsItem("imostr")
x_tp=RsItem("x_tp")
x_tpUrl=RsItem("x_tpUrl")
RsItem.close
set RsItem=nothing
action1="edit"
end if
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder" >
<form method="post" action="?" name="form1">
<tr>
<td height="22" colspan="2" class="title"> <div align="center"><strong> 项 目--列表连接设置</strong></div></td>
</tr>
<tr class="tdbg">
<td align="right" bgcolor="f3f3f3" class="tdbg" ><strong>列表开始代码:</strong></td>
<td bgcolor="f3f3f3" class="tdbg"><textarea name="LsString" cols="70" rows="7" class="lostfocus"><%=LsString %></textarea></td>
</tr>
<tr class="tdbg">
<td align="right" bgcolor="f3f3f3" class="tdbg" ><strong>列表结束代码:</strong></td>
<td bgcolor="f3f3f3" class="tdbg"><textarea name="LoString" cols="70" rows="7" class="lostfocus"><%=LoString %></textarea></td>
</tr>
<tr class="tdbg">
<td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><strong>链接开始代码:</strong></td>
<td width="75%" bgcolor="f3f3f3" class="tdbg">
<textarea name="HsString" cols="70" rows="7" class="lostfocus"><%= HsString %></textarea></td>
</tr>
<tr class="tdbg">
<td width="20%" align="right" bgcolor="f3f3f3" class="tdbg" ><strong>链接结束代码:</strong></td>
<td width="75%" bgcolor="f3f3f3" class="tdbg">
<textarea name="HoString" cols="70" rows="7" class="lostfocus"><%= HoString %></textarea></td>
</tr>
<tr class="tdbg">
<td align="right" bgcolor="f3f3f3" class="tdbg" ><strong>列表小图处设置:</strong></td>
<td bgcolor="f3f3f3" class="tdbg">
<input type="radio" name="x_tp" value="0" <% if x_tp=0 or x_tp="" then Response.Write("checked")%> onClick="picl1.style.display='none'">
不作设置
<input type="radio" name="x_tp" value="1" <% if x_tp=1 then Response.Write("checked")%> onClick="picl1.style.display=''">
列表小图
<input type="radio" name="x_tp" value="2" <% if x_tp=2 then Response.Write("checked") %> onClick="picl1.style.display='none';picl.style.display=''">自动缩略图
</td>
</tr>
<tr class="tdbg" id="picl1" <% if x_tp<>1 then Response.Write "style=""display:none""" %> >
<td align="right" bgcolor="f3f3f3" class="tdbg" ><p><strong><font color=blue>列表小图片开始代码:</font>
</strong></p>
<p> </p>
<p><strong><font color=blue>列表小图片结束代码:</font></strong></p></td>
<td bgcolor="f3f3f3" class="tdbg"><textarea name="imhstr" cols="70" rows="7" id="imhstr" class="lostfocus"><%= imhstr %></textarea>
<textarea name="imostr" cols="70" rows="7" id="imostr" class="lostfocus"><%= imostr %></textarea></td>
</tr>
<tr class="tdbg" bgcolor="#F3F3F3">
<td height="30" align="right"><STRONG>重定小图片地址</STRONG>:</td>
<td><input name="x_tpUrl" type="text" class="lostfocus" value="<% =x_tpUrl %>" size="80" maxlength="200">
</td>
</tr>
<tr class="tdbg">
<td colspan="2" align="center" bgcolor="f3f3f3" class="tdbg" height="30">
<input name="ItemID" type="hidden" value="<%=ItemID%>">
<%
select case action1
case "add"
Response.Write "<input name=""Action1"" type=""hidden"" id=""Action"" value=""add"">"
case "edit"
Response.Write "<input name=""Action1"" type=""hidden"" id=""Action"" value=""edit"">"
end select
%>
<input name="Action" type="hidden" id="Action" value="s2">
<input type="button" name="button1" class="lostfocus" value="上 一 步" onClick="window.location.href='javascript:history.go(-1)'" style="cursor: hand;background-color: #cccccc;">
<input type="submit" name="Submit" class="lostfocus" value="下 一 步" style="cursor: hand;background-color: #cccccc;"> <input type="checkbox" name="ShowCode" value="checkbox">显示源码</td>
</tr>
</form>
</table>
<%
End If
end sub'第一步完
sub setup2()'第二步
sk.Err_msg 2
'======================显示远程源码==============
If FoundErr<>True and Request.Form("ShowCode")="checkbox" Then'得到远程源码
ListCode=GetHttpPage(ListUrl,"GB2312")
If ListCode<>"$False$" Then
ListCode=GetBody(ListCode,LsString,LoString,False,False)
If ListCode<>"$False$" Then
NewsArrayCode=GetArray(ListCode,HsString,HoString,False,False)
'--
if x_tp =1 then
Newsimage=GetArray(ListCode,imhstr,imostr,False,False)
end if
'--
If NewsArrayCode<>"$False$" Then
NewsArray=Split(NewsArrayCode,"$Array$")
For Testi=0 To Ubound(NewsArray)
If HttpUrlType=1 Then
NewsArray(Testi)=Replace(HttpUrlStr,"{$ID}",NewsArray(Testi))
Else
NewsArray(Testi)=DefiniteUrl(NewsArray(Testi),ListUrl)
End If
Next
UrlTest=NewsArray(0)
NewsCode=GetHttpPage(UrlTest,"GB2312")
Else
FoundErr=True
ErrMsg=ErrMsg & "<br><li>在获取链接列表时出错。</li>"
End If
Else
FoundErr=True
ErrMsg=ErrMsg & "<br><li>在截取列表时发生错误。</li>"
End If
Else
FoundErr=True
ErrMsg=ErrMsg & "<br><li>在获取:" & ListUrl & "网页源码时发生错误。</li>"
End If
'--
if x_tp =1 then
If imostr="" or imhstr="" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>小图片代码不能为空</li>"
else
If Newsimage="$False$" Then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>在分析:" & ListUrl & "新闻列表时发生错误!</li>"
Else
Newsim=Split(Newsimage,"$Array$")
If IsArray(Newsim)=True Then
For Testi=0 To Ubound(Newsim)
If HttpUrlType=1 Then
Newsim(Testi)=Replace(HttpUrlStr,"{$ID}",Newsim(Testi))
Else
Newsim(Testi)=DefiniteUrl(Newsim(Testi),ListUrl)
End If
if x_tpUrl<>"" then Newsim(Testi)= x_tpUrl & Newsim(Testi)
Next
Else
FoundErr=True
ErrMsg=ErrMsg & "<br><li>在分析:" & ListUrl & "新闻列表时发生错误!</li>"
End If
End If
End If
end if
End If
'===================显示远程源码完=============================
If FoundErr=True Then
call WriteErrMsg(ErrMsg)
Else
If Request.Form("ShowCode")="checkbox" Then
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder" >
<tr>
<td height="22" colspan="2" class="title"> <div align="center"><strong>项 目 编 辑 -- 采集目标网站源代码 </strong>
<input type="radio" value="0" name="ShowCodeobt" onClick="ShowCode1.style.display='none';">
隐藏源代码窗口
<input type="radio" value="0" name="ShowCodeobt" checked onClick="ShowCode1.style.display='';">
显示源代码窗口
</div></td>
</tr>
<tr class="tdbg" id="ShowCode1">
<td height="22" colspan="2" bgcolor="f3f3f3" class="tdbg" align="center">
<textarea name="showCode" cols="120" rows="10" class="lostfocus"><%=NewsCode%></textarea><br>
<%For Testi=0 To Ubound(NewsArray)
Response.Write "采集的目标地址 →<a href="& NewsArray(Testi) &" target=""_blank"">"& NewsArray(Testi) &"</a>"
Response.Write "<a href='view-source:" & NewsArray(Testi) & "' target=_blank><font color='blue'>点击查看目标源代码</font></a><br>"
Next
if x_tp = 1 then
For Testi=0 To Ubound(Newsim)
Response.Write "采集的小图片地址 →"
Response.Write "<a href='" & Newsim(Testi) & "' target=_blank>" & Newsim(Testi) & "</a><br>"
Next
end if
%>
</td>
</tr>
</table>
<% end if
If action="edit" or action1="edit" or action="s2" and action1<>"add" Then'是否从链接来读数据
Set RsItem=ConnItem.execute("select * from Item where ItemID=" & ItemID)
TsString=RsItem("TsString")
ToString=RsItem("ToString")
CsString=RsItem("CsString")
CoString=RsItem("CoString")
photourls=RsItem("photourls")
photourlo=RsItem("photourlo")
PhotoPaingType=RsItem("PhotoPaingType")
PhotoType_s=RsItem("PhotoType_s")
PhotoType_o=RsItem("PhotoType_o")
PhotoLurl_s=RsItem("PhotoLurl_s")
PhotoLurl_o=RsItem("PhotoLurl_o")
Phototypefy_s=RsItem("Phototypefy_s")
Phototypefy_o=RsItem("Phototypefy_o")
Phototypefyurl_s=RsItem("Phototypefyurl_s")
Phototypefyurl_o=RsItem("Phototypefyurl_o")
Phototypeurl_s=RsItem("Phototypeurl_s")
Phototypeurl_o=RsItem("Phototypeurl_o")
HttpUrlStr=RsItem("HttpUrlStr")
DateType=RsItem("DateType")
DsString=RsItem("DsString")
DoString=RsItem("DoString")
AuthorType=RsItem("AuthorType")
AsString=RsItem("AsString")
AoString=RsItem("AoString")
AuthorStr=RsItem("AuthorStr")
CopyFromType=RsItem("CopyFromType")
FsString=RsItem("FsString")
FoString=RsItem("FoString")
CopyFromStr=RsItem("CopyFromStr")
KeyType=RsItem("KeyType")
KsString=RsItem("KsString")
KoString=RsItem("KoString")
KeyStr=RsItem("KeyStr")
RsItem.close
set RsItem=nothing
action1="edit"
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -