[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?PHP 2 /* Copyright (C) 2004-2005 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: index.php,v 1.3 2005/09/06 14:34:54 rodolphe Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/fournisseur/index.php,v $ 20 * 21 */ 22 require ("./pre.inc.php"); 23 24 $user->getrights('telephonie'); 25 26 if (!$user->rights->telephonie->fournisseur->lire) 27 accessforbidden(); 28 29 $page = $_GET["page"]; 30 $sortorder = $_GET["sortorder"]; 31 32 llxHeader(); 33 34 /* 35 * Sécurité accés client 36 */ 37 if ($user->societe_id > 0) 38 { 39 $action = ''; 40 $socidp = $user->societe_id; 41 } 42 43 if ($sortorder == "") { 44 $sortorder="ASC"; 45 } 46 if ($sortfield == "") { 47 $sortfield="f.nom"; 48 } 49 50 if ($page == -1) { $page = 0 ; } 51 52 $offset = $conf->liste_limit * $page ; 53 $pageprev = $page - 1; 54 $pagenext = $page + 1; 55 56 /* 57 * Mode Liste 58 * 59 * 60 * 61 */ 62 63 $sql = "SELECT f.rowid, f.nom, f.email_commande, f.commande_active"; 64 $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_fournisseur as f"; 65 66 $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset); 67 68 $result = $db->query($sql); 69 if ($result) 70 { 71 $num = $db->num_rows(); 72 $i = 0; 73 74 print_barre_liste("Fournisseurs", $page, "fournisseurs.php", "", $sortfield, $sortorder, '', $num); 75 76 print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; 77 print '<tr class="liste_titre">'; 78 print_liste_field_titre("Société","fournisseurs.php","s.nom"); 79 print '<td>Email de commande</td>'; 80 print '<td align="center">Commande possible</td>'; 81 82 if($user->rights->telephonie->fournisseur->config) 83 { 84 print '<td> </td>'; 85 } 86 87 print "</tr>\n"; 88 $var=True; 89 90 while ($i < min($num,$conf->liste_limit)) 91 { 92 $obj = $db->fetch_object($i); 93 $var=!$var; 94 95 print "<tr $bc[$var]>"; 96 print '<td><a href="fiche.php?id='.$obj->rowid.'">'.stripslashes($obj->nom)."</td>\n"; 97 print "<td>".$obj->email_commande."</td>\n"; 98 print '<td align="center">'.$langs->trans($yesno[$obj->commande_active])."</td>\n"; 99 100 if($user->rights->telephonie->fournisseur->config) 101 { 102 print '<td align="center">'; 103 if ($obj->commande_active) 104 { 105 print '<a href="fiche.php?action=desactive&id='.$obj->rowid.'">Désactive</a>'; 106 } 107 else 108 { 109 print '<a href="fiche.php?action=active&id='.$obj->rowid.'">Active</a>'; 110 } 111 print '</td>'; 112 } 113 114 print "</tr>\n"; 115 $i++; 116 } 117 print "</table>"; 118 $db->free(); 119 } 120 else 121 { 122 print $db->error() . ' ' . $sql; 123 } 124 125 $db->close(); 126 127 llxFooter("<em>Dernière modification $Date: 2005/09/06 14:34:54 $ révision $Revision: 1.3 $</em>"); 128 ?>
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 |
![]() |