[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2003 Éric Seigne <erics@rycks.com> 4 * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 * 20 * $Id: index.php,v 1.10 2005/07/09 14:34:44 eldy Exp $ 21 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/boutique/notification/index.php,v $ 22 * 23 */ 24 25 require ("./pre.inc.php"); 26 27 $langs->load("products"); 28 29 llxHeader(); 30 31 if ($sortfield == "") { 32 $sortfield="lower(c.customers_lastname)"; 33 } 34 if ($sortorder == "") { 35 $sortorder="ASC"; 36 } 37 38 39 if ($page == -1) { $page = 0 ; } 40 $limit = $conf->liste_limit; 41 $offset = $limit * $page ; 42 43 print_barre_liste("Liste des notifications", $page, "index.php"); 44 45 $sql = "SELECT c.customers_id, c.customers_lastname, c.customers_firstname, p.products_name, p.products_id"; 46 $sql .= " FROM ".OSC_DB_NAME.".products_notifications as n,".OSC_DB_NAME.".products_description as p"; 47 $sql .= ",".OSC_DB_NAME.".customers as c"; 48 $sql .= " WHERE n.customers_id = c.customers_id AND p.products_id=n.products_id"; 49 $sql .= " AND p.language_id = ".OSC_LANGUAGE_ID; 50 $sql .= " ORDER BY $sortfield $sortorder "; 51 $sql .= $db->plimit( $limit ,$offset); 52 53 if ( $db->query($sql) ) 54 { 55 $num = $db->num_rows(); 56 $i = 0; 57 print "<table class=\noborder\" width=\"100%\">"; 58 print "<tr class=\"liste_titre\">"; 59 print_liste_field_titre("Client","index.php", "c.customers_lastname"); 60 print '<td>'.$langs->trans("Product").'</td>'; 61 print "</tr>\n"; 62 $var=True; 63 while ($i < $num) 64 { 65 $objp = $db->fetch_object(); 66 $var=!$var; 67 print "<tr $bc[$var]>"; 68 print "<td width='70%'><a href=\"fiche.php?id=$objp->rowid\">$objp->customers_firstname $objp->customers_lastname</a></TD>\n"; 69 print '<td><a href="'.DOL_URL_ROOT.'/boutique/livre/fiche.php?oscid='.$objp->products_id.'">'.$objp->products_name."</a></td>"; 70 print "</tr>\n"; 71 $i++; 72 } 73 print "</table>"; 74 $db->free(); 75 } 76 else 77 { 78 dolibarr_print_error($db); 79 } 80 81 $db->close(); 82 83 llxFooter("<em>Dernière modification $Date: 2005/07/09 14:34:44 $ révision $Revision: 1.10 $</em>"); 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 |
![]() |