Ir para conteúdo
Fórum Script Brasil

cyberalexxx

Membros
  • Total de itens

    2.500
  • Registro em

  • Última visita

Posts postados por cyberalexxx

  1. Eu tentei usar o isdate e não funcionou!!

    if isdate(horaini) = false then

    Response.Redirect ("MSG.ASP")

    end if

    o meu código eu testei e ta funfando, quanto ao seu, mostra mais ai pra poder avaliar.

  2. tenta assim:

    <%
    hora="22:00:00"
    if len(hora) = 7 or len(hora) = 4 then
       hora="0"&hora
    end if
    horasistema=right(time(),8)
    if isdate(hora) = true then 
       response.write "Hora valida - " & hora & "<BR>"
       if hora < horasistema then
          response.write "horario informado menor que o atual - " & horasistema
          else
          response.write "horario informado maior que o atual - " & horasistema
       end if
    else
       response.write "Hora invalida - " & hora & "<br>"
    end if
    %>

  3. Use o Método Gambi:

    Uma saida seria uma tabela de marcas, onde a cada alteração voce registrasse o ID do produto e a marca, ficaria mais aou menos assim:

    ID    MARCA

    1      Sabão em pó OMO

    2      Marca qualquer

    1      Lava Roupas OMO

    Sendo assim voce faria a busca nesta tabela e pegaria o ID e pelo ID voce saberia todas as marcas que este produto já teve.

    Obs: Método gambi = gambiarra

  4. uma conexão minha de exemplo:

    SET conexao=Server.CreateObject("adodb.connection")
      conexao.Open "Driver={mySQL}; Server=localhost; Port=3306; Option=0; Socket=; Stmt=; Database=dados; Uid=xxxx; Pwd=xxxxxx;"
      SQL = "select frase from textos order by rand() limit 0,1"
      SET RS = Server.CreateObject("ADODB.Recordset")
      RS.Open SQL,conexao,3
    

  5. set conexao=server.createobject("adodb.connection")
    caminho="DBQ=" & server.mappath("banco.mdb")
    conexao.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & caminho
    SQL = "select * from tabela"
    SET RS = Server.CreateObject("ADODB.Recordset")
    RS.Open SQL,conexao,3
    response.write rs.recordcount

  6. Num querendo encomodar mais enmcomodando.

    no php,

    ucwords (string), converte os primeiros caracteres de strings em maiúsculo.

    nl2br (string) - Exibe o texto do bd com a formatação.

    e no asp, quais seriam?

    Quanto ao ucwords() no asp não existe uma função correspondente, voce tem que fazer na marra, pois ele só converte toda a string, entaum teria q fazer assim:

    response.write Ucase(left(string,1))&lcase(mid(string,2,len(string)-1))

  7. tenta deixar seu código assim:

    <!--#include file="../../global/funcoes.asp" -->
    <table width=100%><tr><td>
    <center><b>Clike sobre o nome do cantor ou banda abaixo para ver suas musicas</b></center><p>
    <%
    strSQl = "SELECT * FROM cifras ORDER BY autor"
    Set Rs_cifras = server.createobject("ADODB.Recordset")
    Rs_cifras.Open strSQl,Conn , 3, 3
    total= Rs_cifras.recordcount
    linha = "4" ' Numero de imagens por linha
    %>
    <table width="590" border="1" align="center" topmargin=50 cellpadding="0" cellspacing="0"> 
    <tr>
    <%
    'response.write total
    x=0
    Do While not Rs_cifras.EOF 
      x=x+1
    %>
    
      <td valign=top width=25%><center><b><i><a href="cifras_conteudo_con_autor.asp?autor=<%=Rs_cifras("autor")%>"><%=Rs_cifras("autor")%></a></i></b></center></td>
    <%
      if x mod 4 = 0 then
         response.write "</tr><tr>"
      end if
      Rs_cifras.MoveNext 
    Loop 
    %>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    

  8. É.

    Tipo

    imagem1  imagem2  imagem3  imagem4

    imagem5  imagem6  imagem7  imagem8 

    imagem9  imagem8  imagem9  ...etc..

    vou te passar a lógica:

    response.write "<table><tr>"
    x=0
    Do while not RecordSet.Eof
       x=x+1
       response.write "<td>"
       response.write Recordset("imagem")
       response.write "</td>"
       if x mod 4 = 0 then
          response.write "</tr><tr>"
       end if
       RecordSet.MoveNext
    loop
    response.write "<tr></table>"

  9. olha aki um exemplo que exibe 40 registros por pagina com 4 colunas por linha:

    <!-- #include file="../include/top.asp" -->
    <%
    pagina = Request.QueryString("p")
    if pagina = "" then
    pagina = 1
    end if
    'Seta a variavel pagina como a página em questão na paginação
    
    registros = 40
    'Seta o número de registros por pagina
    
    set RS = Server.Createobject("AdoDB.RecordSet")
    set RS.ActiveConnection = conn
    RS.cursortype = 3
    RS.pagesize = registros
    
    StrSQL = "select * from Items where tipo=""calca"""
    RS.Open StrSQL
    
    if RS.EOF then
    %><font face="Arial" size="2">Sua pesquisa não retornou nenhum resultado</font><%
    else
    RS.absolutepage = pagina
    if RS.EOF then
    %><font face="Arial" size="2">Sua pesquisa não retornou nenhum resultado</font><%
    fim = -1
    end if
    xx = 0%>
    
    <table width="776" height="55">
        <tr> 
    <%
    while NOT RS.EOF AND xx < RS.pagesize
    xx = xx + 1
    %>
    
    
          <td height="86" width="384"> 
            <form method=get action=DETALHES.ASP>
              <table width="26%" height="86" border="0">
                <tr> 
                  <td width="30%" height="82" valign="middle"> 
                    <div align="center"><img src="http://www.dynamus.economicojp.com/produtos/shop/uploads/<%=rs("ImageDesc")%>" width="75" height="130" border="0"></div>
                  </td>
                  <td width="70%" height="82"> 
                      <table width="195" border="1" align="left" cellpadding="2" cellspacing="0" bordercolor="#FFFFFF">
                        <tr> 
                          <td bgcolor="#FFFFFF" height="10" width="187"><span class="style16"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=rs("ItemName")%></font></span></td>
                        </tr>
                        <tr> 
                          <td bgcolor="#ffffff" height="18" width="187"> 
                            <p align="LEFT" class="style17"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><span class="style20"><strong><span class="style19"> 
                              <input type="HIDDEN" name="NOME" value="<%=rs("ItemName")%>">
                              <input type="HIDDEN" name="desc" value="<%=rs("Itemdesc")%>">
                              <input type="HIDDEN" name="image" value="<%=rs("ImageDesc")%>">
                              <input type="HIDDEN" name="color" value="<%=rs("cores")%>">
                              <input type="HIDDEN" name="tamam" value="<%=rs("tamanho")%>">
                              <input type="HIDDEN" name="refe" value="<%=rs("ref")%>">
                              <input type="submit" name="Submit" value="Ver Detalhes">
                              </span></strong></span> </font>
                          </td>
                        </tr>
                      </table>
                  </td>
                </tr>
              </table>
            </form>
          </td>
        
    <%
    if xx mod 4 = 0 then%>
      </tr></table><table width="776" height="55">
        <tr>
    <%end if%>
      
    rs.movenext
    rs.cachesize = 1
    wend %>
    </table>
    <%end if
    
    if fim = "" then
    
    anterior = pagina - 1
    proxima = pagina + 1
    
    if anterior <> 0 then
    %><%
    
    end if
    
    RS.Close
    Conn.Close
    
    %><a href="<%=request.servervariables("script_name")%>?p=<%=anterior%>">Página Anterior</a> - <%
    end if
    
    %><a href="<%=request.servervariables("script_name")%>?p=<%=proxima%>">Próxima Página</a>

    Fonte: Vide tópico, só adaptei de 2 para 4 colunas

  10. No servidor onde eu hospedado, quando eu crio um sql server, eles me dão um link para acessar o servidor... é tipo o programa do SQL Server no PC, só que é pela internet... É igual Mysql.. wink.gif

    Interessante, nunca hospedei nada com sql server, só mysql.

    isso que voce esta falando é uma ferramente front-end tipo o phpmyadmin??

×
×
  • Criar Novo...