Ver Mensaje Individual
  #5 (permalink)  
Antiguo 05/08/2011, 18:40
elcapitolio
 
Fecha de Ingreso: mayo-2011
Mensajes: 167
Antigüedad: 13 años
Puntos: 1
Respuesta: Duda con funcion mail()

es valido esto que estoy haciendo??
como meter los if dentro de las variables?

Código PHP:
Ver original
  1. <?php
  2. $mensaje='<div style="height:100%;">
  3. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  4. <tr>
  5. <td><img src="../evolucion/logote.gif" alt="www.elcapitolio.com.mx" width="376" height="112" /></td>
  6. <td align="right" valign="top"><span style="font-family:Courier, monospace; color:#F00; font-weight:900;">No '.add_ceros($cotizacion_no,4).'</span></td>
  7. </tr>
  8. </table>
  9.  
  10. <p align="right">
  11. '.if (isset($_POST['nombre'])) { echo "Ocotlán, Jalisco a ".$fecha=strftime('%d de %B de %Y',strtotime($_POST['fecha']))."<br />"; } .'
  12. </p>
  13. <div align="center">
  14. <h3><strong>COTIZACIÓN</strong></h3>
  15. </div>
  16. <p>
  17. '.if ($_POST['nombre'] == "") {} else { echo $_POST['nombre']."<br />"; } .'
  18. '.if ($_POST['razon_social'] == "") {} else { echo "RAZON SOCIAL: ".$_POST['razon_social']."<br />"; } .'
  19. '.if ($_POST['email'] == "") {} else { echo "EMAIL: ".$_POST['email']."<br />"; } .'
  20. '.if ($_POST['telefono'] == "") {} else { echo "TELEFONO: ".$_POST['telefono']."<br />"; } .'
  21. <br />  
  22. <?php
  23. $result = count($_POST['cantidad'])-1;
  24. $i = 0;
  25. while($i <= $result) {
  26. echo "<strong>$descripcion[$i]</strong><br />";
  27. echo "<em>CANTIDAD:</em>*".$cantidad[$i]."<br />";
  28. echo "<em>PRECIO UNITARIO:</em> ".number_format($precio[$i], 2, ".", ",")."<br />";
  29. $fuck[]=$cantidad[$i]*$precio[$i];
  30.  ++$i; // Esta instrucción hace que el valor de $i se incremente en 1
  31. }
  32. ?>
  33. </p>
  34. <p>
  35. <strong><?php echo number_format($sub, 2, ".", ","); ?> COSTO SIN I.V.A.<br />
  36. <?php echo number_format($iva, 2, ".", ","); ?> 16% I.V.A.<br />
  37. <?php echo number_format($total, 2, ".", ","); ?> COSTO TOTAL INCLUYENDO I.V.A.<br />
  38. </strong><span style="text-transform:uppercase;">(<?php
  39. list($entero, $decimal)=split('[/.-]',number_format($total, 2, ".", ","));
  40. echo ucfirst(strtolower(docenumeros(number_format($total, 2, ".", ",")))) ?> pesos <?php echo $decimal ?>/100 M.N.)</span><br />
  41.    <br />
  42.    CUALQUIER DUDA Y/O COMENTARIO, ESTOY A SUS ÓRDENES...<br />
  43.    <br />
  44.    <br />
  45.    <span class="UNO" style="color:#900">ATENTAMENTE</span><br />
  46.  </p>
  47.  <div style="font-size:10px;">JUAN MANUEL GUTIERREZ TERRAZAS<br />
  48.    DIRECTOR<br />
  49.    <br />
  50.    VISÍTANOS EN<br />
  51.    <strong>www.elcapitolio.com.mx</strong><br />
  52.    MADERO 343
  53.    COL. CENTRO 47800 OCOTLAN, JAL., MX.<br />
  54.    <strong>PHONE*</strong><strong><strong>(392) 922-1210</strong>       CALL FREE*<strong>01800-700-CAPI</strong><br />
  55.    <br />
  56.      SOMOS UNA EMPRESA RESPONSABLE Y TENEMOS UN ALTO COMPROMISO CON LA SOCIEDAD.<br />
  57.    <strong>CON TUS COMENTARIOS PODEMOS MEJORAR NUESTRO SERVICIO, ESCRÍBENOS A:*</strong><span style="color:#900; font-size:12px;">[email protected]</span><br />
  58.      INFORMACIÓN CONFIDENCIAL LEGALMENTE PROTEGIDA / CONFIDENTIAL INFORMATION LEGALLY PRIVILEGED.<br />
  59.  ELCAPITOLIO.COM.MX&reg; ES  MARCA REGISTRADA.</strong></div>
  60. </div>';
  61. ?>

creo q no vdd??