手机站
网通分站
电信主站
密 码:
用户名:
当前位置 : 主页>网络编程>Asp编程>列表

网站图片扫描类

来源:互联网 作者:west263.com 时间:2008-02-23
西部数码-全国虚拟主机10强!40余项虚拟主机管理功能,全国领先!双线多线虚拟主机南北访问畅通无阻!免费赠送企业邮局,.CN域名,自助建站480元起,免费试用7天,满意再付款! P4主机租用799元/月.月付免压金!

</tr>
<tr bgcolor="#FFFFFF">
<td height="20"><div align="right">文件类型:</div></td>
<td height="20"><input name="Ext" type="checkbox" id="Ext" value="asp" checked>
Asp
<input name="Ext" type="checkbox" id="Ext" value="htm" checked>
Htm
<input name="Ext" type="checkbox" id="Ext" value="html" checked>
Html
<input name="Ext" type="checkbox" id="Ext" value="inc" checked>
Inc</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="20"><div align="right">数据库:</div></td>
<td height="20">表:
<input name="Tab" type="text" id="Tab" size="5" class="allinput">
图片ID列:
<input name="ColID" type="text" id="ColID" size="5" class="allinput">
图片路径列:
<input name="ColImg" type="text" id="ColImg" size="5" class="allinput"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="40" colspan="2"><div align="center">
<input type="submit" value=" 开始扫描 " class="allinput">
</div></td>
</tr>
</table>
</form>
</body>
</html>
scan.asp
<!--#include file="scan.inc"-->
<%
dim mcs,fn,fb
%>
<link href="css.css" rel="stylesheet">
<table width="70%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#003366">
<tr bgcolor="#AAAAFF">
<td width="30%" height="30">图片名称</td>
<td width="39%" height="30">所在位置</td>
<td width="31%" height="30">有效</td>
</tr>
<%
Function GetVar(ID,Default)
GetVar = Default
If Request(ID) <> "" Then
GetVar = Request(ID)
End IF
End Function
Dim SType,LType,Path,Ext,Conn,Tab,ColID,ColImg
SType=GetVar("SType",1)
LType=GetVar("LType",3)
Path=GetVar("Path","/")
Ext = Trim(Replace(GetVar("Ext","htm,html,asp,inc"),", ","/"))
Conn=GetVar("Conn","")
Tab=GetVar("Tab","")
ColID=GetVar("ColID","")
ColImg=GetVar("ColImg","")
Conn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("/db1.mdb")
set mcs= new mcscanimg
mcs.ScanType=SType
mcs.list=LType
mcs.ScanText=Ext
mcs.conn=Conn
mcs.Path=Path
mcs.table=Tab
mcs.ColID=ColID
mcs.ColImg=ColImg
mcs.scan()
for each fn in mcs.file
set fb=mcs.file(fn)
%>
<tr bgcolor="#FFFFFF">
<td valign="top"><%=fb.filename%></td>
<td><%=Replace(fb.Belong,"|","<br>")%></td>
<td><%
if fb.Exists=1 then
response.Write "有效的路径"
elseif fb.exists=0 then
response.Write "失效的路径"
else
response.Write "非本地路径"
end if
%></td>
</tr>
<%
next
%>
<tr bgcolor="#FFFFFF">
<td colspan="3">共扫描文件:<%=mcs.files%>;扫描文件夹:<%=mcs.folders%>;总计大小:<%=mcs.totalsize%><br>扫描图片个数:<%=mcs.images&";数据库图片个数:"&mcs.dbimg&";图片总数:"&mcs.TotalImg%>;失效个数:<%=mcs.exists%>个<br>运行时间:<%=mcs.runtime%>毫秒</td>
</tr>
</table>
<%set mcs=nothing%>

文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!