PEEL Shopping
Open source ecommerce : PEEL Shopping
liste_avis.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: liste_avis.php 46935 2015-09-18 08:49:48Z gboussin $
14 
15 include("../../configuration.inc.php");
16 
17 if (!check_if_module_active('avis')) {
18  // This module is not activated => we redirect to the homepage
19  redirect_and_die(get_url('/'));
20 }
21 
22 define('IN_TOUS_LES_AVIS', true);
23 
24 include($GLOBALS['repertoire_modele'] . "/haut.php");
25 
26 if (isset($_GET['prodid'])) {
27  if (check_if_module_active('avis') && !empty($_GET['prodid']) && is_numeric($_GET['prodid'])) {
28  // On charge les fonctions d'avis
29  echo render_avis_public_list($_GET['prodid'], 'produit', vb($_GET['display_specific_note']));
30  } else {
31  echo $GLOBALS['tplEngine']->createTemplate('modules/avis_liste_notice.tpl', array('msg' => $GLOBALS['STR_MODULE_AVIS_NO_OPINION_FOR_THIS_PRODUCT']))->fetch();
32  }
33 } elseif (isset($_GET['ref'])) {
34  // Avis pour annonces
35  if (check_if_module_active('avis') && !empty($_GET['ref']) && is_numeric($_GET['ref'])) {
36  // On charge les fonctions d'avis
37  echo render_avis_public_list($_GET['ref'], 'annonce', vb($_GET['display_specific_note']));
38  } else {
39  echo $GLOBALS['tplEngine']->createTemplate('modules/avis_liste_notice.tpl', array('msg' => $GLOBALS['STR_MODULE_ANNONCES_AVIS_NO_OPINION_FOR_THIS_AD']))->fetch();
40  }
41 }
42 
43 include($GLOBALS['repertoire_modele'] . "/bas.php");
44 
if(isset($_GET['prodid'])) elseif(isset($_GET['ref']))
Definition: liste_avis.php:33
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
render_avis_public_list($prodid, $type, $display_specific_note=null, $no_display_if_empty=false, $ad_owner_opinion=false)
render_avis_public_list()
Definition: fonctions.php:239
vb(&$var, $default=null)
Variable blanche if $var n'est pas défini, retourne $default, sinon retourne $var.
Definition: format.php:97
$GLOBALS['page_columns_count']
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...

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