* * 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"); $langs->load("admin"); if (!$user->admin) accessforbidden(); if ($_GET["action"] == "set") { dolibarr_set_const($db, 'TELEPHONIE_COMPTE_VENTILATION', $_POST["cg"], $type='chaine'); Header("Location: compta.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 ''; $sql = "SELECT rowid, numero, intitule"; $sql .= " FROM ".MAIN_DB_PREFIX."compta_compte_generaux"; $sql .= " ORDER BY numero ASC"; $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); $i = 0; while ($i < $num) { $row = $db->fetch_row($result); $cgs[$row[0]] = '['.$row[0].'] '.$row[1] . ' ' . $row[2]; $i++; } } $html = new Form($db); print ''; print '
NomValeur  
'; print 'Compte de ventilation'; print TELEPHONIE_COMPTE_VENTILATION; print 'TELEPHONIE_EMAIL_FACTURATION_EMAIL
Compte'; print $html->select_array("cg",$cgs); print '
'; print '
'; $db->close(); llxFooter(); ?>