Ir para conteúdo
Fórum Script Brasil

Fabio AVILA

Membros
  • Total de itens

    114
  • Registro em

  • Última visita

Tudo que Fabio AVILA postou

  1. Fabio AVILA

    Consulta Combo

    Ola Marcelo , Tentei usar na combom assim : [b]SQL="SELECT DISTINCT * FROM Horarios ORDER by Cidade"[/b] Porem ele fica do mesmo jeito busca todos os nomes da mesma cidade ...
  2. ola bareta, tu poderia me dar algum exemplo ? Obrigado
  3. Fabio AVILA

    Consulta Combo

    Ola amigos , Estou a realizar um sistema de busca atraves de um combo porem estou encontrando 2 dificuldades 1ª é se tiver na tabela SÃO PAULO e SÃO CAETANO quano realizo a busca por SÃO PAULO ele traz também SÃO CAETANO.. 2ª se tiver na tabela 3 vezes o nome SÃO PAULO ele mostra na combo SÃO PAULO três ou seja eu gostaria de agrupar e aparecener somente 1 vez Abaixo meu cod. <% Dim strURL Dim cnnSearch Dim rstSearch Dim strDBPath Dim strSQL Dim strSearch inicio = Timer '#Função que tira todos os acentos das palavras function TiraAcento(StrAcento) for i = 1 to len(StrAcento) Letra = mid(StrAcento, i, 1) Select Case Letra Case "á","Á","à","À","ã","Ã","â","Â","â","ä","Ä" Letra = "A" Case "é","É","ê","Ê","Ë","ë","È","è" Letra = "E" Case "í","Í","ï","Ï","Ì","ì" Letra = "I" Case "ó","Ó","ô","Ô","õ","Õ","ö","Ö","ò","Ò" Letra = "O" Case "ú","Ú","Ù","ù","ú","û","ü","Ü","Û" Letra = "U" Case "ç","Ç" Letra = "C" Case "não" Letra = "N" End Select texto = texto & Letra next TiraAcento = texto end function strURL = Request.ServerVariables("URL") strSearch = Request.QueryString("search") %> <% if request.queryString("at")= "" then db = Server.MapPath("noticias.mdb") Set cnn = Server.CreateObject("adodb.Connection") cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& db &";" SQL="SELECT * FROM Horarios ORDER by Cidade" SET rs = Server.CreateObject("Adodb.recordset") rs.Open SQL,cnn if not rs.eof then lista = rs.getrows() total = ubound(lista,2) end if rs.close set rs = nothing %><title>:.Gestor de Liga :. </title> <body bgcolor="#FFFFFF"> <link href="estilos.css" rel="stylesheet" type="text/css" /> <table width="141" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2FFF2"> <tr> <td bgcolor="#FFFFFF" width="812"> <table width="738" border="0" cellpadding="2" style="border-collapse: collapse" height="1"> <tr> <td bgcolor="#FFFFFF" height="4" colspan="2" width="890"> <p align="center"> <b> <font face="Tahoma" style="font-size: 12pt"> <img border="0" src="tp_equipes.jpg" align="left"></font></b></td> </tr> <tr> <td bgcolor="#FFFFFF" valign="middle" height="1" width="569"> <form action="<%= strURL %>" method="get"> <div align="left"> <b><font face="Arial" style="font-size: 8pt"> Informe a Cidade </font> </b> <span style="font-size: 8pt"> <font face="Arial" color="#008000"> <br> </font> </span> <select name="search" class="select" Onchange="atualizaLanc(this.value);"> <option value="">selecionar... <% for t=0 to total response.write "<option value=" & lista(2,t) & ">" & lista(2,t) & "</option>" next%> </select><font face="Arial" color="#008000"><input name="submit" type="submit" value="busca" style="font-size: 8 pt; font-weight: bold; background-color: #1D2447; color:#FFFFFF; background-image:url('fundo.jpg')" /><span style="font-size: 8pt"> </span></font> </div> </form> <p align="center"> <font face="Arial" style="font-size: 8pt"> <% If strSearch <> "" Then strDBPath = Server.MapPath("Noticias.mdb") Const adUseClient = 3 Set cnnSearch = Server.CreateObject("ADODB.Connection") cnnSearch.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & ";" cnnSearch.CursorLocation = adUseClient strSQL = "SELECT Equipe, Bairro,Cidade,id " _ & "FROM Horarios " _ & "WHERE Cidade LIKE '%" & TiraAcento(Replace(strSearch, "'", "''")) & "%' " _ & "OR Cidade LIKE '%" & TiraAcento(Replace(strSearch, "'", "''")) & "%' " _ & "ORDER BY Equipe;" Set rstSearch = cnnSearch.Execute(strSQL) intContador = rstSearch.RecordCount %> </font> </p></td> <td bgcolor="#FFFFFF" valign="top" height="1" width="317"> <p align="center"> <font face="Arial" style="font-size: 8pt"><a title="Imprimir" href="a"> &lt;script language="JavaScript1.2"> <!-- function DoPrinting(){ if (!window.print){ alert("Use o Netscape ou Internet Explorer \n nas versões 4.0 ou superior!") return } window.print() } //--> </script> </a> </font></td> </tr> </table> <p align="left"> <font face="Century Gothic" style="font-size: 8pt"><b> <font color="#6E9F4D"> </font><font color="#1D2447"> ( Foram encontradas <%=intContador%> ocorrências )</font></b></font></p> <div align="center" style="width: 502; height: 246"> <table width="759" border="0" cellpadding="4" cellspacing="0" bgcolor="#FFFFFF" style="border-collapse: collapse" bordercolor="#111111"> <tr> <th width="39" bgcolor="#1D2447" align="left" style="border-bottom-style: none; border-bottom-width: medium" bordercolor="#99B5C0"><strong> <font face="Arial" style="font-size: 8pt" color="#FFFFFF">Cod</font></strong></th> <th width="235" bgcolor="#1D2447" align="left" style="border-bottom-style: none; border-bottom-width: medium" bordercolor="#99B5C0"> <strong><font face="Arial" style="font-size: 8pt" color="#FFFFFF"> Equipe</font></strong></th> <th width="211" bgcolor="#1D2447" align="left" style="border-bottom-style: none; border-bottom-width: medium" bordercolor="#99B5C0"> <strong><font face="Arial" style="font-size: 8pt" color="#FFFFFF"> Bairro</font></strong></th> <th width="211" bgcolor="#1D2447" align="left" style="border-bottom-style: none; border-bottom-width: medium" bordercolor="#99B5C0"> <strong><font face="Arial" style="font-size: 8pt" color="#FFFFFF"> Cidade</font></strong></th> <th width="15" bgcolor="#1D2447" align="left" style="border-bottom-style: none; border-bottom-width: medium"> <font face="Arial" style="font-size: 8pt" color="#FFFFFF"> Deletar</font></th> <th width="15" bgcolor="#1D2447" align="left" style="border-bottom-style: none; border-bottom-width: medium"> <font face="Arial" style="font-size: 8pt" color="#FFFFFF"> Editar</font></th> <th width="1" bgcolor="#FFFFFF" align="left" style="border-bottom-style: none; border-bottom-width: medium" bordercolor="#99B5C0"> </th> </tr> <% Do While Not rstSearch.EOF %><font face="Century Gothic" style="font-size: 8pt"> </font> <tr> <% id = Trim(rstSearch.Fields("id")) Response.Write "<TR style='cursor=hand;' id="& id&" onclick=""consultarClick('"&id&"')""; class='"&fundo&"' " Response.Write " onmouseover=""this.className='inputMouse';"" " Response.Write " onmouseout=""this.className='"&fundo&"';"">" %><font face="Century Gothic" style="font-size: 8pt"> </font> <td width="39" align="left" style="border-left-style:none; border-left-width:medium; border-right-style:none; border-right-width:medium; border-top-style:none; border-top-width:medium; border-bottom-style:solid; border-bottom-width:1" bordercolor="#6E9F4D" bgcolor="#EBEBEB"><font size="1" face="Arial"><%= rstSearch.Fields("id").Value %></font></td> <td width="235" align="left" style="border-left-style:none; border-left-width:medium; border-right-style:none; border-right-width:medium; border-top-style:none; border-top-width:medium; border-bottom-style:solid; border-bottom-width:1" bordercolor="#6E9F4D" bgcolor="#EBEBEB"><font size="1" face="Arial"><%= rstSearch.Fields("Equipe").Value %></font></td> <td width="211" align="left" style="border-left-style:none; border-left-width:medium; border-right-style:none; border-right-width:medium; border-top-style:none; border-top-width:medium; border-bottom-style:solid; border-bottom-width:1" bordercolor="#6E9F4D" bgcolor="#EBEBEB"><font size="1" face="Arial"><%= rstSearch.Fields("Bairro").Value %></font></td> <td width="211" align="left" style="border-left-style:none; border-left-width:medium; border-right-style:none; border-right-width:medium; border-top-style:none; border-top-width:medium; border-bottom-style:solid; border-bottom-width:1" bordercolor="#6E9F4D" bgcolor="#EBEBEB"><font size="1" face="Arial"><%= rstSearch.Fields("Cidade").Value %></font></td> <td bgcolor="#EBEBEB" width="15" align="left" style="border-left-style:none; border-left-width:medium; border-right-style:none; border-right-width:medium; border-top-style:none; border-top-width:medium; border-bottom-style:solid; border-bottom-width:1" bordercolor="#6E9F4D"> <p align="center"> <a href="deletaequipe.asp?id=<%=id%>"> <img border="0" src="excluir.gif"></a></td> <td bgcolor="#EBEBEB" width="15" align="left" style="border-left-style:none; border-left-width:medium; border-right-style:none; border-right-width:medium; border-top-style:none; border-top-width:medium; border-bottom-style:solid; border-bottom-width:1" bordercolor="#6E9F4D"> <p align="center"> <a href="altera_equipes.asp?acao=V&id=<%=id%>"> <img border="0" src="edita.gif"></a></td> <td width="1" align="left" style="border-style: none; border-width: medium; " bordercolor="#6E9F4D"> </td> </tr> <% rstSearch.MoveNext Loop %><font face="Century Gothic" style="font-size: 8pt"> </font> </table> <p align="left"> <p align="left"><b> <font face="Century Gothic" style="font-size: 8pt" color="#1D2447">Sua busca foi processada em <%response.write FormatNumber( Timer - inicio, 2 )%> segundos.</font><font face="Century Gothic" style="font-size: 8pt" color="#6E9F4D"><br> </font></b> <font face="Century Gothic" style="font-size: 8pt"> <% rstSearch.Close Set rstSearch = Nothing cnnSearch.Close Set cnnSearch = Nothing End If %> Abraços
  4. Ola amigos , Tenho um cadastro de jogos onde informo seguintes dados : VISITANTE, ADVERSÁRIO , DATA , HORARIO E PLACAR . E estava pensando e fazer um sistema de classificação de um campeonato ou seja venceu 3 pontos , empatou 1 ponto e perdeu nenhum ponto .. [ alguém tem ideia de como fazer isso ? Abcsç
  5. Fabio AVILA

    Parcelamento

    Bareta, O Insert ta nessa linha ak Sql = "INSERT INTO vendas (vencimento, valor, npar,cliente) " Sql = Sql & "VALUES('" & vencimento & "', '" & valor & "', , '" & npar & "','" & Request.Form("cliente") & "')" vla
  6. Fabio AVILA

    Parcelamento

    Ola Amigos , estou com um problema num script de parcelamento e não consigo resolver peço a ajuda de vocês nisso ... são questões 1 localmente ele mostra normalmente todos os campos e quando coloca no site ele o mostra os BOTÕES CADASTRAR E LIMPRAR a 2 é que ele não ta enviando para o BD os dados das parcelas .. Abaixo o codigo completo <!--#include file="config2.asp"--> <% If request.form("enviado") = "sim" Then Cadastrado =False set Dicionario = CreateObject("scripting.dictionary") i = 0 Vet = Dicionario.items if Dicionario.Count<>0 then Response.Write "<b><center><font face=verdana size=1>" Response.Write "O(s) seguintes dado(s) est�(�o) incorreto(s)<BR><br>" for i = 0 to Dicionario.Count - 1 Response.Write vet(i) & "<BR><br>" next response.write "<BR><br>" Else cont = 1 geral = Request.Form("parcelas") for cont = 0 to geral step 1 v1 = Request.Form("npar" & cont) 'aqui da parcela data = Request.Form("vencimento" & cont) 'aqui a data da parcela valor = Request.Form("valor" & cont) 'aqui o valor de cada parcela if v1 <> "" then Sql = "INSERT INTO vendas (vencimento, valor, npar,cliente) " Sql = Sql & "VALUES('" & vencimento & "', '" & valor & "', , '" & npar & "','" & Request.Form("cliente") & "')" end if next response.Write(sql) Cadastrado = True End If If Cadastrado = False Then Else set rs=nothing %> <body bgcolor="#E4E4E4"> <center> <TITLE>:. :. </TITLE> <TABLE cellSpacing=0 cellPadding=0 width=774 align=center background="back_temp.gif" border=0 height="58"> <TR> <TD align=middle valign="top" bgcolor="#EFEFEF" height="97" > <div align="center"> <center> <TABLE cellSpacing=0 cellPadding=0 width=207 border=0 height="1" style="border-collapse: collapse" bordercolor="#111111"> <tr> <TD align=middle bgcolor="#EFEFEF" height="39" valign="middle" bordercolor="#EFEFEF" width="3419" colspan="6"> <b><font face="Tahoma">Cadastro de Mensalidades</font></b></TD> </tr> <tr> <td width="576" bgcolor="#EFEFEF" height="1" style="border-style:none; border-width:medium; " valign="top" bordercolor="#EFEFEF"> &nbsp;</td> <td width="550" bgcolor="#EFEFEF" height="1" style="border-style:none; border-width:medium; " valign="top" bordercolor="#EFEFEF"> &nbsp;</td> <td width="515" bgcolor="#EFEFEF" height="1" style="border-style:none; border-width:medium; " valign="top" bordercolor="#EFEFEF"> &nbsp;</td> <td width="434" bgcolor="#EFEFEF" height="1" style="border-style:none; border-width:medium; " valign="top" bordercolor="#EFEFEF"> &nbsp;</td> <td width="310" bgcolor="#EFEFEF" height="1" style="border-style:none; border-width:medium; " valign="top" bordercolor="#EFEFEF"> &nbsp;</td> <td width="1034" bgcolor="#EFEFEF" height="1" style="border-style:none; border-width:medium; " valign="top" bordercolor="#EFEFEF"> <form method="POST" name="frmparcelas"> <font color="#FF0000"> <input type="hidden" name="enviado" value="sim"> <input type="hidden" name="opc" value=""> </font> <div align="center"> <center> <table border="0" cellpadding="0" width="546" height="47" style="border-collapse: collapse" bordercolor="#111111" cellspacing="0"> <tr> <td width="848" colspan="3" height="32" bgcolor="#EFEFEF"><br> </td> </tr> <tr> <td width="848" colspan="3" height="32" bgcolor="#EFEFEF"> <font color="#FF0000"> <input type="text" name="cliente" size="56" maxlength="10" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1; background-color: #A1C094"></font></td> </tr> <tr> <td width="1242" height="32" bgcolor="#EFEFEF"> <table width="303" height="38"> <tr> <td width="82" align="center" height="9"><b> <font face="Tahoma" style="font-size: 8pt"> Valor</font></b></td> <td width="52" align="center" height="9"><b> <font face="Tahoma" style="font-size: 8pt"> Parcelas</font></b></td> <td align="left" colspan="2" height="9"><b> <font face="Tahoma" style="font-size: 8pt"> 1� Vencimento</font></b></td> </tr> <tr> <td height="21"><font color="#FF0000"> <input type="text" name="valor" size="10" maxlength="10" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1; background-color: #A1C094"></font></td> <td height="21"> <font color="#FF0000"> <input type="text" name="parcelas" size="5" maxlength="5" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1; background-color: #A1C094"></font></td> <td width="63" height="21"><font color="#FF0000"> <input type="text" name="vencimento" size="10" maxlength="10" style="border-style: solid; border-width: 1; padding-left: 4; padding-right: 4; padding-top: 1; padding-bottom: 1; background-color: #A1C094"></font></td> <td width="86" align="right" height="21"> <font color="#FF0000"> <input style="padding:0; background:#A1C094; font-family:Tahoma; font-size:8 pt; font-weight:bold" type="submit" name="calcular" value="Calcular"></font></td> </tr> </table> <% '============================================================================== 'Calcula as Parcelas If Request.Form("calcular") <> "" then 'Pego os dados do Form Parcelas = cInt(Request.Form("parcelas")) ValorTotal = cSng(Request.Form("valor")) DtVencimento = cDate(Request.Form("vencimento")) 'Declaro o array Dt e Calculo a parcela Dim Dt() : Redim Dt(Parcelas) ValorParcelas = (ValorTotal / Parcelas) 'Se for Decimal, calcula o resto da divis�o Resultado = FormatNumber(ValorParcelas) * Parcelas Resto = FormatNumber(Resultado - ValorTotal,2) %> <table> <tr> <td colspan="4"> </td> </tr> <tr> <td align="center" bgcolor="#A1C094"><span style="font-weight: bold"> <font face="Tahoma" style="font-size: 8pt"> Parcela</font></span></td> <td align="center" bgcolor="#A1C094"><span style="font-weight: bold"> <font face="Tahoma" style="font-size: 8pt"> Vencimentos</font></span></td> <td align="center" colspan="2" bgcolor="#A1C094"><span style="font-weight: bold"> <font face="Tahoma" style="font-size: 8pt"> Valor das Parcelas</font></span></td> </tr> <font color="#FF0000"> <% i = 1 For n = 0 to Parcelas - 1 Dt(n) = DateAdd("m", n, DtVencimento) Parc = ValorParcelas If Resto > 0 then If n = (Parcelas - 1) Then Parc = FormatNumber(ValorParcelas - Resto) End if Elseif Resto < 0 Then If n = 0 Then Parc = FormatNumber(ValorParcelas + (Resto*-1)) End if End if %></font> <tr> <td align="center" bgcolor="#A1C094"><span style="font-size: 10pt"><font face="Tahoma" style="font-size: 8pt" color="#FFFFFF"> <%=n+1%></font></span></td> <td align="center" bgcolor="#A1C094"><span style="font-size: 10pt"><font face="Tahoma" style="font-size: 8pt" color="#FFFFFF"> <%=FormatDateTime(Dt(n),0)%> </font></span></td> <td colspan="2" align="center" bgcolor="#A1C094"><span style="font-size: 10pt"><font face="Tahoma" style="font-size: 8pt" color="#FFFFFF"> <%=FormatCurrency(Parc)%></font></span></td> </tr> <% i = i + 1 Next end if %></font> <tr> <td align="center" bgcolor="#A1C094"> <p align="left"><span style="font-weight: bold"> <font face="Tahoma" style="font-size: 8pt"> &nbsp;Total</font></span></td><%end if%> <td colspan="3" align="center" bgcolor="#A1C094"><span style="font-weight: bold"><font face="Tahoma" style="font-size: 8pt" color="#FFFFFF"><%=FormatCurrency(ValorTotal)%></font></span></td><%end if%> </tr> </table></td> </tr> <tr> <td width="1" height="1" bgcolor="#EFEFEF"></td> <td width="425" height="1" bgcolor="#EFEFEF"></td> <td width="8" height="1" bgcolor="#EFEFEF"></td> <td width="542" height="1" bgcolor="#EFEFEF"></td> </tr> <tr> <td width="1" valign="top" height="1" bgcolor="#EFEFEF"></td> <td width="433" valign="top" height="1" colspan="2" bgcolor="#EFEFEF"></td> <td width="542" valign="top" height="1" bgcolor="#EFEFEF"></td> </tr> <tr> <td align="center" width="273" height="1" bgcolor="#EFEFEF"></td> <td align="center" width="1073" colspan="3" height="1" bgcolor="#EFEFEF"></td> </tr> <tr> <td align="center" width="1346" valign="middle" colspan="4" height="47" bgcolor="#EFEFEF"> <font color="#FF0000" face="Tahoma" style="font-size: 8pt"> &nbsp;<input style="padding:0; background:#A1C094; font-family:Tahoma; font-size:8 pt; font-weight:bold" type="submit" value="Cadastrar " name="Submit"></font><font face="Tahoma" style="font-size: 8pt"> </font><span style="font-size: 8pt"> <font face="Tahoma" color="#FF0000"> <input style="BACKGROUND: #A1C094; font-family:Tahoma; font-size:8 pt; font-weight:bold" type="reset" value="Limpar" name="Reset"></font><font face="Tahoma"> </font></span></td> </tr> </table> </center> </div> </form> </td> </tr> </TABLE> </center> </div> </TD> </TR> </TABLE> </center> Abraços
  7. Problema ressolvido... a linha ficou assim : "SELECT * FROM contasreceber Where [b]BAIXA = 'ABERTO'AND [/b]Vencimento between #"+ VarDataI +"# " + " and #"+ VarDataF +"# order by Vencimento " Valeu
  8. já consegui resolver , tinha um erro de nome de campo ..okbrigado
  9. Caros amigos , Estou a 2 semana neste código e não vai de jeito nenhum , o problema é o seguinte .. após fazer a modificao e enviar a pagina do update ele diz que foi alterado com sucesso mas não ta mudando nada............... já dei um RESPONSE.WRITE na sql não retorna erro nenhum e esta enviando os dados corretamente .... já não sei o que fazer..... FORMULARIO: <% Set Conexao = CreateObject("ADODB.CONNECTION") Set objCon = Server.CreateObject("ADODB.Connection") objCon.Open "Data Source="&Server.MapPath("Noticias.mdb")&";Provider=Microsoft.Jet.OLEDB.4.0;" %> <%id = request.querystring("id") Set rs = objCon.execute("SELECT * FROM teste WHERE id =" & id) %> <form name="form" method="post" action="grava.asp"> <input name="nome_campo" type="text" value="<%=rs("local")%>" size="60"> <input type="hidden" name="id" value="<%=rs("id")%>"> <input type="submit" name="Submit" value="Alterar"> </form> Pagina do UPDATE <% Set conObj = Server.CreateObject("ADODB.Connection") conObj.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Noticias.mdb") & ";" %> <%local = Request.Form("nome_campo") id = Request.Form("id") strQuery = "UPDATE teste SET nome_campo="&local&" WHERE id ="&id On error Resume Next Set ObjRs = objCon.execute.Execute(strQuery) On error Resume Next 'Executaa inserção no Banco de Dados 'Fecha o Objeto de Conexão conObj.Close Set conObj = nothing Response.write "Registro foi alterado com sucesso!" response.write "<br><br>Você será redirecionado em 5 segundos<br>" response.write "<meta http-equiv='refresh' content='0; url=dados.asp'/>" %> Se alguém poder me ajudar... agraçdo ou se tiver outro codigo de update desde que funcione... abcs
  10. Ola amigos .... Estou fazendo um sistema de consulta para exinbir as contas a pagar cadastradas funcionando normalmete agora gostaria de colocar a opção para mostrar somente a contas que estão com a opção SITUAÇÃO em ABERTO ... como fazer isso ? Obrigado
  11. Ola Everton Sim no cadastro do aluno tem uma combox para seleciona a que aluno ele pertence , o nome do campo NO bd é CATEGORIA.... Abc
  12. Fabio AVILA

    Exibir Noticias

    AmigoS , Eu já tenho Clasula TOP 4 para exibir as 4 ultimas noticias em DESTAQUES minha duvida seria alem do FRAME DESTAQUE eu tenho na minha pagina incial FRAME NOTICIAS ANTERIORES como no desenho abaixo sendo que ambos pegam dados da mesma TABELA..que seria quando entrar uma nova noticia e ela entrar no FRAME DESTAQUES a mais antiga cadastrada viesse para FRAME NOTICIAS ANTERIORES. etenderam.. Ou eu tenho que ter 1 tabela para DESTAQUE e outra tabela para NOTICIAS ANTERIORES Abracs
  13. Ola amigos , Tenho uma pagina que exibe todos os alunos cadastrados do meu sistema para realizar a impressão de suas carterinhs tudo funcionando , porem gostaria de colocar um select aonde eu clique na ctegoria exemplo 1 ANO ele mostre apenas os alunos do 1 ANO ... alguém pode me dar uma força.. abaixo segue mei codigo atual .. <HTML><HEAD><TITLE></TITLE> <META content="text/html; charset=utf-8" http-equiv=Content-Type> <META name=GENERATOR content="Microsoft FrontPage 5.0"></HEAD> <BODY bgColor=#efefef><LINK rel=stylesheet type=text/css href="estilos.css"> <TABLE border=0 cellSpacing=0 cellPadding=0 width=141 bgColor=#f2fff2 align=center> <TBODY> <TR> <TD bgColor=#FFFFFF width=812> <TABLE style="BORDER-COLLAPSE: collapse" border=0 cellPadding=2 width=625 height=1> <TBODY> <TR> <TD bgColor=#efefef height=4 vAlign=center width=777 colSpan=2> <img border="0" src="Cartei1.jpg" width="765" height="70"></TD></TR> <TR> <TD bgColor=#FFFFFF height=1 vAlign=center width=569> <FORM method=post action=carteirinha.asp> <DIV align=left><B><FONT style="FONT-SIZE: 8pt" face="Trebuchet MS"> </FONT> <font face="Trebuchet MS" style="font-size: 9pt" color="#015C5B"> <br> Selecione a Categoria </font></B><font color="#015C5B"> <select class=select id=fd_estado onChange=java script:fn_MostraOutros() name=Categoria style="font-size: 8 pt; font-family: Tahoma; color:#FFFFFF; font-weight:bold; background-color:#015C5B"> <option value="1">SUB7</option> <option value="2">SUB9</option> </select> </font><SPAN style="FONT-SIZE: 8pt"><FONT color=#015C5B face="Trebuchet MS"> </FONT></SPAN><FONT color=#008000 face="Trebuchet MS"> <INPUT style="BACKGROUND-COLOR: #015C5B; COLOR: #FFFFFF; FONT-SIZE: 8pt; FONT-WEIGHT: bold; font-family:Arial" value=busca type=submit name=submit><SPAN style="FONT-SIZE: 8pt"> </SPAN></FONT></DIV></FORM> </TD> <TD bgColor=#FFFFFF height=1 vAlign=middle width=204> <P align=center><FONT style="FONT-SIZE: 8pt" face="Century Gothic"><A title=Imprimir href="http://takesports.com.br/a"> &lt;script language=JavaScript1.2> <!-- function DoPrinting(){ if (!window.print){ alert("Use o Netscape ou Internet Explorer \n nas vers es 4.0 ou superior!") return } window.print() } //--> </SCRIPT> </A> <% sqlstmt = "SELECT * FROM jogador " Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sqlstmt, Dados, 3, 3 TotalRecs = rs.recordcount x = 0 For x = 1 to 9999 If rs.eof then Exit For Else date1 = rs("data") id = rs("ID") name1 = rs("nome") name2 = rs("endereco") link = "<a href='imprimir_cart2.asp?id=" & id & "'>" & date1 & "</a>" description = materia%> </FONT></P></TD></TR></TBODY></TABLE> <DIV style="WIDTH: 502px; HEIGHT: 246px" align=center> <TABLE style="BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 borderColor=#111111 cellPadding=4 width=607 bgColor=#ffffff height="28"> <TBODY> <TR> <TH style="BORDER-BOTTOM: medium none; border-left-style:none; border-left-width:medium; border-right-style:none; border-right-width:medium; border-top-style:none; border-top-width:medium" bgColor=#FFFFFF width=39 align=left height="14"> </TH> <TH style="BORDER-BOTTOM: medium none; border-left-style:none; border-left-width:medium" bgColor=#015C5B width=39 align=left height="14"><STRONG> <FONT style="FONT-SIZE: 8pt" color=#efefef face="Arial">Cod</FONT></STRONG></TH> <TH style="BORDER-BOTTOM: medium none" bgColor=#015C5B width=494 align=left height="14"><strong> <font face="Arial" style="font-size: 8pt" color="#EFEFEF">Nome do Atleta</font></strong></TH> <TH style="BORDER-BOTTOM: medium none" bgColor=#015C5B width=61 align=left height="14"><strong> <font face="Arial" style="font-size: 8pt" color="#EFEFEF">Nasc</font></strong></TH> <TH style="BORDER-BOTTOM: medium none" bgColor=#015C5B width=419 align=left height="14"><strong> <font face="Arial" style="font-size: 8pt" color="#FFFFFF">Endereco</font></strong></TH> <TH style="BORDER-BOTTOM: medium none" bgColor=#015C5B width=15 align=left height="14"> <div align="center"><font face="Arial" style="font-size: 8pt" color="#FFFFFF">Imprimir</font></div></TH> </TR> <TR style="CURSOR: hand" id=869 onmouseover="this.className='inputMouse';" onmouseout="this.className='';" onclick="consultarClick('869')" ;> <TD style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-TOP: medium none; BORDER-RIGHT: medium none" bgColor=#FFFFFF borderColor=#6e9f4d width=39 align=left height="14"> </TD> <TD style="BORDER-BOTTOM: 1px solid; BORDER-LEFT: medium none; BORDER-TOP: medium none; BORDER-RIGHT: medium none" bgColor=#EBEBEB borderColor=#6e9f4d width=39 align=left height="14"> <FONT size=1 face=Arial><% =id %></FONT></TD> <TD style="BORDER-BOTTOM: 1px solid; BORDER-LEFT: medium none; BORDER-TOP: medium none; BORDER-RIGHT: medium none" bgColor=#EBEBEB borderColor=#6e9f4d width=494 align=left height="14"><% =name1 %><font size="1" face="Arial"> </font> </TD> <TD style="BORDER-BOTTOM: 1px solid; BORDER-LEFT: medium none; BORDER-TOP: medium none; BORDER-RIGHT: medium none" bgColor=#EBEBEB borderColor=#6e9f4d width=61 align=left height="14"> <FONT size=1 face=Arial><% =date1 %></FONT></TD> <TD style="BORDER-BOTTOM: 1px solid; BORDER-LEFT: medium none; BORDER-TOP: medium none; BORDER-RIGHT: medium none" bgColor=#EBEBEB borderColor=#6e9f4d width=419 align=left height="14"> <font face="Arial" size="1"><% =name1 %></font></TD> <TD style="BORDER-BOTTOM: 1px solid; BORDER-LEFT: medium none; BORDER-TOP: medium none; BORDER-RIGHT: medium none" bgColor=#EBEBEB borderColor=#6e9f4d width=15 align=center height="14"> <font face="Arial" color="#000000" size="1"> <a href="imprimir_cart2.asp?id=<%=id%>">Imprimir</a></font></TD> <% rs.MoveNext End If Next%> </TR> </TBODY></TABLE> <P align=left> <P align=left><B><FONT style="FONT-SIZE: 8pt" face="Century Gothic">Sua busca foi processada em 5,53 segundos.</FONT><FONT style="FONT-SIZE: 8pt" color=#6e9f4d face="Century Gothic"><BR></FONT></B></P></DIV></TD></TR></TBODY></TABLE> <P> </P> </BODY></HTML>
  14. Amigos , Tenho um sistema de alunos e surgiu a necessidade de se criar mais de um nucleo e o cliente quer que o sistema tenha acesso das informações de cada nucleo ou seja o Diretor do Nucleo Santos acessar os Alunos cadastrados e outros itens do Nucleo Santos e o Diretor do Nucleo Palmeiras acessar os Alunos cadastrados e outros itens do Nucleo Palmeiras , alguém pode me dar uma dica de como se fazer isso .. eu prciso ter 2 banco ou consigo fazer tudp isso usando1 banco ... A tabela de usuários esta assim : ID , LOGIN , SENHA , NUCLEO ... abs
  15. Ola AMigos , Como que faço pra exibir pra mim todos os registro que possuem o mesmo id , pois eu to conseguindo exibir apenas 1... segue o codigo : <% Set Conexao = CreateObject("ADODB.CONNECTION") Set objCon = Server.CreateObject("ADODB.Connection") objCon.Open "Data Source="&Server.MapPath("bd.mdb")&";Provider=Microsoft.Jet.OLEDB.4.0;" %> <% acao = Request("acao") id = Request("id") if acao = "V" then disabilita = " disabled=""disabled"" " elseif acao = "A" then disabilita = "" end if 'Dados Alterar id= Request("id") if (acao = "A" or acao = "V") then if acao = "A" then acao = "alterar" bt = "Alterar" else acao = "visualizar" bt = "Alterar" end if set rs2 = Server.CreateObject("ADODB.Recordset") sql2 = "select * from Pedidos where id="&id&"" set rs2 = objCon.execute(sql2) '------------------------------------------------- ' Estes dados podem ser alterados Produto = rs2("produto") Cliente= rs2("cliente") id = rs2("id") '-------------------------------------------------- else acao = "gravar" bt = "Gravar" end if bt = Ucase(bt) %> vlw
  16. Ola Rafael, Mais um vez o brigado pela força, funciou ... vlw
  17. fiz as alterações mas ta dando erro Erro de compilação do Microsoft VBScript (0x800A0400) , veja como ficou: strSQL = "SELECT nome,contato,regiao,email,telefone,celular,uf,sigla " _ & "FROM Scanner " _ & "where uf = '"&variaveltexto&"' & TiraAcento(Replace(strSearch, "'", "''")) &" _ & "OR email = '"&variaveltexto&"' & TiraAcento(Replace(strSearch, "'", "''")) &" _ & "ORDER BY nome;" Aonde que errei ... vlw
  18. Rafael, So deixar como abaixo isso ? & "where uf = '"&variaveltexto&"' & TiraAcento(Replace(strSearch, "'", "''")) & "%' " _ vlw
  19. Ola AMigos , To com uma duvida ak e gostaria da opnião de vocês , tem como retornar apenas uma valor especifico usando uma consulta Like , ou seja ele retornar apenas a palavra que digitei ao invés de todas q possuem a mesma incial da palavra pesquisaada. segue o codigo q to usando: <% If strSearch <> "" Then strDBPath = Server.MapPath("bd.mdb") Const adUseClient = 3 Set cnnSearch = Server.CreateObject("ADODB.Connection") cnnSearch.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & ";" cnnSearch.CursorLocation = adUseClient strSQL = "SELECT nome,contato,regiao,email,telefone,celular,uf " _ & "FROM Representantes " _ & "WHERE uf LIKE ‘F%’ & TiraAcento(Replace(strSearch, "'", "''")) & "%' " _ & "OR email LIKE '%" & TiraAcento(Replace(strSearch, "'", "''")) & "%' " _ & "ORDER BY nome;" Set rstSearch = cnnSearch.Execute(strSQL) intContador = rstSearch.RecordCount %> vlw
  20. Ola amigos , Tenho um link pop up no meu site e gostaria de saber se tem como ocultar o endereço do link que aparece na barra de titulo da janela e deixar somente o titulo REPRESENTANTES, da pra fzer isso ...segue meu codigo. <script Language=JavaScript> function AbrirJanela1() { janela=window.open('http://www.fgcom.com.br/2009/admin/representantes_scanner.htm', '', 'height=500,width=630,scrollbars=yes,statusbar=no,resizable=no'); } </script> Abrcs
  21. E ae beleza.. mais uma vez obrigado pela dica .. problema resolvido... []cs
  22. Pessoal Bom Dia , Tenho uma Cadastro de Noticias e sempre quando eu excluo a galeria de Fotos dela e o bd fica sem nenhuma galeria ele apresenta o erro de Record Set Vazio : ADODB.Recordset error '800a0bcd' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. Como eu resolvo isso mesmo.. VLW
  23. Rafael , Era isso o erro mesmo , acertei isso e funciou .. brigado.. []cos
  24. Fala Jhonatan beleza .. cara funcionou perfeitamente .. mais uma vez obrigadão !! []cos
  25. Fala ae beleza , To com uma duvida aki, tenho um Frame na minha Pagina Principal e dentro dele apresento algumas dicas de moda , mas n to conseguindo fazer abrir o link na Pagina Toda ele ta abrindo apenas dentro do Frame , segue abaixo o script se alguém puder me ajudar agradeço. <script language="javascript"> function consultarClick(vr){ pagina = dicas.asp?acao=A&id='+vr; location = pagina; } </script> Abraços
×
×
  • Criar Novo...