* Copyright (C) 2004 Éric Seigne * Copyright (C) 2005 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(); $codeclient_addon_var = CODECLIENT_ADDON; if ($_GET["action"] == 'setcodeclient') { if (dolibarr_set_const($db, "CODECLIENT_ADDON",$_GET["value"])) { // la constante qui a été lue en avant du nouveau set // on passe donc par une variable pour avoir un affichage cohérent $codeclient_addon_var = $_GET["value"]; Header("Location: societe.php"); } } $codecompta_addon_var = CODECOMPTA_ADDON; if ($_GET["action"] == 'setcodecompta') { if (dolibarr_set_const($db, "CODECOMPTA_ADDON",$_GET["value"])) { // la constante qui a été lue en avant du nouveau set // on passe donc par une variable pour avoir un affichage cohérent $codecompta_addon_var = $_GET["value"]; Header("Location: societe.php"); } } llxHeader(); /* * * * */ print_titre($langs->trans("CompanySetup")); print "
"; print_titre($langs->trans("CustomerCodeChecker")); print "\n"; print "\n"; 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"); $modCodeClient = new $file; $var = !$var; print "\n \n \n"; if ($codeclient_addon_var == "$file") { print " \n \n"; } else { print ''; print ''; } print ''; } } closedir($handle); } print '
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Activated").' 
".$modCodeClient->nom.""; print $modCodeClient->info(); print "\n"; print img_tick(); print "  '.$langs->trans("Activate").'
'; print "
"; print_titre($langs->trans("AccountCodeManager")); 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 ''; if ($codecompta_addon_var == "$file") { print ''; } else { print ''; print ''; } print "\n"; } } closedir($handle); } print "
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Activated").' 
'.$modCodeCompta->nom."\n"; print $modCodeCompta->info(); print ''; print img_tick(); print '  '.$langs->trans("Activate").'
\n"; $db->close(); llxFooter(); ?>