14 if (!defined(
'IN_PEEL')) {
25 $result[
'modules_data_group'][
'pensebete'] = array(
'header' =>
$GLOBALS[
'STR_PENSE_BETE'],
'position' => 11);
26 $result[
'modules_data'][
'pensebete'][] = array(
'txt' =>
'<span class="fa fa-list fa-5x"></span><br />' .
$GLOBALS[
'STR_VOIR_PENSE_BETE'],
'href' => get_url(
'/modules/pensebete/voir.php'));
37 if (empty($item_id) || empty($type)) {
40 $url_prod =
vb($_SERVER[
'HTTP_REFERER']);
41 if ($type ==
'produit') {
45 $this_item =
$GLOBALS[
'STR_THE_PRODUCT'];
46 $back_to_item =
$GLOBALS[
'STR_BACK_TO_PRODUCT'];
47 $this_field =
'id_produit';
48 }
elseif ($type ==
'annonce') {
49 $annonce_object =
new Annonce($item_id);
50 $this_url = $annonce_object->get_annonce_url();
51 $this_name = $annonce_object->get_titre();
52 $this_item =
$GLOBALS[
'STR_MODULE_ANNONCES_THE_AD'];
53 $back_to_item =
$GLOBALS[
'STR_MODULE_ANNONCES_BACK_TO_ADS'];
54 $this_field =
'id_annonce';
58 WHERE id_utilisateur = '" . intval(
$_SESSION[
'session_utilisateur'][
'id_utilisateur']) .
"' AND " .
word_real_escape_string($this_field) .
" = '" . intval($item_id) .
"'");
60 $sql =
"INSERT INTO peel_pensebete (
65 '" . intval($item_id) .
"'
66 , '" . intval(
$_SESSION[
'session_utilisateur'][
'id_utilisateur']) .
"'
67 , '" . date(
'Y-m-d H:i:s', time()) .
"')";
70 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'modules/pensebete_insere.tpl');
71 $tpl->assign(
'item', $this_item);
72 $tpl->assign(
'name', $this_name);
73 $tpl->assign(
'account_url', get_account_url(
false,
false));
74 $tpl->assign(
'url', $this_url);
75 $tpl->assign(
'back_to_item', $back_to_item);
77 $tpl->assign(
'STR_AJOUT_PENSE_BETE',
$GLOBALS[
'STR_AJOUT_PENSE_BETE']);
78 $tpl->assign(
'STR_MODULE_PENSEBETE_HAS_BEEN_ADD_REMINDER',
$GLOBALS[
'STR_MODULE_PENSEBETE_HAS_BEEN_ADD_REMINDER']);
79 $tpl->assign(
'STR_MODULE_PENSEBETE_YOUR_REMINDER_ON_RUB',
$GLOBALS[
'STR_MODULE_PENSEBETE_YOUR_REMINDER_ON_RUB']);
80 $tpl->assign(
'STR_MODULE_PENSEBETE_OF_OUR_ONLINE_SHOP',
$GLOBALS[
'STR_MODULE_PENSEBETE_OF_OUR_ONLINE_SHOP']);
90 $sql =
"SELECT pb.id as id_pense_bete, p.id, p.reference, p.nom_" .
$_SESSION[
'session_langue'] .
" AS name, p.image1, p.prix * (1-p.promotion/100) as prix, p.promotion, c.id as categorie_id, c.nom_" .
$_SESSION[
'session_langue'] .
" as categorie
92 INNER JOIN peel_pensebete pb ON (pb.id_produit = p.id)
93 INNER JOIN peel_produits_categories pc ON p.id = pc.produit_id
94 INNER JOIN peel_categories c ON c.id = pc.categorie_id AND " .
get_filter_site_cond(
'categories',
'c') .
"
95 WHERE pb.id_utilisateur = '" . intval(
$_SESSION[
'session_utilisateur'][
'id_utilisateur']) .
"' AND " .
get_filter_site_cond(
'produits',
'p') .
"
98 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'modules/pensebete_display.tpl');
99 $tpl->assign(
'del_src', get_url(
'/images/suppression.png'));
100 $tpl->assign(
'STR_MODULE_PENSEBETE_PENSE_BETE_PRODUIT',
$GLOBALS[
'STR_MODULE_PENSEBETE_PENSE_BETE_PRODUIT']);
101 $tpl->assign(
'STR_MODULE_PENSEBETE_NO_PRODUCT_IN_REMINDER',
$GLOBALS[
'STR_MODULE_PENSEBETE_NO_PRODUCT_IN_REMINDER']);
102 $tpl->assign(
'STR_TABLE_SUMMARY_CADDIE',
$GLOBALS[
'STR_TABLE_SUMMARY_CADDIE']);
105 $tpl->assign(
'STR_UNIT_PRICE',
$GLOBALS[
'STR_UNIT_PRICE']);
106 $tpl->assign(
'STR_DELETE_PROD_CART',
$GLOBALS[
'STR_DELETE_PROD_CART']);
109 $tpl->assign(
'pseudo', $user_info[
'pseudo']);
112 $tpl->assign(
'are_prods',
true);
113 $tpl_prods = array();
117 $urlprod = get_product_url($prod[
'id'], $prod[
'name'], $prod[
'categorie_id'], $prod[
'categorie']);
120 if ($display_picture) {
121 $tpl_img = $GLOBALS[
'repertoire_upload'] .
'/thumbs/' .
thumbs($display_picture, 75, 75,
'fit');
122 }
elseif(!empty($GLOBALS[
'site_parameters'][
'default_picture'])) {
123 $tpl_img = $GLOBALS[
'repertoire_upload'] .
'/thumbs/' .
thumbs($GLOBALS[
'site_parameters'][
'default_picture'], 75, 75,
'fit');
126 if($prod[
'promotion'] > 0) {
127 $tpl_promo =
fprix($prod[
'promotion']);
129 $tpl_prods[] = array(
130 'del_href' => $GLOBALS[
'wwwroot'] .
'/modules/pensebete/voir.php?mode=delete&id=' . $prod[
'id_pense_bete'],
131 'attributes_with_single_options_array' =>
$product_object->attributes_with_single_options_array,
133 'urlprod' => $urlprod,
134 'name' => $prod[
'name'],
135 'promotion' => $tpl_promo,
139 $tpl->assign(
'prods', $tpl_prods);
141 $tpl->assign(
'are_prods',
false);
144 return $tpl->fetch();
get_user_information($user_id=null, $get_full_infos=false)
Chargement des détails de l'utilisateur.
is_user_tva_intracom_for_no_vat($user_id=null)
is_user_tva_intracom_for_no_vat()
word_real_escape_string($value)
Applique real_escape_string dans le cas où on n'insère qu'un seul mot, de moins de 30 caractères...
if(!empty($_GET['id'])) if(isset($_POST['form_name'], $_POST['form_subject'], $_POST['form_text'], $_POST['form_lang'])&&empty($_GET['id'])) if(empty($_GET['id'])) $tpl
if(!defined('IN_PEEL')) $GLOBALS['page_types_array']
if(empty($_GET['id'])) if(!empty($GLOBALS['site_parameters']['allow_multiple_product_url_with_category'])) $product_object
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...
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.
if(!defined('IN_PEEL')) display_prices_with_taxes_active()
display_prices_with_taxes_active()
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.
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))
num_rows($query_result)
num_rows()
fetch_assoc($query_result)
fetch_assoc()
insere_pense($item_id=null, $type=null)
fprix($price, $display_currency=false, $currency_code_or_default=null, $convertion_needed_into_currency=true, $currency_rate=null, $display_iso_currency_code=false, $format=true, $force_format_separator=null, $add_rdfa_properties=false, $round_even_if_no_format=false)
fprix formatte le prix donné en le convertissant si nécessaire au préalable et en ajoutant éventuelle...
if(!defined('IN_PEEL')) pensebete_hook_account_show($params)
Renvoie les tableaux d'informations à afficher dans Mon compte.
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...
display_product_in_reminder($return_mode=false)
if(defined('IN_PEEL_ADMIN')||IN_INSTALLATION) $_SESSION['session_langue']