PEEL Shopping
Open source ecommerce : PEEL Shopping
index.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: index.php 47234 2015-10-08 11:03:43Z gboussin $
20 define('IN_HOME', true);
21 include("configuration.inc.php");
22 $GLOBALS['page_name'] = 'index';
23 
24 $output = '';
25 
26 if (strpos($_SERVER['REQUEST_URI'], '/index.php') !== false) {
27  redirect_and_die(get_url('/'), true);
28 }
29 $rubrique_template = 'home';
30 
31 $tpl = $GLOBALS['tplEngine']->createTemplate('index.tpl');
32 if (check_if_module_active('vacances') && get_vacances_type() == 1) {
33  $tpl->assign('error', vb($GLOBALS['site_parameters']['module_vacances_client_msg_' . $_SESSION['session_langue']]));
34 }
35 if (function_exists('get_home_title')) {
36  $tpl->assign('home_title', get_home_title());
37 }
38 $tpl->assign('site', $GLOBALS['site'] );
39 $tpl->assign('categorie_accueil', affiche_categorie_accueil(true));
40 if(!empty($GLOBALS['site_parameters']['skip_home_top_products'])) {
41  $tpl->assign('meilleurs_ventes', '');
42 } else {
43  $tpl->assign('meilleurs_ventes', affiche_produits(null, 2, "top", 10, 'home', true, null, 4, true, false));
44 }
45 if(!empty($GLOBALS['site_parameters']['skip_home_special_products'])) {
46  $tpl->assign('notre_selection', '');
47 } else {
48  $tpl->assign('notre_selection', affiche_produits(null, 2, "special", 10, 'home', true, null, 4, true, false));
49 }
50 if(!empty($GLOBALS['site_parameters']['skip_home_new_products'])) {
51  $tpl->assign('nouveaute', '');
52 } else {
53  $tpl->assign('nouveaute', affiche_produits(null, 2, "nouveaute", 10, 'home', true, null, 4, true, false));
54 }
55 if (!est_identifie()) {
56  // Si pas identifie, on regarde si on affiche les blocs de connexion et d'inscription
57  if(!empty($GLOBALS['site_parameters']['skip_home_affiche_compte'])) {
58  $tpl->assign('affiche_compte', '');
59  } else {
60  $tpl->assign('affiche_compte', affiche_compte(true, "home"));
61  }
62 
63  if(!empty($GLOBALS['site_parameters']['skip_home_register_form'])) {
64  $tpl->assign('user_register_form', '');
65  } else {
67  $tpl->assign('user_register_form', get_user_register_form($frm, $form_error_object, false, true, get_url('/utilisateurs/enregistrement.php')));
68  }
69 }elseif(!empty($GLOBALS['site_parameters']['home_affiche_compte_loggedin'])) {
70  $tpl->assign('affiche_compte', affiche_compte(true, "home"));
71 }
72 if(!empty($GLOBALS['site_parameters']['home_affiche_banner_ids'])) {
73  foreach($GLOBALS['site_parameters']['home_affiche_banner_ids'] as $this_id) {
74  $tpl->assign('pub'.$this_id, affiche_banner($this_id, true));
75  }
76 }
77 
78 $tpl->assign('actu', print_actu(true, 0));
79 
80 $tpl->assign('image_accueil', vb($GLOBALS['site_parameters']['general_home_image1']));
81 $tpl->assign('image_accueil_2', vb($GLOBALS['site_parameters']['general_home_image2']));
82 
83 if(empty($GLOBALS['site_parameters']['skip_home_ad_categories_presentation']) && check_if_module_active('annonces')) {
84  // Ajoute la liste des catégories d'annonces sur la home
85  $tpl->assign('categorie_annonce', get_ad_categories_presentation(true));
86  // Présentation des annonces récentes. Fonction multisite qui affiche toutes les annonces récente et les classe par site.
87  if (!empty($GLOBALS['site_parameters']['display_home_fresh_ad_presentation'])) {
88  // L'entête de la liste d'annonce est différent selon les sites :
89  $tpl->assign('fresh_ad_presentation', get_fresh_ad_presentation());
90  }
91 }
92 
93 
94 $tpl->assign('contenu_html', affiche_contenu_html("home", true));
95 $tpl->assign('contenu_html_bottom', affiche_contenu_html("home_bottom", true));
96 $tpl->assign('center_middle_home', get_modules('center_middle_home', true));
97 if(check_if_module_active('abonnement')) {
98  $tpl->assign('vitrine_list', getVerifiedVitrineList());
99 }
100 if(check_if_module_active('carrousel')) {
101  $tpl->assign('carrousel_html', Carrousel::display('top_home', true, vb($GLOBALS['site_parameters']['module_carrousel_top_home_show_pagination'], true), vb($GLOBALS['site_parameters']['module_carrousel_top_home_show_previous_next_buttons'], false)));
102  if(vb($GLOBALS['site_parameters']['module_carrousel_display_categorie_on_homepage'])) {
103  $tpl->assign('CARROUSEL_CATEGORIE', '<div class="affiche_contenu_entre_module">'. affiche_contenu_html("entre_carrousel", true) .'</div>' . Carrousel::display('categorie', true, false, false));
104  }
105 }
106 $output .= $tpl->fetch();
107 
108 $GLOBALS['page_columns_count'] = $GLOBALS['site_parameters']['site_index_page_columns_count'];
109 include($GLOBALS['repertoire_modele'] . "/haut.php");
110 echo $output;
111 include($GLOBALS['repertoire_modele'] . "/bas.php");
if(!empty($GLOBALS['site_parameters']['order_specific_field_titles'])) if(check_if_module_active('socolissimo')&&!empty($_REQUEST)&&!empty($_REQUEST['PUDOFOID'])&&!empty($_REQUEST['CEEMAIL'])&&!empty($_REQUEST['SIGNATURE'])&&!empty($_REQUEST['ORDERID'])) elseif(!empty($_POST)) elseif(check_if_module_active('socolissimo')&&!empty($_SESSION['session_commande']['is_socolissimo_order'])) foreach(array('bill'=> 1, 'ship'=> 2) as $address_type=> $session_commande_address_id) $frm['societe1']
$tpl
Definition: index.php:69
if(!empty($GLOBALS['site_parameters']['user_session_mandatory_info_in_catalog_pages'])&&empty($_SESSION['session_utilisateur'][$GLOBALS['site_parameters']['user_session_mandatory_info_in_catalog']])) if(!empty($catid)) $form_error_object
Definition: index.php:51
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
get_modules($location, $return_mode=false, $technical_code=null, $id_categorie=null, $this_annonce_number=0, $return_array_with_raw_information=false, $criterias=null)
Récupère le contenu HTML des modules en fonction des contraintes données en paramètre Il est possible...
Definition: fonctions.php:543
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(strpos($_SERVER['REQUEST_URI'], '/index.php')!==false) $rubrique_template
Definition: index.php:29
$output
Definition: index.php:61
$GLOBALS['page_name']
Definition: index.php:28
affiche_banner($position=null, $return_mode=false, $page=null, $cat_id=null, $this_annonce_number=0, $page_type=null, $keywords_array=null, $lang=null, $return_array_with_raw_information=false, $ad_id=null, $page_related_to_user_id=null, $disable_cache=false)
affiche_banner()
Definition: fonctions.php:63
if(!isset($_GET['lettre'])&&!isset($_GET['id'])) elseif(isset($_GET['lettre'])&&!isset($_GET['id'])) elseif(isset($_GET['lettre'])&&isset($_GET['id']))
Definition: index.php:27
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...
$_SESSION['session_install_serveur']
Definition: index.php:23

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