Ir para conteúdo
Fórum Script Brasil

jow

Membros
  • Total de itens

    546
  • Registro em

  • Última visita

Tudo que jow postou

  1. con.execute("update tbContato set nome='"&aniversario&"', tratamento='"&tratamento&"', titulo='"&titulo&"', cargo='"&cargo&"', entidade='"&entidade&"', endereco='"&endereco&"', cidade='"&cidade&"' , cep='"&cep&"', cpf='"&cpf&"', estado='"&estado&"', pais='"&pais&"', telefone='"&telefone&"', fax='"&fax&"', celular='"&celular&"', email='"&email&"', nota='"&nota&"' where id_contato="&id_contato&'") ou con.execute "update tbContato set nome='"&aniversario&"', tratamento='"&tratamento&"', titulo='"&titulo&"', cargo='"&cargo&"', entidade='"&entidade&"', endereco='"&endereco&"', cidade='"&cidade&"' , cep='"&cep&"', cpf='"&cpf&"', estado='"&estado&"', pais='"&pais&"', telefone='"&telefone&"', fax='"&fax&"', celular='"&celular&"', email='"&email&"', nota='"&nota&"' where id_contato="&id_contato
  2. Cara este acima é o código q você está usando eu tentei ver o seu código só me exibiu na tela uma div em branco
  3. Isso você pode usar vários ifs ou um select case, abaixo um exemplo de select case: Select request.form("checkbox") Case 1 response.write "grava gerais" Case 2 response.write "grava policia" End Select
  4. Usa o caminho completo exemplo? <?php rename("C:/pasta/pasta2/pasta3","C:/pasta/pasta2/pasta_nova"); ?>
  5. cria um if tipo se o checkbox foi preeenchido insere naquele banco ... if checkbox = "gerais" then insere no banco gerais elseif checkbox = "policia" then insere no banco policia end if
  6. jow

    Salvar formulário

    Bom você quer que alguém faça o script pra vc, ou você está com dúvida de como criar ... Se estiver com dúvida iremos te ajudar, abaixo a idéia de como eu faria ... <form> <% if request.form("campo") <> "" then 'Faz o update ou insert "depende do que você precisa" else %> <input type="text" name="campo"> <input type="submit" value="Salvar"> <% end if %> </form>
  7. Apenas dividi a tabela onde você tem o nome dos dias da semana e inseri uma tabela para as datas, que é onde você mencionou "Necessito formatar as tabelas onde ficam as datas", é onde tem o seguinte comentário "<!-- Aqui você formata as todos das datas !-->" <% ' ***Begin Function Declaration*** ' New and improved GetDaysInMonth implementation. ' Thanks to Florent Renucci for pointing out that I ' could easily use the same method I used for the ' revised GetWeekdayMonthStartsOn function. Function GetDaysInMonth(iMonth, iYear) Dim dTemp dTemp = DateAdd("d", -1, DateSerial(iYear, iMonth + 1, 1)) GetDaysInMonth = Day(dTemp) End Function ' Previous implementation on GetDaysInMonth 'Function GetDaysInMonth(iMonth, iYear) ' Select Case iMonth ' Case 1, 3, 5, 7, 8, 10, 12 ' GetDaysInMonth = 31 ' Case 4, 6, 9, 11 ' GetDaysInMonth = 30 ' Case 2 ' If IsDate("February 29, " & iYear) Then ' GetDaysInMonth = 29 ' Else ' GetDaysInMonth = 28 ' End If ' End Select 'End Function Function GetWeekdayMonthStartsOn(dAnyDayInTheMonth) Dim dTemp dTemp = DateAdd("d", -(Day(dAnyDayInTheMonth) - 1), dAnyDayInTheMonth) GetWeekdayMonthStartsOn = WeekDay(dTemp) End Function Function SubtractOneMonth(dDate) SubtractOneMonth = DateAdd("m", -1, dDate) End Function Function AddOneMonth(dDate) AddOneMonth = DateAdd("m", 1, dDate) End Function ' ***End Function Declaration*** Dim dDate ' Date we're displaying calendar for Dim iDIM ' Days In Month Dim iDOW ' Day Of Week that month starts on Dim iCurrent ' Variable we use to hold current day of month as we write table Dim iPosition ' Variable we use to hold current position in table ' Get selected date. There are two ways to do this. ' First check if we were passed a full date in RQS("date"). ' If so use it, if not look for seperate variables, putting them togeter into a date. ' Lastly check if the date is valid...if not use today If IsDate(Request.QueryString("date")) Then dDate = CDate(Request.QueryString("date")) Else If IsDate(Request.QueryString("day") & "-" & Request.QueryString("month") & "-" & Request.QueryString("year")) Then dDate = CDate(Request.QueryString("day") & "-" & Request.QueryString("month") & "-" & Request.QueryString("year")) Else dDate = Date() ' The annoyingly bad solution for those of you running IIS3 If Len(Request.QueryString("day")) <> 0 Or Len(Request.QueryString("month")) <> 0 Or Len(Request.QueryString("year")) <> 0 Or Len(Request.QueryString("date")) <> 0 Then Response.Write "The date you picked was not a valid date. The calendar was set to today's date.<BR><BR>" End If ' The elegant solution for those of you running IIS4 'If Request.QueryString.Count <> 0 Then Response.Write "The date you picked was not a valid date. The calendar was set to today's date.<BR><BR>" End If End If 'Now we've got the date. Now get Days in the choosen month and the day of the week it starts on. iDIM = GetDaysInMonth(Month(dDate), Year(dDate)) iDOW = GetWeekdayMonthStartsOn(dDate) %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Linhas Rodoviárias.com.br</title> <!-- Outer Table is simply to get the pretty border--> </head> <body link="#797E82" vlink="#797E82" alink="#797E82" bgcolor="#F6F3E7" topmargin="0" leftmargin="0"> <div align="center"> <TABLE BORDER=1 CELLSPACING=0 BGCOLOR=#FCFAEA width="200" cellpadding="0" bordercolor="#87785F" height="3" id="table1"> <TR> <TD BGCOLOR=#8EC601 ALIGN="center" COLSPAN=7> <TABLE WIDTH=312 BORDER=0 CELLSPACING=0 CELLPADDING=0 id="table2"> <TR> <TD ALIGN="right"> <p align="center"><A HREF="./calendario.asp?date=<%= SubtractOneMonth(dDate) %>"> <span style="text-decoration: none"> <img border="0" src="http://www.linhasrodoviarias.com.br/diary/IMG/seta.gif" width="9" height="9"> <img border="0" src="http://www.linhasrodoviarias.com.br/diary/IMG/seta.gif" width="9" height="9"> <img border="0" src="http://www.linhasrodoviarias.com.br/diary/IMG/seta.gif" width="9" height="9"></span></A></TD> <TD ALIGN="center"><FONT COLOR=#FFFFFF><B><%= MonthName(Month(dDate)) & " " & Year(dDate) %></B></FONT></TD> <TD ALIGN="left"> <p align="center"><A HREF="./calendario.asp?date=<%= AddOneMonth(dDate) %>"> <span style="text-decoration: none"> <img border="0" src="http://www.linhasrodoviarias.com.br/diary/IMG/seta.gif" width="9" height="9"> <img border="0" src="http://www.linhasrodoviarias.com.br/diary/IMG/seta.gif" width="9" height="9"> <img border="0" src="http://www.linhasrodoviarias.com.br/diary/IMG/seta.gif" width="9" height="9"></span></A></TD> </TR> </TABLE> </TD> </TR> <TR> <TD ALIGN="center" BGCOLOR=#87785F width="20"> <FONT COLOR=#FFFFFF face="Verdana" size="2"><B>Dom</B><BR><IMG SRC="./images/spacer.gif" WIDTH=60 HEIGHT=1 BORDER=0></FONT></TD> <TD ALIGN="center" BGCOLOR=#87785F width="30"> <b><font face="Verdana" size="2" color="#FFFFFF">Seg</font></b><FONT COLOR=#FFFFFF face="Verdana" size="2"><BR><IMG SRC="./images/spacer.gif" WIDTH=60 HEIGHT=1 BORDER=0></FONT></TD> <TD ALIGN="center" BGCOLOR=#87785F width="30"> <FONT COLOR=#FFFFFF face="Verdana" size="2"><B>Ter</B><BR><IMG SRC="./images/spacer.gif" WIDTH=60 HEIGHT=1 BORDER=0></FONT></TD> <TD ALIGN="center" BGCOLOR=#87785F width="30"> <b><font face="Verdana" size="2" color="#FFFFFF">Qua</font></b><FONT COLOR=#FFFFFF face="Verdana" size="2"><BR><IMG SRC="./images/spacer.gif" WIDTH=60 HEIGHT=1 BORDER=0></FONT></TD> <TD ALIGN="center" BGCOLOR=#87785F width="30"> <b><font face="Verdana" size="2" color="#FFFFFF">Qui</font></b><FONT COLOR=#FFFFFF face="Verdana" size="2"><BR><IMG SRC="./images/spacer.gif" WIDTH=60 HEIGHT=1 BORDER=0></FONT></TD> <TD ALIGN="center" BGCOLOR=#87785F width="30"> <FONT COLOR=#FFFFFF face="Verdana" size="2"><b>Sex</b><BR><IMG SRC="./images/spacer.gif" WIDTH=60 HEIGHT=1 BORDER=0></FONT></TD> <TD ALIGN="center" BGCOLOR=#87785F width="30"> <FONT COLOR=#FFFFFF face="Verdana" size="2"><B>Sáb</B><BR><IMG SRC="./images/spacer.gif" WIDTH=60 HEIGHT=1 BORDER=0></FONT></TD> </TR> </TABLE> <!-- Aqui você formata as todos das datas !--> <TABLE BORDER=1 CELLSPACING=0 BGCOLOR=#FCFAEA width="436" cellpadding="0" bordercolor="#87785F" height="3" id="table1"> <% ' Write spacer cells at beginning of first row if month doesn't start on a Sunday. If iDOW <> 1 Then Response.Write vbTab & "<TR>" & vbCrLf iPosition = 1 Do While iPosition < iDOW Response.Write vbTab & vbTab & "<TD> </TD>" & vbCrLf iPosition = iPosition + 1 Loop End If ' Write days of month in proper day slots iCurrent = 1 iPosition = iDOW Do While iCurrent <= iDIM ' If we're at the begginning of a row then write TR If iPosition = 1 Then Response.Write vbTab & "<TR>" & vbCrLf End If ' If the day we're writing is the selected day then highlight it somehow. If iCurrent = Day(dDate) Then Response.Write vbTab & vbTab & "<TD BGCOLOR=#8EC601><A target=""Registro"" HREF=""http://www.linhasrodoviarias.com.br/edicao/calendario/Banners_list.asp?a=search&value=1&SearchFor=" & iCurrent & "%2F" & Month(dDate) & "%2F" & Year(dDate) & "&SearchOption=Equals&SearchField=Aviso+de+Vencimento""><FONT SIZE=""1""><B>" & iCurrent & "</B></FONT><BR><BR></TD>" & vbCrLf Else Response.Write vbTab & vbTab & "<TD><A target=""Registro"" HREF=""http://www.linhasrodoviarias.com.br/edicao/calendario/Banners_list.asp?a=search&value=1&SearchFor=" & iCurrent & "%2F" & Month(dDate) & "%2F" & Year(dDate) & "&SearchOption=Equals&SearchField=Aviso+de+Vencimento""><FONT SIZE=""-1"">" & iCurrent & "</FONT></A><BR><BR></TD>" & vbCrLf End If ' If we're at the endof a row then write /TR If iPosition = 7 Then Response.Write vbTab & "</TR>" & vbCrLf iPosition = 0 End If ' Increment variables iCurrent = iCurrent + 1 iPosition = iPosition + 1 Loop ' Write spacer cells at end of last row if month doesn't end on a Saturday. If iPosition <> 1 Then Do While iPosition <= 7 Response.Write vbTab & vbTab & "<TD> </TD>" & vbCrLf iPosition = iPosition + 1 Loop Response.Write vbTab & "</TR>" & vbCrLf End If %> </TABLE> </div>
  8. Bom se eu entendi sua dúvida você quer gravar em mais de um banco de dados, correto ? Se for isso você cria as conexões e os inserts necessários, exemplo
  9. Bom dia, Cara debuga a sua linha sql e veja o que ela está retornando, executa o script abaixo e posta o resultado ai, ou se preferir copia o resultado da linha sql e joga no banco pra você ver se tem erro ou não ... sql = "insert into tbContato" & vbNewline sql = sql & " (nome, aniversario, tratamento, titulo, cargo, entidade, endereco, cidade, cep, cpf, estado, pais, telefone, fax, celular, email, nota)" & vbNewLine sql = sql & " values" & vbNewLine sql = sql & " ('"& nome &"','"& aniversario &"','"& tratamento &"','"& titulo &"','"& cargo &"','"& entidade &"','"& endereco &"','"& cidade &"','"& cep &"','"& cpf &"'," & vbNewLine sql = sql & " '"& estado &"','"& pais &"','"& telefone &"','"& fax &"','"& celular &"','"& email &"','"& nota &"')" response.write sql
  10. Tendi posta ai como esta o seu select !!
  11. Cara este select está funcionando ? sql = "select * from inventario where equipamento order by equipamento ASC" isso resolsolve o seu problema sql = "select * from inventario order by campo_ordenar ASC"
  12. Um bom começo é o site do marcoratti, tem o você precisa
  13. Se for para preencher uma comboBox com os itens do BD, abaixo o código <% response.write "<select name="select">" sql = "SELECT * FROM tabela" Set rs = conexao.execute(sql) Do until rs.eof response.write "<option>"&rs("campo")&"</option>" rs.movenext : Loop response.write "</select>" %>
  14. jow

    Atualização de campo

    <html> <head> &lt;script type="text/javascript"> function mostra() { var minhaLista = document.getElementById("uf_contato"); document.getElementById("estado_calc").value = uf_contato.options[uf_contato.selectedIndex].value; } </script> </head> <body> <form name="Formulario"> <table> <tr> <td>Selecione:</td> <td><select id="uf_contato" name="uf" onchange="mostra();"> <% Set rs = conn.execute("SELECT * FROM TABLE") Do Until rs.eof %> <option value="<%=rs("CAMPO")%>"><%=rs("CAMPO")%></option> <% rs.movenext : Loop : rs.close : Set rs = nothing %> </select></td></tr> <tr> <td><input type="text" id="estado_calc" name="campo" size="50"></td> </tr> </table> </form> </body> </html>
  15. jow

    (Resolvido) Alteração

    Boa tarde vou te dá um exemplo prático .... Set rs = conexao.execute("Select codigo, nome from NOME") Do While Not rs.Eof %> <a href="alt2.dados.asp?id=<%=rs("codigo")%>"><%=rs("nome")%></a> <% rs.MoveNext Loop %> alt2.dados.asp <% response.write request.querystring("id") %>
  16. jow

    Gerar PDF no ASP

    Olhe este exemplo ... http://forum.wmonline.com.br/index.php?showtopic=133224
  17. Sempre usei está função e nunca repetiu os numeros .... <% response.write "<center><strong>Função que gera numéros aleatoriamente.</strong></center>" Function rndNum(nNum) Randomize If nNum < 1 then nNum = 1 If nNum > 12 then nNum = 12 qNum = Int(Rnd * 10^nNum) zEsq = "" If Len(qNum) < nNum then For i=0 to (nNum-1)-Len(qNum) zEsq = zEsq & "0" Next End If rndNum = zEsq & qNum End Function 'Mostrando exemplo Response.Write rndNum(13) %>
  18. Então se você tiver acesso ao código ... crie uma segunda conexão apontando para o seu banco ai faz o q citei acima ... quando o email é enviado você manda a imagem com um link ... o link apontando para uma página do seu sistema ... essa página do sistema deve ter a conexão como banco q você quer salvar as informações ...
  19. Então você quer usar os dois o groupmail para enviar os emails, e o q você irá desenvolver apenas para gravar no banco correto ?? Se for isso provávelmente você terá q fazer alterações para q o sistema groupmail trabalhe também com sua base de dados ... Como fazer as alerações, alterando o script ... Se você tiver acesso ao script do groupmail, fica tranquilo fazer isso .. Caso você não tenha acesso desconhço uma solução ..
  20. você terá q importar o arquivo com os email para uma tabela Terá que enviar um email para todos emails desta tabela O gif do corpo do seu email, deverá ser um link que aponta para o seu sistema, e grava no banco as informações q você precisa .... Suponha que você queira gravar o email, a data e a hora, e se foi aberto o email ... você passa no link email="teste@teste.com.br" <a href="pagina.asp?email=<%=email%>&data=<%=now()%>&status=1">imagem</a> pagina.asp conexao.excute(" INSERT INTO tabela (email, data, status) VALUES ('"&request("email")&"', '"&request("data")&"', '"&request("status")&"') ")
  21. Então você não usará o sistema groupmail, você irá criar um totalmente independente certo ???
  22. você quer criar um sistema com a mesma funcionalidade ou usar junto com que já existe ??
  23. Para você mandar salvar em outro banco você deverá, apontar o script para outro banco ou seja alterar a sua conexão
  24. jow

    (Resolvido) Split

    <% variavel = "CATEG TERM - CATEGORIA DO TERMINAL" Array_Variavel = Split(variavel, "-", -1, 1) v = Array_Variavel(0) ' CATEG TERM v1 = Array_Variavel(1) 'CATEGORIA DO TERMINAL response.write v & "<br>" & v1 %>
×
×
  • Criar Novo...