| [ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2003-2005 Éric Seigne <eric.seigne@ryxeo.com> 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: fiche.php,v 1.9 2005/07/09 14:34:44 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/boutique/client/fiche.php,v $ 21 * 22 */ 23 require ("./pre.inc.php"); 24 25 llxHeader(); 26 27 if ($action == 'update' && !$cancel) { 28 $client = new Client($db); 29 $client->nom = $nom; 30 $client->update($id, $user); 31 } 32 33 /* 34 * 35 * 36 */ 37 if ($_GET['id']) 38 { 39 40 $client = new Client($db); 41 $result = $client->fetch($_GET['id']); 42 if ( $result ) 43 { 44 print '<div class="titre">Fiche Client : '.$client->name.'</div><br>'; 45 46 print '<table border="1" width="100%" cellspacing="0" cellpadding="4">'; 47 print "<tr>"; 48 print '<td width="20%">Nom</td><td width="80%">'.$client->name.'</td></tr>'; 49 print "</table>"; 50 51 52 /* 53 * Commandes 54 * 55 */ 56 $sql = "SELECT o.orders_id, o.customers_id,".$db->pdate("date_purchased")." as date_purchased, t.value as total"; 57 $sql .= " FROM ".OSC_DB_NAME.".orders as o, ".OSC_DB_NAME.".orders_total as t";; 58 $sql .= " WHERE o.customers_id = " . $client->id; 59 $sql .= " AND o.orders_id = t.orders_id AND t.class = 'ot_total'"; 60 if ( $db->query($sql) ) 61 { 62 $num = $db->num_rows(); 63 $i = 0; 64 print '<table class="noborder" width="50%">'; 65 print "<tr class=\"liste_titre\"><td>Commandes</td>"; 66 print "</tr>\n"; 67 $var=True; 68 while ($i < $num) { 69 $objp = $db->fetch_object(); 70 $var=!$var; 71 print "<tr $bc[$var]>"; 72 73 print '<td><a href="'.DOL_URL_ROOT.'/boutique/commande/fiche.php?id='.$objp->orders_id.'"><img src="/theme/'.$conf->theme.'/img/filenew.png" border="0" alt="Fiche"> '; 74 75 print strftime("%d %B %Y",$objp->date_purchased)."</a>\n"; 76 print $objp->total . "</a></TD>\n"; 77 print "</tr>\n"; 78 $i++; 79 } 80 print "</table>"; 81 $db->free(); 82 } 83 else 84 { 85 print "<p>ERROR 1</p>\n"; 86 dolibarr_print_error($db); 87 } 88 89 } 90 else 91 { 92 print "<p>ERROR 1</p>\n"; 93 dolibarr_print_error($db); 94 } 95 96 97 } 98 else 99 { 100 print "<p>ERROR 1</p>\n"; 101 print "Error"; 102 } 103 104 105 /* ************************************************************************** */ 106 /* */ 107 /* Barre d'action */ 108 /* */ 109 /* ************************************************************************** */ 110 111 // Pas d'action 112 113 114 $db->close(); 115 116 llxFooter("<em>Dernière modification $Date: 2005/07/09 14:34:44 $ révision $Revision: 1.9 $</em>"); 117 ?>
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 |
|