diff --git a/htdocs/admin/boutique.php b/htdocs/admin/boutique.php new file mode 100644 index 00000000000..c8d4c9d8894 --- /dev/null +++ b/htdocs/admin/boutique.php @@ -0,0 +1,124 @@ + + * + * 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$ + */ +require("./pre.inc.php"); + +$db = new Db(); + +llxHeader(); + +$dir = "../includes/modules/facture/"; + +if (!$user->admin) +{ + print "Forbidden"; + llxfooter(); + exit; +} + +// +// TODO mettre cette section dans la base de données +// + +$modules["BOUTIQUE_LIVRE"][0] = "Livres"; +$modules["BOUTIQUE_LIVRE"][1] = "BOUTIQUE_LIVRE"; +$modules["BOUTIQUE_LIVRE"][2] = BOUTIQUE_LIVRE; +$modules["BOUTIQUE_LIVRE"][3] = "Module de gestion des livres"; + +$modules["BOUTIQUE_ALBUM"][0] = "Albums"; +$modules["BOUTIQUE_ALBUM"][1] = "BOUTIQUE_ALBUM"; +$modules["BOUTIQUE_ALBUM"][2] = BOUTIQUE_ALBUM; +$modules["BOUTIQUE_ALBUM"][3] = "Module de gestion des albums"; + + +if ($action == 'set') +{ + $sql = "REPLACE INTO llx_const SET name = '".$value."', value='1', visible = 0"; + + if ($db->query($sql)) + { + $modules[$value][2] = 1; + } +} + +if ($action == 'reset') +{ + $sql = "REPLACE INTO llx_const SET name = '".$value."', value='0', visible = 0"; + + if ($db->query($sql)) + { + $modules[$value][2] = 0; + } +} + +$db->close(); + +print_titre("Boutique"); + +print '
| Nom | '; +print 'Info | '; +print 'Activé | '; +print ''; +print " |
| '; + echo "$titre"; + print " | \n"; + echo "$desc"; + print ' | ';
+
+ if ($const_value == 1)
+ {
+ print ' ';
+ }
+ else
+ {
+ print " ";
+ }
+
+ print ' | '; + + if ($const_value == 1) + { + print 'Désactiver'; + } + else + { + print 'Activer'; + } + + print ' |