Created
August 6, 2018 18:07
-
-
Save carlosvini/02076296ddea4ac2ecbb2ec5326fde83 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html><head> | |
<link type="text/css" href="pagina.css" rel="stylesheet"> | |
<title>Pesquisa</title> | |
</head> | |
<script language="vbscript"> | |
sub window_onload() | |
adw.innerhtml = clear | |
end sub | |
</script> | |
<body bgcolor="black"> | |
Resultados da busca por <%=request.Form("txtbusca")%>:<br><br> | |
<!-- Resultados de banda --> | |
<% | |
if request.Form("optbusca") = 1 or request.Form("optbusca") = 2 then | |
set wconexao=server.createobject("adodb.connection") | |
wendereco = server.mappath("dragoes.mdb") | |
wconexao.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & wendereco | |
wsql = "SELECT * from tabbandas where banda like '%" & request.Form("txtbusca") & "%' order by banda" | |
set rs=wconexao.execute(wsql) %> | |
<table cellpadding="0" cellspacing="0" border="0" width="200"> | |
<tr><td class="titulo"><img src="images/banda.gif" alt="Bandas encontradas"></td></tr> | |
<% | |
if rs.eof then werro = "Nenhuma banda foi encontrada" | |
do while not rs.eof | |
%> | |
<tr><td class="titulo"> <a href="album.asp?wbanda=<%=rs("ID")%>"><%=rs("banda")%></a></td></tr> | |
<% | |
rs.movenext | |
loop %> | |
</table><%=werro%><br><br> | |
<% | |
end if | |
%> | |
<!-- Resultados de album --> | |
<% | |
if request.Form("optbusca") = 1 or request.Form("optbusca") = 3 then | |
set wconexao=server.createobject("adodb.connection") | |
wendereco = server.mappath("dragoes.mdb") | |
wconexao.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & wendereco | |
wsql = "SELECT * froM tabalbuns where album like '%" & request.Form("txtbusca") & "%' order by album" | |
set rs=wconexao.execute(wsql) | |
%> | |
<table cellpadding="0" cellspacing="0" border="0" width="200"> | |
<tr><td class="albuns" align="center"><img src="images/albuns.gif" alt="Albuns encontrados"></td></tr> | |
<% | |
werro = "" | |
if rs.eof then werro = "Nenhum álbum foi encontrado" | |
do while not rs.eof | |
%> | |
<tr><td class="albuns"><a href="musica.asp?walbum=<%=rs("ID")%>"><%=rs("album")%></a></td></tr> | |
<% | |
rs.movenext | |
loop %> | |
</table><%=werro%><br><br> | |
<% | |
end if | |
%> | |
<!-- resultados de musica --> | |
<% | |
if request.Form("optbusca") = 1 or request.Form("optbusca") = 4 then | |
set wconexao=server.createobject("adodb.connection") | |
wendereco = server.mappath("dragoes.mdb") | |
wconexao.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & wendereco | |
wsql = "SELECT tabletras.*, tabalbuns.*, tabbandas.* FROM tabbandas INNER JOIN (tabalbuns INNER JOIN tabletras ON tabalbuns.ID = tabletras.IDalbum) ON tabbandas.ID = tabalbuns.IDbanda where titulo like '%" & request.Form("txtbusca") & "%' order by titulo" | |
set rs=wconexao.execute(wsql) | |
%> | |
<table cellpadding="0" cellspacing="0" border="0" width="200"> | |
<tr><td class="titulo"><img src="images/musicas.gif" alt="Músicas encontradas"></td></tr> | |
<% | |
werro = "" | |
if rs.eof then werro = "Nenhuma música foi encontrada" | |
do while not rs.eof | |
%> | |
<tr><td class="titulo"><a href="letra.asp?wmusica=<%=rs("IDletra")%>"><%=rs("titulo")%></a> <a href="albuns.asp?wbanda=<%=rs("ID")%>">- <%=rs("banda")%></a></td></tr> | |
<% | |
rs.movenext | |
loop %> | |
</table><%=werro%><br><br> | |
<% | |
end if | |
%> | |
</body> | |
</html> | |
<span id="adw"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment