PEEL Shopping
Open source ecommerce : PEEL Shopping
ajouter.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: ajouter.php 46935 2015-09-18 08:49:48Z gboussin $
14 //
15 
16 include("../../configuration.inc.php");
17 
18 if (!check_if_module_active('pensebete')) {
19  // This module is not activated => we redirect to the homepage
20  redirect_and_die(get_url('/'));
21 }
22 
23 if (!est_identifie()) {
24  // User not logged in ==> we redirect to login page.
25  $_SESSION['session_redirect_after_login'] = get_current_url(true);
26  redirect_and_die(get_url('membre'));
27 }
28 
29 define('IN_PENSE_BETE', true);
30 
31 include($GLOBALS['repertoire_modele'] . "/haut.php");
32 switch (vb($_GET['mode'])) {
33  case "ajout" :
34  if (!empty($_GET['adsid'])) {
35  $item_id = intval($_GET['adsid']);
36  $type = 'annonce';
37  } elseif (!empty($_GET['prodid'])) {
38  $item_id = intval($_GET['prodid']);
39  $type = 'produit';
40  }
41  echo insere_pense(vn($item_id), $type);
42  break;
43 }
44 include($GLOBALS['repertoire_modele'] . "/bas.php");
45 
get_current_url($with_get=true, $get_short_url=false, $take_away_get_args_array=null)
get_current_url()
Definition: fonctions.php:1743
redirect_and_die($url, $permanent_redirection=false, $avoid_loop=false)
Redirige vers l'URL demandée et arrête le programme.
Definition: fonctions.php:1551
if(!defined('IN_PEEL')) est_identifie()
Retourne true si l'utilisateur est identifié
Definition: user.php:23
vb(&$var, $default=null)
Variable blanche if $var n'est pas défini, retourne $default, sinon retourne $var.
Definition: format.php:97
if(strlen($date2)== '10') if($type== 'users-by-age'&&a_priv('admin_users', true)) elseif($type== 'forums-count'&&a_priv('admin_content', true)) elseif($type== 'forums-categories'&&a_priv('admin_content', true)) elseif($type== 'users-count'&&a_priv('admin_users', true)) elseif($type== 'product-categories'&&a_priv('admin_products', true)) elseif($type== 'users-by-sex'&&a_priv('admin_users', true)) elseif($type== 'users-by-country'&&a_priv('admin_users', true)) elseif($type== 'sales'&&a_priv('admin_sales', true))
Definition: chart-data.php:160
$GLOBALS['page_columns_count']
insere_pense($item_id=null, $type=null)
Definition: fonctions.php:35
vn(&$var, $default=0)
Variable nulle if $var n'est pas défini, retourne $default, sinon retourne $var.
Definition: format.php:110
check_if_module_active($module_name, $specific_file_name=null)
Renvoie si un module est présent et activé ou non - Peut être appelé avant ou après le chargement d'u...
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:33 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.