Set qswh=new qswhImg '得到照片的大小
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(Request.ServerVariables("APPL_PHYSICAL_PATH") & PhotoPath)
Set fc = f.Files
For Each f1 in fc
ext=fso.GetExtensionName(f1.path)
If ext="gif" Or ext="jpg" Or ext="jpeg" Then
arr=qswh.getImageSize(f1.path)
If arr(1)<VarPhotoWidth Then PhotoWidth=arr(1) Else PhotoWidth=VarPhotoWidth
If arr(2)<VarPhotoHeight Then PhotoHeight=arr(2) Else PhotoHeight=VarPhotoHeight
WebPhotoPath="/yngfgx/images/school/" & f1.name
If (trNo Mod 3)=0 Then
Response.Write "<tr width='100%' height='140'>"
End If
TempName=Left(f1.name,Len(f1.name)-Len(ext)-1)
Response.write "<td width='30%' height='130' align='center'>"
Response.Write "<img style='cursor:hand;'border=1 src='" & WebPhotoPath & "' width='" & PhotoWidth & "' height='" & PhotoHeight & "' alt=" & TempName & " onClick=javascript:openWindow('/yngfgx/subsite/school/dispic.asp?picpath=" & WebPhotoPath & "&picwidth=" & arr(1) & "&picheight=" & arr(2) & "','" & arr(2) & "','" & arr(1) & "');>"
Response.Write "<br><font size='2' face='宋体'>" & TempName & "</font>"
Response.Write "</td>"
'response.write "<br>" & arr(0) & " " & arr(3) & ":" & f1.name & " width:" & arr(1) & " height:" & arr(2)
trNo=trNo+1
End If
Next
Set fc=nothing
Set f=nothing
Set fso=nothing
Set qswh=nothing