<% if session("LOGADO") <> "T" then strMsg = "* Este serviço só está disponível para usuários cadastrados.
Se você for um usuário cadastrado, por favor execute o login.
Se você ainda não se cadastrou, por favor cadastre-se e tente novamente.
O cadastro é grátis. " Call MessageBox(strMsg, "vbcritical", "None") else Response.Write "

 Papel de Parede


" diretorio = Server.MapPath("../images/wallpaper/") Response.Write "" & _ showfolderlist(diretorio) & _ "


" Function ShowFolderList(folderspec) Dim fso, f, f1, fc, flag Set fso = CreateObject("Scripting.FileSystemObject") if fso.FolderExists(folderspec) Then Set f = fso.GetFolder(folderspec) Set fc = f.Files total = 0 For Each f1 in fc 'Response.Write f1.path & "
" total = total + 1 if not instr(f1.Name,".asp") > 0 Then lista = lista & "
Formato: " & right(f1.Name,3) &"" & _ "" & _ "
" & _ " " & _ "
Resolução
" mid_len = len(f1.name) - 6 flag = diretorio & "\640x480\" & mid(f1.name, 3) flag_t = "\" & mid(f1.name, 3, mid_len) & "640x480.log" if ChkFile(flag) = 1 then lista = lista & " 640x480   " total_download = TotalDownload(flag_t) end if flag = diretorio & "\800x600\" & mid(f1.name, 3) flag_t = "\" & mid(f1.name, 3, mid_len) & "800x600.log" if ChkFile(flag) = 1 then lista = lista & " 800x600   " total_download = total_download + TotalDownload(flag_t) end if flag = diretorio & "\1024x768\" & mid(f1.name, 3) flag_t = "\" & mid(f1.name, 3, mid_len) & "1024x768.log" if ChkFile(flag) = 1 then lista = lista & " 1024x768   " total_download = total_download + TotalDownload(flag_t) end if lista = lista & _ "

" & _ "" & total_download & " download(s).

" & _ " " & _ "
" & _ "" & _ "" end if Next else total = 0 end if ShowFolderList = lista End Function Function chkFile(filespec) Dim fso Set fso = CreateObject("Scripting.FileSystemObject") if fso.FileExists(filespec) then chkFile = 1 'existe else chkFile = 0 'nao existe end if set fso = nothing End Function Function TotalDownload(filespec) ' Le o nro de downloads Dim arquivo, log 'Dim mid_len 'armazena o tamanho do nome do arquivo - o ponto e a extensao 'mid_len = Len(filename) - 4 arquivo = Server.MapPath("../dados/log/wallpaper") & filespec Set fso = Server.CreateObject("Scripting.FileSystemObject") if fso.FileExists(arquivo) then Set log = fso.OpenTextFile(arquivo, 1) If Not log.AtEndOfStream Then TotalDownload = CLng(log.ReadAll) Else TotalDownload = 0 End If log.Close Set log = Nothing else TotalDownload = 0 end if Set fso = Nothing End Function End if %>