Jump to content


Rakhan

Member Since 05/09/2008
Offline Last Active 23/09/2008, 16:51
-----

Topics I've Started

Buscar Literaturas Dentro Do Access

23/09/2008, 15:39

Galera por favor help, preciso de uma ajuda para as pessoas poderem localizar as literaturas por ordem alfabetica ou apenas digitando o nome da literatura..abaixo vou postar o codigo onde lista todas as literaturas..abraços e obrigado.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="../Connections/cnn.asp" -->
<%
' *** Logout the current user.
MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1"
If (CStr(Request("MM_Logoutnow")) = "1") Then
Session.Contents.Remove("MM_Username")
Session.Contents.Remove("MM_UserAuthorization")
MM_logoutRedirectPage = "default.asp"
' redirect with URL parameters (remove the "MM_Logoutnow" query param).
if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL"))
If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_newQS = "?"
For Each Item In Request.QueryString
If (Item <> "MM_Logoutnow") Then
If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&"
MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))
End If
Next
if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS
End If
Response.Redirect(MM_logoutRedirectPage)
End If
%>
<%
Dim rsLiteraturas
Dim rsLiteraturas_numRows

Set rsLiteraturas = Server.CreateObject("ADODB.Recordset")
rsLiteraturas.ActiveConnection = MM_cnn_STRING
rsLiteraturas.Source = "SELECT idLiteratura, arquivo FROM tbLiteraturas ORDER BY idLiteratura ASC"
rsLiteraturas.CursorType = 0
rsLiteraturas.CursorLocation = 2
rsLiteraturas.LockType = 1
rsLiteraturas.Open()

rsLiteraturas_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
rsLiteraturas_numRows = rsLiteraturas_numRows + Repeat1__numRows
%>
<html><!-- InstanceBegin template="/Templates/admin.dwt.asp" codeOutsideHTMLIsLocked="false" -->
<head>
<title>Opção Fenix - Área Administrativa</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
.style1 {
font-size: 11px;
font-weight: bold;
}
-->
</style>
<style type="text/css">
<!--
.style3 {font-weight: bold}
-->
</style>
<!-- InstanceEndEditable -->
<link href="../styles/estiloADMIN.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="760" height="147" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="57%"><img src="imagens/logo.jpg" width="231" height="60"></td>
<td align="right"><img src="imagens/areaAdmin.gif" width="252" height="60"></td>
</tr>
</table></td>
</tr>
<tr>
<td align="right"><!-- InstanceBeginEditable name="menu" -->
<a href="menu_fixo.asp">menu principal</a> ::: <a href="literaturaLista.asp">literaturas</a> ::: <a href="fispqsLista.asp">fispqs</a> :::
<a href="documentacoesLista.asp">documentações</a> ::: <a href="catalogo.asp">insumos</a> ::: <a href="midia.asp">folhetos de divulgação</a> ::: <a href="<%= MM_Logout %>">sair</a>
<!-- InstanceEndEditable --></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><!-- InstanceBeginEditable name="conteudo" -->
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="tbConteudo">
<tr>
<td><table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr>
<td bgcolor="#B7F301" class="tituloPagina">Lista de Literaturas</td>
</tr>
<tr>
<td colspan="2" align="center" class="mensagem">&nbsp;</td>
</tr>
<tr>
<td class="textoCampo"><p><strong>Selecione abaixo a literatura
que deseja</strong></p>
<p class="style1">Para facilitar utilize CRTL+F e digita o nome da literatura que deseje.</p></td>
</tr>
<tr>
<td align="center"><table width="90%" border="0" cellspacing="2" cellpadding="2">
<tr bgcolor="#666666">
<td width="557" class="nomeCampo"><font color="#FFFFFF">T&iacute;tulo</font></td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT rsLiteraturas.EOF))
%>
<tr>
<td bgcolor="#CCCCCC" class="textoCampo">

<a href="/acesso/literaturas/<%=(rsLiteraturas.Fields.Item("arquivo").Value)%>" target="_blank">
<%=(rsLiteraturas.Fields.Item("arquivo").Value)%></a>

</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsLiteraturas.MoveNext()
Wend
%>

</table>
<br>
<% If rsLiteraturas.EOF And rsLiteraturas.BOF Then %>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
</table>
<% End If ' end rsLiteraturas.EOF And rsLiteraturas.BOF %>

</td>
</tr>
</table></td>
</tr>
</table>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
<%
rsLiteraturas.Close()
Set rsLiteraturas = Nothing
%>

IPB Skin By Virteq