[ 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/config/ -> compta.php (source)

   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: compta.php,v 1.2 2005/04/06 12:27:39 rodolphe Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/config/compta.php,v $
  20   */
  21  
  22  /**
  23      \file       htdocs/telephonie/config/index.php
  24      \ingroup    telephonie
  25      \brief      Page configuration telephonie
  26      \version    $Revision: 1.2 $
  27  */
  28  
  29  require ("./pre.inc.php");
  30  
  31  $langs->load("admin");
  32  
  33  if (!$user->admin) accessforbidden();
  34  
  35  if ($_GET["action"] == "set")
  36  {
  37  
  38    dolibarr_set_const($db, 'TELEPHONIE_COMPTE_VENTILATION', $_POST["cg"], $type='chaine');
  39  
  40  
  41    Header("Location: compta.php");
  42  }
  43  
  44  /*
  45   *
  46   *
  47   *
  48   */
  49  llxHeader('','Téléphonie - Configuration');
  50  print_titre("Configuration du module de Téléphonie");
  51  
  52  print "<br>";
  53  
  54  /*
  55   *
  56   *
  57   */
  58  print_titre("Emails");
  59  print '<form method="post" action="compta.php?action=set">';
  60  print '<table class="noborder" cellpadding="3" cellspacing="0" width="100%">';
  61  print '<tr class="liste_titre">';
  62  print '<td>Nom</td>';
  63  print '<td>Valeur</td><td>&nbsp;</td><td>&nbsp;</td>';
  64  print "</tr>\n";
  65  
  66  print '<tr class="pair"><td>';
  67  print 'Compte de ventilation</td><td>';
  68  print TELEPHONIE_COMPTE_VENTILATION;
  69  print '</td><td>TELEPHONIE_EMAIL_FACTURATION_EMAIL</td></tr>';
  70  
  71  $sql = "SELECT rowid, numero, intitule";
  72  $sql .= " FROM ".MAIN_DB_PREFIX."compta_compte_generaux";
  73  $sql .= " ORDER BY numero ASC";
  74  
  75  $result = $db->query($sql);
  76  if ($result)
  77  {
  78    $num = $db->num_rows($result);
  79    $i = 0; 
  80    
  81    while ($i < $num)
  82      {
  83        $row = $db->fetch_row($result);
  84        $cgs[$row[0]] = '['.$row[0].'] '.$row[1] . ' ' . $row[2];
  85        $i++;
  86      }
  87  }
  88  
  89  $html = new Form($db);
  90  print '<tr><td>Compte</td><td>';
  91  
  92  print $html->select_array("cg",$cgs);
  93  
  94  print '</td><td><input type="submit"></td></tr>';
  95  
  96  print '</table>';
  97  print '</form>';
  98  
  99  $db->close();
 100  
 101  llxFooter();
 102  ?>


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