* Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * * 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. */ /** * \file htdocs/admin/confexped.php * \ingroup produit * \brief Page to setup sending module * \version $Id$ */ require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); $langs->load("admin"); $langs->load("sendings"); $langs->load("deliveries"); if (!$user->admin) accessforbidden(); if ($_GET["action"] == 'activate_sending') { dolibarr_set_const($db, "MAIN_SUBMODULE_EXPEDITION", "1",'chaine',0,'',$conf->entity); Header("Location: confexped.php"); exit; } else if ($_GET["action"] == 'disable_sending') { dolibarr_del_const($db, "MAIN_SUBMODULE_EXPEDITION",$conf->entity); Header("Location: confexped.php"); exit; } else if ($_GET["action"] == 'activate_delivery') { dolibarr_set_const($db, "MAIN_SUBMODULE_LIVRAISON", "1",'chaine',0,'',$conf->entity); Header("Location: confexped.php"); exit; } else if ($_GET["action"] == 'disable_delivery') { dolibarr_del_const($db, "MAIN_SUBMODULE_LIVRAISON",$conf->entity); Header("Location: confexped.php"); exit; } /* * Affiche page */ $dir = DOL_DOCUMENT_ROOT."/includes/modules/expedition/"; $html=new Form($db); llxHeader("",""); $linkback=''.$langs->trans("BackToModuleList").''; print_fiche_titre($langs->trans("SendingsSetup"),$linkback,'setup'); print '
'; $h = 0; $head[$h][0] = DOL_URL_ROOT."/admin/confexped.php"; $head[$h][1] = $langs->trans("Setup"); $hselected=$h; $h++; if ($conf->global->MAIN_SUBMODULE_EXPEDITION) { $head[$h][0] = DOL_URL_ROOT."/admin/expedition.php"; $head[$h][1] = $langs->trans("Sending"); $h++; } if ($conf->global->MAIN_SUBMODULE_LIVRAISON) { $head[$h][0] = DOL_URL_ROOT."/admin/livraison.php"; $head[$h][1] = $langs->trans("Receivings"); $h++; } dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); /* * Formulaire parametres divers */ $var=true; print ''; print ''; print ''; print ''; print ''; print ''."\n"; // expedition activation/desactivation $var=!$var; print ""; print ''; print ''; print '"; print ''; // Bon de livraison activation/desactivation $var=!$var; print ''; print ''; print ''; print '"; print ''; print '
'.$langs->trans("Feature").' '.$langs->trans("Status").'
'.$langs->trans("SendingsAbility").''; print ''; if($conf->global->MAIN_SUBMODULE_EXPEDITION == 0) { print ''.img_picto($langs->trans("Disabled"),'off').''; } else if($conf->global->MAIN_SUBMODULE_EXPEDITION == 1) { print ''.img_picto($langs->trans("Enabled"),'on').''; } print "
'.$langs->trans("DeliveriesOrderAbility").''; print ''; if($conf->global->MAIN_SUBMODULE_LIVRAISON == 0) { print ''.img_picto($langs->trans("Disabled"),'off').''; } else if($conf->global->MAIN_SUBMODULE_LIVRAISON == 1) { print ''.img_picto($langs->trans("Enabled"),'on').''; } print "
'; print ''; print info_admin($langs->trans("NoNeedForDeliveryReceipts")); $db->close(); llxFooter(); ?>