灵's profile关灵的树洞PhotosBlogListsMore Tools Help

Blog


    16 July

    百变美女图 [每刷新/回复一次,就变一次]

    百变美女图 [每刷新/回复一次,就变一次喔``]

    原创minet

     
     其实实现的这个效果是一段ASP代码,如下: 

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> 
    <% 
    '---------------------------------------------------------------------------------------- 
    '转发时请保留此声明信息,这段声明不并会影响你的显示速度! 
    '*********************** 随机图片显示 ************************* 
    '代码分析收集: netm1.126.com 
    '时间:2005-07-01 
    '使用实例:img.asp?list=图片存放目录 
    '使用注意:图片目录放于本文件同目录下!需要FSO支持! 
    ---------------------------------------------------------------------------------------- 
    Function AllPath() 
    Dim Domain,GFilePath 
    Domain = Request.ServerVariables("SERVER_NAME") 
    GFilePath = Request.ServerVariables("PATH_INFO") 
    GFilePath = lcase(left(GFilePath,instrRev(GFilePath,"/"))) 
    AllPath = "http://"&Domain&GFilePath 
    End Function 

    Function ShowFileList(folderspec) 
    Dim Path,objFSO,objFolder,count,objFile,nume,S 
    Path = Server.MapPath(folderspec) 
    Set objFSO = Server.CreateObject("Scripting.FileSystemObject") 
    If objFSO.FolderExists(Path) Then 
    Set objFolder = objFSO.GetFolder(Path) 
    count = 0 
    For Each objFile in objFolder.Files 
    count = count+1 
    Next 
    randomize 
    nume = Int((count*rnd)+1) 
    S = 0 
    ShowFileList = "" 
    For Each objFile in objFolder.Files 
    S = S + 1 
    If S = nume Then 
    ShowFileList = objFile.Name 
    Exit For 
    End If 
    Next 
    Set objFolder = Nothing 
    Else 
    ShowFileList = "NO" 
    End If 
    Set objFSO = Nothing 
    End Function 

    Dim list,filename,address,str 

    list = trim(Request.QueryString("list")) 
    if list = "" then 
    Response.write "本页需要正确参数引入,您缺少相关的参数!正确 
    格式如下:"&AllPath&"img.asp?list= 

    图片存放目录" 
    Response.End() 
    end if 

    filename = ShowFileList("./"&list&"/") 
    if filename = "NO" then 
    Response.write "您指定的目录<b>"&list&"</b>不存在,请重新 
    指定!" 
    Response.End() 
    end if 

    if filename = "" then 
    Response.write "您指定的目录<b>"&list&"</b>没有相关的图片 
    文件存在,请重新指定!" 
    Response.End() 
    end if 

    str = right(filename,3) 
    if str<>"jpg" and str<>"gif" then 
    filename = "erro.gif" 
    end if 

    address = AllPath&list&"/" 
    address = address&filename 
    %> 
    <%Response.redirect(address)%> 

    ------------------------------

    Target Store Discounts

    Comments (13)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    ❀晕晕✾wrote:
    hehe you dian bu mingbai
    25 Feb.
    Picture of Anonymous
    五陵衣马自轻肥 wrote:
    恩 很多都对
    26 Aug.
    Picture of Anonymous
    penny妮 wrote:
    呵呵!!真的好谢谢你的支持了,你的空间我很喜欢哦!!特别是这篇日志!!我要转贴哈!!我想一定没问题吧??谢谢你,谢谢你!再次感谢你哈!!!


    你要加油!!我会常看你的!!!
    16 Aug.
    Picture of Anonymous
    猫咪小小 wrote:
    这个我要转载~~~
    2 Aug.
    Picture of Anonymous
    甜咖啡(sweetcoffee) wrote:
    我很无奈
    1 Aug.
    Picture of Anonymous
    Energypan wrote:
    请问这个背景音乐是什么呀?!~~i like it
    23 July
    Picture of Anonymous
    ╰☆小欣じ wrote:
    我的是QQ宠物,space当然看不到了:)
    21 July
    Picture of Anonymous
    ╰☆小欣じ wrote:
    你哪里来的那么多宠物,我只养了一个QQ宠物就焦头烂额的了!
    21 July
    Picture of Anonymous
    sharon wrote:
    好炫的space啊!
    21 July
    Picture of Anonymous
    Sand12151 wrote:
    谢谢你来我那里,我也链了你哦.
    19 July
    Picture of Anonymous
    zmyou wrote:
    哈哈 狂刷你这里 朋友
    18 July
    Picture of Anonymous
    瘦马 wrote:
    淡淡的哀愁,似水年华。
    希望你快乐。
    17 July
    Picture of Anonymous
    么么嘎嘎 wrote:
    你的个人简介跟我最好的朋友的qq个性签名一样,呵呵,看到它有一种陌生的亲切的感觉,你知道我说的那个他是谁么?

    其实我写的文字都不是很用心,只是一时来感的表现,也可以说是种冲动的表现,没办法,我太情绪化了......

    苦笑 *0*
    17 July

    Trackbacks (1)

    The trackback URL for this entry is:
    http://guanling.spaces.live.com/blog/cns!F166C7CC51C30A4E!309.trak
    Weblogs that reference this entry