[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 * 18 * $Id: donateurs_code.php,v 1.12 2005/07/10 15:46:19 eldy Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/public/dons/donateurs_code.php,v $ 20 * 21 */ 22 23 24 $conf = new Conf(); 25 $conf->db->type = $dolibarr_main_db_type; 26 $conf->db->host = $dolibarr_main_db_host; 27 $conf->db->name = $dolibarr_main_db_name; 28 $conf->db->user = $dolibarr_main_db_user; 29 $conf->db->pass = $dolibarr_main_db_pass; 30 31 $db = new DoliDb($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name); 32 33 $sql = "SELECT ".$db->pdate("d.datedon")." as datedon, d.nom, d.prenom, d.amount, d.public, d.societe"; 34 $sql .= " FROM ".MAIN_DB_PREFIX."don as d"; 35 $sql .= " WHERE d.fk_don_projet = 1 AND d.fk_statut in (2, 3) ORDER BY d.datedon DESC"; 36 37 if ( $db->query( $sql) ) 38 { 39 $num = $db->num_rows(); 40 if ($num) 41 { 42 43 print "<TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">"; 44 45 print '<TR>'; 46 print "<td>Prénom Nom / Société</td>"; 47 print "<td>Date</td>"; 48 print "<td align=\"right\">Montant</TD>"; 49 print "</TR>\n"; 50 51 $var=True; 52 $bc[1]='bgcolor="#f5f5f5"'; 53 $bc[0]='bgcolor="#f0f0f0"'; 54 while ($i < $num) 55 { 56 $objp = $db->fetch_object( $i); 57 58 $var=!$var; 59 print "<TR $bc[$var]>"; 60 if ($objp->public) 61 { 62 print "<td>".stripslashes($objp->prenom)." ".stripslashes($objp->nom)." ".stripslashes($objp->societe)."</td>\n"; 63 } 64 else 65 { 66 print "<td>Anonyme Anonyme</td>\n"; 67 } 68 print "<td>".dolibarr_print_date($objp->datedon)."</td>\n"; 69 print '<td align="right">'.number_format($objp->amount,2,'.',' ').' '.$langs->trans("Currency".$conf->monnaie).'</td>'; 70 print "</tr>"; 71 $i++; 72 } 73 print "</table>"; 74 75 } 76 } 77 else 78 { 79 print $db->error(); 80 } 81 82 $db->close(); 83 84 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |