Tema: Hacer if
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/10/2009, 12:26
Avatar de eits
eits
 
Fecha de Ingreso: junio-2005
Ubicación: valladolid, yucatán
Mensajes: 1.655
Antigüedad: 18 años, 10 meses
Puntos: 88
Respuesta: Hacer if

espero que esto te pueda servir
Código PHP:
function dateadd($date$yy=0){
    
$date_r getdate(strtotime($date));
    
$date_result date('d-m-Y'mktime(0,0,0,($date_r['mon']),($date_r['mday']),($date_r['year']+$yy)));
    return 
$date_result;
}
$hoy=date('d-m-Y');
if(!empty(
$columna['NUMCLIENTE'])){
    echo 
'<td><img src="verde.gif" alt="ACTIVADO" border="0">';
    
//************* o j o *****************
    //asegurate de que "$fecha_actualizada" tenga el formato 'd-m-Y'
    
if(strtotime(dateadd($fecha_actualizada,1)) > strtotime($hoy)){
        echo 
"<td><img src='caducado.gif' alt='CADUCADO' border='0'>";
    }
}else{
    echo 
'<td><img src="rojo.gif" alt="SIN ACTIVAR" border="0">';

saludos.
__________________
El amor es la locura mas lucida que tiene el hombre.- Andres Henestrosa
la tristeza no existe, solo es... la ausencia de la felicidad.