[ 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/tarifs/ -> grilles.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: grilles.php,v 1.3 2005/08/30 13:13:12 rodolphe Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/tarifs/grilles.php,v $
  20   *
  21   */
  22  require ("./pre.inc.php");
  23  
  24  llxHeader();
  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  /*
  36   * Mode Liste
  37   *
  38   *
  39   *
  40   */
  41  print '<table width="100%" class="noborder">';
  42  print '<tr><td valign="top" width="50%">';
  43  
  44  $sql = "SELECT d.libelle as tarif_desc, d.rowid";
  45  
  46  $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_tarif_grille as d";
  47  $sql .= ","    . MAIN_DB_PREFIX."telephonie_tarif_grille_rights as r";
  48  $sql .= " WHERE d.rowid = r.fk_grille";
  49  $sql .= " AND r.fk_user =".$user->id;
  50  $sql .= " AND r.pread = 1";
  51  
  52  
  53  $sql .= " ORDER BY d.rowid";
  54  
  55  $result = $db->query($sql);
  56  if ($result)
  57  {
  58    $num = $db->num_rows();
  59    $i = 0;
  60    
  61    print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
  62    print '<tr class="liste_titre">';
  63    print "<td>Grille</td>";
  64    print "</tr>\n";
  65  
  66    $var=True;
  67  
  68    while ($i < $num)
  69      {
  70        $obj = $db->fetch_object($i);    
  71        $var=!$var;
  72  
  73        print "<tr $bc[$var]>";
  74        print '<td><a href="grille.php?id='.$obj->rowid.'">'.$obj->tarif_desc."</a></td>\n";
  75  
  76        print "</tr>\n";
  77        $i++;
  78      }
  79    print "</table>";
  80    $db->free();
  81  }
  82  else 
  83  {
  84    print $db->error() . ' ' . $sql;
  85  }
  86  
  87  print '</td></tr></table>';
  88  
  89  
  90  //print '<br>Tableur des <a href="grille-export-achat.php">tarifs d\'achats comparés</a>';
  91  
  92  $db->close();
  93  
  94  llxFooter("<em>Derni&egrave;re modification $Date: 2005/08/30 13:13:12 $ r&eacute;vision $Revision: 1.3 $</em>");
  95  ?>


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