Skip to main content
añadida la respuesta de ID 563518 como contenido suplementario
Origen Enlace
Alvaro Montoro
  • 49.8k
  • 28
  • 109
  • 190

<!--
Copyright Notice                  
Web Site URL:  http://www.colomred.com                    
Script Owner eMail: [email protected]     
Date: October 10, 2007         
Script Name: Multiples Membresias PHP Script   
Copyright Details: This script is not free.  Do not Remove this Copy Right notice.
-->
<?php
if(!isset($_COOKIE['userId'])) header("Location: login.php");
include("head.php");
$sql_pages=mysql_query("select * from affiliate_pages") or die(mysql_error());
$fet_pages=mysql_fetch_array($sql_pages);

$sender=mysql_query("select * from affiliate_user where userId='".$_COOKIE['userId']."'")or die(mysql_error());
$fetchsender=mysql_fetch_array($sender);


if(isset($_POST['submit']))
{
$to=$admin_email;
$fmail=$_POST['email'];
$fname=$_POST['nombre'];
$subject='contacto mejor futuro';
$msg=$_POST['msg']; 
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$fname." Usuario de $site_name <".$fmail.">\r\n";
mail($to,$subject,$msg,$headers);
}
?>
<script>
 function check()
 {
   if(document.form1.nombre.value=="")
   {
      alert("Favor Ingrese el Asunto.");
      document.form1.subject.focus();
      return false;
   }
 
   if(document.form1.msg.value=="")
   {
      alert("Favor Ingrese el Mensaje.");
      document.form1.subject.focus();
      return false;
   }
   if (document.form1.email.value) {
      var str=document.form1.email.value;
      var indx1=str.indexOf("@");
      var indx2=str.indexOf(".");
      var indx3=str.length;
      if(indx1<=0 ||indx2<=indx1+1 ||indx2==indx1+1 || indx2==indx3-1)
      {
        alert (" El formato del email no es correcto");
      return false;
    }

   };
   return true;
 }
</script>
<script language="JavaScript">
function check() {
    
    var response = grecaptcha.getResponse();
    if(response.length == 0) {
        document.getElementById('g-recaptcha-error').innerHTML = '<span style="color:red;">Debes Verificar el Captcha.</span>';
        return false;
    }
    function verifyCaptcha() {
      document.getElementById('g-recaptcha-error').innerHTML = '';
    }
}
</script>



<script language="Javascript1.2">

  <!-- // load htmlarea
    _editor_url = "htmlarea/";                     // URL to htmlarea files
    var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
    if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
    if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
    if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
    if (win_ie_ver >= 5.5) {
     document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
     document.write(' language="Javascript1.2"></scr' + 'ipt>');  
    } else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
  // -->

</script>
<!--BEGIN header-content.php -->
<div class="container" style="margin:0 auto;">
  <div style="float:left; width:615px; height:50px; margin-top:12px; margin-left: 5px;">
    <!--BEGIN #subscribe-follow-->
    <span class="social-title">Contactenos</span>
    <!--END #subscribe-follow-->
  </div>
</div>
<!--END header-content.php -->
<!--BEGIN .content-top-->
<div class="content-top"></div>
<!--BEGIN .content-->
<div class="content adminsingular single s-category-uncategorized s-tag-html s-tag-wordpress s-author-none windows msie ie6">  
  <!--BEGIN .container-->
  <div class="container" style="margin:0px auto;">
  <!--BEGIN #content-->
  <div id="content">    
    <!--BEGIN #primary .hfeed-->
  </div>
  </div>
  <div class="container nacked-menu" style="margin:0 auto;padding-bottom:10px;position:relative;z-index:99;min-height:400px;">
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>
      <div align="center">
        <form action="" name="form1" method="post" onSubmit="return check();">
          <div width="16%">
            <strong>Nombre:</strong>
            <input style="-webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px;" name="nombre" type="text" id="nombre" size="52">
          </div> 
          <br>
          <div width="16%">
            <strong>&nbsp;&nbsp;&nbsp;E-mail:</strong>
            <input style="-webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px;" name="email" type="text" id="email" size="52">
          </div>
          <br>
          <div><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mensaje</strong></div> 
          <div> 
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <textarea style="-webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px;" name="msg" cols="50" rows="10" id="msg"></textarea>
            <script language="JavaScript1.2">
            editor_generate('msg');
            </script>
          </div>
           <div class="g-recaptcha" data-sitekey="6LeFG14aAAAAAFGhKDaCTj35lynwo_z8E0wN71FM" data-callback="verifyCaptcha"></div><div id="g-recaptcha-error"></div>
          <br>
          <div>
             &nbsp;&nbsp;&nbsp;
            <input style="-webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px;" name="submit" type="submit" id="submit" value="Enviar">
          </div>
        </form>
      </div>
    </td>
  </tr>
  <tr>
    <td>
      <center>
        <span class="tipsytext" ><?php include("foot.php"); ?></span>

<!--
Copyright Notice                  
Web Site URL:  http://www.colomred.com                    
Script Owner eMail: [email protected]     
Date: October 10, 2007         
Script Name: Multiples Membresias PHP Script   
Copyright Details: This script is not free.  Do not Remove this Copy Right notice.
-->
<?php
if(!isset($_COOKIE['userId'])) header("Location: login.php");
include("head.php");
$sql_pages=mysql_query("select * from affiliate_pages") or die(mysql_error());
$fet_pages=mysql_fetch_array($sql_pages);

$sender=mysql_query("select * from affiliate_user where userId='".$_COOKIE['userId']."'")or die(mysql_error());
$fetchsender=mysql_fetch_array($sender);


if(isset($_POST['submit']))
{
$to=$admin_email;
$fmail=$_POST['email'];
$fname=$_POST['nombre'];
$subject='contacto mejor futuro';
$msg=$_POST['msg']; 
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$fname." Usuario de $site_name <".$fmail.">\r\n";
mail($to,$subject,$msg,$headers);
}
?>
<script>
 function check()
 {
   if(document.form1.nombre.value=="")
   {
      alert("Favor Ingrese el Asunto.");
      document.form1.subject.focus();
      return false;
   }
 
   if(document.form1.msg.value=="")
   {
      alert("Favor Ingrese el Mensaje.");
      document.form1.subject.focus();
      return false;
   }
   if (document.form1.email.value) {
      var str=document.form1.email.value;
      var indx1=str.indexOf("@");
      var indx2=str.indexOf(".");
      var indx3=str.length;
      if(indx1<=0 ||indx2<=indx1+1 ||indx2==indx1+1 || indx2==indx3-1)
      {
        alert (" El formato del email no es correcto");
      return false;
    }

   };
   return true;
 }
</script>
<script language="JavaScript">
function check() {
    
    var response = grecaptcha.getResponse();
    if(response.length == 0) {
        document.getElementById('g-recaptcha-error').innerHTML = '<span style="color:red;">Debes Verificar el Captcha.</span>';
        return false;
    }
    function verifyCaptcha() {
      document.getElementById('g-recaptcha-error').innerHTML = '';
    }
}
</script>



<script language="Javascript1.2">

  <!-- // load htmlarea
    _editor_url = "htmlarea/";                     // URL to htmlarea files
    var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
    if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
    if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
    if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
    if (win_ie_ver >= 5.5) {
     document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
     document.write(' language="Javascript1.2"></scr' + 'ipt>');  
    } else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
  // -->

</script>
<!--BEGIN header-content.php -->
<div class="container" style="margin:0 auto;">
  <div style="float:left; width:615px; height:50px; margin-top:12px; margin-left: 5px;">
    <!--BEGIN #subscribe-follow-->
    <span class="social-title">Contactenos</span>
    <!--END #subscribe-follow-->
  </div>
</div>
<!--END header-content.php -->
<!--BEGIN .content-top-->
<div class="content-top"></div>
<!--BEGIN .content-->
<div class="content adminsingular single s-category-uncategorized s-tag-html s-tag-wordpress s-author-none windows msie ie6">  
  <!--BEGIN .container-->
  <div class="container" style="margin:0px auto;">
  <!--BEGIN #content-->
  <div id="content">    
    <!--BEGIN #primary .hfeed-->
  </div>
  </div>
  <div class="container nacked-menu" style="margin:0 auto;padding-bottom:10px;position:relative;z-index:99;min-height:400px;">
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>
      <div align="center">
        <form action="" name="form1" method="post" onSubmit="return check();">
          <div width="16%">
            <strong>Nombre:</strong>
            <input style="-webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px;" name="nombre" type="text" id="nombre" size="52">
          </div> 
          <br>
          <div width="16%">
            <strong>&nbsp;&nbsp;&nbsp;E-mail:</strong>
            <input style="-webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px;" name="email" type="text" id="email" size="52">
          </div>
          <br>
          <div><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mensaje</strong></div> 
          <div> 
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <textarea style="-webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px;" name="msg" cols="50" rows="10" id="msg"></textarea>
            <script language="JavaScript1.2">
            editor_generate('msg');
            </script>
          </div>
           <div class="g-recaptcha" data-sitekey="6LeFG14aAAAAAFGhKDaCTj35lynwo_z8E0wN71FM" data-callback="verifyCaptcha"></div><div id="g-recaptcha-error"></div>
          <br>
          <div>
             &nbsp;&nbsp;&nbsp;
            <input style="-webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px;" name="submit" type="submit" id="submit" value="Enviar">
          </div>
        </form>
      </div>
    </td>
  </tr>
  <tr>
    <td>
      <center>
        <span class="tipsytext" ><?php include("foot.php"); ?></span>
etiquetas editadas; título editado
Enlace
padaleiana
  • 3.3k
  • 13
  • 19
  • 27

No me funciona el php de contacto y me sale error  : "No se puede modificar la información del encabezado: encabezados ya enviados"

Origen Enlace
Loading