复制代码 代码如下: <% if session("admin")<>"on" then Response.Redirect"login.asp" end if %> <!--#include file="config.asp" --> <!--#include file="mdb/conn.asp" -->
<% Set Upload = Server.CreateObject("Persits.Upload")
FilePath=Server.MapPath(".")
Count = Upload.Save(FilePath&BigPhotoPath) "传大图
SmallFilePath=FilePath & SmallPhotoPath
For Each File in Upload.Files
Set Jpeg = Server.CreateObject("Persits.Jpeg") Jpeg.Open (File.Path)
if imgWidth>=imgHeight and imgWidth>120 then Jpeg.Width=150 Jpeg.Height=Jpeg.OriginalHeight/(Jpeg.OriginalWidth/150) end if if imgHeight>imgWidth and imgHeight>113 then Jpeg.Height=113 Jpeg.Width=Jpeg.OriginalWidth/(Jpeg.OriginalHeight/113) end if Jpeg.Sharpen 1, 130 Jpeg.Save (SmallFilePath&"S_"&File.FileName)