[ Index ]
 

Code source de Dolibarr 2.0.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/htdocs/telephonie/distributeurs/ -> index.php (source)

   1  <?PHP
   2  /* Copyright (C) 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.6 2005/09/12 13:51:42 rodolphe Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/distributeurs/index.php,v $
  20   *
  21   */
  22  require ("./pre.inc.php");
  23  
  24  if (!$user->rights->telephonie->lire) accessforbidden();
  25  
  26  llxHeader('','Telephonie - Statistiques - Distributeurs');
  27  
  28  /*
  29   *
  30   *
  31   *
  32   */
  33  
  34  $h = 0;
  35  
  36  $head[$h][0] = DOL_URL_ROOT.'/telephonie/distributeurs/index.php';
  37  $head[$h][1] = "Liste";
  38  $hselected = $h;
  39  $h++;
  40  
  41  dolibarr_fiche_head($head, $hselected, "Distributeurs");
  42  
  43  print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
  44  
  45  print '<tr><td width="50%" valign="top">';
  46  
  47  print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
  48  print '<tr class="liste_titre">';
  49  print '<td>Distributeur</td>';
  50  
  51  $sql = "SELECT d.nom, d.rowid, d.avance_pourcent, d.rem_pour_prev, d.rem_pour_autr, d.avance_duree";
  52  
  53  $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_distributeur as d";
  54  if ($user->distributeur_id)
  55  {
  56    $sql .= " WHERE d.rowid = ".$user->distributeur_id;
  57  }
  58  $sql .= " ORDER BY d.rowid ASC";
  59  
  60  $resql = $db->query($sql);
  61  
  62  if ($resql)
  63  {
  64    $num = $db->num_rows();
  65    $i = 0;
  66    $total = 0;
  67  
  68    while ($i < $num)
  69      {
  70        $row = $db->fetch_row($i);    
  71  
  72        $var=!$var;
  73  
  74        print "<tr $bc[$var]>";
  75  
  76        print '<td><a href="distributeur.php?id='.$row[1].'">'.$row[0].'</a></td>';
  77  
  78        print '</tr>';
  79        $i++;
  80      }
  81    $db->free();
  82  }
  83  else 
  84  {
  85    print $db->error() . ' ' . $sql;
  86  }
  87  print '</table><br />';
  88  
  89  print '</td><td width="50%" valign="top">&nbsp;</td></tr>';
  90  print '</table></div>';
  91  
  92  /* ************************************************************************** */
  93  /*                                                                            */ 
  94  /* Barre d'action                                                             */ 
  95  /*                                                                            */ 
  96  /* ************************************************************************** */
  97  
  98  print "\n<div class=\"tabsAction\">\n";
  99  
 100  if ($_GET["action"] == '' && $user->admin)
 101  {
 102    print "<a class=\"tabAction\" href=\"fiche.php?action=create\">".$langs->trans("Nouveau")."</a>";
 103  }
 104  
 105  print "</div><br>";
 106  
 107  
 108  $db->close();
 109  
 110  llxFooter("<em>Derni&egrave;re modification $Date: 2005/09/12 13:51:42 $ r&eacute;vision $Revision: 1.6 $</em>");
 111  ?>


Généré le : Mon Nov 26 12:29:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics