[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> 4 * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 * 20 * $Id: boutique.php,v 1.10 2005/03/06 15:40:24 eldy Exp $ 21 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/admin/boutique.php,v $ 22 */ 23 24 /*! \file htdocs/admin/boutique.php 25 \ingroup boutique 26 \brief Page d'administration/configuration du module Boutique 27 \version $Revision: 1.10 $ 28 */ 29 30 require ("./pre.inc.php"); 31 32 $langs->load("admin"); 33 34 if (!$user->admin) 35 accessforbidden(); 36 37 38 llxHeader(); 39 40 $dir = "../includes/modules/facture/"; 41 42 // 43 // \todo mettre cette section dans la base de données 44 // 45 $modules["BOUTIQUE_LIVRE"][0] = "Livres"; 46 $modules["BOUTIQUE_LIVRE"][1] = "BOUTIQUE_LIVRE"; 47 $modules["BOUTIQUE_LIVRE"][2] = BOUTIQUE_LIVRE; 48 $modules["BOUTIQUE_LIVRE"][3] = "Module de gestion des livres"; 49 50 $modules["BOUTIQUE_ALBUM"][0] = "Albums"; 51 $modules["BOUTIQUE_ALBUM"][1] = "BOUTIQUE_ALBUM"; 52 $modules["BOUTIQUE_ALBUM"][2] = BOUTIQUE_ALBUM; 53 $modules["BOUTIQUE_ALBUM"][3] = "Module de gestion des albums"; 54 55 56 if ($action == 'set') 57 { 58 $sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = '".$value."';"; 59 $db->query($sql); 60 $sql =''; 61 $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('".$value."','1',0) ; "; 62 63 //$sql = "REPLACE INTO ".MAIN_DB_PREFIX."const SET name = '".$value."', value='1', visible = 0"; 64 65 if ($db->query($sql)) 66 { 67 $modules[$value][2] = 1; 68 } 69 } 70 71 if ($action == 'reset') 72 { 73 $sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = '".$value."';"; 74 $db->query($sql); 75 $sql = ''; 76 $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('".$value."','0',0) ; "; 77 //$sql = "REPLACE INTO ".MAIN_DB_PREFIX."const SET name = '".$value."', value='0', visible = 0"; 78 79 if ($db->query($sql)) 80 { 81 $modules[$value][2] = 0; 82 } 83 } 84 85 $db->close(); 86 87 print_titre("Boutique"); 88 89 print '<table border="1" cellpadding="3" cellspacing="0">'; 90 print '<TR class="liste_titre">'; 91 print '<td>Nom</td>'; 92 print '<td>Info</td>'; 93 print '<td align="center">Activé</td>'; 94 print '<td> </td>'; 95 print "</TR>\n"; 96 97 foreach ($modules as $key => $value) 98 { 99 $titre = $modules[$key][0]; 100 $const_name = $modules[$key][1]; 101 $const_value = $modules[$key][2]; 102 $desc = $modules[$key][3]; 103 104 105 print '<tr><td>'; 106 echo "$titre"; 107 print "</td><td>\n"; 108 echo "$desc"; 109 print '</td><td align="center">'; 110 111 if ($const_value == 1) 112 { 113 print img_tick(); 114 } 115 else 116 { 117 print " "; 118 } 119 120 print '</td><td align="center">'; 121 122 if ($const_value == 1) 123 { 124 print '<a href="boutique.php?action=reset&value='.$const_name.'">'.$langs->trans("Disable").'</a>'; 125 } 126 else 127 { 128 print '<a href="boutique.php?action=set&value='.$const_name.'">'.$langs->trans("Activate").'</a>'; 129 } 130 131 print '</td></tr>'; 132 } 133 134 print '</table>'; 135 136 llxFooter(); 137 ?>
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 |
![]() |