PEEL Shopping
Open source ecommerce : PEEL Shopping
fonctions.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: fonctions.php 46935 2015-09-18 08:49:48Z gboussin $
14 
21 function profil_hook_account_show($params) {
22  $result['modules_data'] = array();
23  $result['modules_data_group'] = array();
24  $profil = get_profil($_SESSION['session_utilisateur']['priv']);
25  if (!empty($profil['document_'.$_SESSION['session_langue']]) || !empty($profil['description_document_'.$_SESSION['session_langue']])) {
26  $result['modules_data_group']['profil'] = array('header' => $GLOBALS['STR_ACCOUNT_DOCUMENTATION'], 'position' => 18, 'comments' => $profil['description_document_'.$_SESSION['session_langue']]);
27  $result['modules_data']['profil'] = array();
28  foreach(array('document_'.$_SESSION['session_langue']) as $this_doc_name) {
29  if (!empty($profil[$this_doc_name])) {
30  $result['modules_data']['profil'][] = array('txt' => '<img src="' . $GLOBALS['repertoire_upload'] . '/thumbs/' . thumbs($profil[$this_doc_name], 75, 75, 'fit') . '" /><br />' . $GLOBALS["STR_DOWNLOAD_DOCUMENT"], 'href' => $GLOBALS['repertoire_upload'] . '/' . $profil[$this_doc_name]);
31  }
32  }
33  }
34  return $result;
35 }
36 
43 function get_profil($technical_code)
44 {
45  /* Charge les informations du produit */
46  $qid = query("SELECT *, name_".$_SESSION['session_langue']." AS name
47  FROM peel_profil
48  WHERE priv = '" . nohtml_real_escape_string($technical_code) . "' AND " . get_filter_site_cond('profil') . "");
49  $profil = fetch_assoc($qid);
50  return $profil;
51 }
$result
nohtml_real_escape_string($value, $allowed_tags=null)
Protège les données pour insertion dans MySQL ET supprime les tags HTML pour protéger de toute sorte ...
Definition: database.php:400
get_profil($technical_code)
Retourne les informations d'un type de profil.
Definition: fonctions.php:43
if(!defined('IN_PEEL')) $GLOBALS['page_types_array']
Definition: fonctions.php:19
if(!defined('IN_PEEL')) thumbs($source_filename, $width, $height, $method= 'fit', $source_folder=null, $thumb_folder=null, $thumb_rename=true, $return_absolute_path=false)
Charge l'image dont le nom est $source_filename dans le répertoire d'upload, et crée une vignette pou...
Definition: fonctions.php:33
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
profil_hook_account_show($params)
Renvoie les tableaux d'informations à afficher dans Mon compte.
Definition: fonctions.php:21
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:31:02 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.