Resolvi perguntar se vocês não tem alguma enquete que faça igual a desta pág. aqui
para que eu possa aplicar neste código de fotos??? Quero ter um esquema q apareça as fotos e a votação do lado. Será que tem como eu pegar um enquete e jogar como include?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
</head>
<body bgcolor="#000000" text="#ffffff" link="#ffff00" vlink="#ffff00" alink="#ffff00">
<!-- #include file="adovbs.inc" -->
<%
Dim CONN_STRING
Dim CONN_USER
Dim CONN_PASS
CONN_STRING = "DBQ=" & Server.MapPath("bdteste.mdb") & ";"
CONN_STRING = CONN_STRING & "Driver={Microsoft Access Driver (*.mdb)};"
CONN_USER = ""
CONN_PASS = ""
Dim iPageSize
Dim iPageCount
Dim iPageCurrent
Dim strOrderBy
Dim strSQL
Dim conexao
Dim objPagingRS
Dim iRecordsShown
Dim I
Dim varcliques,RSFOTOS, RSrecados
iPageSize = 1
id=request.querystring("id")
strSQL = "SELECT * FROM fotos WHERE codevento="&id&""
Set conexao = Server.CreateObject("ADODB.Connection")
conexao.Open CONN_STRING, CONN_USER, CONN_PASS
conexao.Cursorlocation = 3
Set objPagingRS = Server.CreateObject("ADODB.Recordset")
objPagingRS.PageSize = iPageSize
objPagingRS.CacheSize = iPageSize
objPagingRS.Open strSQL, conexao, adOpenStatic, adLockReadOnly, adCmdText
If Request.QueryString("page") = "" Then
iPageCurrent = 1
Else
iPageCurrent = CInt(Request.QueryString("page"))
End If
iPageCount = objPagingRS.PageCount
If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
If iPageCurrent < 1 Then iPageCurrent = 1
If iPageCount = 0 Then
Response.Write "Nenhuma Foto Encontrada"
Else
objPagingRS.AbsolutePage = iPageCurrent
%>
<p align="center">
<font size="+1">Foto <strong><%= iPageCurrent %></strong>
de <strong><%= iPageCount %></strong></font>
</p>
<%
Response.Write "<table border=""1"">" & vbCrLf
iRecordsShown = 0
varcliques = 0
Do While iRecordsShown < iPageSize And Not objPagingRS.EOF
varcliques = objPagingRS("cliques")
varcliques = varcliques + 1
Set RSFOTOS = Server.CreateObject("ADODB.RecordSet")
strSQL="UPDATE fotos SET cliques = "&varcliques&" WHERE codfoto="&objPagingRS("codfoto")&""
RSFOTOS.Open strSQL, conexao, adOpenStatic, adLockReadOnly, adCmdText
%>
<center>
<div align="center">
<table border="0" width="60%">
<tr>
<td width="100%" align="center"><font face="BankGothic Md BT" color="yellow" size="5">:: <%=objPagingRS("nomesfoto")%> ::</font></td>
</tr>
<tr>
<td width="100%"><img src="fotos/<%=objPagingRS("nomefisico")%>" width="456" height="340"></td>
</tr>
<tr> <td width="100%" align="center">Esta foto foi visualizada <b><%=objPagingRS("cliques")%></b> vezes
</td>
</tr>
<tr>
<script language="javascript">
function
abrir(){
window.open('mandarecado.asp?id=<%=objPagingRS("codfoto")%>','nome','status=no,scrollbars=no,resizable=no,width=400,height=400');}
</script>
<td width="100%" align="center"><font size="2" face="Verdana" color="#FFFFFF">
<a href="javascript:abrir()">Postar novo Torpedo</a></font>
</td>
</tr>
<tr>
<td width="100%"><%
strSQL="SELECT * from recados WHERE codfoto="&objPagingRS("codfoto")&" AND Ucase(valida)='sim' ORDER BY idrecados"
Set RSRECADOS = conexao.execute(strSQL)
While not RSRECADOS.EOF
%>
<hr width="80%">
De:<%=RSRECADOS("remetente")%> <br>
email:<%=RSRECADOS("email")%><br>
Para:<%=RSRECADOS("destinatario")%><br>
Torpedo:<%=RSRECADOS("mensagem")%><br>
<hr width="80%">
<% RSRECADOS.MoveNext
Wend%>
</td>
</tr>
</table>
</div>
</center>
<p align="center">
<%iRecordsShown = iRecordsShown + 1
objPagingRS.MoveNext
Loop
Response.Write "</table>" & vbCrLf
End If
objPagingRS.Close
Set objPagingRS = Nothing
conexao.Close
Set conexao = Nothing
y=0
%>
<div align="center">
<table border="0" width="83%">
<tr>
<td width="20%">
<p align="left">
<%
If iPageCurrent > 1 Then
%>
<a href="detalhes.asp?id=<%=id%>&page=<%= iPageCurrent - 1 %>"> << Anterior</a></td>
<%
End If
%>
<center>
<td width="60%"><p align="center">
<%
For I = 1 To iPageCount
If y=12 OR y=24 OR y=36 OR y=48 OR y=60 then Response.Write "<br>"
If I = iPageCurrent Then
%>
<span style="background-color: #FF0033">[ <%= I %> ]</span>
<%
Else
%>
<a href="detalhes.asp?id=<%=id%>&page=<%= I %>">[ <%= I %> ]</a>
<%
End If
y=y+1
Next
If iPageCurrent < iPageCount Then
%>
</td>
</center>
<td width="20%">
<p align="right">
<a href="detalhes.asp?id=<%=id%>&page=<%= iPageCurrent + 1 %>">Próxima >></a>
</td>
</tr>
</table>
</div>
<%
End If
%>
</body>
</html>
Pergunta
Mateustg
Resolvi perguntar se vocês não tem alguma enquete que faça igual a desta pág. aqui
para que eu possa aplicar neste código de fotos??? Quero ter um esquema q apareça as fotos e a votação do lado. Será que tem como eu pegar um enquete e jogar como include?
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title></title> </head> <body bgcolor="#000000" text="#ffffff" link="#ffff00" vlink="#ffff00" alink="#ffff00"> <!-- #include file="adovbs.inc" --> <% Dim CONN_STRING Dim CONN_USER Dim CONN_PASS CONN_STRING = "DBQ=" & Server.MapPath("bdteste.mdb") & ";" CONN_STRING = CONN_STRING & "Driver={Microsoft Access Driver (*.mdb)};" CONN_USER = "" CONN_PASS = "" Dim iPageSize Dim iPageCount Dim iPageCurrent Dim strOrderBy Dim strSQL Dim conexao Dim objPagingRS Dim iRecordsShown Dim I Dim varcliques,RSFOTOS, RSrecados iPageSize = 1 id=request.querystring("id") strSQL = "SELECT * FROM fotos WHERE codevento="&id&"" Set conexao = Server.CreateObject("ADODB.Connection") conexao.Open CONN_STRING, CONN_USER, CONN_PASS conexao.Cursorlocation = 3 Set objPagingRS = Server.CreateObject("ADODB.Recordset") objPagingRS.PageSize = iPageSize objPagingRS.CacheSize = iPageSize objPagingRS.Open strSQL, conexao, adOpenStatic, adLockReadOnly, adCmdText If Request.QueryString("page") = "" Then iPageCurrent = 1 Else iPageCurrent = CInt(Request.QueryString("page")) End If iPageCount = objPagingRS.PageCount If iPageCurrent > iPageCount Then iPageCurrent = iPageCount If iPageCurrent < 1 Then iPageCurrent = 1 If iPageCount = 0 Then Response.Write "Nenhuma Foto Encontrada" Else objPagingRS.AbsolutePage = iPageCurrent %> <p align="center"> <font size="+1">Foto <strong><%= iPageCurrent %></strong> de <strong><%= iPageCount %></strong></font> </p> <% Response.Write "<table border=""1"">" & vbCrLf iRecordsShown = 0 varcliques = 0 Do While iRecordsShown < iPageSize And Not objPagingRS.EOF varcliques = objPagingRS("cliques") varcliques = varcliques + 1 Set RSFOTOS = Server.CreateObject("ADODB.RecordSet") strSQL="UPDATE fotos SET cliques = "&varcliques&" WHERE codfoto="&objPagingRS("codfoto")&"" RSFOTOS.Open strSQL, conexao, adOpenStatic, adLockReadOnly, adCmdText %> <center> <div align="center"> <table border="0" width="60%"> <tr> <td width="100%" align="center"><font face="BankGothic Md BT" color="yellow" size="5">:: <%=objPagingRS("nomesfoto")%> ::</font></td> </tr> <tr> <td width="100%"><img src="fotos/<%=objPagingRS("nomefisico")%>" width="456" height="340"></td> </tr> <tr> <td width="100%" align="center">Esta foto foi visualizada <b><%=objPagingRS("cliques")%></b> vezes </td> </tr> <tr> <script language="javascript"> function abrir(){ window.open('mandarecado.asp?id=<%=objPagingRS("codfoto")%>','nome','status=no,scrollbars=no,resizable=no,width=400,height=400');} </script> <td width="100%" align="center"><font size="2" face="Verdana" color="#FFFFFF"> <a href="javascript:abrir()">Postar novo Torpedo</a></font> </td> </tr> <tr> <td width="100%"><% strSQL="SELECT * from recados WHERE codfoto="&objPagingRS("codfoto")&" AND Ucase(valida)='sim' ORDER BY idrecados" Set RSRECADOS = conexao.execute(strSQL) While not RSRECADOS.EOF %> <hr width="80%"> De:<%=RSRECADOS("remetente")%> <br> email:<%=RSRECADOS("email")%><br> Para:<%=RSRECADOS("destinatario")%><br> Torpedo:<%=RSRECADOS("mensagem")%><br> <hr width="80%"> <% RSRECADOS.MoveNext Wend%> </td> </tr> </table> </div> </center> <p align="center"> <%iRecordsShown = iRecordsShown + 1 objPagingRS.MoveNext Loop Response.Write "</table>" & vbCrLf End If objPagingRS.Close Set objPagingRS = Nothing conexao.Close Set conexao = Nothing y=0 %> <div align="center"> <table border="0" width="83%"> <tr> <td width="20%"> <p align="left"> <% If iPageCurrent > 1 Then %> <a href="detalhes.asp?id=<%=id%>&page=<%= iPageCurrent - 1 %>"> << Anterior</a></td> <% End If %> <center> <td width="60%"><p align="center"> <% For I = 1 To iPageCount If y=12 OR y=24 OR y=36 OR y=48 OR y=60 then Response.Write "<br>" If I = iPageCurrent Then %> <span style="background-color: #FF0033">[ <%= I %> ]</span> <% Else %> <a href="detalhes.asp?id=<%=id%>&page=<%= I %>">[ <%= I %> ]</a> <% End If y=y+1 Next If iPageCurrent < iPageCount Then %> </td> </center> <td width="20%"> <p align="right"> <a href="detalhes.asp?id=<%=id%>&page=<%= iPageCurrent + 1 %>">Próxima >></a> </td> </tr> </table> </div> <% End If %> </body> </html>Link para o comentário
Compartilhar em outros sites
2 respostass a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.