[ 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.2 2005/08/19 14:15:36 rodolphe Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/adsl/index.php,v $ 20 * 21 */ 22 require ("./pre.inc.php"); 23 24 if (!$user->rights->telephonie->adsl->lire) accessforbidden(); 25 26 $page = $_GET["page"]; 27 $sortorder = $_GET["sortorder"]; 28 29 llxHeader('','Telephonie'); 30 31 /* 32 * Sécurité accés client 33 */ 34 if ($user->societe_id > 0) 35 { 36 $action = ''; 37 $socidp = $user->societe_id; 38 } 39 40 /* 41 * Mode Liste 42 * 43 * 44 * 45 */ 46 47 print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; 48 49 print '<tr><td width="30%" valign="top">'; 50 51 print '<form method="GET" action="'.DOL_URL_ROOT.'/telephonie/adsl/liste.php">'; 52 print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; 53 print '<tr class="liste_titre"><td>Recherche ligne</td>'; 54 print "</tr>\n"; 55 print "<tr $bc[1]>"; 56 print '<td>Numéro <input name="search_ligne" size="12"></td></tr>'; 57 print '</table>'; 58 59 print '<br />'; 60 61 62 $sql = "SELECT distinct statut, count(*) as cc"; 63 $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_adsl_ligne as l"; 64 $sql .= " GROUP BY statut"; 65 66 if ($db->query($sql)) 67 { 68 $num = $db->num_rows(); 69 $i = 0; 70 $ligne = new LigneAdsl($db); 71 72 print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; 73 print '<tr class="liste_titre"><td>Liaisons Statuts</td><td valign="center">Nb</td>'; 74 print "<td> </td></tr>\n"; 75 $var=True; 76 77 while ($i < min($num,$conf->liste_limit)) 78 { 79 $obj = $db->fetch_object(); 80 $values[$obj->statut] = $obj->cc; 81 $i++; 82 } 83 84 foreach ($ligne->statuts as $key => $statut) 85 { 86 $var=!$var; 87 print "<tr $bc[$var]>"; 88 print "<td>".$statut."</td>\n"; 89 print "<td>".$values[$key]."</td>\n"; 90 print '<td><a href="'.DOL_URL_ROOT.'/telephonie/adsl/liste.php?statut='.$key.'"><img border="0" src="./statut'.$key.'.png"></a></td>'; 91 print "</tr>\n"; 92 } 93 94 print "</table>"; 95 $db->free(); 96 } 97 else 98 { 99 print $db->error() . ' ' . $sql; 100 } 101 102 print '<br />'; 103 104 /* 105 * 106 * 107 */ 108 109 print '</td><td width="70%" valign="top">'; 110 111 print '</td></tr>'; 112 113 print '</table>'; 114 115 116 117 $db->close(); 118 119 llxFooter("<em>Dernière modification $Date: 2005/08/19 14:15:36 $ révision $Revision: 1.2 $</em>"); 120 ?>
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 |
![]() |