Pagina 2 di 2 primaprima 1 2
Visualizzazione dei risultati da 11 a 13 su 13

Discussione: cartelle gallery

  1. #11
    "aiutarmi" per te vuol dire "fammelo tu"? siamo alle solite...

  2. #12
    Utente di HTML.it
    Registrato dal
    Jul 2005
    Messaggi
    2,630
    non pretendo che mi fai lo script da zero, ci mancherebbe.
    un aiuto per dove partire, comunque ho trovato in giro questo script che potrebbe fare al caso mio, solo che ora lotto per la paginazione, ecco qui mi servirebbe un tuo aiuto su come fare o modificare lo script, per renderlo paginato a 5 come le foto.
    codice:
    <%
    
    Set objRS = Server.CreateObject("ADODB.Recordset")
    objRS.CursorLocation = 3 ' adUseClient
    objRS.Fields.Append "Name", 200, 50 '  adVarChar
    objRS.Fields.Append "created", 7 ' adDate
    objRS.Open
    
    '*******************************************************
    imagespath = "d:\inetpub\webs\sitoit\public\admin\photogallery\"
    '*******************************************************
    
    Dim FSObj, FOlderObj, FileCollObj
    Set FSObj = Server.CreateObject("Scripting.FileSystemObject")
    if request.querystring("gallery") = "" then
    	Set FolderObj = FSObj.GetFolder(imagespath)
    	Set FolderCollObj = FolderObj.SubFolders
    	%>
    	<table border="1" align="center" width=50%>
    		<tr>
    	<%
    	For Each item in FolderCollObj
    		Set SubFolderObj = FSObj.GetFolder(FolderObj & "/" & item.name)
    		objRS.AddNew
    		objRS("Name") = item.name
    		objRS("created") = SubFolderObj.DateCreated
    		'response.write "" & item.name & "
    
    "
    	Next
    	objRS.Sort = "created DESC"
    	objRS.MoveFirst
    	Do UNTIL objRS.EOF
    	
    		response.write "<td align=""center""><a href=""gallery.asp?gallery=" & objRS(0) & """>[img][/img]
    "
    		response.write objRS(0) & "
    
    </A></td>"
    		objRS.movenext
    	Loop
    	%>
    		</tr>
    		</table>
    	<%
    Else
    	If request.querystring("next") <> "" then
    		y = 0
    		x = request.querystring("x")
    		gallery = request.querystring("gallery")
    		image = request.querystring("next")
    		Set FolderObj = FSObj.GetFolder(imagespath & gallery & "")
    		Set FileCollObj = FolderObj.Files
    		response.write "
    <center><font size=""4"">" & gallery & "</font>"
    		response.write "
    <center>Total Images " & FileCollObj.Count & "</center>
    "
    		%>
    		<table align="center" width=50%>
    		<tr>
    		<%
    		For each item in FileCollObj
    		If y = 5 or y = 10 or y = 15 then
    				response.write "<TR>"
    		End if
    				If item.name = image and poo <> "yes" then
    					poo = "yes"
    				End if
    				If poo = "yes" and item.name <> image then
    					response.write "<td>[img][/img]</td>"
    					y = y + 1
    					If y = 15 then
    						response.write "</TR></TABLE><CENTER>
    " & x & "-" & x+y-1 & ""
    						response.write "
    Next >></center>"
    						response.end
    					End if
    				End if
    		Next
    		%>
    		</tr>
    		</table>
    		<%
    		response.write "<center>
    " & x & "-" & x+y-1 & "</center>
    
    "
    		response.end
    	end if
    
    	x = 0
    	gallery = request.querystring("gallery")
    	Set FolderObj = FSObj.GetFolder(imagespath & gallery & "")
    	Set FileCollObj = FolderObj.Files
    	response.write "
    <center><font size=""4"">" & gallery & "</font>"
    
    %>
    <table align="center" width=50%>
    <tr>
    <%
    	For each item in FileCollObj
    	If x = 5 or x = 10 or x = 15 then
    		response.write "<TR>"
    	End if
    		response.write "<td>[img][/img]</td>"
    		x = x + 1
    		If x = 15 then
    			response.write "</TR></TABLE><CENTER>
    1 - 15"
    			response.write "
    Avanti >></center>"
    			response.end
    		End if
    	Next
    	%>
    	</TR></TABLE>
    	<%
    end if
    %>
    Grazie ancora.
    G.

  3. #13
    Utente di HTML.it
    Registrato dal
    Jul 2005
    Messaggi
    2,630
    nessun aiuto??

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 © 2026 vBulletin Solutions, Inc. All rights reserved.