Ver Mensaje Individual
  #2 (permalink)  
Antiguo 07/07/2014, 04:21
mortisdj
 
Fecha de Ingreso: mayo-2014
Ubicación: Valencia
Mensajes: 63
Antigüedad: 10 años
Puntos: 0
Respuesta: Alta manual y envío de email con contraseña.

Continuo el codigo aquí, que no me dejaba ponerlo todo en el anterior...

Código PHP:
    <form method="POST" action="<?php echo $editFormAction?>" name="form1">    
                    <label class="name">
                      <h1>Nombre: </h1>
                      <input id="nombreregistro" name="strNombre"  class="seleccion" type="text" value="<?php echo htmlentities($row_ModificarDatos['strNombre'], ENT_COMPAT'utf-8'); ?>" onClick="javascript:  borrarnombre();"/>
           
                      <div id="errorregistronombre" class="ocultar texto-error">* Campo obligatorio</div>                        
                    </label>
                     <label class="name">
                          <br><br><h1>Apellidos:</h1>
                          <input id="apellidosregistro" name="strApellidos"  class="seleccion" type="text"  value="<?php echo htmlentities($row_ModificarDatos['strApellidos'], ENT_COMPAT'utf-8'); ?>"  onClick="javascript:  borrarapellidos();"/>
                           
                    <div id="errorregistroapellidos" class="ocultar texto-error">* Campo obligatorio</div>
                    </label>
                    <label class="name">
                      <br><br><h1>Especialidad:</h1>
                      <input id="especialidadregistro" name="strEspecialidad"  class="seleccion" type="text" value="<?php echo htmlentities($row_ModificarDatos['strEspecialidad'], ENT_COMPAT'utf-8'); ?>" onClick="javascript:  borrarespecialidad();"/>
                      
                   <div id="errorregistroespecialidad" class="ocultar texto-error">* Campo obligatorio</div>
                    </label>
                    <br><br><h1>Centro:</h1>
                   <select name="intCentro" id="intCentro" class="seleccion">
                       <?php
do {  
?>
                       <option value="<?php echo $row_DatosCentros['intCentro']?><?php if (!(strcmp($row_ModificarDatos['intCentro'], htmlentities($row_DatosCentros['intCentro'], ENT_COMPAT'utf-8')))) {echo "SELECTED";} ?>><?php echo   $row_DatosCentros['provincia']." - "$row_DatosCentros['strLocalidad']." - ".$row_DatosCentros['strNombre']?></option>
                       <?php
} while ($row_DatosCentros mysql_fetch_assoc($DatosCentros));
  
$rows mysql_num_rows($DatosCentros);
  if(
$rows 0) {
      
mysql_data_seek($DatosCentros0);
      
$row_DatosCentros mysql_fetch_assoc($DatosCentros);
  }
?>
                     </select>
                    <label class="email">
                      <br><br><h1>Email:</h1><input id="emailregistro" name="strEmail"  disabled class="seleccion" type="text" value="<?php echo htmlentities($row_ModificarDatos['strEmail'], ENT_COMPAT'utf-8'); ?>" />
                    <div id="errorregistroemail" class="ocultar texto-error">* Debe ser un Email válido</div>
                    <div id="errorregistroemailduplicado" class="ocultar texto-error">* Esta dirección de correo ya está siendo usada por un usuario</div>
                    </label>
                    <label class="phone">
                        <br><br><h1>Teléfono:</h1><input id="telefonoregistro" name="intTelefono"  class="seleccion" type="text" value="<?php echo htmlentities($row_ModificarDatos['intTelefono'], ENT_COMPAT'utf-8'); ?>" onClick="javascript:  borrartelefono();"  />
                    <div id="errorregistrotelefono" class="ocultar texto-error">* Debe ser un Teléfono válido</div>
                    </label>
                   
                   <label class="name">
                        <br><br>
                        <h1>Contraseña:</h1>
                        <input id="contraseñaregistro" name="strPassword"  class="seleccion" type="password" value="<?php echo htmlentities($row_ModificarDatos['strPassword'], ENT_COMPAT'utf-8'); ?>"  />
                    <div id="errorregistropassword" class="ocultar texto-error">* Debe ser una contraseña          </div>
<p>Contraseña recomendada: <br>
                    FOL14<? 
$str 
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
$cad "";
for(
$i=0;$i<5;$i++) {
$cad .= substr($str,rand(0,62),1);
}
print 
$cad;
?>
    <td align="center" >
    <h1>Alta Regist:</h1><input type="checkbox" id="altaproferegist<?php echo $row_Profesores['intId'?>" name="intAltaProfeRegist" <?php if (!(strcmp($row_Profesores['intAltaProfeRegist'],1))) {echo "checked=\"checked\"";} ?>
     
    
    </td>
                   </p>
          Estado:<br>
     <select class="seleccion" name="intActivo">
      <option value="1" <?php if (!(strcmp(1htmlentities($row_ModificarDatos['intActivo'], ENT_COMPAT'utf-8')))) {echo "SELECTED";} ?>>Activo</option>
     <option value="0" <?php if (!(strcmp(0htmlentities($row_ModificarDatos['intActivo'], ENT_COMPAT'utf-8')))) {echo "SELECTED";} ?>>Inactivo</option>
   </select>                    

                   
                   
                   
                   
                    <label class="message">
                      <br><br><h1>Mensaje:</h1><textarea id="mensajeregistro" class="seleccionarea" rows="5" name="strMensaje" onClick="javascript:  borrarmensaje();" ><?php echo htmlentities($row_ModificarDatos['strMensaje'], ENT_COMPAT'utf-8'); ?></textarea>
<div id="errorregistromensaje" class="ocultar texto-error">* Debe escribir un Mensaje</div>
                    </label>
                    <div>
                        <div class="clear"></div>
                        <div class="btns">
                           
                           <!-- <a id="botonalta" class="btn" href="javascript: document.form1.submit()" onClick="javascript: return validar();">Enviar</a>  -->
                           
                   
                  
                             <input id="botonalta" class="botton" type="submit" value="Aceptar" onClick="javascript: return validar();"><br>
                <div class="btns">
                <a class="btn" href="mensaje-historial.php?recordId=<?php echo $row_ModificarDatos['intId']; ?>&recordNameUser=<?php echo $_GET['recordNameUser']; ?>" data-type="submit">Enviar Mensaje a Cliente</a>
                </div><br><br>

                   
                                           
                       
          </div>
                    </div>
  <input type="hidden" name="MM_update" value="form1">
  <input type="hidden" name="intId" value="<?php echo $row_ModificarDatos['intId']; ?>">
                </form>
                
<!---->  <!---->  <!---->  <!---->  <!---->  <!---->  <!---->  <!---->  <!---->  <!---->  <!---->  
<!---->  <!---->  <!---->  <!---->  <!---->  <!---->  <!---->  <!---->  <!---->  <!---->  <!---->           
     
          </div>
        </div>
    </div>
  </div>
  <!--===================footer=====================-->
  <?php include("includes/footer.php"); ?>
</section>
<!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd -->

</html>
<?php
mysql_free_result
($ModificarDatos);
mysql_free_result($DatosCentros);
?>
<?php 
}else{ header("Location: index.php"); }/*restringir acceso a pagina*/?>
<script type="text/javascript">    
    function validar(){        
        validado = true;    
            
        valor = document.getElementById("nombreregistro").value;        
        if( valor == null || valor.length == 0 || /^\s+$/.test(valor) ) {
            $('#errorregistronombre').show(1000);
              validado = false;
        }
        valor = document.getElementById("apellidosregistro").value;        
        if( valor == null || valor.length == 0 || /^\s+$/.test(valor) ) {
            $('#errorregistroapellidos').show(1000);
              validado = false;
        } 
            
    if (validado==false){return false;}            
    

    
    }
    </script>
    <script type="text/javascript">
function borrarnombre(){
    $('#errorregistronombre').hide(1000);
    }
function borrarapellidos(){
    $('#errorregistroapellidos').hide(1000);
    }
function borrarespecialidad(){
    $('#errorregistroespecialidad').hide(1000);
    }        
function borrarcentro(){
    $('#errorregistrocentro').hide(1000);
    }
function borrarlocalidadcentro(){
    $('#errorregistrolocalidadcentro').hide(1000);
    }
function borrartelefono(){
    $('#errorregistrotelefono').hide(1000);
    }    
function borrarmensaje(){    
    $('#errorregistromensaje').hide(1000);
    }
</script>