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
|
// C'est un wrapper, donc header vierge
|
||||||
function llxHeader() { print '<html><title>Export agenda cal</title><body>'; }
|
function llxHeaderVierge() { print '<html><title>Export agenda cal</title><body>'; }
|
||||||
function llxFooter() { print '</body></html>'; }
|
function llxFooterVierge() { print '</body></html>'; }
|
||||||
|
|
||||||
|
|
||||||
// Check config
|
// Check config
|
||||||
@ -58,9 +58,9 @@ if (empty($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY))
|
|||||||
{
|
{
|
||||||
$user->getrights();
|
$user->getrights();
|
||||||
|
|
||||||
llxHeader();
|
llxHeaderVierge();
|
||||||
print '<div class="error">Module Agenda was not configured properly.</div>';
|
print '<div class="error">Module Agenda was not configured properly.</div>';
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooterVierge('$Date$ - $Revision$');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,9 +69,9 @@ if (empty($_GET["exportkey"]) || $conf->global->MAIN_AGENDA_XCAL_EXPORTKEY != $_
|
|||||||
{
|
{
|
||||||
$user->getrights();
|
$user->getrights();
|
||||||
|
|
||||||
llxHeader();
|
llxHeaderVierge();
|
||||||
print '<div class="error">Bad value for key.</div>';
|
print '<div class="error">Bad value for key.</div>';
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooterVierge('$Date$ - $Revision$');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,9 +85,9 @@ if (! $filename)
|
|||||||
{
|
{
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
llxHeader();
|
llxHeaderVierge();
|
||||||
print '<div class="error">'.$langs->trans("ErrorWrongValueForParameterX",'format').'</div>';
|
print '<div class="error">'.$langs->trans("ErrorWrongValueForParameterX",'format').'</div>';
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooterVierge('$Date$ - $Revision$');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ if ($format == 'rss')
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
llxHeader();
|
llxHeaderVierge();
|
||||||
print '<div class="error">'.$agenda->error.'</div>';
|
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";
|
print '<body style="margin: 20px;">'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
function llxFooter()
|
function llxFooterVierge()
|
||||||
{
|
{
|
||||||
print "\n";
|
print "\n";
|
||||||
print "</body>\n";
|
print "</body>\n";
|
||||||
@ -280,5 +280,5 @@ if (! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN
|
|||||||
print '</div>'."\n";
|
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) )
|
if ( $db->query( $sql) )
|
||||||
{
|
{
|
||||||
$num = $db->num_rows();
|
$num = $db->num_rows();
|
||||||
|
|
||||||
if ($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)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
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);
|
$objp = $db->fetch_object( $i);
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<TR $bc[$var]>";
|
print "<TR $bc[$var]>";
|
||||||
if ($objp->public)
|
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
|
else
|
||||||
{
|
{
|
||||||
print "<td>Anonyme Anonyme</td>\n";
|
print "<td>Anonyme Anonyme</td>\n";
|
||||||
}
|
}
|
||||||
print "<td>".dol_print_date($objp->datedon)."</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 '<td align="right">'.number_format($objp->amount,2,'.',' ').' '.$langs->trans("Currency".$conf->monnaie).'</td>';
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "Aucun don publique";
|
print "Aucun don publique";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -48,8 +48,8 @@ $db->close();
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Graph thermometer
|
* Graph thermometer
|
||||||
*/
|
*/
|
||||||
print moneyMeter($actualValue, $pendingValue, $intentValue);
|
print moneyMeter($actualValue, $pendingValue, $intentValue);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -56,7 +56,7 @@ function llxHeaderVierge($title, $head = "")
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Function for page HTML footer
|
// Function for page HTML footer
|
||||||
function llxFooter()
|
function llxFooterVierge()
|
||||||
{
|
{
|
||||||
print "</body>\n";
|
print "</body>\n";
|
||||||
print "</html>\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 "<tr><td><FONT COLOR=\"blue\">Nouvel Adherent ajoute. En attente de validation</FONT></td></tr>\n";
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooterVierge('$Date$ - $Revision$');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -286,5 +286,5 @@ print "</form>\n";
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooterVierge('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -106,7 +106,7 @@ if ($rowid > 0)
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooterVierge('$Date$ - $Revision$');
|
||||||
|
|
||||||
|
|
||||||
/* Functions header and footer */
|
/* Functions header and footer */
|
||||||
@ -124,7 +124,7 @@ function llxHeaderVierge($title, $head = "")
|
|||||||
print "<body>\n";
|
print "<body>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
function llxFooter()
|
function llxFooterVierge()
|
||||||
{
|
{
|
||||||
print "</body>\n";
|
print "</body>\n";
|
||||||
print "</html>\n";
|
print "</html>\n";
|
||||||
|
|||||||
@ -51,7 +51,7 @@ function llxHeaderVierge($title, $head = "")
|
|||||||
print "<body>\n";
|
print "<body>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
function llxFooter()
|
function llxFooterVierge()
|
||||||
{
|
{
|
||||||
print "</body>\n";
|
print "</body>\n";
|
||||||
print "</html>\n";
|
print "</html>\n";
|
||||||
@ -142,5 +142,5 @@ else
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooterVierge('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user