14 if (!defined(
'IN_PEEL')) {
27 $bad_strings = array(
"Content-Type:",
"text/plain;",
"MIME-Version:",
"Content-Transfer-Encoding:",
"Content-Transfer-Encoding: 7Bit",
"bcc:");
28 if (is_array($value)) {
29 if (function_exists(
'array_walk_recursive')) {
30 array_walk_recursive($value,
'cleanDataDeep');
32 $value = array_map(
'cleanDataDeep', $value);
35 if (function_exists(
'get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
37 $value = stripslashes($value);
39 if (!defined(
'DISABLE_INPUT_ENCODING_CONVERT') && (!defined(
'IN_PEEL_ADMIN') || !
a_priv(
'admin*',
false))) {
40 foreach($bad_strings as $bad_string) {
48 $key_parts=explode(
'_', str_replace(
'form_',
'', $key));
49 if (!empty(
$GLOBALS[
'site_parameters'][
'post_variables_with_html_allowed_if_not_admin']) && !in_array($key_parts[0],
$GLOBALS[
'site_parameters'][
'post_variables_with_html_allowed_if_not_admin'])) {
63 if(strlen($value)>20 &&
String::strpos($value,
'myEventWatcherDiv')!==
false) {
66 $value = str_replace(array(
'<div id="myEventWatcherDiv" style="display: none;"> </div>',
'<div style="display:none;" id="myEventWatcherDiv"> </div>',
'<div style="display: none;" id="myEventWatcherDiv"> </div>'),
'', $value);
80 function frmvalide($variable_to_test, $true_value =
'checked="checked"', $false_value =
"")
82 if ($variable_to_test) {
97 function vb(&$var, $default = null)
99 return isset($var) ? $var : $default;
110 function vn(&$var, $default = 0)
112 return isset($var) ? $var : $default;
125 return str_replace(array(
"a",
"c",
"e",
"i",
"o",
"u",
"n",
"y"),
126 array(
"[aáåâäàã]",
"[cç]",
"[eêéèë]",
"[iíîïì]",
"[oóôöòõ]",
"[uûüùú]",
"[nñ]",
"[yÿý]"), $string);
138 return preg_replace(
'/(http|mailto|news|ftp|https)\:\/\/(([-éa-z0-9\/\.\?_=#@:;,!~&%])*)/i',
"<a href=\"$1://$2\" target=\"_blank\">$1://$2</a>", $string);
158 while (
String::strpos($text,
'[link="', $quote_begin + 1) !==
false) {
160 $quote_begin =
String::strpos($text,
'[link="', $quote_begin + 1);
169 $quote_text =
'<a href="' . $quote_text;
170 $quote_text = str_replace(
"]",
">", $quote_text);
171 $quote_text .=
'</a>';
174 if ($quote_begin > 0) {
177 $text .= $quote_text;
184 $text = str_replace(
"[/link]",
"", $text);
198 if(is_array($string)) {
201 foreach(array(
'.',
',') as $separator) {
202 $array_temp = explode($separator, $string);
203 if (count($array_temp) > 2) {
205 $string = str_replace($separator,
'', $string);
208 if (strpos($string, $separator) !==
false && strpos($string, $separator) == strlen($string) - 3) {
213 if (strpos($string,
',') !==
false && strpos($string,
'.') !==
false) {
214 if (strpos($string,
',') < strpos($string,
'.')) {
216 $string = str_replace(
',',
'', $string);
219 $string = str_replace(
'.',
'', $string);
223 return floatval(preg_replace(
"([^-0-9.])",
"", str_replace(
',',
'.', $string))) / $from_currency_rate;
237 function filtre_javascript($string, $addslashes =
true, $allow_escape_single_quote =
true, $allow_escape_double_quote =
true, $skip_endline =
true, $inside_html =
true)
240 $string = addslashes($string);
241 if (!$allow_escape_single_quote) {
242 $string = str_replace(
"\'",
"'", $string);
244 if (!$allow_escape_double_quote) {
245 $string = str_replace(
'\"',
'"', $string);
247 $string = str_replace(
'\"',
'"', $string);
251 $string = str_replace(array(
"\t",
"\r\n",
"\n"), array(
" ",
" ",
" "), $string);
254 $string = str_replace(array(
"\t",
"\r\n",
"\n"), array(
" ",
'\n',
'\n'), $string);
290 function fxsl($number_string, $separator =
',')
292 $number_string = number_format(floatval(str_replace(array(
",",
" "), array(
".",
""), $number_string)), 2, $separator,
'');
293 return $number_string;
306 if ($convert_string_to_lower ==
true) {
310 $string = preg_replace(
'/[-]{2,}/',
"-", $string);
323 $currencies = array(
'CHF' =>
'756',
334 if (!empty($currencies[$currency_code])) {
335 return $currencies[$currency_code];
360 }
elseif ($guess_if_not_found && !is_numeric($country_id_or_name)) {
387 }
elseif ($guess_if_not_found && !is_numeric($country_id_or_name)) {
403 $sql =
'SELECT iso_num
445 $format =
$GLOBALS[
'date_format_'.$mode];
446 }
elseif($mode !=
'timestamp' && $mode !=
'timestamp1000') {
447 $format =
$GLOBALS[
'date_format_long'];
451 if($format !== null) {
452 if ($hour_minute===
true) {
453 $format .=
' ' .
$GLOBALS[
'time_format_long'];
454 }
elseif (!empty($hour_minute)) {
455 $format .=
' ' .
vb(
$GLOBALS[
'time_format_'.$hour_minute]);
458 if (empty($datetime_or_timestamp) || $datetime_or_timestamp===
'0') {
460 }
elseif (!is_numeric($datetime_or_timestamp)) {
461 if (substr($datetime_or_timestamp, 0, 10) ==
'0000-00-00') {
463 }
elseif (is_numeric(substr($datetime_or_timestamp, 0, 4))) {
465 $date = strtotime($datetime_or_timestamp);
476 $date = $datetime_or_timestamp;
478 if($date!==
'' && $date!==
false && $date!==null && is_numeric($date) && $format !== null) {
480 $date = strftime($format, $date);
481 }
elseif($mode ==
'timestamp1000' && is_numeric($date)) {
483 $date =
'' . $date .
'000';
498 if (is_numeric(substr($string, 0, 4)) && substr($string, 4, 1) ==
'-' && !is_numeric(substr(
$GLOBALS[
'date_format_short'], 0, 4))) {
500 $supposed_string_format =
'Y-m-d H:i:s';
507 $supposed_string_format =
$GLOBALS[
'date_format_short'].
' '.
$GLOBALS[
'time_basic_format_long'];
509 $user_date_format_array = explode(
'-', str_replace(array(
'%',
' ',
'/',
'.',
':',
'_',
'h',
','), array(
'',
'-',
'-',
'-',
'-',
'-',
'-',
'-'), $supposed_string_format));
510 $user_date_array = explode(
'-', str_replace(array(
' ',
'/',
'.',
':',
'_',
'h',
','), array(
'-',
'-',
'-',
'-',
'-',
'-',
'-'), $string));
511 foreach($user_date_format_array as $this_key => $this_letter) {
512 if(isset($user_date_array[$this_key])) {
513 $this_date_array[$this_letter] = $user_date_array[$this_key];
516 if($use_current_hour_min_sec_if_missing && count($user_date_array)<=3){
517 $hour =
' '.date(
'H:i:s');
518 }
elseif(count($user_date_array)>=5) {
520 $hour =
' '.str_pad(
vb($this_date_array[
'H']), 2, 0, STR_PAD_LEFT).
':'. str_pad(
vb($this_date_array[
'i']), 2, 0, STR_PAD_LEFT).
':'. str_pad(
vb($this_date_array[
's']), 2, 0, STR_PAD_LEFT);
522 return str_pad(
vb($this_date_array[
'Y']), 4, 0, STR_PAD_LEFT).
'-'. str_pad(
vb($this_date_array[
'm']), 2, 0, STR_PAD_LEFT).
'-'. str_pad(
vb($this_date_array[
'd']), 2, 0, STR_PAD_LEFT) .
vb($hour);
536 if (!is_numeric($total_seconds) || $total_seconds < 0) {
539 $days = $total_seconds / (3600 * 24);
540 $hours = $total_seconds / 3600 - floor($days) * 24;
541 $minutes = $total_seconds / 60 - floor($days) * 60 * 24 - floor($hours) * 60;
542 $seconds = $total_seconds - floor($days) * 3600 * 24 - floor($hours) * 3600 - floor($minutes) * 60;
543 $weeks = $total_seconds / (3600 * 24 * 7);
544 $months = $total_seconds / (3600 * 24 * 30);
546 if ($display_mode ==
'month') {
548 $result[] = floor($months) .
' ' . str_replace(
'(s)', ($months>1?
's':
''),
$GLOBALS[
'STR_MONTHS']);
550 $result[] = floor($weeks) .
' ' . str_replace(
'(s)', ($weeks>1?
's':
''),
$GLOBALS[
'strWeeks']);
552 $result[] = floor($days) .
' ' . str_replace(
'(s)', ($days>1?
's':
''),
$GLOBALS[
'strDays']);
556 $result[] = floor($days) .
'' . str_replace(
'(s)', ($days>1?
's':
''),
$GLOBALS[
'strShortDays']);
559 $result[] = floor($hours) .
'' . str_replace(
'(s)', ($hours>1?
's':
''),
$GLOBALS[
'strShortHours']);
562 $result[] = floor($minutes) .
'' . str_replace(
'(s)', ($minutes>1?
's':
''),
$GLOBALS[
'strShortMinutes']);
564 if ($seconds >= 1 && ($show_seconds || $total_seconds<60)) {
565 $result[] = floor($seconds) .
'' . str_replace(
'(s)', ($seconds>1?
's':
''),
$GLOBALS[
'strShortSecs']);
568 if(is_numeric($display_mode)) {
569 $temp = array_chunk(
$result, $display_mode);
599 function template_tags_replace($text, $custom_template_tags = array(), $replace_only_custom_tags =
false, $format = null,
$lang = null, $avoid_load_urls =
false)
601 if(is_array($text)) {
603 foreach(array_keys($text) as $this_key) {
604 if(strpos($this_key,
'[') !==
false) {
605 $this_new_key =
template_tags_replace($this_key, $custom_template_tags, $replace_only_custom_tags, $format,
$lang, $avoid_load_urls);
607 $this_new_key = $this_key;
610 $temp[$this_new_key] =
template_tags_replace($text[$this_key], $custom_template_tags, $replace_only_custom_tags, $format,
$lang, $avoid_load_urls);
617 $template_tags = array();
618 if(!$replace_only_custom_tags) {
620 $template_tags[
'SITE'] =
$GLOBALS[
'site'];
621 $template_tags[
'SITE_NAME'] =
$GLOBALS[
'site'];
622 $template_tags[
'WWWROOT'] = get_lang_rewrited_wwwroot(
$lang);
623 if(!$avoid_load_urls) {
624 $template_tags[
'CATALOG_URL'] = get_product_category_url();
626 $template_tags[
'PHP_SELF'] = $_SERVER[
'PHP_SELF'];
628 $template_tags[
'REMOTE_ADDR'] = $_SERVER[
'REMOTE_ADDR'];
632 $template_tags[
'TIMESTAMP'] = time();
634 foreach(array(
'CODE_PROMO_SOURCE' =>
false,
'FUNCTION' =>
true,
'HTML' =>
true,
'GLOBALS' =>
true,
'BEST_SELLER_CARROUSEL' =>
true,
'CONTENT_CARROUSEL' =>
true) as $this_function_tag => $arg_mandatory) {
640 $tag_begin =
String::strpos($text,
'[' . $this_function_tag .
'=', $tag_begin + 1);
642 $tag_name_array = explode(
'=', $this_tag, 2);
643 $this_arg =
vb($tag_name_array[1]);
644 if(!$arg_mandatory || !empty($this_arg)) {
645 if($this_function_tag ==
'CODE_PROMO_SOURCE') {
647 $sql =
'SELECT id, nom
648 FROM peel_codes_promos cp
649 WHERE ' .
get_filter_site_cond(
'codes_promos',
'cp') .
' AND nb_valide>0 AND (nombre_prevue=0 OR compteur_utilisation<nombre_prevue) AND source="'.real_escape_string($this_arg).
'" AND cp.etat = "1" AND ("' . date(
'Y-m-d', time()) .
'" BETWEEN cp.date_debut AND cp.date_fin)
654 $template_tags[$this_tag] = $obj->nom;
655 $sql =
'UPDATE peel_codes_promos
656 SET nb_valide=nb_valide-1
660 }
elseif($this_function_tag ==
'FUNCTION') {
662 $allowed_functions = array(
'');
663 $this_arg_array=explode(
',', $this_arg, 2);
664 $this_arg = $this_arg_array[0];
666 if(in_array($this_arg, $allowed_functions)) {
667 $function_name = $this_arg;
669 $function_name =
'get_tag_function_' . $this_arg;
671 if(function_exists($function_name)) {
672 $template_tags[$this_tag] = $function_name($this_params_array);
674 $template_tags[$this_tag] =
'[' . $function_name .
' not found]';
676 }
elseif($this_function_tag ==
'GLOBALS') {
678 $allowed_functions = array(
'');
679 if(in_array($this_arg, $allowed_functions)) {
680 $function_name = $this_arg;
682 $function_name =
'tag_' . $this_arg;
684 $template_tags[$this_tag] =
vb(
$GLOBALS[$function_name]);
685 }
elseif($this_function_tag ==
'RSS') {
688 }
elseif($this_function_tag ==
'HTML') {
690 $template_tags[$this_tag] = affiche_contenu_html($this_arg,
true);
701 $template_tags[
'CONTENT_CARROUSEL'] = Carrousel::display(
'content_carrousel',
true);
703 $template_tags[
'CLIENT_REFERENCES'] = affiche_reference_multipage(null,
'',
'reference', 12,
'general',
true, 0, 4,
false);
706 $template_tags[
'CLOSE_MAIN_CONTAINER'] =
'</div></div></div>';
707 if(defined(
'IN_RUBRIQUE') || defined(
'IN_RUBRIQUE_ARTICLE')) {
708 $template_tags[
'CLOSE_MAIN_CONTAINER'] .=
'</div></div>';
709 }
elseif(defined(
'IN_HOME')) {
710 $template_tags[
'CLOSE_MAIN_CONTAINER'] .=
'</div>';
714 $template_tags[
'REOPEN_MAIN_CONTAINER'] =
'<div class="middle_column container"><div class="middle_column_repeat row"><div class="col-md-12">';
715 if(defined(
'IN_RUBRIQUE') || defined(
'IN_RUBRIQUE_ARTICLE')) {
716 $template_tags[
'REOPEN_MAIN_CONTAINER'] .=
'<div class="rub_wrapper special_content"><div class="rub_content">';
717 }
elseif(defined(
'IN_HOME')) {
718 $template_tags[
'REOPEN_MAIN_CONTAINER'] .=
'<div class="page_home_content">';
721 if (empty($custom_template_tags[
'NEWSLETTER']) &&
String::strpos($text,
'[NEWSLETTER]') !==
false) {
725 if (!empty($news_infos)) {
728 $custom_template_tags[
'NEWSLETTER'] =
template_tags_replace(str_replace(
'[NEWSLETTER]',
'', $news_infos[
'message_' .
$frm[
'lang']]), $custom_template_tags, $replace_only_custom_tags, $format,
$lang);
732 $template_tags = array_merge($template_tags,
call_module_hook(
'template_tags', array(
'text' => $text),
'array'));
734 if (!empty($custom_template_tags) && is_array($custom_template_tags)) {
735 foreach(array(
'GENDER,CIVILITE',
'NOM_FAMILLE,LASTNAME,LAST_NAME,NOM,NAME',
'FIRST_NAME,FIRSTNAME,PRENOM',
'PSEUDO,LOGIN') as $this_tags_list) {
737 foreach(explode(
',', $this_tags_list) as $this_tag) {
738 if (isset($custom_template_tags[$this_tag])) {
740 foreach(explode(
',', $this_tags_list) as $replaced_tag) {
741 if ($replaced_tag != $this_tag && !isset($custom_template_tags[$replaced_tag])) {
742 $custom_template_tags[$replaced_tag] = $custom_template_tags[$this_tag];
748 $template_tags = array_merge($template_tags, $custom_template_tags);
750 foreach($template_tags as $this_tag => $this_tag_value) {
752 $text = str_replace(
'<p>['.$this_tag.
']</p>',
'['.$this_tag.
']', $text);
755 if($format ==
'text') {
757 }
elseif($format ==
'html') {
763 if(!$replace_only_custom_tags) {
765 foreach(array(
'd',
'D',
'j',
'l',
'N',
's',
'w',
'z',
'W',
'F',
'm',
'M',
'n',
't',
'L',
'o',
'Y',
'y',
'a',
'A',
'B',
'g',
'G',
'h',
'H',
'i',
's',
'u',
'U') as $this_date_item) {
767 $template_tags[$this_date_item] = date($this_date_item);
769 for(
$i=0 ;
$i<=10 ;
$i++) {
771 $template_tags[str_replace(
'YEAR-0',
'YEAR',
'YEAR-'.
$i)] = date(
'Y')-
$i;
775 foreach($template_tags as $this_tag => $this_tag_value) {
776 if($format ==
'text') {
778 }
elseif($format ==
'html') {
781 $text = str_replace(
'[' . $this_tag .
']', $this_tag_value, $text);
783 if(!empty(
$GLOBALS[
'site_parameters'][
'replace_words_after_tags_replace'])) {
785 foreach(
$GLOBALS[
'site_parameters'][
'replace_words_after_tags_replace'] as $replaced => $new) {
786 if(strpos($text, $replaced) !==
false) {
787 $text = str_replace($replaced, $new, $text);
805 output_light_html_page(
$GLOBALS[
'tplEngine']->createTemplate(
'global_error.tpl', array(
'message' =>
$GLOBALS[
'STR_DEMO_RIGHTS_LIMITED']))->fetch());
809 if ($type ==
'excel') {
810 header(
"Content-Type: application/vnd.ms-excel");
812 header(
'Content-Type: application/csv-tab-delimited-table; charset=' .
$page_encoding);
814 header(
"Expires: 0");
815 header(
"Cache-Control: must-revalidate, post-check=0, pre-check=0");
816 header(
"Content-disposition: filename=" .
$filename);
831 output_light_html_page(
$GLOBALS[
'tplEngine']->createTemplate(
'global_error.tpl', array(
'message' =>
$GLOBALS[
'STR_DEMO_RIGHTS_LIMITED']))->fetch());
834 header(
'Content-Type: '.$content_type.
'; charset=' .
$page_encoding);
835 if(!empty($cache_duration_in_seconds)) {
836 header(
'Pragma: public');
837 header(
'Cache-Control: public, max-age=' . $cache_duration_in_seconds .
', must-revalidate');
839 header(
"Expires: 0");
840 header(
"Cache-Control: must-revalidate, post-check=0, pre-check=0");
842 header(
"Content-disposition: filename=" .
$filename);
856 if (!empty($_SERVER[
'HTTPS']) && $_SERVER[
'HTTPS'] !=
'off') {
857 $wwwroot_to_replace = str_replace(
'https://',
'http://',
$GLOBALS[
'wwwroot']);
860 if($replace_template_tags) {
872 $tab = array(1 =>
':)',
960 foreach($tab as $img => $key) {
961 $string = str_replace(htmlentities($key, ENT_COMPAT),
'<img src="' .
$GLOBALS[
'wwwroot'] .
'/images/smileys/' . $img .
'.gif" alt="" align="absMiddle" />', $string);
975 if(is_array($array)) {
977 if($array===array_values($array)) {
979 if ($disable_ad_quote) {
980 $string =
'' . implode(
', ', $array) .
'';
982 $string =
'"' . implode(
'", "', $array) .
'"';
985 foreach($array as $this_key => $this_value) {
986 if($this_value ===
true){
987 $array[$this_key] =
'true';
988 }
elseif($this_value ===
false){
989 $array[$this_key] =
'false';
990 }
elseif($this_value === null){
991 $array[$this_key] =
'null';
993 $array[$this_key] =
'"' . $this_value .
'"';
996 $string = trim(str_replace(array(
'Array ',
' ',
' ',
' '), array(
'Array',
' ',
' ',
' '), str_replace(array(
"Array,",
"),",
"(,",
",)"), array(
"Array ",
")",
"(",
")"), str_replace(array(
"\r\n",
"\n"),
',', print_r($array,
true)))));
1013 $string = str_replace(
'Array ',
'Array', trim(str_replace(array(
"\t",
"\r\n",
"\r"), array(
' ',
"\n",
''), $string)));
1017 $parts = explode(
',', str_replace(
"\n",
',', $string));
1019 foreach($parts as $this_part_key => $this_part) {
1020 if(empty($skip_part_key_array) || !in_array($this_part_key, $skip_part_key_array)) {
1021 $this_part = trim($this_part);
1022 if(!empty($this_part)){
1023 $line = explode(
'=>', $this_part, 2);
1024 if(!isset($line[1])) {
1025 $this_value = trim($line[0]);
1027 $this_key = trim($line[0]);
1028 $this_value = trim($line[1]);
1030 if(in_array(
String::substr($this_value, 0, 1), array(
'"',
"'",
'['))) {
1034 while(!in_array(
String::substr($this_value, -1), array(
'"',
"'",
']')) && !empty($parts[$this_part_key+
$i])) {
1036 $this_value .=
','.$parts[$this_part_key+
$i];
1037 $skip_part_key_array[] = $this_part_key+
$i;
1043 if($this_value ==
'true'){
1045 }
elseif($this_value ==
'false'){
1046 $this_value =
false;
1047 }
elseif($this_value ==
'null'){
1050 if(!isset($line[1])) {
1053 if(in_array(
String::substr($this_key, 0, 1), array(
'"',
"'",
'['))) {
1056 $result[$this_key] = $this_value;
1075 function get_keywords_from_text($string_or_array, $min_length = 3, $max_length = 20, $allow_numeric =
false, $get_long_keywords_first =
true, $max_words = 7) {
1076 $keywords_array = array();
1077 if(is_array($string_or_array)) {
1078 $string = implode(
' ', array_unique($string_or_array));
1080 $string = $string_or_array;
1082 $filter_stop_words_array = array_unique(explode(
' ', str_replace(array(
"\t",
"\r",
"\n"),
' ',
vb(
$GLOBALS[
'site_parameters'][
'filter_stop_words']))));
1086 $string = str_replace(array(
",",
".",
"?",
"!",
':',
';',
"-",
"+",
'*',
"d'",
'/',
'\\',
'(',
')',
'[',
']',
'{',
'}',
"'",
'"',
'<',
'>',
'«',
'»',
'´',
' '),
" ", $string);
1088 foreach(explode(
' ', $string) as $this_word) {
1089 if(
String::strlen($this_word)>=$min_length && ($allow_numeric || !is_numeric($this_word))){
1090 $keywords_array[$this_word] = $this_word;
1094 $keywords_array = array_diff($keywords_array, $filter_stop_words_array);
1095 if($get_long_keywords_first) {
1097 $keywords_lengths = array();
1098 foreach($keywords_array as $this_word) {
1101 arsort($keywords_lengths);
1102 $keywords_array = array_keys($keywords_lengths);
1105 while($max_words !== null && count($keywords_array)>$max_words) {
1106 array_pop($keywords_array);
1108 return $keywords_array;
1121 $bbcode = array(
'[tagsearch]',
'[/tagsearch]');
1125 foreach (
$terms as $this_term) {
1128 if (stripos($text, $this_term) !==
false) {
1129 $text = preg_replace(
'/' . $preg_condition .
'/iu', $bbcode[0] .
'$0' . $bbcode[1], $text, -1);
1135 return str_replace($bbcode, $found_tags, $text);
1146 return floor((date(
'Ymd') - str_replace(
"-",
"", $date)) / 10000);
1157 return str_replace(array(
' ',
'/',
'.',
'-',
')',
'(',
'_'),
"", $phone_number);
1177 if(!empty(
$GLOBALS[
'site_parameters'][
'password_regexp'])) {
1178 $result = preg_match(
$GLOBALS[
'site_parameters'][
'password_regexp'], $string);
static strtoupper($string)
Returns string with all alphabetic characters converted to uppercase.
handle_contact_form($frm, $skip_introduction_text=false)
Gère l'affichage du formulaire de contact, avec les erreurs et le message de confirmation d'envoi...
static strip_tags($string, $allowed_tags=null)
String::strip_tags()
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']
static htmlspecialchars_decode($string, $style=ENT_COMPAT)
This function is String::htmlspecialchars_decode with php4 compatibility.
static utf8_encode($string)
Si vous avez des utilisateurs sous windows qui saisissent du contenu dans une interface qui l'insère ...
static strpos($haystack, $needle, $offset=0)
Returns the numeric position of the first occurrence of needle in the haystack string.
get_current_url($with_get=true, $get_short_url=false, $take_away_get_args_array=null)
get_current_url()
static html_entity_decode_if_needed($string)
String::html_entity_decode_if_needed()
get_last_newsletter($id=null, $lang=null)
Récupère les informations de la newsletter de l'id demandée, ou de la dernière newsletter dans une la...
static strtolower($string)
Returns string with all alphabetic characters converted to lowercase.
static strlen($string)
Returns the length of the given string.
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 ...
if(!defined('IN_PEEL')) affiche_best_seller_produit_colonne($return_mode=false, $location=null, $nb_col_sm=3, $nb_col_md=4)
Affiche la liste des catégories qui sont spéciales.
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.
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))
fetch_object($query_result)
fetch_object()
call_module_hook($hook, $params, $mode= 'boolean')
Appelle la fonction correspondant au $hook pour chaque module installé La fonction doit s'appeler : [...
static detect_utf8_characters($string)
Détecte si au moins un caractère est manifestement de l'UTF8.
if(!defined('IN_PEEL')) if(!function_exists('get_article_details_html')) if(!function_exists('get_rubriques_sons_html')) if(!function_exists('get_articles_html')) if(!function_exists('get_articles_list_brief_html')) if(!function_exists('affiche_arbre_rubrique')) get_rss_feed_content($feed_url)
Récupère le contenu d'un fichier RSS.
$GLOBALS['page_columns_count']
if(!check_if_module_active('search')) $page_encoding
a_priv($requested_priv, $demo_allowed=false, $site_configuration_modification=false, $user_id=null)
Renvoie true si l'utilisateur de la session a le privilège $requested_priv ou un droit supérieur Des ...
static html_entity_decode($string, $quote_style=ENT_COMPAT, $charset=GENERAL_ENCODING)
String::html_entity_decode()
static convert_accents($string, $convert_umlaut=false, $strip_umlaut=true)
convert_accents()
static substr($string, $start, $length=null)
Returns the portion of string specified by the start and length parameters.
static nl2br_if_needed($string)
Fonction de compatibilité avec de vieilles versions de PEEL ou du contenu qui vient d'ailleurs...
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']
static rawurlencode($string, $avoid_slash=true)
Returns string compatible with Apache without the AllowEncodedSlashes directive ON => avoids systemat...