[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> 4 * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> 5 * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 * 21 * $Id: commande.php,v 1.11 2005/07/14 16:21:19 eldy Exp $ 22 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/admin/commande.php,v $ 23 */ 24 25 /** 26 \file htdocs/admin/commande.php 27 \ingroup commande 28 \brief Page d'administration-configuration du module Commande 29 \version $Revision: 1.11 $ 30 */ 31 32 require ("./pre.inc.php"); 33 34 $langs->load("admin"); 35 $langs->load("orders"); 36 37 llxHeader(); 38 39 if (!$user->admin) 40 accessforbidden(); 41 42 43 // positionne la variable pour le test d'affichage de l'icone 44 45 $commande_addon_var = COMMANDE_ADDON; 46 $commande_addon_var_pdf = COMMANDE_ADDON_PDF; 47 $commande_rib_number_var = COMMANDE_RIB_NUMBER; 48 49 $commande_addon_var = COMMANDE_ADDON; 50 51 52 /* 53 * Actions 54 */ 55 56 if ($_GET["action"] == 'setmod') 57 { 58 $sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'COMMANDE_ADDON' ;"; 59 $db->query($sql); 60 $sql = ''; 61 $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES 62 ('COMMANDE_ADDON','".$_GET["value"]."',0) ; "; 63 64 if ($db->query($sql)) 65 { 66 // la constante qui a été lue en avant du nouveau set 67 // on passe donc par une variable pour avoir un affichage cohérent 68 $commande_addon_var = $_GET["value"]; 69 } 70 } 71 72 73 $dir = "../includes/modules/commande/"; 74 75 print_titre($langs->trans("OrdersSetup")); 76 77 print "<br>"; 78 79 print_titre($langs->trans("OrdersNumberingModules")); 80 81 print '<table class="noborder" width="100%">'; 82 print '<tr class="liste_titre">'; 83 print '<td>'.$langs->trans("Name").'</td><td>'.$langs->trans("Description").'</td>'; 84 print '<td>'.$langs->trans("Example").'</td>'; 85 print '<td align="center">'.$langs->trans("Activated").'</td>'; 86 print "</tr>\n"; 87 88 clearstatcache(); 89 90 $dir = "../includes/modules/commande/"; 91 $handle = opendir($dir); 92 if ($handle) 93 { 94 $var=true; 95 96 while (($file = readdir($handle))!==false) 97 { 98 if (substr($file, 0, 13) == 'mod_commande_' && substr($file, strlen($file)-3, 3) == 'php') 99 { 100 $file = substr($file, 0, strlen($file)-4); 101 102 require_once(DOL_DOCUMENT_ROOT ."/includes/modules/commande/".$file.".php"); 103 104 $modCommande = new $file; 105 106 $var=!$var; 107 print '<tr '.$bc[$var].'><td>'.$modCommande->nom."</td><td>\n"; 108 print $modCommande->info(); 109 print '</td>'; 110 111 print '<td align="center" nowrap>'; 112 print $modCommande->getExample(); 113 print '</td>'; 114 115 if ($commande_addon_var == "$file") 116 { 117 print '<td align="center">'; 118 print img_tick(); 119 print '</td>'; 120 } 121 else 122 { 123 print '<td align="center"><a href="commande.php?action=setmod&value='.$file.'">'.$langs->trans("Activate").'</a></td>'; 124 } 125 126 print '</tr>'; 127 } 128 } 129 closedir($handle); 130 } 131 132 print '</table>'; 133 134 135 llxFooter('$Date: 2005/07/14 16:21:19 $ - $Revision: 1.11 $'); 136 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |