[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 * 19 * $Id: index.php,v 1.11 2005/07/09 14:34:44 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/boutique/commande/index.php,v $ 21 * 22 */ 23 24 require ("./pre.inc.php"); 25 26 llxHeader(); 27 28 if ($sortfield == "") 29 { 30 $sortfield="date_purchased"; 31 } 32 if ($sortorder == "") 33 { 34 $sortorder="DESC"; 35 } 36 37 if ($page == -1) { $page = 0 ; } 38 $limit = $conf->liste_limit; 39 $offset = $limit * $page ; 40 41 print_barre_liste("Liste des commandes", $page, "commande.php"); 42 43 $sql = "SELECT o.orders_id, customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, last_modified,".$db->pdate("date_purchased")." as date_purchased, orders_status, orders_date_finished, currency, currency_value, t.value"; 44 45 $sql .= " FROM ".OSC_DB_NAME.".orders as o, ".OSC_DB_NAME.".orders_total as t"; 46 $sql .= " WHERE o.orders_id = t.orders_id AND t.class = 'ot_total'"; 47 $sql .= " ORDER BY $sortfield $sortorder "; 48 $sql .= $db->plimit( $limit ,$offset); 49 50 if ( $db->query($sql) ) 51 { 52 $num = $db->num_rows(); 53 $i = 0; 54 print "<table class=\"noborder\" width=\"100%\">"; 55 print "<tr class=\"liste_titre\">"; 56 print "<td>".$langs->trans("Ref")."</td>"; 57 print "<td>".$langs->trans("Date")."</td>"; 58 print_liste_field_titre("Client","commande.php", "customers_name"); 59 print '<td align="right">'.$langs->trans("Total").'</td>'; 60 print "</tr>\n"; 61 $var=True; 62 while ($i < $num) 63 { 64 $objp = $db->fetch_object(); 65 $var=!$var; 66 print "<tr $bc[$var]>"; 67 68 print '<td><a href="fiche.php?id='.$objp->orders_id.'"><img src="/theme/'.$conf->theme.'/img/filenew.png" border="0" alt="Fiche"> '; 69 print $objp->orders_id ."</a></td><td>"; 70 print strftime("%d %B %Y",$objp->date_purchased).'</td>'; 71 print '<td><a href="../client/fiche.php?id='.$objp->customers_id.'">'.$objp->customers_name."</a></TD>\n"; 72 print '<td align="right">'.price($objp->value).'</td>'; 73 print "</tr>\n"; 74 $i++; 75 } 76 print "</table>"; 77 $db->free(); 78 } 79 else 80 { 81 dolibarr_print_error($db); 82 } 83 84 $db->close(); 85 86 llxFooter("<em>Dernière modification $Date: 2005/07/09 14:34:44 $ révision $Revision: 1.11 $</em>"); 87 ?>
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 |
![]() |