[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004-2005 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.7 2005/10/22 13:48:47 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/user/group/index.php,v $ 21 */ 22 23 /** 24 \file htdocs/user/group/index.php 25 \brief Page d'accueil de la gestion des groupes 26 \version $Revision: 1.7 $ 27 */ 28 29 require ("./pre.inc.php"); 30 31 $user->getrights(); 32 33 if (! $user->rights->user->user->lire && ! $user->admin) accessforbidden(); 34 35 $langs->load("users"); 36 37 $sall=isset($_GET["sall"])?$_GET["sall"]:$_POST["sall"]; 38 39 $sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"]; 40 $sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"]; 41 $page=isset($_GET["page"])?$_GET["page"]:$_POST["page"]; 42 if ($page < 0) $page = 0; 43 44 $limit = $conf->liste_limit; 45 $offset = $limit * $page ; 46 47 if (! $sortfield) $sortfield="g.nom"; 48 if (! $sortorder) $sortorder="ASC"; 49 50 51 llxHeader(); 52 53 print_titre($langs->trans("ListOfGroups")); 54 55 $sql = "SELECT g.rowid, g.nom, ".$db->pdate("g.datec")." as datec"; 56 $sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g"; 57 $sql .= " WHERE 1=1"; 58 if ($_POST["search_group"]) 59 { 60 $sql .= " AND (g.nom like '%".$_POST["search_group"]."%' OR g.note like '%".$_POST["search_group"]."%')"; 61 } 62 if ($sall) $sql.= " AND (g.nom like '%".$sall."%' OR g.note like '%".$sall."%')"; 63 if ($sortfield) 64 { 65 $sql .= " ORDER BY ".$sortfield." ".$sortorder; 66 } 67 $resql = $db->query($sql); 68 if ($resql) 69 { 70 $num = $db->num_rows($resql); 71 $i = 0; 72 73 print "<br>"; 74 75 $param="search_group=$search_group&sall=$sall"; 76 print "<table class=\"noborder\" width=\"100%\">"; 77 print '<tr class="liste_titre">'; 78 print_liste_field_titre($langs->trans("Group"),"index.php","g.nom",$param,"","",$sortfield); 79 print_liste_field_titre($langs->trans("DateCreation"),"index.php","g.datec",$param,"","",$sortfield); 80 print "</tr>\n"; 81 $var=True; 82 while ($i < $num) 83 { 84 $obj = $db->fetch_object($resql); 85 $var=!$var; 86 87 print "<tr $bc[$var]>"; 88 print '<td><a href="fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowGroup"),"group").' '.$obj->nom.'</a></td>'; 89 print '<td width="100" align="center">'.dolibarr_print_date($obj->datec,"%d %b %Y").'</td>'; 90 print "</tr>\n"; 91 $i++; 92 } 93 print "</table>"; 94 $db->free(); 95 } 96 else 97 { 98 dolibarr_print_error($db); 99 } 100 101 $db->close(); 102 103 llxFooter('$Date: 2005/10/22 13:48:47 $ - $Revision: 1.7 $'); 104 105 ?>
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 |
![]() |