1
0

debuggage

This commit is contained in:
Daniel Tartavel 2019-12-01 01:41:57 +01:00
parent 9ad10750b0
commit 40e76403f5

View File

@ -64,20 +64,21 @@ while ($user = $doldb->result->fetch_assoc())
write_status( $insert, $user["login"], $user["fk_user_valid"] ); write_status( $insert, $user["login"], $user["fk_user_valid"] );
} }
// vérification si l'utilisateur est à jour de cotisation // vérification si l'utilisateur est à jour de cotisation
echo "datefin =>" . $user['datefin']; if( !empty($datefin) )
$datefin = DateTime::createFromFormat("Y-m-d H:i:s", $user['datefin']);print_r($datefin); {
$interval = new DateInterval('P0000Y02M00D'); $datefin = DateTime::createFromFormat("Y-m-d H:i:s", $user['datefin']);
echo "vérification"; $interval = new DateInterval('P0000Y02M00D');
$datefin->add($interval); $datefin->add($interval);
print_r($datefin); print_r($datefin);
if ( $datefin->getTimestamp() <= time() ) if ( $datefin->getTimestamp() <= time() )
{ {
echo "write_status( $insert, " . $user['login'] . ", 0 )"; echo "write_status( $insert, " . $user['login'] . ", 0 )";
}elseif ( $status == 0 ) }elseif ( $status == 0 )
{ {
// ré active l'utlisateur désactivé à jour de cotisation. // ré active l'utlisateur désactivé à jour de cotisation.
echo "write_status( $insert, " . $user['login'] . ", 1 )"; echo "write_status( $insert, " . $user['login'] . ", 1 )";
}
} }
}else }else
{ {