Jump to content


julio.mb

Member Since 19/11/2004
Offline Last Active 15/02/2006, 04:41
-----

Topics I've Started

Formulario De E-mail

18/01/2006, 08:21

Ola amigos to com um problema aqui.. tenho um formulario de e-mail mais quando eu posto ele os campos nao vem na mesma ordem que a que aparece na pagina..

o script é esse:


<%
Function RemoveHTML(strText)
Set objRE = createObject("VBScript.RegExp")
objRE.Pattern = "\<[^\>]*\>"
objRE.Global = true
objRE.IgnoreCase = true
RemoveHTML = objRE.Replace(strText,"")
End Function
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
	For Each Item In Request.Form
  EscriboCuerpoMensaje = EscriboCuerpoMensaje & "<b>" & Item & "</b>: " & Request.Form(Item) & "<br>" & VbCrlf
	Next
	Set ObjSendMail = CreateObject("CDO.Message") 
	'This section provides the configuration information for the remote SMTP server.
	ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
	ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="ip do server"
	ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 
	ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)
	ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 55
	' If your server requires outgoing authentication uncomment the lines bleow and use a valid email address and password.
	'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
	'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="usuario"
	'ObjSendMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="senha"
	ObjSendMail.Configuration.Fields.Update
	'End remote SMTP server configuration section==
	ObjSendMail.To = "julio.batista@hotmail.com" ' a quien se le envia el correo
	ObjSendMail.Subject = "Reserva para Locação" ' asunto
	ObjSendMail.From = "julio.batista@hotmail.com" ' el que envia el correo
	' we are sending a text email.. simply switch the comments around to send an html email instead
	'ObjSendMail.HTMLBody = EscriboCuerpoMensaje 'cuerpo HTML
	ObjSendMail.TextBody = RemoveHTML(EscriboCuerpoMensaje) ' cuerpo texto
	ObjSendMail.Send
	Set ObjSendMail = Nothing 
	Response.Write "<script>alert('O E-mail Foi enviado com Sucesso');location.href='email.asp';</script>" 
Else
%>
<html>
<head>
<title>Reserva para Locação</title>

<LINK REL="StyleSheet" HREF="style.css" TYPE="text/css">

</head>
<body>
<script src="validaciones.js" language="javascript" type="text/javascript"></script>
</head>
<body onload="init()">
<script language="JavaScript">
<!--
function init() {
}
//-->
</script>

<fieldset>
<legend>Reserva para Locação</legend>
<form method="POST" name="locacao" action="email.asp" onSubmit="Validar();return RetornoValor;">
<table border="0" cellspacing="2" cellpadding="3" align="center" width="67%">
<tr>
<td width="26%" align="left" valign="middle"><div align="left"><strong>Tipo de Equipamento</strong></div></td>
<td width="74%" valign="middle">

<input name="Tipo de Equipamento - Coletor" type="checkbox"  value="Coletor de Dados">
<font size="2" color="#ff6550" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Coletor de Dados</font><br><br>
 <input name="Tipo de Equipamento - Informática" type="checkbox"  value="Equipamentos de Informática">
 <font size="2" color="#ff6550" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif">Equipamentos de Informática<br>
 </font>
<br></td>
</tr>
<tr>
  <td colspan="2" valign="top" class=""><div align="center"><strong><hr>
    Dados Do Comprador </strong></div></td>
  </tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Razão Social:</strong></td>
	<td width="74%"><input name="Razão Social" type="text" class="" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Fantasia:</strong></td>
	<td width="74%"><input name="Fantasia" type="text" class="" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Telefone:</strong></td>
	<td width="74%"><input name="Telefone" type="text" class="" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Fax:</strong></td>
	<td width="74%"><input name="Fax" type="text" class="" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Contato:</strong></td>
	<td width="74%"><input name="Contato" type="text" class="" value="" size="55"></td>
</tr>
<tr>
  <td colspan="2" valign="top" class=""><div align="center"><strong><hr>
    Dados Para Faturamento </strong></div></td>
  </tr>
<tr>
	<td width="26%" class="" valign="top"><strong>CNPJ:</strong></td>
	<td width="74%"><input name="CNPJ" type="text" class="" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Inscr. Estadual:</strong></td>
	<td width="74%"><input type="text" name="Inscr. Estadual" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Razão Social:</strong></td>
	<td width="74%"><input type="text" name="Razão Social" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Fantasia:</strong></td>
	<td width="74%"><input type="text" name="Fantasia" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>CEP:</strong></td>
	<td width="74%"><input type="text" name="CEP" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Tipo:</strong></td>
	<td width="74%"><input type="text" name="Tipo" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>End.:</strong></td>
	<td width="74%"><input type="text" name="Endereço" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Nº:</strong></td>
	<td width="74%"><input type="text" name="Número" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Complemento:</strong></td>
	<td width="74%"><input type="text" name="Complemento" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Cidade:</strong></td>
	<td width="74%"><input type="text" name="Cidade" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Estado:</strong></td>
	<td width="74%"><input type="text" name="Estado" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Pais</strong>:</td>
	<td width="74%"><input type="text" name="Pais" value="" size="55"></td>
</tr>
<tr>
  <td colspan="2" valign="top" class=""><div align="center"><strong><hr>
    Dados Para Cobran&ccedil;a </strong></div></td>
  </tr>
<tr>
	<td width="26%" class="" valign="top"><strong>CEP:</strong></td>
	<td width="74%"><input type="text" name="CEP para cobrança" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Tipo:</strong></td>
	<td width="74%"><input type="text" name="Tipo para cobrança" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>End.:</strong></td>
	<td width="74%"><input type="text" name="Endereço para cobrança" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Nº : </strong></td>
	<td width="74%"><input type="text" name="Número para cobrança" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Complemento:</strong></td>
	<td width="74%"><input type="text" name="Complemento para cobrança" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Cidade:</strong></td>
	<td width="74%"><input type="text" name="Cidade Para cobrança" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Estado:</strong></td>
	<td width="74%"><input type="text" name="Estado para cobrança" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Pais:</strong></td>
	<td width="74%"><input type="text" name="Pais para cobrança" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>E-mail:</strong></td>
	<td width="74%"><input type="text" name="E-mail para cobrança" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Telefone:</strong></td>
	<td width="74%"><input type="text" name="Telefone para cobrança" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>Contato:</strong></td>
	<td width="74%"><input type="text" name="Contato Para Cobrança" value="" size="55"></td>
</tr>
<tr>
	<td width="26%" class="" valign="top"><strong>E-mail:</strong></td>
	<td width="74%"><input type="text" name="E-mail" value="" size="55"></td>
</tr>

<tr>
	<td colspan="2" align="center">
	<input type="submit" name="submit" value="Enviar formulario">	</td>
</tr>
</table>
</form>
</fieldset>
</body
></html>
<%End If%>

e o que aparece no email que recebo é isso:

Razão Social: , 
Tipo para cobrança: 
Pais para cobrança: 
Fantasia: , 
Tipo: 
Cidade: 
Estado: 
Telefone: 
Fax: 
Pais: 
Telefone para cobrança: 
E-mail: 
Complemento: 
Número para cobrança: 
Complemento para cobrança: 
Contato Para Cobrança: 
Contato: 
Número: 
E-mail para cobrança: 
submit: Enviar formulario
CNPJ: 
CEP: 
Estado para cobrança: 
Inscr. Estadual: 
Cidade Para cobrança: 
Endereço: 
Endereço para cobrança: 
CEP para cobrança: 


Alguem me da uma luz.. obrigado..

Script Para Atualizar Ip No Servidor?

22/05/2005, 13:44

Ola amigos, estou com uma duvida, existe alguma maneira de atualizar meu ip dinamicamente em um arquivo no meu servidor de hospedagem?

tipo eu tenho internet em casa, pppoe dinamica, o ip muda a cada conexão. ou de tempos em tempos..

gostaria q acontecesse o seguinte.. eu deixasse um script no meu micro e de tempos em tempos, suponhamos 1 hora ele mandasse meu ip para o arquivo no servidor, dai eu faria uma funcão para inserir esse ip no arquivo que desejo..

aguardo respostas obrigado.!

IPB Skin By Virteq