[ 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/ -> index.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: index.php,v 1.10 2005/08/24 08:02:31 rodolphe Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/config/index.php,v $
  20   */
  21  
  22  /**
  23      \file       htdocs/telephonie/config/index.php
  24      \ingroup    telephonie
  25      \brief      Page configuration telephonie
  26      \version    $Revision: 1.10 $
  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    for ($i = 1 ; $i < 3 ; $i++)
  38      {
  39        dolibarr_set_const($db, $_POST["nom$i"], $_POST["value$i"], $type='chaine');
  40      }
  41  
  42    Header("Location: index.php");
  43  }
  44  
  45  /*
  46   *
  47   *
  48   *
  49   */
  50  llxHeader('','Téléphonie - Configuration');
  51  print_titre("Configuration du module de Téléphonie");
  52  
  53  print "<br>";
  54  
  55  /*
  56   *
  57   *
  58   */
  59  print_titre("Emails");
  60  print '<form method="post" action="index.php?action=set">';
  61  print '<table class="noborder" cellpadding="3" cellspacing="0" width="100%">';
  62  print '<tr class="liste_titre">';
  63  print '<td>Nom</td>';
  64  print '<td>Valeur</td><td>&nbsp;</td><td>&nbsp;</td>';
  65  print "</tr>\n";
  66  
  67  
  68  print '<tr class="pair"><td>';
  69  print 'Marge minimale</td><td align="center">';
  70  print '<input type="hidden" name="nom1" value="TELEPHONIE_MARGE_MINI">';
  71  print '<input type="text"   name="value1" value="'.TELEPHONIE_MARGE_MINI.'" size="3" >';
  72  
  73  print '</td><td><input type="submit"></td></tr>';
  74  
  75  print '<tr class="pair"><td>';
  76  print 'Compte de ventilation</td><td align="center">';
  77  print TELEPHONIE_COMPTE_VENTILATION;
  78  print '</td><td>-</td><td>TELEPHONIE_EMAIL_FACTURATION_EMAIL</td></tr>';
  79  
  80  print '<tr class="pair"><td>';
  81  print 'Email facturation FROM</td><td align="center">';
  82  print TELEPHONIE_EMAIL_FACTURATION_EMAIL;
  83  print '</td><td>-</td><td>TELEPHONIE_EMAIL_FACTURATION_EMAIL</td></tr>';
  84  
  85  
  86  print '<tr class="impair"><td>';
  87  print 'Email facturation BCC</td><td align="center">';
  88  print TELEPHONIE_LIGNE_COMMANDE_EMAIL_BCC;
  89  print '</td><td>-</td><td>TELEPHONIE_LIGNE_COMMANDE_EMAIL_BCC</td></tr>';
  90  
  91  
  92  print '<tr class="pair"><td>Module ADSL</td>';
  93  print '<td align="center">';
  94  if (TELEPHONIE_MODULE_ADSL == 1)
  95  {
  96    print 'oui</td><td><a href="index.php?action=set&amp;name=TELEPHONIE_MODULE_ADSL&amp;value=0">Changer</a>';
  97  }
  98  else
  99  {
 100    print 'non</td><td><a href="index.php?action=set&amp;name=TELEPHONIE_MODULE_ADSL&amp;value=1">Changer</a>';
 101  }
 102  print '</td><td>TELEPHONIE_MODULE_ADSL</td></tr>';
 103  
 104  
 105  print '<tr class="pair"><td>Module SIMULATION</td>';
 106  print '<td align="center">';
 107  if (TELEPHONIE_MODULE_SIMULATION == 1)
 108  {
 109    print 'oui</td><td><a href="index.php?action=set&amp;name=TELEPHONIE_MODULE_SIMULATION&amp;value=0">Changer</a>';
 110  }
 111  else
 112  {
 113    print 'non</td><td><a href="index.php?action=set&amp;name=TELEPHONIE_MODULE_SIMULATION&amp;value=1">Changer</a>';
 114  }
 115  print '</td><td>TELEPHONIE_MODULE_SIMULATION</td></tr>';
 116  
 117  
 118  print '<tr class="pair"><td>Module GROUPES</td>';
 119  print '<td align="center">';
 120  if (TELEPHONIE_MODULE_GROUPES == 1)
 121  {
 122    print 'oui</td><td><a href="index.php?action=set&amp;name=TELEPHONIE_MODULE_GROUPES&amp;value=0">Changer</a>';
 123  }
 124  else
 125  {
 126    print 'non</td><td><a href="index.php?action=set&amp;name=TELEPHONIE_MODULE_GROUPES&amp;value=1">Changer</a>';
 127  }
 128  print '</td><td>TELEPHONIE_MODULE_GROUPES</td></tr>';
 129  
 130  /* ***************************************** */
 131  
 132  print '<tr class="pair"><td>Module NUMDATA</td>';
 133  print '<td align="center">';
 134  if (TELEPHONIE_MODULE_NUMDATA == 1)
 135  {
 136    print 'oui</td><td><a href="index.php?action=set&amp;name=TELEPHONIE_MODULE_NUMDATA&amp;value=0">Changer</a>';
 137  }
 138  else
 139  {
 140    print 'non</td><td><a href="index.php?action=set&amp;name=TELEPHONIE_MODULE_NUMDATA&amp;value=1">Changer</a>';
 141  }
 142  print '</td><td>TELEPHONIE_MODULE_NUMDATA</td></tr>';
 143  
 144  /* ***************************************** */
 145  
 146  print '<tr class="pair"><td>Id Groupes des commerciaux</td>';
 147  print '<td align="center">';
 148  
 149  print TELEPHONIE_GROUPE_COMMERCIAUX_ID.'</td><td>-';
 150  print '</td><td>TELEPHONIE_GROUPE_COMMERCIAUX_ID</td></tr>';
 151  
 152  /* ***************************************** */
 153  
 154  $form = new Form($db);
 155  print '<tr class="pair"><td>Fournisseur par défaut</td><td>';
 156  $ff = array();
 157  $sql = "SELECT rowid, nom FROM ".MAIN_DB_PREFIX."telephonie_fournisseur WHERE commande_active = 1 ORDER BY nom ";
 158  $resql = $db->query($sql);
 159  if ($resql)
 160  {
 161    while ($row = $db->fetch_row($resql))
 162      {
 163        $ff[$row[0]] = $row[1];
 164      }
 165    $db->free($resql);    
 166  }
 167  $form->select_array("value2",$ff,TELEPHONIE_FOURNISSEUR_DEFAUT_ID);
 168  
 169  print $ff[TELEPHONIE_FOURNISSEUR_DEFAUT_ID].'</td><td>-';
 170  print '</td><td>TELEPHONIE_FOURNISSEUR_DEFAUT_ID</td></tr>';
 171  print '<input type="hidden" name="nom2" value="TELEPHONIE_FOURNISSEUR_DEFAUT_ID">';
 172  
 173  
 174  
 175  print '</table>';
 176  print '</form>';
 177  
 178  $db->close();
 179  
 180  llxFooter();
 181  ?>


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