Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/05/2010, 17:51
panchoasdf
 
Fecha de Ingreso: octubre-2009
Mensajes: 39
Antigüedad: 16 años, 11 meses
Puntos: 0
Problema en Llama funcion

hola! voi al grano!
tengo 2 funciones en una misma hoja php.
el problema que me sale el siguiente error

Fatal error: Call to undefined function SumarFecha() in .......



esta esta hoja

Código PHP:
function SumarFecha($date, $dd=0, $mm=0, $yy=0){
    
$date_r = getdate(strtotime($date));
    
$date_result = date("d-m-Y", mktime(($date_r["hours"]+$hh),($date_r["minutes"]+$mn),($date_r["seconds"]+$ss),($date_r["mon"]+$mm),($date_r["mday"]+$dd),(     $date_r["year"]+$yy)));
    return 
$date_result;
}
  
  
//Fecha de Contrato
  
function ValidarFechaInicioContrato($fco){
    
$fecha = explode("-",$fco);
    
$diac = $fecha[0];
    
$mesc = $fecha[1];
    
$anoc = $fecha[2];    
    if (
checkdate ( $mesc, $diac, $anoc)){
        
$fecha_hoy = date("d-m-Y");
        
$dia_max = 5;
        
$fecha_maxima = SumarFecha($fecha_hoy,$dia_max,0,0); // llamo a f(x) Suma fecha
        
if ( (($fco) > ($fecha_hoy)) &&  (($fco) < ($fecha_maxima)) ){
            return 
true;
        }else{
            return 
false;}
    }else{
        return 
false;}            
    }