Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 17
  1. #1

    visualizzazione immagini

    Mi che fatica iscriversi non riuscivo a trovare un nome utente valido!!
    VVoVe:




    be questa la dice lunga su come sono combinato perciò abbiate pietà di me!


    aiutatemi

    ho questo script
    codice:
    <%
    @Language = "VBscript"
    %>
    <%
    ' SETTINGS
    ' -->
    	dim PageTitle, ImageDirectory, ThumbnailHeight, ThumbnailWidth, ItemsPerPage, ItemsHorizontal
    	PageTitle			= "Stadio Radio "
    	ImageDirectory		= "Taurianovese/"
    	ThumbnailHeight	= 75
    	ThumbnailWidth		= 75
    	ItemsPerPage		= 10
    	ItemsHorizontal	= 5
    ' <--
    
    dim TotalItems, CurrentPage
    
    sub PrintGallery()
    	CurrentPage = request.querystring("page")
    
    	if CurrentPage = "" OR int(CurrentPage) = 0 then
    		CurrentPage = 1
    	end if
    	
    	dim StartItem
    	StartItem = ((CurrentPage - 1) * ItemsPerPage) + 1
    	
    	if int(StartItem) = 0 then
    		StartItem = 1
    	end if
    
    	dim FileSystemObject, FileSystemObjectFiles
    	set FileSystemObject			= server.createobject("scripting.filesystemobject")
    	set FileSystemObjectFiles	= FileSystemObject.getfolder(server.mappath(ImageDirectory))
    	
    	dim item, ItemArray
    	for each item in FileSystemObjectFiles.files
    		TotalItems = TotalItems + 1
    		
    		if int(StartItem) <= int(TotalItems) AND int(StartItem + ItemsPerPage) > int(TotalItems) then
    			if ItemArray = "" then
    				ItemArray = ItemArray & item.name
    			else
    				ItemArray = ItemArray & "," & item.name
    			end if
    		end if
    	next
    	
    	ItemArray = split(ItemArray, ",")
    
    	response.write "<table class=""table"">" & vbnewline
    	
    		dim i, ItemPrints
    		for i = 0 to ubound(ItemArray)
    			ItemPrints = ItemPrints + 1
    		
    				if int(ItemPrints) = 1 then
    					response.write "<tr>" & vbnewline
    				end if
    
    					response.write "<td class=""td"">" &_
    						
    						"<a href="""& ImageDirectory & "/" & ItemArray(i) & """ target=""_blank"" class=""link_image"">" &_
    							"[img][/img]" &_
    						"</a>" &_
    					"</td>" & vbnewline
    
    			if int(ItemPrints) = int(ItemsHorizontal) OR i = ubound(ItemArray) then
    				ItemPrints = 0
    				response.write  "</tr>" & vbnewline
    			end if
    		next
    
    	response.write  "</table>" & vbnewline
    
    end sub
    
    
    private sub PrintPaging()
    	dim TotalPages
    	TotalItems = TotalItems
    	TotalPages = TotalItems/ItemsPerPage
    	
    	if int(TotalPages) < TotalPages then
    		TotalPages = int(TotalPages) + 1
    	end if
    	
    	dim PageName
    	PageName = request.servervariables("script_name")
    	
    	if 1 < TotalPages then
    		response.write "<div class=""div_paging"">" &_
    			"Page: "
    
    			dim i
    			for i = 1 to TotalPages
    				if int(CurrentPage) = int(i) then
    					response.write " ("& i &")"
    				else
    					response.write " <a href="""& PageName &"?page="& i &""" class=""link_paging"">" &_
    						i &_
    					"</a>"
    				end if
    
    				if NOT i = TotalPages then
    					response.write ", "
    				end if
    			next
    
    		response.write "</div>"
    	end if
    end sub
    
    
    response.write "<html>" & vbnewline &_
    "<head>" & vbnewline &_
    "<title>" & PageTitle & "</title>" & vbnewline &_
    "<style>" & vbnewline &_
    
    "body" &_
    "{" &_
    "font-family: tahoma, verdana, arial;" &_
    "font-size: 10pt;" &_
    "color: #000000;" &_
    "text-align:center;" &_
    "}" & vbnewline &_
    
    ".table" &_
    "{" &_
    "margin:auto;" &_
    "}" & vbnewline &_
    
    ".td" &_
    "{" &_
    "padding:20px;" &_
    "}" & vbnewline &_
    
    "a.link_image" &_
    "{" &_
    "border:2px groove #000000;" &_
    "}" & vbnewline &_
    
    "a.link_image:hover" &_
    "{" &_
    "border:2px groove #000000;" &_
    "}" & vbnewline &_
    
    "a.link_paging" &_
    "{" &_
    "text-decoration:underline;" &_
    "color: #000000;" &_
    "}" & vbnewline &_
    
    "a.link_paging:hover" &_
    "{" &_
    "text-decoration:none;" &_
    "color: #000000;" &_
    "}" & vbnewline &_
    
    "a.link_credits" &_
    "{" &_
    "font-size: 8pt;" &_
    "color: #000000;" &_
    "}" & vbnewline &_
    
    ".div_credits" &_
    "{" &_
    "font-size: 8pt;" &_
    "color: #000000;" &_
    "}" & vbnewline &_
    
    ".image" &_
    "{" &_
    "border:0px;" &_
    "}" & vbnewline &_
    
    "</style>" & vbnewline &_
    "</head>" & vbnewline &_
    "<body>" & vbnewline
    
    call PrintGallery()
    
    call PrintPaging()
    
    
    response.write "
    " & vbnewline &_
    "
    " & vbnewline &_
    
    
    
    "</body>" & vbnewline &_
    "</html>"
    %><body bgcolor="#28457F">

    funziona alla grande però non mi da la possibilità di visualizzare quantomeno il nome del file sotto la foto, giusto per identificarla, vi prego aiutatemi


    ciao e grazie anticipatamente
    e vai!!

  2. #2
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    codice:
    "<a href="""& ImageDirectory & "/" & ItemArray(i) & """ target=""_blank"" class=""link_image"">" &_
    							"[img][/img]
    "& ItemArray(i) &"" &_
    						"</a>" &_
    Roby

  3. #3
    graziee



    certo eliminare l'estensione sarebbe il massimo ma va bene anche così, grazie ancora

    e vai!!

  4. #4
    fai una mid del nome dell'immagine dall'inizio fino all'ultimo punto e così elimini l'estensione.....

  5. #5
    un cosa?

    VVoVe:

    e vai!!

  6. #6
    abbiate pietà, guardate alla mia buona volotà quantomeno


    ho provato così
    codice:
    dim i, ItemPrints, nfoto, nomefoto
    		for i = 0 to ubound(ItemArray)
    			ItemPrints = ItemPrints + 1
    		
    				if int(ItemPrints) = 1 then
    					response.write "<tr>" & vbnewline
    				end if
                        nfoto= (ItemArray(i))
                        nomefoto= mid(nfoto,1,InStrRev(value,".")-1)
    					response.write "<td class=""td"">" &_
    						
    						"<a href="""& ImageDirectory & "/" & ItemArray(i) & """ target=""_blank"" class=""link_image"">" &_
    							"[img][/img]
    "& nomefoto &"" &_
    						"</a>" &_
    					"</td>" & vbnewline
    
    			if int(ItemPrints) = int(ItemsHorizontal) OR i = ubound(ItemArray) then
    				ItemPrints = 0
    				response.write  "</tr>" & vbnewline
    			end if
    		next
    ma mi da questo errore





    Microsoft VBScript runtime error '800a0005'
    Invalid procedure call or argument: 'mid'

    /lefotoilprogramma.asp, line 80
    e vai!!

  7. #7
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    E "value" nella mid cos'è???

    Roby

  8. #8
    che deficente hai ragione

    non so nemmeno copiare!!
    e vai!!

  9. #9
    be fin'ora ha funzionato ora mi da quest'errore


    Microsoft VBScript runtime error '800a0005'
    Invalid procedure call or argument: 'mid'
    /lefoto2006-2007prom-A.asp, line 81


    perchè?
    :master:
    e vai!!

  10. #10
    posta la riga 81 e dicci che cosa dovrebbe fare qulla riga e con quali valori
    IP-PBX management: http://www.easypbx.it

    Old account: 2126 messages
    Oldest account: 3559 messages

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.