⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resize.asp

📁 使用ASP元件(請自行下載、安裝或登錄) AspUpload+AspJpeg+Jmail[或AspMail] 整合JS與FLASH套件 Highslide JS+SWFUpload+Titl
💻 ASP
字号:
<!-- #include file="config.asp" -->
<%
If request("Request_Method")="POST" Then
   Server.ScriptTimeOut = 10000
   areana=request("areana")
   If request("description1")="" Then
      description=request("description")
   Else
      description=request("description1")
   End If
   wh_type=request("wh_type")  
   Select Case wh_type
     Case 1
       Width=1024
       Height=768
     Case 2
       Width=1600
       Height=1200        
     Case 3
       Width=1280
       Height=1024            
     Case 4
       Width=1280
       Height=800
     Case 5
       Width=1440
       Height=900
     Case 6
       Width=1680
       Height=1050
     Case 7
       Width=1920
       Height=1200 
     Case 8
       Width=1920
       Height=1080          
   End Select
   
   Set FS = CreateObject("Scripting.FileSystemObject")
   Set Upload = Server.CreateObject("Persits.Upload")
   Set Jpeg = Server.CreateObject("Persits.Jpeg") 

   OriFolder=areana&"/"&description
   OriTestFolder = Server.Mappath(OriFolder)
   Set objFolder = FS.GetFolder(OriTestFolder)
   
   S=0
   Csave=0
   For Each objFile in objFolder.Files
      Set File = Upload.OpenFile(objFile.Path)
      If File.ImageType = "UNKNOWN" OR File.ImageWidth=1024 Then
         S=S+1
      Else
         Csave=Csave+1     
         jpeg.OpenBinary( File.Binary )
         Jpeg.Width = Width
         Jpeg.Height = Height
         StrWidth=Cstr(Width)
         ymdhms=File.FileName
         strpath=areana&"/"&description&"_"&StrWidth&"/"&ymdhms
         strFolder=areana&"/"&description&"_"&StrWidth
         strTestFolder=Server.Mappath(strFolder)
             
         If Not FS.FolderExists(strTestFolder) Then
             FS.CreateFolder(strTestFolder)
         End If
         Jpeg.Save Server.MapPath(strpath)
         Response.Write File.FileName & "= " & File.Path & " (" & File.Size &" bytes)<BR>"
      End IF 
   Next
   Response.Write "File saved."&Csave&"<BR>"
   Response.Write "<font color=red><b>Not an image file."&S&"</b></font><br>"   
   Response.Write "<A HREF=RESIZE.ASP><FONT SIZE=5><B>Continue...</B></FONT></A><BR>"
   
   Response.Write "<A HREF=filelist_SImg.asp?areana="&areana&"><FONT SIZE=5><B>"&areana&"</B></FONT></A><BR>"
   Response.End
End If
%>
<HEAD><TITLE>呼隔

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -