From 6b9b50d9dfd0203168d8ccbe2c9bdac053182fd7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 Jan 2010 10:41:29 +0000 Subject: [PATCH] Qual: Uniformize code --- htdocs/public/agenda/agendaexport.php | 20 ++++---- htdocs/public/demo/index.php | 4 +- htdocs/public/donations/donateurs_code.php | 58 +++++++++++----------- htdocs/public/donations/therm.php | 4 +- htdocs/public/members/new.php | 6 +-- htdocs/public/members/public_card.php | 4 +- htdocs/public/members/public_list.php | 4 +- 7 files changed, 50 insertions(+), 50 deletions(-) diff --git a/htdocs/public/agenda/agendaexport.php b/htdocs/public/agenda/agendaexport.php index 8a9731b4bd6..0cce2c9098a 100644 --- a/htdocs/public/agenda/agendaexport.php +++ b/htdocs/public/agenda/agendaexport.php @@ -49,8 +49,8 @@ if (! empty($_GET["logind"])) $filters['logind']=$_GET["logind"]; // C'est un wrapper, donc header vierge -function llxHeader() { print 'Export agenda cal'; } -function llxFooter() { print ''; } +function llxHeaderVierge() { print 'Export agenda cal'; } +function llxFooterVierge() { print ''; } // Check config @@ -58,9 +58,9 @@ if (empty($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY)) { $user->getrights(); - llxHeader(); + llxHeaderVierge(); print '
Module Agenda was not configured properly.
'; - llxFooter('$Date$ - $Revision$'); + llxFooterVierge('$Date$ - $Revision$'); exit; } @@ -69,9 +69,9 @@ if (empty($_GET["exportkey"]) || $conf->global->MAIN_AGENDA_XCAL_EXPORTKEY != $_ { $user->getrights(); - llxHeader(); + llxHeaderVierge(); print '
Bad value for key.
'; - llxFooter('$Date$ - $Revision$'); + llxFooterVierge('$Date$ - $Revision$'); exit; } @@ -85,9 +85,9 @@ if (! $filename) { $langs->load("main"); $langs->load("errors"); - llxHeader(); + llxHeaderVierge(); print '
'.$langs->trans("ErrorWrongValueForParameterX",'format').'
'; - llxFooter('$Date$ - $Revision$'); + llxFooterVierge('$Date$ - $Revision$'); exit; } @@ -161,7 +161,7 @@ if ($format == 'rss') } -llxHeader(); +llxHeaderVierge(); print '
'.$agenda->error.'
'; -llxFooter('$Date$ - $Revision$'); +llxFooterVierge('$Date$ - $Revision$'); ?> diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 5794f5e0c8c..f4985827ef6 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -84,7 +84,7 @@ function llxHeaderVierge($title, $head = "") print ''."\n"; } -function llxFooter() +function llxFooterVierge() { print "\n"; print "\n"; @@ -280,5 +280,5 @@ if (! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN print ''."\n"; } -llxFooter('$Date$ - $Revision$'); +llxFooterVierge('$Date$ - $Revision$'); ?> diff --git a/htdocs/public/donations/donateurs_code.php b/htdocs/public/donations/donateurs_code.php index 61d6b72733d..f8335ccf4e0 100644 --- a/htdocs/public/donations/donateurs_code.php +++ b/htdocs/public/donations/donateurs_code.php @@ -45,48 +45,48 @@ $sql .= " WHERE d.fk_statut in (2, 3) ORDER BY d.datedon DESC"; if ( $db->query( $sql) ) { - $num = $db->num_rows(); + $num = $db->num_rows(); - if ($num) - { - - print ""; - - print ''; - print ""; - print ""; - print ""; - print "\n"; - - $var=True; - $bc[1]='bgcolor="#f5f5f5"'; - $bc[0]='bgcolor="#f0f0f0"'; - while ($i < $num) + if ($num) { + + print "
".$langs->trans("Name")." / ".$langs->trans("Company")."Date".$langs->trans("Amount")."
"; + + print ''; + print ""; + print ""; + print ""; + print "\n"; + + $var=True; + $bc[1]='bgcolor="#f5f5f5"'; + $bc[0]='bgcolor="#f0f0f0"'; + while ($i < $num) + { $objp = $db->fetch_object( $i); $var=!$var; print ""; if ($objp->public) - { - print "\n"; - } + { + print "\n"; + } else - { - print "\n"; - } + { + print "\n"; + } print "\n"; print ''; print ""; $i++; - } - print "
".$langs->trans("Name")." / ".$langs->trans("Company")."Date".$langs->trans("Amount")."
".stripslashes($objp->prenom)." ".stripslashes($objp->nom)." ".stripslashes($objp->societe)."".stripslashes($objp->prenom)." ".stripslashes($objp->nom)." ".stripslashes($objp->societe)."Anonyme AnonymeAnonyme Anonyme".dol_print_date($objp->datedon)."'.number_format($objp->amount,2,'.',' ').' '.$langs->trans("Currency".$conf->monnaie).'
"; + } + print ""; - } - else - { - print "Aucun don publique"; - } + } + else + { + print "Aucun don publique"; + } } else { diff --git a/htdocs/public/donations/therm.php b/htdocs/public/donations/therm.php index 76589351bd7..4a3657b02dc 100644 --- a/htdocs/public/donations/therm.php +++ b/htdocs/public/donations/therm.php @@ -48,8 +48,8 @@ $db->close(); /* -* Graph thermometer -*/ + * Graph thermometer + */ print moneyMeter($actualValue, $pendingValue, $intentValue); ?> diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 6d8fc1305b0..cb233728e4a 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -56,7 +56,7 @@ function llxHeaderVierge($title, $head = "") } // Function for page HTML footer -function llxFooter() +function llxFooterVierge() { print "\n"; print "\n"; @@ -198,7 +198,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'added') print "Nouvel Adherent ajoute. En attente de validation\n"; print ''; - llxFooter('$Date$ - $Revision$'); + llxFooterVierge('$Date$ - $Revision$'); exit; } } @@ -286,5 +286,5 @@ print "\n"; $db->close(); -llxFooter('$Date$ - $Revision$'); +llxFooterVierge('$Date$ - $Revision$'); ?> diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php index 80f383b1264..3c4d4843499 100644 --- a/htdocs/public/members/public_card.php +++ b/htdocs/public/members/public_card.php @@ -106,7 +106,7 @@ if ($rowid > 0) $db->close(); -llxFooter('$Date$ - $Revision$'); +llxFooterVierge('$Date$ - $Revision$'); /* Functions header and footer */ @@ -124,7 +124,7 @@ function llxHeaderVierge($title, $head = "") print "\n"; } -function llxFooter() +function llxFooterVierge() { print "\n"; print "\n"; diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index 61fd6e365e4..5ea486b9f20 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -51,7 +51,7 @@ function llxHeaderVierge($title, $head = "") print "\n"; } -function llxFooter() +function llxFooterVierge() { print "\n"; print "\n"; @@ -142,5 +142,5 @@ else $db->close(); -llxFooter('$Date$ - $Revision$'); +llxFooterVierge('$Date$ - $Revision$'); ?>