![]() |
PEEL Shopping
Open source ecommerce : PEEL Shopping
|
Go to the source code of this file.
Functions | |
| if(!defined('IN_PEEL')) | cleanDataDeep (&$value, $key=null) |
| Nettoyage des données PGC. More... | |
| frmvalide ($variable_to_test, $true_value= 'checked="checked"', $false_value="") | |
| Affiche le mot "checked" si la variable est vraie sinon rien. More... | |
| vb (&$var, $default=null) | |
| Variable blanche if $var n'est pas défini, retourne $default, sinon retourne $var. More... | |
| vn (&$var, $default=0) | |
| Variable nulle if $var n'est pas défini, retourne $default, sinon retourne $var. More... | |
| getPregConditionCompatAccents ($string, $delimiter= '/') | |
| getPregConditionCompatAccents() More... | |
| url2Link ($string) | |
| url2Link() More... | |
| linkFormat ($text) | |
| linkFormat() More... | |
| get_float_from_user_input ($string, $from_currency_rate=1) | |
| Transforme tout nombre formaté en un float au format PHP Exemples : 12 004,34 ou 12,324.50. More... | |
| filtre_javascript ($string, $addslashes=true, $allow_escape_single_quote=true, $allow_escape_double_quote=true, $skip_endline=true, $inside_html=true) | |
| Formatte une chaine de caractère pour insertion dans du javascript. More... | |
| filtre_pdf ($string) | |
| filtre_pdf() More... | |
| filtre_csv ($string, $separator="\t") | |
| Formatte une chaine de caractère pour insertion dans du CSV. More... | |
| fxsl ($number_string, $separator= ',') | |
| Formatte un nombre pour insertion dans du CSV. More... | |
| rewriting_urlencode ($string, $convert_string_to_lower=true) | |
| Filtre une chaine de caractères pour insertion dans une URL On essaie de couper proprement, pour une longueur entre 30 et 60 caractères. More... | |
| get_currency_international_numerical_code ($currency_code) | |
| get_currency_international_numerical_code() More... | |
| get_country_iso_2_letter_code ($country_id_or_name, $guess_if_not_found=true) | |
| get_country_iso_2_letter_code() More... | |
| get_country_iso_3_letter_code ($country_id_or_name, $guess_if_not_found=true) | |
| get_country_iso_3_letter_code() More... | |
| get_country_iso_num_code ($country_id_or_name) | |
| get_country_iso_num_code() More... | |
| fdate (&$date_nok) | |
| fdate() More... | |
| get_formatted_date ($datetime_or_timestamp=null, $mode= 'short', $hour_minute=false) | |
| Afficher une date formatée, en évitant les problèmes liés aux noms de mois sur les serveurs qui ne sont pas installés pour gérer le multilingue : Si on appelle get_formatted_date() sur une chaine déjà formattée par get_formatted_date(), la date est bien préservée On peut donc appliquer cette fonction sur une date provenant d'un formulaire ou de la base de données. More... | |
| get_mysql_date_from_user_input ($string, $use_current_hour_min_sec_if_missing=false) | |
| Transforme une date formattée par get_formatted_date() en date MySQL Si la date est vide, ou partielle, ce qui manque est remplacé par des 0. More... | |
| get_formatted_duration ($total_seconds, $show_seconds=false, $display_mode= 'day') | |
| Affiche une durée en jours / heures / minutes / secondes. More... | |
| template_tags_replace ($text, $custom_template_tags=array(), $replace_only_custom_tags=false, $format=null, $lang=null, $avoid_load_urls=false) | |
| Remplace les tags d'un texte au format [TAG] par les valeurs correspondantes. More... | |
| output_csv_http_export_header ($filename, $type= 'excel', $page_encoding) | |
| Génère les entêtes HTTP pour un fichier CSV. More... | |
| output_xml_http_export_header ($filename, $page_encoding, $content_type= 'application/svg+xml', $cache_duration_in_seconds=null) | |
| output_xml_http_export_header() More... | |
| correct_output (&$output, $replace_template_tags=false, $format=null, $lang=null) | |
| Corrige le contenu à afficher, notamment pour avoir du https même si http est stocké en BDD. More... | |
| tabSmileys () | |
| tabSmileys() More... | |
| smileysFormat ($string) | |
| smileysFormat() More... | |
| get_string_from_array ($array, $disable_ad_quote=false) | |
| Convertit un tableau en chaine de caractère simple à gérer par un utilisateur. More... | |
| get_array_from_string ($string) | |
| Convertit une chaine de caractère simple à gérer par un utilisateur en un tableau PHP. More... | |
| get_keywords_from_text ($string_or_array, $min_length=3, $max_length=20, $allow_numeric=false, $get_long_keywords_first=true, $max_words=7) | |
| Nettoie une chaine des stop words, retire les mots trop courts, et renvoie une liste de mots clés. More... | |
| highlight_found_text ($text, $terms, &$found_words_array, $found_tags=array('< span class="search_tag">', '</span >')) | |
| Highlights terms in text. More... | |
| userAgeFormat ($date) | |
| Convert birthday date to age. More... | |
| get_formatted_phone_number ($phone_number) | |
| Supprime les caractères entre et autour des chiffres dans un numéro de téléphone. More... | |
| check_password_format ($string) | |
| Vérifie le format d'un mot de passe si une contrainte est configurée. More... | |
| check_password_format | ( | $string | ) |
Vérifie le format d'un mot de passe si une contrainte est configurée.
Exemple de regexp qui peut être mise dans $GLOBALS['site_parameters']['password_regexp'] : #.*^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*).*$# Explications : #.*^ # Start of group (?=.*[0-9]) # must contains one digit from 0-9 (?=.*[a-z]) # must contains one lowercase characters (?=.*[A-Z]) # must contains one uppercase characters (?=.*) # must contains one special symbols (ou un caractère accentué) .*$#
| string | $string |
Definition at line 1176 of file format.php.
| if (!defined('IN_PEEL')) cleanDataDeep | ( | & | $value, |
$key = null |
|||
| ) |
Nettoyage des données PGC.
| mixed | $value | |
| mixed | $key |
Definition at line 25 of file format.php.
| correct_output | ( | & | $output, |
$replace_template_tags = false, |
|||
$format = null, |
|||
$lang = null |
|||
| ) |
Corrige le contenu à afficher, notamment pour avoir du https même si http est stocké en BDD.
| string | $output | |
| boolean | $replace_template_tags | |
| string | $format | : null => does not touch the format of the tag, "text" or "html" |
| string | $lang |
Definition at line 854 of file format.php.
| fdate | ( | & | $date_nok | ) |
| filtre_csv | ( | $string, | |
$separator = "\t" |
|||
| ) |
Formatte une chaine de caractère pour insertion dans du CSV.
| string | $string | |
| string | $separator |
Definition at line 277 of file format.php.
| filtre_javascript | ( | $string, | |
$addslashes = true, |
|||
$allow_escape_single_quote = true, |
|||
$allow_escape_double_quote = true, |
|||
$skip_endline = true, |
|||
$inside_html = true |
|||
| ) |
Formatte une chaine de caractère pour insertion dans du javascript.
| string | $string | |
| boolean | $addslashes | |
| boolean | $allow_escape_single_quote | |
| boolean | $allow_escape_double_quote | |
| boolean | $skip_endline | |
| boolean | $inside_html |
Definition at line 237 of file format.php.
| filtre_pdf | ( | $string | ) |
| frmvalide | ( | $variable_to_test, | |
$true_value = 'checked="checked"', |
|||
$false_value = "" |
|||
| ) |
Affiche le mot "checked" si la variable est vraie sinon rien.
| mixed | $variable_to_test | |
| string | $true_value | |
| string | $false_value |
Definition at line 80 of file format.php.
| fxsl | ( | $number_string, | |
$separator = ',' |
|||
| ) |
Formatte un nombre pour insertion dans du CSV.
| string | $number_string | |
| string | $separator |
Definition at line 290 of file format.php.
| get_array_from_string | ( | $string | ) |
Convertit une chaine de caractère simple à gérer par un utilisateur en un tableau PHP.
| mixed | $string |
Definition at line 1011 of file format.php.
| get_country_iso_2_letter_code | ( | $country_id_or_name, | |
$guess_if_not_found = true |
|||
| ) |
get_country_iso_2_letter_code()
| mixed | $country_id_or_name | |
| boolean | $guess_if_not_found |
Definition at line 348 of file format.php.
| get_country_iso_3_letter_code | ( | $country_id_or_name, | |
$guess_if_not_found = true |
|||
| ) |
get_country_iso_3_letter_code()
| mixed | $country_id_or_name | |
| boolean | $guess_if_not_found |
Definition at line 375 of file format.php.
| get_country_iso_num_code | ( | $country_id_or_name | ) |
| get_currency_international_numerical_code | ( | $currency_code | ) |
get_currency_international_numerical_code()
| mixed | $currency_code |
Definition at line 321 of file format.php.
| get_float_from_user_input | ( | $string, | |
$from_currency_rate = 1 |
|||
| ) |
Transforme tout nombre formaté en un float au format PHP Exemples : 12 004,34 ou 12,324.50.
| mixed | $string | |
| float | $from_currency_rate |
Definition at line 196 of file format.php.
| get_formatted_date | ( | $datetime_or_timestamp = null, |
|
$mode = 'short', |
|||
$hour_minute = false |
|||
| ) |
Afficher une date formatée, en évitant les problèmes liés aux noms de mois sur les serveurs qui ne sont pas installés pour gérer le multilingue : Si on appelle get_formatted_date() sur une chaine déjà formattée par get_formatted_date(), la date est bien préservée On peut donc appliquer cette fonction sur une date provenant d'un formulaire ou de la base de données.
| mixed | $datetime_or_timestamp | Si nulle : date du jour. Si === '' ou === 0, alors c'est pas de de date |
| string | $mode | can be 'short', 'long', 'standard', 'nice', 'veryshort', 'timestamp1000' |
| mixed | $hour_minute | can be a boolean => displays the hour:minute or not, or "long" or "short" to define the format |
Definition at line 440 of file format.php.
| get_formatted_duration | ( | $total_seconds, | |
$show_seconds = false, |
|||
$display_mode = 'day' |
|||
| ) |
Affiche une durée en jours / heures / minutes / secondes.
| int | $total_seconds | Délai en secondes |
| boolean | $show_seconds | |
| string | $display_mode |
Definition at line 533 of file format.php.
| get_formatted_phone_number | ( | $phone_number | ) |
Supprime les caractères entre et autour des chiffres dans un numéro de téléphone.
| mixed | $phone_number |
Definition at line 1155 of file format.php.
| get_keywords_from_text | ( | $string_or_array, | |
$min_length = 3, |
|||
$max_length = 20, |
|||
$allow_numeric = false, |
|||
$get_long_keywords_first = true, |
|||
$max_words = 7 |
|||
| ) |
Nettoie une chaine des stop words, retire les mots trop courts, et renvoie une liste de mots clés.
| mixed | $string_or_array | |
| integer | $min_length | Doit être compatible avec la longueur minimale des stop words dans $GLOBALS['site_parameters']['filter_stop_words'] => normalement doit être >= 3 |
| integer | $max_length | |
| boolean | $allow_numeric | |
| boolean | $get_long_keywords_first | |
| integer | $max_words |
Definition at line 1075 of file format.php.
| get_mysql_date_from_user_input | ( | $string, | |
$use_current_hour_min_sec_if_missing = false |
|||
| ) |
Transforme une date formattée par get_formatted_date() en date MySQL Si la date est vide, ou partielle, ce qui manque est remplacé par des 0.
| string | $string | |
| boolean | $use_current_hour_min_sec_if_missing | Force l'ajout de l'heure H:i:s correspondant à l'instant t, si cette heure n'est pas spécifiée ; permet de générer facilement une date t + X jours |
Definition at line 496 of file format.php.
| get_string_from_array | ( | $array, | |
$disable_ad_quote = false |
|||
| ) |
Convertit un tableau en chaine de caractère simple à gérer par un utilisateur.
| mixed | $array | |
| mixed | $disable_ad_quote | pour ne pas ajouter de guillemets autour de la valeur à retourner. |
Definition at line 973 of file format.php.
| getPregConditionCompatAccents | ( | $string, | |
$delimiter = '/' |
|||
| ) |
getPregConditionCompatAccents()
| mixed | $string | |
| string | $delimiter |
Definition at line 122 of file format.php.
| highlight_found_text | ( | $text, | |
| $terms, | |||
| & | $found_words_array, | ||
$found_tags = array('<span class="search_tag">', '</span>') |
|||
| ) |
Highlights terms in text.
| string | $text | |
| array | $terms | |
| array | $found_words_array | |
| array | $found_tags |
Definition at line 1120 of file format.php.
| linkFormat | ( | $text | ) |
| output_csv_http_export_header | ( | $filename, | |
$type = 'excel', |
|||
| $page_encoding | |||
| ) |
Génère les entêtes HTTP pour un fichier CSV.
| mixed | $filename | |
| mixed | $type | |
| mixed | $page_encoding |
Definition at line 802 of file format.php.
| output_xml_http_export_header | ( | $filename, | |
| $page_encoding, | |||
$content_type = 'application/svg+xml', |
|||
$cache_duration_in_seconds = null |
|||
| ) |
output_xml_http_export_header()
| string | $filename | |
| string | $page_encoding | |
| string | $content_type | |
| integer | $cache_duration_in_seconds |
Definition at line 828 of file format.php.
| rewriting_urlencode | ( | $string, | |
$convert_string_to_lower = true |
|||
| ) |
Filtre une chaine de caractères pour insertion dans une URL On essaie de couper proprement, pour une longueur entre 30 et 60 caractères.
| mixed | $string | |
| mixed | $convert_string_to_lower |
Definition at line 304 of file format.php.
| smileysFormat | ( | $string | ) |
| tabSmileys | ( | ) |
| template_tags_replace | ( | $text, | |
$custom_template_tags = array(), |
|||
$replace_only_custom_tags = false, |
|||
$format = null, |
|||
$lang = null, |
|||
$avoid_load_urls = false |
|||
| ) |
Remplace les tags d'un texte au format [TAG] par les valeurs correspondantes.
Les tags doivent correspondre à des clés du tableau $custom_template_tags ou à des tags génériques du site. Les tags génériques sont :
| mixed | $text | |
| array | $custom_template_tags | |
| boolean | $replace_only_custom_tags | |
| string | $format | : null => does not touch the format of the tag, "text" or "html" |
| string | $lang | |
| boolean | $avoid_load_urls | A mettre à true pour éviter appels récursifs infinis |
Definition at line 599 of file format.php.
| url2Link | ( | $string | ) |
| userAgeFormat | ( | $date | ) |
Convert birthday date to age.
| string | $date |
Definition at line 1144 of file format.php.
| vb | ( | & | $var, |
$default = null |
|||
| ) |
Variable blanche if $var n'est pas défini, retourne $default, sinon retourne $var.
| mixed | $var | |
| string | $default |
Definition at line 97 of file format.php.
| vn | ( | & | $var, |
$default = 0 |
|||
| ) |
Variable nulle if $var n'est pas défini, retourne $default, sinon retourne $var.
| mixed | $var | |
| integer | $default |
Definition at line 110 of file format.php.
This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:40 -
is a product of
SAS. All rights reserved.