Qual: Uniformize code
This commit is contained in:
parent
a3230291a6
commit
6b9b50d9df
@ -49,8 +49,8 @@ if (! empty($_GET["logind"])) $filters['logind']=$_GET["logind"];
|
||||
|
||||
|
||||
// C'est un wrapper, donc header vierge
|
||||
function llxHeader() { print '<html><title>Export agenda cal</title><body>'; }
|
||||
function llxFooter() { print '</body></html>'; }
|
||||
function llxHeaderVierge() { print '<html><title>Export agenda cal</title><body>'; }
|
||||
function llxFooterVierge() { print '</body></html>'; }
|
||||
|
||||
|
||||
// Check config
|
||||
@ -58,9 +58,9 @@ if (empty($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY))
|
||||
{
|
||||
$user->getrights();
|
||||
|
||||
llxHeader();
|
||||
llxHeaderVierge();
|
||||
print '<div class="error">Module Agenda was not configured properly.</div>';
|
||||
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 '<div class="error">Bad value for key.</div>';
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooterVierge('$Date$ - $Revision$');
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -85,9 +85,9 @@ if (! $filename)
|
||||
{
|
||||
$langs->load("main");
|
||||
$langs->load("errors");
|
||||
llxHeader();
|
||||
llxHeaderVierge();
|
||||
print '<div class="error">'.$langs->trans("ErrorWrongValueForParameterX",'format').'</div>';
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooterVierge('$Date$ - $Revision$');
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -161,7 +161,7 @@ if ($format == 'rss')
|
||||
}
|
||||
|
||||
|
||||
llxHeader();
|
||||
llxHeaderVierge();
|
||||
print '<div class="error">'.$agenda->error.'</div>';
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooterVierge('$Date$ - $Revision$');
|
||||
?>
|
||||
|
||||
@ -84,7 +84,7 @@ function llxHeaderVierge($title, $head = "")
|
||||
print '<body style="margin: 20px;">'."\n";
|
||||
}
|
||||
|
||||
function llxFooter()
|
||||
function llxFooterVierge()
|
||||
{
|
||||
print "\n";
|
||||
print "</body>\n";
|
||||
@ -280,5 +280,5 @@ if (! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN
|
||||
print '</div>'."\n";
|
||||
}
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooterVierge('$Date$ - $Revision$');
|
||||
?>
|
||||
|
||||
@ -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 "<TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||
|
||||
print '<TR>';
|
||||
print "<td>".$langs->trans("Name")." / ".$langs->trans("Company")."</td>";
|
||||
print "<td>Date</td>";
|
||||
print "<td align=\"right\">".$langs->trans("Amount")."</TD>";
|
||||
print "</TR>\n";
|
||||
|
||||
$var=True;
|
||||
$bc[1]='bgcolor="#f5f5f5"';
|
||||
$bc[0]='bgcolor="#f0f0f0"';
|
||||
while ($i < $num)
|
||||
if ($num)
|
||||
{
|
||||
|
||||
print "<TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
|
||||
|
||||
print '<TR>';
|
||||
print "<td>".$langs->trans("Name")." / ".$langs->trans("Company")."</td>";
|
||||
print "<td>Date</td>";
|
||||
print "<td align=\"right\">".$langs->trans("Amount")."</TD>";
|
||||
print "</TR>\n";
|
||||
|
||||
$var=True;
|
||||
$bc[1]='bgcolor="#f5f5f5"';
|
||||
$bc[0]='bgcolor="#f0f0f0"';
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object( $i);
|
||||
|
||||
$var=!$var;
|
||||
print "<TR $bc[$var]>";
|
||||
if ($objp->public)
|
||||
{
|
||||
print "<td>".stripslashes($objp->prenom)." ".stripslashes($objp->nom)." ".stripslashes($objp->societe)."</td>\n";
|
||||
}
|
||||
{
|
||||
print "<td>".stripslashes($objp->prenom)." ".stripslashes($objp->nom)." ".stripslashes($objp->societe)."</td>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td>Anonyme Anonyme</td>\n";
|
||||
}
|
||||
{
|
||||
print "<td>Anonyme Anonyme</td>\n";
|
||||
}
|
||||
print "<td>".dol_print_date($objp->datedon)."</td>\n";
|
||||
print '<td align="right">'.number_format($objp->amount,2,'.',' ').' '.$langs->trans("Currency".$conf->monnaie).'</td>';
|
||||
print "</tr>";
|
||||
$i++;
|
||||
}
|
||||
print "</table>";
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Aucun don publique";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print "Aucun don publique";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -48,8 +48,8 @@ $db->close();
|
||||
|
||||
|
||||
/*
|
||||
* Graph thermometer
|
||||
*/
|
||||
* Graph thermometer
|
||||
*/
|
||||
print moneyMeter($actualValue, $pendingValue, $intentValue);
|
||||
|
||||
?>
|
||||
|
||||
@ -56,7 +56,7 @@ function llxHeaderVierge($title, $head = "")
|
||||
}
|
||||
|
||||
// Function for page HTML footer
|
||||
function llxFooter()
|
||||
function llxFooterVierge()
|
||||
{
|
||||
print "</body>\n";
|
||||
print "</html>\n";
|
||||
@ -198,7 +198,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'added')
|
||||
print "<tr><td><FONT COLOR=\"blue\">Nouvel Adherent ajoute. En attente de validation</FONT></td></tr>\n";
|
||||
print '</table>';
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooterVierge('$Date$ - $Revision$');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@ -286,5 +286,5 @@ print "</form>\n";
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooterVierge('$Date$ - $Revision$');
|
||||
?>
|
||||
|
||||
@ -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 "<body>\n";
|
||||
}
|
||||
|
||||
function llxFooter()
|
||||
function llxFooterVierge()
|
||||
{
|
||||
print "</body>\n";
|
||||
print "</html>\n";
|
||||
|
||||
@ -51,7 +51,7 @@ function llxHeaderVierge($title, $head = "")
|
||||
print "<body>\n";
|
||||
}
|
||||
|
||||
function llxFooter()
|
||||
function llxFooterVierge()
|
||||
{
|
||||
print "</body>\n";
|
||||
print "</html>\n";
|
||||
@ -142,5 +142,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
llxFooterVierge('$Date$ - $Revision$');
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user