mbt masai
 
Welcome !
         

                                
After experiencing a lot of down time, We decided to move this site to CrystalTech.com. CrystalTech.com is powered by only the finest Windows servers providing the best performance, reliability, and value anywhere.

 latest image upload applet

Author Message
NazzDesigns

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 12/12/2009
  • Status: offline
latest image upload applet Saturday, December 12, 2009 5:31 AM (permalink)
0
hey everyone,
I am new to this forum and also vbscript
 
I use the following coding to show six images from the latest photo album i uploaded picture to. However the images being shown are the 1st six images in the folder (which are the ones the oldest uploaded) not the final six images uploaded. Anyone can help me what should i change in the following coding to show the last six images in the folder.
 
 
       <%
                                                     latestfolder = "na"
                                                     latestdate = cdate("01/01/09")
     
                                                     set fs=Server.CreateObject("Scripting.FileSystemObject")
                             set fo=fs.GetFolder(Server.MapPath("images/gallery"))
                                                     for each folder in fo.subfolders 
                                                             if cdate(folder.DateLastModified) > latestdate then
                                                                     latestdate = cdate(folder.DateLastModified)
                                                                     latestfolder = folder.name
                                                             end if
                                                     next
     
                                                     if latestfolder <> "na" then
                                                       set fi=fs.GetFolder(Server.MapPath("images/gallery/" & latestfolder))
                                                             looptimes = 0
                                                             for each file in fi.files 
     
         if right(lcase(file.Name),3) = "jpg" then %>
     
      <a href="thumbnail.aspx?picture=<%=server.URLEncode("images/gallery/" & latestfolder & "/" & file.Name)%>&maxWidth=640&maxHeight=480" target="_blank"  style="text-decoration:none; cursor:pointer;">          
        <img src="thumbnail.aspx?picture=<%=server.URLEncode("images/gallery/" & latestfolder & "/" & file.Name)%>&maxWidth=100&maxHeight=60" style="border:1px solid #ffffff; margin:5px; margin-top:14px;">        </a> 
     
       <% end if
     
                                                                     looptimes = looptimes + 1
                                                                     if looptimes = 6 then exit for end if
                                                             next
     
                                                     end if
                                     %>
          

#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.8
    mbt shoes www.wileywilson.com