[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4676: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3822)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4678: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3822)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4679: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3822)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4680: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3822)
GULIX - Grupo de Usuarios GNU/Linux de la IX región
Fecha actual Dom Ago 09, 2020 11:07 am

Todos los horarios son UTC - 3 horas




Nuevo tema Responder al tema  [ 3 mensajes ] 
Autor Mensaje
NotaPublicado: Lun Mar 03, 2008 10:30 am 
Desconectado
usuario
usuario

Registrado: Mié Sep 27, 2006 16:28 pm
Mensajes: 21
Hola cabros haber quien me puede dar una mano con php.

Lo que pasa es que tengo ke ingresar licencias medicas por un formulario en php, ingreso la fecha de inicio de la licencia y los dias de duracion, lo que quiero es que al momento de sacar el foco de los dias me cargue automaticamente la fecha de termino.

Aca coloco la funcion que taba ocupando:


function suma_fechas($fecha,$ndias)


{


if (preg_match("/[0-9]{1,2}\/[0-9]{1,2}\/([0-9][0-9]){1,2}/",$fecha))


list($dia,$mes,$a?o)=split("/", $fecha);


if (preg_match("/[0-9]{1,2}-[0-9]{1,2}-([0-9][0-9]){1,2}/",$fecha))


list($dia,$mes,$a?o)=split("-",$fecha);
$nueva = mktime(0,0,0, $mes,$dia,$a?o) + $ndias * 24 * 60 * 60;
$nuevafecha=date("d-m-Y",$nueva);


return ($nuevafecha);


}


Y aca adjunto una imagen del formulario:



Eso seria todo de antemano muchas gracias.
salu2.


Arriba
 Perfil  
 
 Asunto:
NotaPublicado: Lun Mar 03, 2008 12:45 pm 
Desconectado
maestro gulix
maestro gulix
Avatar de Usuario

Registrado: Mié Sep 27, 2006 16:03 pm
Mensajes: 2081
Ubicación: /home/danilote

_________________


Arriba
 Perfil  
 
 Asunto:
NotaPublicado: Lun Mar 03, 2008 16:11 pm 
Desconectado
usuario
usuario

Registrado: Mié Sep 27, 2006 16:28 pm
Mensajes: 21


Arriba
 Perfil  
 
Mostrar mensajes previos:  Ordenar por  
Nuevo tema Responder al tema  [ 3 mensajes ] 

Todos los horarios son UTC - 3 horas


¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 1 invitado


No puede abrir nuevos temas en este Foro
No puede responder a temas en este Foro
No puede editar sus mensajes en este Foro
No puede borrar sus mensajes en este Foro
No puede enviar adjuntos en este Foro

Buscar:
Saltar a:  
cron
Powered by phpBB® Forum Software © phpBB Group
Traducción al español por Huan Manwë