PEEL Shopping
Open source ecommerce : PEEL Shopping
bannerHit.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: bannerHit.php 46935 2015-09-18 08:49:48Z gboussin $
14 //
15 if (!isset($_GET['id'])) {
16  die();
17 }
18 define('LOAD_NO_OPTIONAL_MODULE', true);
19 include('../../configuration.inc.php');
20 
21 if (!check_if_module_active('banner')) {
22  // This module is not activated => we redirect to the homepage
23  redirect_and_die(get_url('/'));
24 }
25 
26 query("UPDATE peel_banniere SET hit = hit+1 WHERE id='" . intval($_GET['id']) . "' AND " . get_filter_site_cond('banniere'));
27 $sql = 'SELECT lien
28  FROM peel_banniere
29  WHERE id="' . intval($_GET['id']) . '" AND ' . get_filter_site_cond('banniere');
31 if (($result = fetch_assoc($q)) && !empty($result['lien'])) {
32  redirect_and_die(trim($result['lien']));
33 }
$result
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_filter_site_cond($table_technical_code, $table_alias=null, $use_strict_rights_if_in_admin=false, $specific_site_id=null, $exclude_public_items=false, $admin_force_multisite_if_allowed=false)
Retourne la condition SQL permettant de filtrer les données pour une table.
Definition: fonctions.php:4643
query($query, $die_if_error=false, $database_object=null, $silent_if_error=false, $security_sql_filter=true)
The query() function is meant to be called anywhere you want to make a query.
Definition: database.php:158
fetch_assoc($query_result)
fetch_assoc()
Definition: database.php:283
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.