14 if (!defined(
'IN_PEEL')) {
25 <script><!--//--><![CDATA[//><!--
26 function gotobrand(ident){
27 document.location="' .
$GLOBALS[
'wwwroot'] .
'/achat/marque.php?id="+ident;
29 function gotocategorie(ident){
30 document.location="' .
$GLOBALS[
'wwwroot'] .
'/achat/?catid="+ident;
48 ORDER BY position ASC, nom_" .
$_SESSION[
'session_langue'] .
" ASC");
50 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'modules/search_select_marque.tpl');
51 $tpl->assign(
'STR_SEARCH_BRAND',
$GLOBALS[
'STR_SEARCH_BRAND']);
60 'value' => intval($brand[
'id']),
84 if (!empty($attribute[
'join'])) {
85 $sql =
'SELECT DISTINCT a.`id`, a.`nom_' .
$_SESSION[
'session_langue'] .
'` AS `nom`
94 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'modules/search_select_attribute.tpl');
95 $tpl->assign(
'categorie', $categorie);
96 $tpl->assign(
'label', $attribute[
'label']);
100 'value' => $attrib[
'id'],
101 'issel' =>
vb($_GET[$categorie]) == $attrib[
'id'],
102 'name' => $attrib[
'nom']
121 if(!empty($technical_code)) {
122 if (is_array($technical_code)) {
123 $sql_technical_code_condition =
'a.technical_code IN "(' . implode(
'","',
real_escape_string($technical_code)) .
')"';
125 $sql_technical_code_condition =
'a.technical_code ="' .
real_escape_string($technical_code) .
'"';
129 $sql_technical_code_condition =
'a.`texte_libre`=0 ';
131 $sql =
'SELECT DISTINCT o.`id`, a.`id` AS `id_nom_attribut`, a.`nom_' .
$_SESSION[
'session_langue'] .
'` AS `attribut`, o.`descriptif_' .
$_SESSION[
'session_langue'] .
'` AS `nom`
132 FROM `peel_nom_attributs` a
133 LEFT JOIN `peel_attributs` o ON a.`id` = o.`id_nom_attribut` AND ' .
get_filter_site_cond(
'attributs',
'o') .
'
134 '.(!$show_all?
'INNER JOIN `peel_produits_attributs` pa ON o.`id` = pa.`attribut_id`':
'').
'
135 WHERE '.$sql_technical_code_condition.
' AND a.`etat`=1 AND a.technical_code NOT IN ("duration", "categorie_number") AND ' .
get_filter_site_cond(
'nom_attributs',
'a');
138 $tpl_attrs[$this_attribute[
'id_nom_attribut']][
'name'] = $this_attribute[
'attribut'];
139 $tpl_attrs[$this_attribute[
'id_nom_attribut']][
'value'] =
vb($selected_attributes[$this_attribute[
'id_nom_attribut']]);
140 if(!empty($this_attribute[
'id'])) {
141 $tpl_attrs[$this_attribute[
'id_nom_attribut']][
'options'][] = array(
142 'value' => intval($this_attribute[
'id']),
143 'issel' => (!empty($selected_attributes) && is_array($selected_attributes) &&
vb($selected_attributes[$this_attribute[
'id_nom_attribut']]) == $this_attribute[
'id']),
144 'name' => $this_attribute[
'nom']
148 if(!empty($tpl_attrs)) {
149 $tpl =
$GLOBALS[
'tplEngine']->createTemplate(
'modules/search_custom_attribute.tpl');
150 $tpl->assign(
'STR_BEFORE_TWO_POINTS',
$GLOBALS[
'STR_BEFORE_TWO_POINTS']);
151 $tpl->assign(
'select_attrib_txt',
$GLOBALS[
'STR_MODULE_SEARCH_SELECT_ATTRIB']);
152 $tpl->assign(
'attributes', $tpl_attrs);
display_select_attribute($categorie, $attribute)
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']
real_escape_string($value)
real_escape_string()
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.
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.
num_rows($query_result)
num_rows()
display_custom_attribute($selected_attributes=null, $technical_code=null, $show_all=false)
fetch_assoc($query_result)
fetch_assoc()
affiche_select_marque($return_mode=false)
affiche_select_marque()
if(!defined('IN_PEEL')) get_advanced_search_script()
get_advanced_search_script()
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...
static str_shorten($string, $length_limit, $middle_separator= '', $ending_if_no_middle_separator= '...', $ideal_length_with_clean_cut_if_possible=null)
Raccourcit une chaine de caractère en insérant au milieu ou à la fin un séparateur.
if(defined('IN_PEEL_ADMIN')||IN_INSTALLATION) $_SESSION['session_langue']