* Copyright (C) 2004 Éric Seigne * Copyright (C) 2005-2006 Laurent Destailleur * * 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/admin/societe.php \ingroup propale \brief Page d'administration/configuration du module Societe \version $Revision$ */ require("./pre.inc.php"); $langs->load("admin"); if (!$user->admin) accessforbidden(); /* * Actions */ if ($_GET["action"] == 'setcodeclient') { if (dolibarr_set_const($db, "SOCIETE_CODECLIENT_ADDON",$_GET["value"])) { Header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { dolibarr_print_error($db); } } if ($_GET["action"] == 'setcodecompta') { if (dolibarr_set_const($db, "SOCIETE_CODECOMPTA_ADDON",$_GET["value"])) { Header("Location: ".$_SERVER["PHP_SELF"]); exit; } else { dolibarr_print_error($db); } } /* * Affichage page configuration module societe * */ $form=new Form($db); llxHeader(); print_fiche_titre($langs->trans("CompanySetup"),'','setup'); print "
"; // Choix du module de gestion des codes clients / fournisseurs print_titre($langs->trans("CompanyCodeChecker")); print "\n"; print "\n"; print ' '; print ' '; print ' '; print ' '; print ' '; print "\n"; clearstatcache(); $dir = "../includes/modules/societe/"; $handle = opendir($dir); if ($handle) { $var = true; while (($file = readdir($handle))!==false) { if (substr($file, 0, 15) == 'mod_codeclient_' && substr($file, -3) == 'php') { $file = substr($file, 0, strlen($file)-4); require_once(DOL_DOCUMENT_ROOT ."/includes/modules/societe/".$file.".php"); $modCodeTiers = new $file; $var = !$var; print "\n \n \n"; print '\n"; if ($conf->global->SOCIETE_CODECLIENT_ADDON == "$file") { print " \n \n"; } else { print ''; print ''; } print ''; } } closedir($handle); } print '
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Example").''.$langs->trans("Activated").' 
".$modCodeTiers->nom.""; print $modCodeTiers->info($langs); print "'.$modCodeTiers->getExample($langs)."\n"; print img_tick(); print "  '.$langs->trans("Activate").'
'; print "
"; // Choix du module de gestion des codes compta print_titre($langs->trans("AccountCodeManager")); print ''; print ''; print ''; print ''; print ''; print ''; print ''; print "\n"; clearstatcache(); $dir = "../includes/modules/societe/"; $handle = opendir($dir); if ($handle) { $var = true; while (($file = readdir($handle))!==false) { if (substr($file, 0, 15) == 'mod_codecompta_' && substr($file, -3) == 'php') { $file = substr($file, 0, strlen($file)-4); require_once(DOL_DOCUMENT_ROOT ."/includes/modules/societe/".$file.".php"); $modCodeCompta = new $file; $var = !$var; print ''; print ''; print '\n"; if ($conf->global->SOCIETE_CODECOMPTA_ADDON == "$file") { print ''; } else { print ''; print ''; } print "\n"; } } closedir($handle); } print "
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Example").''.$langs->trans("Activated").' 
'.$modCodeCompta->nom."\n"; print $modCodeCompta->info($langs); print ''.$modCodeCompta->getExample($langs)."'; print img_tick(); print '  '.$langs->trans("Activate").'
\n"; print '
'; // Autres options /* print_titre($langs->trans("OtherOptions")); $var=true; print ''; print ''; print ''; print ''; print ''; print ''; print "\n"; print ''; print ''; print ''; $var=!$var; print ''; print '\n"; print ''; print ''; print ''; print "\n"; print ''; print "
'.$langs->trans("Parameter").''.$langs->trans("Value").''.$langs->trans("Description").' 
'.$langs->trans("UseXXX")."'; $form->selectyesnonum('constvalue',! $conf->global->XXX); print ''.$langs->trans("XXXDesc").''; print '   '; print '
\n"; */ $db->close(); llxFooter('$Date$ - $Revision$'); ?>