From e9b8c7cd110be1c8d5f87b85655313e72e6abd95 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Mar 2006 16:31:41 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20La=20date=20de=20validation=20n'=E9tait?= =?UTF-8?q?=20pas=20renseign=E9e.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/adherents/adherent.class.php | 2 +- htdocs/adherents/liste.php | 106 +++++++++++++++------------- 2 files changed, 57 insertions(+), 51 deletions(-) diff --git a/htdocs/adherents/adherent.class.php b/htdocs/adherents/adherent.class.php index 338a4deea70..2edc01505ab 100644 --- a/htdocs/adherents/adherent.class.php +++ b/htdocs/adherents/adherent.class.php @@ -753,7 +753,7 @@ class Adherent global $user,$langs,$conf; $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET"; - $sql.= " statut=1,"; + $sql.= " statut=1, datevalid = now(),"; $sql.= " fk_user_valid=".$userid; $sql.= " WHERE rowid = $this->id"; diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index 2413fc7b147..531e4dee42d 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -121,65 +121,71 @@ if ($result) $var=True; while ($i < $num) { - if ($_GET["type"] && $i==0) { # Fetch deja fait - } else { - $objp = $db->fetch_object($result); - } + if ($_GET["type"] && $i==0) + { + # Fetch deja fait + } else { + $objp = $db->fetch_object($result); + } - $adh=new Adherent($db); + $adh=new Adherent($db); - $var=!$var; - print ""; - if ($objp->societe != ''){ - print "rowid\">".img_object($langs->trans("ShowAdherent"),"user").' '.stripslashes($objp->prenom)." ".stripslashes($objp->nom)." / ".stripslashes($objp->societe)."\n"; - }else{ - print "rowid\">".img_object($langs->trans("ShowAdherent"),"user").' '.stripslashes($objp->prenom)." ".stripslashes($objp->nom)."\n"; - } - print ""; - if ($objp->cotisation == 'yes') + $var=!$var; + print ""; + if ($objp->societe != '') + { + print "rowid\">".img_object($langs->trans("ShowAdherent"),"user").' '.stripslashes($objp->prenom)." ".stripslashes($objp->nom)." / ".stripslashes($objp->societe)."\n"; + } + else + { + print "rowid\">".img_object($langs->trans("ShowAdherent"),"user").' '.stripslashes($objp->prenom)." ".stripslashes($objp->nom)."\n"; + } + print ""; + if ($objp->cotisation == 'yes') + { + if ($objp->datefin) + { + if ($objp->datefin < time() && $objp->statut != 0) { - if ($objp->datefin) - { - if ($objp->datefin < time()) - { - print dolibarr_print_date($objp->datefin)." - ".$langs->trans("SubscriptionLate")." ".img_warning()."\n"; - } - else - { - print dolibarr_print_date($objp->datefin)."\n"; - } - } - else { - print $langs->trans("SubscriptionNotReceived")." ".img_warning()."\n"; - } + print dolibarr_print_date($objp->datefin)." - ".$langs->trans("SubscriptionLate")." ".img_warning()."\n"; } else { - print " "; + print dolibarr_print_date($objp->datefin)."\n"; } - - print "$objp->email\n"; - print ''.img_object($langs->trans("ShowType"),"group").' '.$objp->type.''; - print "".$adh->getmorphylib($objp->morphy)."\n"; - - // Statut - print ""; - print $adh->LibStatut($objp->statut,2); - print ""; - - print "rowid&action=edit\">".img_edit()."   "; - print "rowid&action=resign\">".img_disable($langs->trans("Resiliate"))."   rowid&action=delete\">".img_delete()."\n"; - print ""; - $i++; } - print "
\n"; - print ""; - - print_barre_liste("", $page, "liste.php", "&statut=$statut&sortorder=$sortorder&sortfield=$sortfield",$sortfield,$sortorder,'',$num); - - print "

\n"; - + else { + print $langs->trans("SubscriptionNotReceived"); + if ($objp->statut != 0) print " ".img_warning(); + print "\n"; + } } + else + { + print " "; + } + + print "$objp->email\n"; + print ''.img_object($langs->trans("ShowType"),"group").' '.$objp->type.''; + print "".$adh->getmorphylib($objp->morphy)."\n"; + + // Statut + print ""; + print $adh->LibStatut($objp->statut,4); + print ""; + + print "rowid&action=edit\">".img_edit()."   "; + print "rowid&action=resign\">".img_disable($langs->trans("Resiliate"))."   rowid&action=delete\">".img_delete()."\n"; + print ""; + $i++; + } + print "
\n"; + print ""; + + print_barre_liste("", $page, "liste.php", "&statut=$statut&sortorder=$sortorder&sortfield=$sortfield",$sortfield,$sortorder,'',$num); + + print "

\n"; +} else { dolibarr_print_error($db);