* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ * $Source$ */ /** \file htdocs/telephonie/config/index.php \ingroup telephonie \brief Page configuration telephonie \version $Revision$ */ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); $langs->load("admin"); if (!$user->admin) accessforbidden(); if ($_GET["action"] == "set") { for ($i = 1 ; $i < 5 ; $i++) { dolibarr_set_const($db, $_POST["nom$i"], $_POST["value$i"], $type='chaine'); } Header("Location: index.php"); } if ($_GET["action"] == "switch") { dolibarr_set_const($db, $_GET["name"], $_GET["value"], $type='chaine'); Header("Location: index.php"); } /* * * * */ llxHeader('','T�l�phonie - Configuration'); print_titre("Configuration du module de T�l�phonie"); print "
"; /* * * */ print_titre("Emails"); print '
'; print ''; print ''; print ''; print ''; print "\n"; print ''; print ''; print ''; print ''; $form = new Form($db); /* ***************************************** */ print ''; print ''; print ''; /* ***************************************** */ print ''; print ''; print ''; $gg = array(); $gg[0] = "Aucune grille definie"; $sql = "SELECT d.rowid,d.libelle"; $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_tarif_grille as d"; $sql .= " WHERE d.type_tarif='vente'"; $sql .= " ORDER BY d.libelle"; $resql = $db->query($sql); if ($resql) { while ($row = $db->fetch_row($resql)) { $gg[$row[0]] = $row[1]; } $db->free($resql); } print ''; print ''; print ''; print ''; print ''; print ''; print "\n"; print ''; print ''; print ''; print ''; print ''; print ''; /* ***************************************** */ print ''; print ''; print '
NomValeur Constante
'; print 'Marge minimale'; print ''; print '%'; print 'TELEPHONIE_MARGE_MINI
'; print 'Compte de ventilation'; print TELEPHONIE_COMPTE_VENTILATION; print '-TELEPHONIE_COMPTE_VENTILATION
'; print 'Email facturation FROM'; print TELEPHONIE_EMAIL_FACTURATION_EMAIL; print '-TELEPHONIE_EMAIL_FACTURATION_EMAIL
'; print 'Email facturation BCC'; print TELEPHONIE_LIGNE_COMMANDE_EMAIL_BCC; print '-TELEPHONIE_LIGNE_COMMANDE_EMAIL_BCC
Groupes des commerciaux'; $ff = array(); $ff[0] = "Aucun groupe defini"; $sql = "SELECT rowid, nom FROM ".MAIN_DB_PREFIX."usergroup ORDER BY nom ASC;"; $resql = $db->query($sql); if ($resql) { while ($row = $db->fetch_row($resql)) { $ff[$row[0]] = $row[1]; } $db->free($resql); } $form->select_array("value4",$ff,TELEPHONIE_GROUPE_COMMERCIAUX_ID); print ''; print 'TELEPHONIE_GROUPE_COMMERCIAUX_ID
Fournisseur par d�faut'; $ff = array(); $sql = "SELECT rowid, nom FROM ".MAIN_DB_PREFIX."telephonie_fournisseur WHERE commande_active = 1 ORDER BY nom "; $resql = $db->query($sql); if ($resql) { while ($row = $db->fetch_row($resql)) { $ff[$row[0]] = $row[1]; } $db->free($resql); } $form->select_array("value2",$ff,TELEPHONIE_FOURNISSEUR_DEFAUT_ID); print ''; print 'TELEPHONIE_FOURNISSEUR_DEFAUT_ID
Grille vente par d�faut'; $form->select_array("value3",$gg,TELEPHONIE_GRILLE_VENTE_DEFAUT_ID); print 'TELEPHONIE_GRILLE_VENTE_DEFAUT_ID
NomValeur Constante
Module ADSL'; if (TELEPHONIE_MODULE_ADSL == 1) { print 'ouiChanger'; } else { print 'nonChanger'; } print 'TELEPHONIE_MODULE_ADSL
Module SIMULATION'; if (TELEPHONIE_MODULE_SIMULATION == 1) { print 'ouiChanger'; } else { print 'nonChanger'; } print 'TELEPHONIE_MODULE_SIMULATION
Module GROUPES'; if (TELEPHONIE_MODULE_GROUPES == 1) { print 'ouiChanger'; } else { print 'nonChanger'; } print 'TELEPHONIE_MODULE_GROUPES
Module NUMDATA'; if (TELEPHONIE_MODULE_NUMDATA == 1) { print 'ouiChanger'; } else { print 'nonChanger'; } print 'TELEPHONIE_MODULE_NUMDATA
'; print '
'; $db->close(); llxFooter(); ?>