PEEL Shopping
Open source ecommerce : PEEL Shopping
attributs.php
Go to the documentation of this file.
1 <?php
2 // This file should be in UTF8 without BOM - Accents examples: éèê
3 // +----------------------------------------------------------------------+
4 // | Copyright (c) 2004-2015 Advisto SAS, service PEEL - contact@peel.fr |
5 // +----------------------------------------------------------------------+
6 // | This file is part of PEEL Shopping 8.0.0, which is subject to an |
7 // | opensource GPL license: you are allowed to customize the code |
8 // | for your own needs, but must keep your changes under GPL |
9 // | More information: https://www.peel.fr/lire/licence-gpl-70.html |
10 // +----------------------------------------------------------------------+
11 // | Author: Advisto SAS, RCS 479 205 452, France, https://www.peel.fr/ |
12 // +----------------------------------------------------------------------+
13 // $Id: attributs.php 47090 2015-10-01 16:54:52Z gboussin $
14 define('IN_PEEL_ADMIN', true);
15 include("../../../configuration.inc.php");
17 necessite_priv("admin_products");
18 
19 $GLOBALS['DOC_TITLE'] = $GLOBALS["STR_MODULE_ATTRIBUTS_ADMIN_TITLE"];
20 include($GLOBALS['repertoire_modele'] . "/admin_haut.php");
21 
22 $start = intval(vn($_GET['start'])); // Détermine la variable start (début de page)
24 $frm = $_POST;
25 
26 switch (vb($_REQUEST['mode'])) {
27  case "ajout" :
29  break;
30 
31  case "modif" :
33  break;
34 
35  case "suppr" :
38  break;
39 
40  case "supprfile" :
41  supprime_attribut_image(vn($_GET['id']), $_GET['file']);
43  break;
44 
45  case "insere" :
46  $frm['image'] = upload('image', false, 'image', $GLOBALS['site_parameters']['image_max_width'], $GLOBALS['site_parameters']['image_max_height'], null, null, vb($frm['image']));
47  insere_attribut($_GET['attid'], $frm);
48  echo $GLOBALS['tplEngine']->createTemplate('global_success.tpl', array('message' => sprintf($GLOBALS["STR_MODULE_ATTRIBUTS_ADMIN_MSG_OPTION_CREATED_OK"], vb($_POST['descriptif_' . $_SESSION["session_langue"]]))))->fetch();
50  break;
51 
52  case "maj" :
53  $frm['image'] = upload('image', false, 'image', $GLOBALS['site_parameters']['image_max_width'], $GLOBALS['site_parameters']['image_max_height'], null, null, vb($frm['image']));
54  maj_attribut($_GET['attid'], $frm);
55  echo $GLOBALS['tplEngine']->createTemplate('global_success.tpl', array('message' => sprintf($GLOBALS["STR_MODULE_ATTRIBUTS_ADMIN_MSG_OPTION_UPDATED_OK"], vn($_POST['id']))))->fetch();
56  affiche_formulaire_liste_attribut($_REQUEST['id'], $frm);
57  break;
58 
59  case "liste" :
60  default :
62  break;
63 }
64 
65 include($GLOBALS['repertoire_modele'] . "/admin_bas.php");
66 
affiche_formulaire_liste_attribut($id, &$frm)
Affiche un formulaire de attributs vide.
Definition: fonctions.php:467
maj_attribut($id, $frm)
maj_attribut()
Definition: fonctions.php:442
upload($field_name, $rename_file=true, $file_kind=null, $image_max_width=null, $image_max_height=null, $path=null, $new_file_name_without_extension=null, $default_return_value=null)
Fonction d'upload de fichiers.
Definition: fonctions.php:3302
insere_attribut($id, $frm)
insere_attribut()
Definition: fonctions.php:419
affiche_liste_attribut($frm)
affiche_liste_attribut()
Definition: fonctions.php:486
$form_error_object
Definition: attributs.php:23
$start
Definition: attributs.php:22
necessite_priv($priv, $demo_allowed=true, $configuration_modification=false)
Cette fonction vérifie si l'utilisateur a les privilèges de $priv.
Definition: fonctions.php:1575
affiche_formulaire_modif_attribut(&$frm, &$form_error_object)
Charge les infos de la attributs.
Definition: fonctions.php:376
supprime_attribut()
supprime_attribut()
Definition: fonctions.php:396
vb(&$var, $default=null)
Variable blanche if $var n'est pas défini, retourne $default, sinon retourne $var.
Definition: format.php:97
necessite_identification()
Si l'utilisateur n'est pas connecté à un compte, on affiche une page d'identification et arrête le sc...
Definition: fonctions.php:1596
$frm
Definition: attributs.php:24
vn(&$var, $default=0)
Variable nulle if $var n'est pas défini, retourne $default, sinon retourne $var.
Definition: format.php:110
supprime_attribut_image($id, $file)
Supprime le produit spécifié par $id.
Definition: fonctions.php:610
affiche_formulaire_ajout_attribut(&$frm, &$form_error_object)
Fonctions d'attributs.php.
Definition: fonctions.php:355
$GLOBALS['DOC_TITLE']
Definition: attributs.php:19
if(defined('IN_PEEL_ADMIN')||IN_INSTALLATION) $_SESSION['session_langue']

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:25 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.