[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2004 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: liste.php,v 1.3 2004/10/23 17:35:45 eldy Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/lolix/societe/liste.php,v $ 20 * 21 */ 22 require ("./pre.inc.php"); 23 24 llxHeader("","","Lolix, liste des offres"); 25 26 /* 27 * Sécurité accés client 28 */ 29 if ($user->societe_id > 0) 30 { 31 $action = ''; 32 $socidp = $user->societe_id; 33 } 34 35 if ($page == -1) { $page = 0 ; } 36 37 $offset = $conf->liste_limit * $page ; 38 $pageprev = $page - 1; 39 $pagenext = $page + 1; 40 41 $sql = "SELECT s.nom, s.ville,".$db->pdate("datea") ." as da"; 42 $sql .= " FROM lolixfr.societe as s"; 43 44 45 $sortfield = "s.nom"; 46 $sortorder = "DESC"; 47 48 $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit +1, $offset); 49 50 $result = $db->query($sql); 51 if ($result) 52 { 53 $num = $db->num_rows(); 54 55 56 print_barre_liste("Liste des offres", $page, $PHP_SELF,"",$sortfield,$sortorder,'',$num); 57 58 $i = 0; 59 60 if ($sortorder == "DESC") 61 { 62 $sortorder="ASC"; 63 } 64 else 65 { 66 $sortorder="DESC"; 67 } 68 print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; 69 print '<TR class="liste_titre">'; 70 print "<TD valign=\"center\">"; 71 print_liste_field_titre("Société",$PHP_SELF,"s.nom"); 72 print "</td><td>"; 73 print_liste_field_titre("Ville",$PHP_SELF,"s.ville"); 74 print "</td><td> </td>"; 75 76 print "</tr>\n"; 77 $var=True; 78 79 while ($i < min($num,$conf->liste_limit)) 80 { 81 $obj = $db->fetch_object($result); 82 83 $var=!$var; 84 85 print "<tr $bc[$var]>"; 86 print '<td><a href="fiche.php?id='.$obj->idp.'">'; 87 print img_file(); 88 print " ".$obj->nom.'</td>'; 89 90 91 print "</a> <a href=\"offre.php?id=$obj->idp\">$obj->ref</A></td>\n"; 92 print "<TD>".$obj->ville." </TD>\n"; 93 94 print '<td align="center">'.strftime("%d/%m/%Y",$obj->da)."</td>\n"; 95 96 print "</TR>\n"; 97 $i++; 98 } 99 print "</TABLE>"; 100 $db->free(); 101 } 102 else 103 { 104 print $db->error() . ' ' . $sql; 105 } 106 107 $db->close(); 108 109 llxFooter("<em>Dernière modification $Date: 2004/10/23 17:35:45 $ révision $Revision: 1.3 $</em>"); 110 ?>
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 |
![]() |