Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

Miscellany
Tuesday, August 7th, 2012 at 3:31:49pm MDT 

  1. SEND.PHP
  2.  
  3. <?php
  4. require_once 'Zend/Mail.php';
  5. require_once 'Zend/Mail/Transport/Smtp.php';
  6.  
  7. $config = array('auth' => 'login',
  8.                 'username' => 'valiweb@vali.com.mx',
  9.                 'password' => 'Hola');
  10.      
  11. $transport = new Zend_Mail_Transport_Smtp('192.168.4.13', $config);
  12.        
  13.  
  14. $nombre = $_POST['nombre'];
  15. if ($_REQUEST['nombre']==""){$_REQUEST['nombre']="Ingrese el Nombre";}
  16. $telefono = $_POST['telefono'];
  17. $email  = $_POST['email'];
  18. $empresa = $_POST['empresa'];
  19. $mensaje = $_POST['mensaje'];
  20. $LF = "\n";
  21. if (empty($_POST['nombre'])) $error .= "<p class=\"error\">No has introducido tu nombre</p>";
  22.     if (empty($_POST['email'])) $error .= "<p class=\"error\">No has introducido tu dirección de correo</p>";
  23.     if (empty($_POST['comentario'])) $error .= "<p class=\"error\">No has escrito nada en el cuerpo del mensaje</p>";
  24.     $text_len = strlen($_POST['comentario']);
  25.     if($text_len > 800) { $error .= "<p class=\"error\">El comentario debe ser de menor a 800, se ingresaron $text_len </p>"; }
  26.     if(isset($_POST['correo']))
  27.       {
  28.         if (!comprobar_email($_POST['email']))
  29.         { $error .= "<p class=\"error\">La dirección de correo es incorrecta</p>"; }
  30.       }// end of email check
  31.     if($error) {
  32.         echo $error;
  33.                 }
  34.                 else {
  35.  
  36. $sugerencia = "Nombre: " . $nombre . $LF . "Empresa: " . $empresa . $LF . "Telefono: " . $telefono . $LF;
  37. $sugerencia .= "Correo: " . $email . $LF . $LF . "Comentario y/o sugerencia:" . $LF . $mensaje;
  38.  
  39.                
  40. $mail = new Zend_Mail();
  41. $mail->setBodyText($sugerencia);
  42. $mail->setFrom('webmaster@vali.com.mx', 'Pagina Web');
  43.  
  44. $mail->addBcc('gerardo.carmona@vali.com.mx', 'Gerardo Carmona');
  45.  
  46. $mail->setSubject('Comentarios de pagina web');
  47. $mail->send($transport);
  48. header("Location: contactos.html");
  49. ?>
  50.  
  51.  
  52.  
  53.  
  54. CONTACTOS.HTML
  55.  
  56.  
  57. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  58. <html xmlns="http://www.w3.org/1999/xhtml">
  59. <head>
  60. <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
  61. <meta name="description" content=""/>
  62. <meta name="keywords" content=""/>
  63. <meta name="author" content=""/>
  64. <META http-equiv=Content-Type content="text/html; charset=windows-1252">
  65. <link rel="stylesheet" type="text/css" href="style1.css" media="screen"/>
  66. <link rel="canonical" href="" />
  67. <META content="MSHTML 6.00.2900.3268" name="GENERATOR">
  68. </HEAD>
  69. <title>.:Vali:. Alimentando tu esfuerzo, Fortaleciendo tu Futuro.</title> </head>
  70. </head>
  71. <body >
  72. <div id="wrapper">
  73. <div id="container">
  74. <div class="title">
  75.  <div align="right"><img src="img/inicio.png" alt="" /> <a href="principal.html" >Inicio</a> <img src="img/serv.gif" alt="" /> <a href="servicios.html" >Servicios</a> <img src="img/icomail.gif" alt="" /> <a href="contactos.html" >Contactenos</a></div>
  76.   <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="745" height="120">
  77.     <param name="movie" value="Title.swf" />
  78.     <param name="quality" value="high" />
  79.     <embed src="Title.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="745" height="120" ></embed>
  80.   </object>
  81. </div>
  82. <!--cierra div title -->
  83.  
  84. <div class="header">
  85. <table width="703" height="309" border="0" align="center" cellpadding="0" cellspacing="0">
  86.   <tr>
  87.     <td width="200" valign="top">
  88.           <img src="img/22.png" /><img src="img/10.png" /><br/><img src="img/pic_2.gif" />
  89.                   </td>
  90.                 <td width="7"></td>
  91.     <td width="343"><br/>
  92.              <form id="Contacto" name="Contacto" method="post" action="send.php" >
  93.                           <fieldset><legend>Buzón de Sugerencias</legend>
  94.                           <table width="309" border="0">
  95.   <tr>
  96.     <td width="100"><label>Nombre: </label> </td>
  97.     <td width="199"> <input name="nombre" type="text" id="nombre"size="25" /></td>
  98.   </tr>
  99.   <tr>
  100.     <td><label>Telefono: </label></td>
  101.     <td> <input name="telefono" type="text" id="telefono"size="25" /></td>
  102.   </tr>
  103.   <tr>
  104.     <td><img src="img/contacto.jpg"/ ><label> Email:</label></td>
  105.     <td> <input name="email" type="text" id="email"size="25" /></td>
  106.   </tr>
  107.   <tr>
  108.     <td><label>Empresa: </label></td>
  109.     <td> <input name="empresa" type="text" id="empresa"size="25" /></td>
  110.   </tr>
  111.   <tr>
  112.     <td><label>Comentario: </label></td>
  113.     <td><textarea name="mensaje" cols="25" rows="4" id="mensaje"style="background-color:#FFCF42"></textarea></td>
  114.   </tr>
  115.   <tr>
  116.     <td></td>
  117.     <td><input type="reset" name="Reset"  class="button" value="Borrar" />
  118.       <input name="Submit" type="submit" class="button" value="Enviar" /></td>
  119.   </tr>
  120. </table>
  121. </fieldset>
  122. </form>     </td>
  123.     <td width="220"  valign="top"><br />
  124.         <div align="center"> <img src="img/email.png" />
  125.                 </div><!--cierra div imagen  --> 
  126.    
  127.           </td>
  128.   </tr>
  129.   </table>
  130. <div id="menuh">
  131.       <ul>
  132.        <li><a href="lechero.html"><img src="img/lechero.gif" width="50" height="45"/><br/>I Lechero I</a></li>
  133.         <li><a href="gallo.html"><img src="img/gallo.gif" width="50" height="45"/><br/>I Gallo I</a></li>
  134.         <li><a href="porcino.html"><img src="img/porcino.gif" width="50" height="45"/><br/>I Porcino I</a></li>
  135.         <li><a href="borrego.html"><img src="img/borrego.gif" width="50" height="45"/><br/>I Borrego I</a></li>
  136.         <li><a href="caballo.html"><img src="img/equino.gif" width="50" height="45" /><br/>I Equino I</a></li>
  137.         <li><a href="toro.html"><img src="img/toro.gif" width="50" height="45"/><br/>I Toro I</a></li>
  138.         <li><a href="pollo.html"><img src="img/pollo.gif" width="50" height="45"/><br/>I Pollo I</a></li>
  139.         <li><a href="bovino.html"><img src="img/bovino.gif" width="50" height="45"/><br/>I Bovino I</a></li>
  140.                 <li><a href="otros.html"><img src="img/otros.gif" width="50" height="45" /><br/>I Otros I</a></li>
  141.       </ul>
  142.     </div><!--cierra div menuproductos -->
  143. <div class="CopyR">
  144.   <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="745" height="20">
  145.     <param name="movie" value="copy.swf" />
  146.     <param name="quality" value="high" />
  147.     <embed src="copy.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="745" height="20" ></embed>
  148.   </object>
  149. </div> <!--cierra div header --> 
  150. </div><!--cierra div copyright  -->
  151. </div><!--cierra div container --> 
  152. </div><!--cierra div wrapper --> 
  153. </body>
  154. </html>

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

worth-right
worth-right
fantasy-obligation