Quantcast
Channel: Últimos conteúdos
Viewing all articles
Browse latest Browse all 14190

Ajuda com lógica para album

$
0
0

Preciso de ajuda com uma lógica para album de fotos.

 

 Tenho um BD com duas tabelas:

 - A primeira chamada TYPES onde cadastro o nome do album e a foto, nele tenho as seguintes colunas: TYPE_ID, TYPE_NAME e TYPE_IMAGE

 - A segunda chamada PICTURES onde cadastro as fotos do álbum, nele tenho as seguintes colunas: PIC_ID, PIC_TYPE (onde uso os dados do TYPE_ID para relacionar), PIC_NAME e PIC_IMAGE.

 

Bem, chamo os albuns desta forma:

<%
Dim rsTypesGallery__MMColParam
rsTypesGallery__MMColParam = "1"
If (Request.QueryString("iUsuario") <> "") Then 
  rsTypesGallery__MMColParam = Request.QueryString("iUsuario")
End If
%>

<%
Dim rsTypesGallery
Dim rsTypesGallery_numRows
Set rsTypesGallery = Server.CreateObject("ADODB.Recordset")
rsTypesGallery.ActiveConnection = MM_conn_STRING
rsTypesGallery.Source = "SELECT TOP 20 * FROM TYPES WHERE TYPE_USER = '" + Replace(rsTypesGallery__MMColParam, "'", "''") + "' ORDER BY TYPE_DATED DESC"
rsTypesGallery.CursorType = 0
rsTypesGallery.CursorLocation = 2
rsTypesGallery.LockType = 1
rsTypesGallery.Open()
rsTypesGallery_numRows = 0
%>

<%
Do while not rsTypesGallery.eof
%>
<li id="item-91" class="col col-3 tablet-col-6 mobile-full lightbox" data-cat="design photography t-shirts">
	<a href="user.asp?iType=<%=(rsTypesGallery.Fields.Item("TYPE_ID").Value)%>" >
		<img width="480" height="360" src="../images/<%= rsTypesGallery.Fields.Item("TYPE_IMAGE") %>" class="attachment-post-thumbnail wp-post-image" />
		<span class="icon retroicon-gallery"></span>
		<h3><%=(rsTypesGallery.Fields.Item("TYPE_NAME").Value)%></h3>
	</a>
	<span class="hidden-gallery hidden">
		
	</span>
</li>		
						
<%
rsTypesGallery.movenext
loop
rsTypesGallery.close
%>

Até ai sem problema, o proximo passo é clicar no album para abrir as fotos, não estou encontrando uma maneira de fazer isso, vocês podem me ajudar?


Viewing all articles
Browse latest Browse all 14190

Latest Images

Trending Articles