This commit is contained in:
Laurent Destailleur 2009-01-15 01:14:03 +00:00
parent b02d8add63
commit 4ee0959a72
2 changed files with 19 additions and 19 deletions

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -207,7 +207,7 @@ $formfile = new FormFile($db);
if ($_GET["action"] == 'create') if ($_GET["action"] == 'create')
{ {
print_titre($langs->trans("AddDonation")); print_fiche_titre($langs->trans("AddDonation"));
print '<form name="add" action="fiche.php" method="post">'; print '<form name="add" action="fiche.php" method="post">';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
@ -383,7 +383,7 @@ if ($_GET["rowid"] && $_GET["action"] != 'edit')
print $don->getNomUrl(); print $don->getNomUrl();
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
// Date // Date
print "<tr><td>".$langs->trans("Date")."</td><td>"; print "<tr><td>".$langs->trans("Date")."</td><td>";
print dolibarr_print_date($don->date,"day"); print dolibarr_print_date($don->date,"day");
@ -426,8 +426,8 @@ if ($_GET["rowid"] && $_GET["action"] != 'edit')
// \TODO Gérer action émettre paiement // \TODO Gérer action émettre paiement
$resteapayer = 0; $resteapayer = 0;
/** /**
* Barre d'actions * Barre d'actions
*/ */

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -15,28 +15,28 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*
*/ */
/** /**
\file htdocs/compta/dons/stats.php \file htdocs/compta/dons/stats.php
\ingroup don \ingroup don
\brief Page des statistiques de dons \brief Page des statistiques de dons
\version $Revision$ \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
$langs->load("donations"); $langs->load("donations");
/*
* View
*/
llxHeader(); llxHeader();
print_titre($langs->trans("Statistics")); print_fiche_titre($langs->trans("Statistics"));
print '<br>';
$sql = "SELECT d.amount"; $sql = "SELECT d.amount";
@ -44,10 +44,10 @@ $sql .= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."don_projet
$sql .= " ON p.rowid = d.fk_don_projet"; $sql .= " ON p.rowid = d.fk_don_projet";
$result = $db->query($sql); $result = $db->query($sql);
if ($result) if ($result)
{ {
$num = $db->num_rows($result); $num = $db->num_rows($result);
$var=true; $var=true;
$i=0; $i=0;
$total=0; $total=0;
@ -57,11 +57,11 @@ if ($result)
$total += $objp->amount; $total += $objp->amount;
$i++; $i++;
} }
print '<table class="noborder" width="50%">'; print '<table class="noborder" width="50%">';
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td align="right">'.$langs->trans("Value").'</td></tr>'; print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td align="right">'.$langs->trans("Value").'</td></tr>';
$var=!$var; $var=!$var;
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
print '<td>'.$langs->trans("DonationsNumber").'</td><td align="right">'.$num.'</td></tr>'; print '<td>'.$langs->trans("DonationsNumber").'</td><td align="right">'.$num.'</td></tr>';
@ -70,7 +70,7 @@ if ($result)
$var=!$var; $var=!$var;
print "<tr $bc[$var]>".'<td>'.$langs->trans("Average").'</td><td align="right">'.price($total / ($num?$num:1)).'</td>'; print "<tr $bc[$var]>".'<td>'.$langs->trans("Average").'</td><td align="right">'.price($total / ($num?$num:1)).'</td>';
print "</tr>"; print "</tr>";
print "</table>"; print "</table>";
} }
else else