*
* 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$
*/
require("./pre.inc.php");
if (!$user->admin)
accessforbidden();
llxHeader();
$compta_mode = defined("COMPTA_MODE")?COMPTA_MODE:"RECETTES-DEPENSES";
if ($action == 'setcomptamode')
{
$compta_mode = $HTTP_POST_VARS["compta_mode"];
if (! dolibarr_set_const($db, "COMPTA_MODE",$compta_mode)) { print $db->error(); }
}
$form = new Form($db);
$typeconst=array('yesno','texte','chaine');
if ($HTTP_POST_VARS["action"] == 'update' || $HTTP_POST_VARS["action"] == 'add')
{
if (! dolibarr_set_const($db, $HTTP_POST_VARS["constname"],$HTTP_POST_VARS["constvalue"],$typeconst[$HTTP_POST_VARS["consttype"]],0,isset($HTTP_POST_VARS["constnote"])?$HTTP_POST_VARS["constnote"]:''));
{
print $db->error();
}
}
if ($_GET["action"] == 'delete')
{
if (! dolibarr_del_const($db, $_GET["constname"]));
{
print $db->error();
}
}
print_titre("Configuration du module Comptabilité");
print "
";
print '
| Autres option du module comptabilité | Description | '; print ''; print " |