* 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. */ /** \file htdocs/compta/prelevement/config.php \ingroup prelevement \brief Page configuration des prelevements \version $Id$ */ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); if (!$user->rights->prelevement->bons->lire) accessforbidden(); if ($_GET["action"] == "set" && $user->rights->prelevement->bons->configurer) { for ($i = 1 ; $i < 7 ; $i++) { dolibarr_set_const($db, $_POST["nom$i"], $_POST["value$i"], $type='chaine'); } Header("Location: config.php"); } if ($_GET["action"] == "addnotif" && $user->rights->prelevement->bons->configurer) { $bon = new BonPrelevement($db); $bon->AddNotification($_POST["user"],$_POST["action"]); Header("Location: config.php"); } if ($_GET["action"] == "deletenotif" && $user->rights->prelevement->bons->configurer) { $bon = new BonPrelevement($db); $bon->DeleteNotificationById($_GET["notif"]); Header("Location: config.php"); } /* * * * */ llxHeader('',$langs->trans("WithdrawalsSetup")); print_fiche_titre($langs->trans("WithdrawalsSetup")); print "
"; /* * * */ if ($user->rights->prelevement->bons->configurer) print '
'; print ''; print ''; print ''; if ($user->rights->prelevement->bons->configurer) print ''; print ''; print "\n"; print ''; if ($user->rights->prelevement->bons->configurer) { print ''; } print ''; print ''; if ($user->rights->prelevement->bons->configurer) { print ''; } print ''; print ''; if ($user->rights->prelevement->bons->configurer) { print ''; } print ''; print ''; if ($user->rights->prelevement->bons->configurer) { print ''; } print ''; print ''; if ($user->rights->prelevement->bons->configurer) { print ''; } print ''; print ''; if ($user->rights->prelevement->bons->configurer) { print ''; } print ''; if ($user->rights->prelevement->bons->configurer) print ''; print '
NomValeurValeur Actuelle
Num�ro National Emetteur'; print ''; print ''.PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR.'
Raison sociale'; print ''; print ''.PRELEVEMENT_RAISON_SOCIALE.'
Code Banque'; print ''; print ''.PRELEVEMENT_CODE_BANQUE.'
Code Guichet'; print ''; print ''.PRELEVEMENT_CODE_GUICHET.'
Num�ro compte'; print ''; print ''.PRELEVEMENT_NUMERO_COMPTE.'
Utilisateur responsable des pr�l�vements'; print ''; print ''; if (defined("PRELEVEMENT_USER") && PRELEVEMENT_USER > 0) { $cuser = new User($db, PRELEVEMENT_USER); $cuser->fetch(); print $cuser->fullname; } else { print PRELEVEMENT_USER; } print '
'; if ($user->rights->prelevement->bons->configurer) print '
'; print '
'; /* * Notifications * */ print_titre($langs->trans("Notifications")); if ($user->rights->prelevement->bons->configurer) print '
'; print ''; print ''; print ''; print ''; if ($user->rights->prelevement->bons->configurer) print ''; print "\n"; if ($user->rights->prelevement->bons->configurer) { print ''; print ''; print ''; } $sql = "SELECT u.name, u.firstname, pn.action, pn.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; $sql .= " , ".MAIN_DB_PREFIX."prelevement_notifications as pn"; $sql .= " WHERE u.rowid = pn.fk_user"; $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); $i = 0; $var = True; while ($i < $num) { $obj = $db->fetch_object($resql); $var=!$var; print ""; print ''; print ''; if ($user->rights->prelevement->bons->configurer) { print ''; } else { print ''; } $i++; } $db->free($resql); } print '
NomValeurAction
'; print ''; print ''; print '
'.stripslashes($obj->firstname)." ".stripslashes($obj->name).''.$obj->action.''.img_delete().'
'; if ($user->rights->prelevement->bons->configurer) print '
'; $db->close(); llxFooter('$Date$ - $Revision$'); ?>