Go to the source code of this file.
Functions | |
| sanitizeFileName ($str, $newstr='_') | |
| Clean a string to use it as a file name. | |
| dol_string_unaccent ($str) | |
| Clean a string from all accent characters. | |
| dol_string_nospecial ($str, $newstr='_') | |
| Clean a string from all punctuation characters. | |
| dol_escape_js ($stringtoescape) | |
| Returns text escaped for inclusion in javascript code. | |
| dol_escape_htmltag ($stringtoescape) | |
| Returns text escaped for inclusion in HTML alt or title tags. | |
| dol_syslog ($message, $level=LOG_INFO) | |
| Write log message in a file or to syslog process Pour fichier: fichier defined by SYSLOG_FILE Pour syslog: facility defined by SYSLOG_FACILITY Warning, les fonctions syslog sont buggues sous Windows et generent des fautes de protection memoire. | |
| dol_fiche_head ($links, $active='0', $title='', $notab=0) | |
| Affiche le header d'une fiche. | |
| dol_time_plus_duree ($time, $duration_value, $duration_unit) | |
| Add a delay to a date. | |
| dol_print_date ($time, $format='', $to_gmt=false, $outputlangs='', $encodetooutput=false) | |
| Output date in a string format according to outputlangs (or langs if not defined). | |
| dol_getdate ($timestamp, $fast=false) | |
| Return an array with date info. | |
| dol_mktime ($hour, $minute, $second, $month, $day, $year, $gm=0, $check=1) | |
| Return a GMT date built from detailed informations Replace function mktime not available under Windows if year < 1970 PHP mktime is restricted to the years 1901-2038 on Unix and 1970-2038 on Windows. | |
| dol_date ($fmt, $timestamp, $gm=0) | |
| Returns formated date. | |
| dol_print_size ($size) | |
| Return string with formated size. | |
| dol_print_url ($url, $target='_blank', $max=32) | |
| Show Url link. | |
| dol_print_email ($email, $cid=0, $socid=0, $addlink=0, $max=64) | |
| Show EMail link. | |
| dol_print_phone ($phone, $country="FR", $cid=0, $socid=0, $addlink=0, $separ=" ") | |
| Format phone numbers according to country. | |
| dol_strlen ($string, $stringencoding='') | |
| Make a strlen call. | |
| dol_substr ($string, $start, $length, $stringencoding='') | |
| Make a substring. | |
| dol_trunc ($string, $size=40, $trunc='right', $stringencoding='') | |
| Truncate a string to a particular length adding '. | |
| img_object ($alt, $object) | |
| Affiche picto propre a une notion/module (fonction g�n�rique). | |
| img_picto ($alt, $picto, $options='', $pictoisfullpath=0) | |
| Show picto (generic function). | |
| img_picto_common ($alt, $picto, $options='', $pictoisfullpath=0) | |
| Show picto (generic function). | |
| img_action ($alt="default", $numaction) | |
| Affiche logo action. | |
| img_file ($alt="default") | |
| Affiche logo fichier. | |
| img_refresh ($alt="default") | |
| Affiche logo refresh. | |
| img_folder ($alt="default") | |
| Affiche logo dossier. | |
| img_file_new ($alt="default") | |
| Affiche logo nouveau fichier. | |
| img_pdf ($alt="default", $size=3) | |
| Affiche logo pdf. | |
| img_edit_add ($alt="default") | |
| Affiche logo +. | |
| img_edit_remove ($alt="default") | |
| Affiche logo -. | |
| img_edit ($alt="default", $float=0, $other='') | |
| Affiche logo editer/modifier fiche. | |
| img_view ($alt="default", $float=0, $other='') | |
| Affiche logo voir fiche. | |
| img_delete ($alt="default") | |
| Affiche logo effacer. | |
| img_help ($usehelpcursor=1, $usealttitle=1) | |
| Affiche logo help avec curseur "?". | |
| img_info ($alt="default") | |
| Affiche logo info. | |
| img_warning ($alt="default", $float=0) | |
| Affiche logo warning. | |
| img_error ($alt="default") | |
| Affiche logo error. | |
| img_phone ($alt="default", $option=0) | |
| Affiche logo telephone. | |
| img_next ($alt="default") | |
| Affiche logo suivant. | |
| img_previous ($alt="default") | |
| Affiche logo pr�c�dent. | |
| img_down ($alt="default", $selected=0) | |
| Affiche logo bas. | |
| img_up ($alt="default", $selected=0) | |
| Affiche logo haut. | |
| img_left ($alt="default", $selected=0) | |
| Affiche logo gauche. | |
| img_right ($alt="default", $selected=0) | |
| Affiche logo droite. | |
| img_tick ($alt="default") | |
| Affiche logo tick. | |
| img_allow ($allow) | |
| Affiche le logo tick si allow. | |
| img_mime ($file, $alt='') | |
| Show mime picto. | |
| info_admin ($texte, $infoonimgalt=0) | |
| Show information for admin users. | |
| restrictedArea ($user, $feature='societe', $objectid=0, $dbtablename='', $feature2='', $dbt_socfield='fk_soc') | |
| Check permissions of a user to show a page and an object. | |
| accessforbidden ($message='', $printheader=1) | |
| Affiche message erreur de type acces interdit et arrete le programme. | |
| dol_print_error ($db='', $error='') | |
| Affiche message erreur system avec toutes les informations pour faciliter le diagnostic et la remont�e des bugs. | |
| dol_move_uploaded_file ($src_file, $dest_file, $allowoverwrite) | |
| Deplacer les fichiers telecharg�s, apres quelques controles divers. | |
| print_liste_field_titre ($name, $file, $field, $begin="", $options="", $td="", $sortfield="", $sortorder="") | |
| Show title line of an array. | |
| print_titre ($titre) | |
| Affichage d'un titre. | |
| print_fiche_titre ($titre, $mesg='', $picto='title.gif', $pictoisfullpath=0) | |
| Affichage d'un titre d'une fiche, align� a gauche. | |
| print_barre_liste ($titre, $page, $file, $options='', $sortfield='', $sortorder='', $center='', $num=-1, $totalnboflines=0, $picto='title.gif', $pictoisfullpath=0) | |
| Print a title with navigation controls for pagination. | |
| print_fleche_navigation ($page, $file, $options='', $nextpage, $betweenarrows='') | |
| Fonction servant a afficher les fleches de navigation dans les pages de listes. | |
| dol_delete_file ($file) | |
| Effacement d'un fichier. | |
| dol_delete_dir ($dir) | |
| Remove a directory. | |
| dol_delete_dir_recursive ($dir, $count=0) | |
| Remove a directory $dir and its subdirectories. | |
| vatrate ($rate, $addpercent=false, $info_bits=0) | |
| Fonction qui retourne un taux de tva formate pour visualisation. | |
| price ($amount, $html=0, $outlangs='', $trunc=1, $rounding=2) | |
| Fonction qui formate un montant pour visualisation. | |
| price2num ($amount, $rounding='', $alreadysqlnb=0) | |
| Function that return a number with universal decimal format (decimal separator is '. | |
| get_product_vat_for_country ($idprod, $countrycode) | |
| Return vat rate of a product in a particular selling country. | |
| get_default_tva ($societe_vendeuse, $societe_acheteuse, $taux_produit, $idprod=0) | |
| Fonction qui renvoie la tva d'une ligne (en fonction du vendeur, acheteur et taux du produit). | |
| get_default_npr ($societe_vendeuse, $societe_acheteuse, $taux_produit) | |
| Fonction qui renvoie si tva doit etre tva percue r�cup�rable. | |
| yn ($yesno, $case=1, $color=0) | |
| Renvoie oui ou non dans la langue choisie. | |
| get_exdir ($num, $level=3) | |
| Return a path to class a directory according to an id. | |
| create_exdir ($dir) | |
| Creation of a directory (recursive). | |
| picto_required () | |
| Retourne le picto champ obligatoire. | |
| dol_string_nohtmltag ($StringHtml, $removelinefeed=1) | |
| Clean a string from all HTML tags and entities. | |
| dol_nl2br ($stringtoencode, $nl2brmode=0) | |
| Replace CRLF in string with a HTML BR tag. | |
| dol_htmlentitiesbr ($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8') | |
| This function is called to encode a string into a HTML string. | |
| dol_htmlentitiesbr_decode ($stringtodecode, $pagecodeto='UTF-8') | |
| This function is called to decode a HTML string (it decodes entities and br tags). | |
| dol_htmlcleanlastbr ($stringtodecode) | |
| This function remove all ending and br at end. | |
| dol_entity_decode ($stringhtml, $pagecodeto='UTF-8') | |
| This function is called to decode a string with HTML entities (it decodes entities tags). | |
| dol_string_is_good_iso ($s) | |
| Check if a string is a correct iso string If not, it will we considered not HTML encoded even if it is by FPDF. | |
| dol_nboflines ($s, $maxchar=0) | |
| Return nb of lines of a clear text. | |
| dol_nboflines_bis ($texte, $maxlinesize=0) | |
| Return nb of lines of a formated text with and . | |
| dol_microtime_float () | |
| Fonction simple identique a microtime de PHP 5 mais compatible PHP 4. | |
| make_substitutions ($chaine, $substitutionarray) | |
| Effectue les substitutions des mots cl�s par les donn�es en fonction du tableau. | |
| print_date_range ($date_start, $date_end, $format= '', $outputlangs='') | |
| Format output for start and end date. | |
| monthArrayOrSelected ($selected=0) | |
| Retourne un tableau des mois ou le mois selectionne. | |
| dol_htmloutput_errors ($mesgstring='', $mesgarray='') | |
| Returns formated reduction. | |
| stopwithmem () | |
| This function output memory used by PHP and exit everything. | |
| dol_sort_array (&$array, $index, $order='asc', $natsort, $case_sensitive) | |
| Advanced sort array by second index function, which produces ascending (default) or descending output and uses optionally natural case insensitive sorting (which can be optionally case sensitive as well). | |
| utf8_check ($Str) | |
| Check if a string is in UTF8. | |
Definition in file functions.lib.php.
| accessforbidden | ( | $ | message = '', |
|
| $ | printheader = 1 | |||
| ) |
Affiche message erreur de type acces interdit et arrete le programme.
| message | Force error message | |
| printheader | Affiche avant le header |
Definition at line 1482 of file functions.lib.php.
References llxHeader(), and print.
Referenced by restrictedArea().
| create_exdir | ( | $ | dir | ) |
Creation of a directory (recursive).
| $dir | Directory to create |
Definition at line 2287 of file functions.lib.php.
References dol_syslog().
Referenced by DolibarrModules::_init(), Product::add_photo(), Product::add_photo_web(), Webcal::build_calfile(), ActionComm::build_exportfile(), Export::build_file(), EcmDirectory::create(), BonPrelevement::Create(), facture_meta_create(), vignette(), pdf_muscadet::write_file(), pdf_paiement::write_file(), pdf_propale_jaune::write_file(), pdf_propale_azur::write_file(), pdf_typhon::write_file(), pdf_sirocco::write_file(), pdf_soleil::write_file(), pdf_oursin::write_file(), pdf_crabe::write_file(), html_cerfafr::write_file(), pdf_einstein::write_file(), pdf_edison::write_file(), BordereauChequeBlochet::write_file(), and modPhpbarcode::writeBarCode().
| dol_date | ( | $ | fmt, | |
| $ | timestamp, | |||
| $ | gm = 0 | |||
| ) |
Returns formated date.
| fmt | Format (Exemple: 'Y-m-d H:i:s') | |
| timestamp | Date. Exemple: Si timestamp=0 et gm=1, renvoi 01/01/1970 00:00:00 | |
| gm | 1 if timestamp was built with gmmktime, 0 if timestamp was build with mktime |
Definition at line 606 of file functions.lib.php.
| dol_delete_dir | ( | $ | dir | ) |
Remove a directory.
| file | Directory to delete |
Definition at line 1933 of file functions.lib.php.
Referenced by Propal::delete(), Livraison::delete(), Expedition::delete(), EcmDirectory::delete(), Commande::delete(), Livraison::valid(), and Expedition::valid().
| dol_delete_dir_recursive | ( | $ | dir, | |
| $ | count = 0 | |||
| ) |
Remove a directory $dir and its subdirectories.
| file | Dir to delete | |
| count | Counter to count nb of deleted elements |
Definition at line 1944 of file functions.lib.php.
Referenced by FormMail::clear_attached_files(), and Societe::delete().
| dol_delete_file | ( | $ | file | ) |
Effacement d'un fichier.
| file | Fichier a effacer ou masque de fichier a effacer | |
| boolean | true if file deleted, false if error |
Definition at line 1915 of file functions.lib.php.
References dol_syslog().
Referenced by Propal::delete(), Livraison::delete(), Expedition::delete(), Commande::delete(), Facture::set_valid(), Livraison::valid(), Expedition::valid(), and Commande::valid().
| dol_entity_decode | ( | $ | stringhtml, | |
| $ | pagecodeto = 'UTF-8' | |||
| ) |
This function is called to decode a string with HTML entities (it decodes entities tags).
| string | stringhtml |
Definition at line 2456 of file functions.lib.php.
Referenced by dol_string_nohtmltag().
| dol_escape_htmltag | ( | $ | stringtoescape | ) |
Returns text escaped for inclusion in HTML alt or title tags.
| $stringtoescape | String to escape |
Definition at line 127 of file functions.lib.php.
| dol_escape_js | ( | $ | stringtoescape | ) |
Returns text escaped for inclusion in javascript code.
| $stringtoescape | String to escape |
Definition at line 115 of file functions.lib.php.
| dol_fiche_head | ( | $ | links, | |
| $ | active = '0', |
|||
| $ | title = '', |
|||
| $ | notab = 0 | |||
| ) |
Affiche le header d'une fiche.
| links | Tableau de titre d'onglets | |
| active | 0=onglet non actif, 1=onglet actif | |
| title | Titre tabelau ("" par defaut) | |
| notab | 0=Add tab header, 1=no tab header |
Definition at line 265 of file functions.lib.php.
References dol_trunc(), and print.
Referenced by report_header().
| dol_getdate | ( | $ | timestamp, | |
| $ | fast = false | |||
| ) |
Return an array with date info.
| timestamp | Timestamp | |
| fast | Fast mode |
Definition at line 510 of file functions.lib.php.
| dol_htmlcleanlastbr | ( | $ | stringtodecode | ) |
This function remove all ending
and br at end.
| stringtodecode | String to decode |
Definition at line 2445 of file functions.lib.php.
| dol_htmlentitiesbr | ( | $ | stringtoencode, | |
| $ | nl2brmode = 0, |
|||
| $ | pagecodefrom = 'UTF-8' | |||
| ) |
This function is called to encode a string into a HTML string.
All entities except &,<,> are converted. This permits to encode special chars to entities with no double encoded for already encoded HTML strings. This function also remove last CR/BR.
| stringtoencode | String to encode | |
| nl2brmode | 0=Adding br before , 1=Replacing by br (for use with FPDF writeHTMLCell function for example) |
Definition at line 2405 of file functions.lib.php.
References dol_nl2br().
Referenced by DolEditor::DolEditor(), Adherent::send_an_email(), show_list_sending_receive(), pdf_propale_jaune::write_file(), and pdf_soleil::write_file().
| dol_htmlentitiesbr_decode | ( | $ | stringtodecode, | |
| $ | pagecodeto = 'UTF-8' | |||
| ) |
This function is called to decode a HTML string (it decodes entities and br tags).
| stringtodecode | String to decode |
Definition at line 2430 of file functions.lib.php.
Referenced by CommActionRapport::_pages().
| dol_htmloutput_errors | ( | $ | mesgstring = '', |
|
| $ | mesgarray = '' | |||
| ) |
Returns formated reduction.
| reduction | Reduction percentage |
Definition at line 2671 of file functions.lib.php.
| dol_microtime_float | ( | ) |
Fonction simple identique a microtime de PHP 5 mais compatible PHP 4.
Definition at line 2538 of file functions.lib.php.
| dol_mktime | ( | $ | hour, | |
| $ | minute, | |||
| $ | second, | |||
| $ | month, | |||
| $ | day, | |||
| $ | year, | |||
| $ | gm = 0, |
|||
| $ | check = 1 | |||
| ) |
Return a GMT date built from detailed informations Replace function mktime not available under Windows if year < 1970 PHP mktime is restricted to the years 1901-2038 on Unix and 1970-2038 on Windows.
| hour | Hour (can be -1 for undefined) | |
| minute | Minute (can be -1 for undefined) | |
| second | Second (can be -1 for undefined) | |
| month | Month | |
| day | Day | |
| year | Year | |
| gm | 1=Input informations are GMT values, otherwise local to user | |
| check | 0=No check on parameters (Can use day 32, etc...) |
Definition at line 548 of file functions.lib.php.
Referenced by Product::_get_stats(), Stats::_getAmountByMonth(), Stats::_getNbByMonth(), pdf_paiement::_pagehead(), Webcal::build_calfile(), Facture::calculate_date_lim_reglement(), dol_print_date(), and show_day_events().
| dol_move_uploaded_file | ( | $ | src_file, | |
| $ | dest_file, | |||
| $ | allowoverwrite | |||
| ) |
Deplacer les fichiers telecharg�s, apres quelques controles divers.
| src_file | Source filename | |
| dest_file | Target filename | |
| allowoverwrite | Overwrite if exists |
Definition at line 1625 of file functions.lib.php.
References dol_avscan_file(), and dol_syslog().
Referenced by Product::add_photo().
| dol_nboflines | ( | $ | s, | |
| $ | maxchar = 0 | |||
| ) |
Return nb of lines of a clear text.
| s | String to check | |
| maxchar | Not yet used |
Definition at line 2491 of file functions.lib.php.
Referenced by CommActionRapport::_pages().
| dol_nboflines_bis | ( | $ | texte, | |
| $ | maxlinesize = 0 | |||
| ) |
Return nb of lines of a formated text with
and
.
| texte | Text | |
| maxlinesize | Largeur de ligne en caracteres(ou 0 si pas de limite - defaut) |
Definition at line 2507 of file functions.lib.php.
Referenced by pdf_propale_jaune::write_file(), pdf_propale_azur::write_file(), pdf_typhon::write_file(), pdf_sirocco::write_file(), pdf_soleil::write_file(), pdf_crabe::write_file(), pdf_einstein::write_file(), and pdf_edison::write_file().
| dol_nl2br | ( | $ | stringtoencode, | |
| $ | nl2brmode = 0 | |||
| ) |
Replace CRLF in string with a HTML BR tag.
| string2encode | String to encode | |
| nl2brmode | 0=Adding br before , 1=Replacing by br |
Definition at line 2382 of file functions.lib.php.
Referenced by dol_htmlentitiesbr().
| dol_print_date | ( | $ | time, | |
| $ | format = '', |
|||
| $ | to_gmt = false, |
|||
| $ | outputlangs = '', |
|||
| $ | encodetooutput = false | |||
| ) |
Output date in a string format according to outputlangs (or langs if not defined).
Return charset is always UTF-8, except if encodetoouput is defined. In this cas charset is output charset.
| time | GM Timestamps date (or 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' in server TZ) | |
| format | Output date format "%d %b %Y", "%d/%m/%Y %H:%M", "%d/%m/%Y %H:%M:%S", "day", "daytext", "dayhour", "dayhourldap", "dayhourtext" | |
| to_gmt | false=output string if for local server TZ users, true=output string is for GMT users | |
| outputlangs | Object lang that contains language for text translation. |
Definition at line 347 of file functions.lib.php.
References dol_mktime(), dol_substr(), and dol_syslog().
Referenced by Product::_get_stats(), Stats::_getAmountByMonth(), Stats::_getNbByMonth(), Adherent::_load_ldap_info(), pdf_muscadet::_pagehead(), pdf_paiement::_pagehead(), pdf_typhon::_pagehead(), pdf_sirocco::_pagehead(), pdf_crabe::_pagehead(), CommActionRapport::_pages(), pdf_oursin::_tableau_versements(), pdf_crabe::_tableau_versements(), mailing_fraise::add_to_target(), build_calfile(), dol_print_error(), dol_print_object_info(), facture_meta_create(), Commande::fetch(), BordereauChequeBlochet::Header(), report_header(), InterfaceWebcalsynchro::run_trigger(), InterfacePhenixsynchro::run_trigger(), InterfaceActionsAuto::run_trigger(), Form::select_date(), show_day_events(), write_conf_file(), pdf_paiement::write_file(), pdf_soleil::write_file(), and html_cerfafr::write_file().
| dol_print_email | ( | $ | email, | |
| $ | cid = 0, |
|||
| $ | socid = 0, |
|||
| $ | addlink = 0, |
|||
| $ | max = 64 | |||
| ) |
Show EMail link.
| EMail to show | ||
| cid | Id of contact if known | |
| socid | Id of third party if known | |
| addlink | 0=no link to create action | |
| max | Max number of characters to show |
Definition at line 667 of file functions.lib.php.
References dol_trunc(), and img_object().
Referenced by show_contacts().
| dol_print_error | ( | $ | db = '', |
|
| $ | error = '' | |||
| ) |
Affiche message erreur system avec toutes les informations pour faciliter le diagnostic et la remont�e des bugs.
On doit appeler cette fonction quand une erreur technique bloquante est rencontree. Toutefois, il faut essayer de ne l'appeler qu'au sein de pages php, les classes devant renvoyer leur erreur par l'intermediaire de leur propriete "error".
| db | Database handler | |
| error | Chaine erreur ou tableau de chaines erreur complementaires a afficher |
Definition at line 1526 of file functions.lib.php.
References dol_print_date(), dol_syslog(), and print.
Referenced by Stats::_getAllByYear(), Stats::_getNbByMonth(), Stats::_getNbByYear(), Product::_log_price(), Categorie::add_fille(), Product::add_sousproduit(), Product::add_subproduct(), mailing_poire::add_to_target(), Tva::addPayment(), UserGroup::addrights(), User::addrights(), Categorie::already_exists(), Societe::attribute_prefix(), batch_fournisseur_updateturnover(), Propal::classer_facturee(), Commande::classer_facturee(), clean_orphelins(), Contrat::cloture(), Societe::contact_array(), Societe::contact_email_array(), Societe::contact_get_email(), Categorie::containing(), Product::correct_stock(), Propal::create(), Don::create(), Categorie::create(), Commande::create(), AdherentOptions::create(), AdherentOptions::create_label(), Product::del_sousproduit(), UserGroup::delete(), AdherentOptions::delete_label(), FactureFournisseur::deleteline(), UserGroup::delrights(), User::delrights(), CommonObject::detail_contact(), dol_set_user_param(), dolibarr_set_const(), don_create(), expedition_pdf_create(), facture_pdf_create(), Entrepot::fetch(), Product::fetch(), Paiement::fetch(), FactureFournisseur::fetch(), CommandeFournisseurLigne::fetch(), PaiementFourn::fetch(), FichinterLigne::fetch(), FactureLigne::fetch(), Export::fetch(), AccountLine::fetch(), Categorie::fetch(), CommandeLigne::fetch(), Bookmark::fetch(), Adherent::fetch_login(), AdherentOptions::fetch_name_optionals_label(), Adherent::fetch_optionals(), fichinter_create(), FormCompany::form_prospect_level(), RemiseCheque::GeneratePdf(), Categorie::get_all_categories(), Project::get_element_list(), Categorie::get_filles(), Product::get_fils_arbo(), EcmDirectory::get_full_arbo(), Categorie::get_full_arbo(), Categorie::get_meres(), Categorie::get_nb_categories(), get_next_value(), Societe::get_nom(), Product::get_pere(), Facture::getListIdAvoirFromInvoice(), Propal::getNextNumRef(), CommandeFournisseur::getNextNumRef(), Facture::getNextNumRef(), Commande::getNextNumRef(), Propal::getOrderArrayList(), Project::getTasksArray(), Project::getTasksRoleForUser(), Societe::info(), Propal::info(), FactureFournisseur::info(), Facture::info(), AccountLine::info(), Commande::info(), Cotisation::info(), Adherent::info(), ActionComm::info(), FichinterLigne::insert(), FactureLigne::insert(), CommandeLigne::insert(), Product::is_sousproduit(), Fournisseur::ListArray(), CommonObject::liste_contact(), ModelePDFFactures::liste_modeles(), methode_expedition::liste_modeles(), ModeleDroitPret::liste_rapport(), Menubase::listeMainmenu(), Translate::Load(), FactureFournisseur::load_board(), Facture::load_board(), Contrat::load_board(), RemiseCheque::load_board(), Account::load_board(), Adherent::load_board(), Form::load_cache_conditions_paiements(), Form::load_cache_types_paiements(), User::load_entrepots(), EcmDirectory::load_motherof(), Service::load_state_board(), Prospect::load_state_board(), Propal::load_state_board(), Product::load_state_board(), Fournisseur::load_state_board(), Facture::load_state_board(), Contrat::load_state_board(), Commande::load_state_board(), Client::load_state_board(), Adherent::load_state_board(), FormProduct::loadWarehouses(), Menubase::menuLeftCharger(), Menubase::menuTopCharger(), migrate_paiements(), migrate_paiements_orphelins_1(), migrate_paiements_orphelins_2(), PDF_card::PDF_card(), print_paybox_redirect(), propale_pdf_create(), ImportCsv::read_record(), Categorie::remove(), Product::remove_price(), Form::select_adresse_livraison(), FormCompany::select_civilite(), Form::select_comptes(), Form::select_contacts(), Form::select_currency(), FormCompany::select_departement(), FormOther::select_ecotaxes(), FormOther::select_export_model(), Form::select_export_model(), FormCompany::select_forme_juridique(), Form::select_product_fourn_price(), Form::select_produits_do(), Form::select_produits_fournisseurs_do(), select_projects(), Form::select_propal_statut(), FormCompany::select_region(), Form::select_remises(), Form::select_societes(), Form::select_type_socialcontrib(), Form::select_users(), FormCompany::selectCompaniesForNewContact(), Notify::send(), FactureFournisseur::set_payed(), Societe::set_price_level(), Facture::set_valid(), CommonObject::setDocModel(), User::setPassword(), Adherent::setPassword(), CommonObject::setProject(), show_actions_done(), show_actions_todo(), show_array_actions_to_do(), show_array_last_actions_done(), FormFile::show_documents(), show_list_sending_receive(), FormActions::showactions(), supplier_order_pdf_create(), tva_coll(), tva_paye(), UserGroup::update(), Don::update(), Account::update(), Categorie::update(), AdherentOptions::update(), Product::update_barcode(), Product::update_barcode_type(), CommonObject::update_contact(), Paiement::update_fk_bank(), PaiementFourn::update_fk_bank(), Tva::update_fk_bank(), AdherentOptions::update_label(), Product::update_price(), vat_by_quarter(), vat_by_thirdparty(), pdf_paiement::write_file(), pdf_typhon::write_file(), pdf_sirocco::write_file(), pdf_soleil::write_file(), and ExportCsv::write_record().
| dol_print_phone | ( | $ | phone, | |
| $ | country = "FR", |
|||
| $ | cid = 0, |
|||
| $ | socid = 0, |
|||
| $ | addlink = 0, |
|||
| $ | separ = " " | |||
| ) |
Format phone numbers according to country.
| phone | Phone number to format | |
| country | Country to use for formatting | |
| cid | Id of contact if known | |
| socid | Id of third party if known | |
| addlink | 0=no link to create action | |
| separ | separation between numbers for a better visibility example : xx.xx.xx.xx.xx |
Definition at line 711 of file functions.lib.php.
References img_object().
Referenced by show_contacts().
| dol_print_size | ( | $ | size | ) |
Return string with formated size.
| size | Size to print |
Definition at line 630 of file functions.lib.php.
| dol_print_url | ( | $ | url, | |
| $ | target = '_blank', |
|||
| $ | max = 32 | |||
| ) |
Show Url link.
| url | Url to show | |
| target | Target for link | |
| max | Max number of characters to show |
Definition at line 644 of file functions.lib.php.
References dol_trunc().
| dol_string_is_good_iso | ( | $ | s | ) |
Check if a string is a correct iso string If not, it will we considered not HTML encoded even if it is by FPDF.
| s | String to check |
Definition at line 2470 of file functions.lib.php.
| dol_string_nohtmltag | ( | $ | StringHtml, | |
| $ | removelinefeed = 1 | |||
| ) |
Clean a string from all HTML tags and entities.
| StringHtml | String to clean | |
| removelinefeed | Replace also all lines feeds by a space |
Definition at line 2357 of file functions.lib.php.
References dol_entity_decode().
Referenced by build_calfile(), build_rssfile(), ImportCsv::csv_clean(), ExportCsv::csv_clean(), and ExportExcel::excel_clean().
| dol_string_nospecial | ( | $ | str, | |
| $ | newstr = '_' | |||
| ) |
Clean a string from all punctuation characters.
| str | String to clean | |
| newstr | String to replace bad chars by |
Definition at line 101 of file functions.lib.php.
Referenced by check_value(), Product::create(), EcmDirectory::create(), get_next_value(), sanitizeFileName(), and Product::update().
| dol_string_unaccent | ( | $ | str | ) |
Clean a string from all accent characters.
| str | String to clean |
Definition at line 55 of file functions.lib.php.
References utf8_check().
Referenced by sanitizeFileName().
| dol_strlen | ( | $ | string, | |
| $ | stringencoding = '' | |||
| ) |
Make a strlen call.
Works even in mbstring module not enabled
| unknown_type | $string | |
| unknown_type | $stringencoding |
Definition at line 777 of file functions.lib.php.
Referenced by dol_trunc().
| dol_substr | ( | $ | string, | |
| $ | start, | |||
| $ | length, | |||
| $ | stringencoding = '' | |||
| ) |
Make a substring.
Works even in mbstring module not enabled
| unknown_type | $string | |
| unknown_type | $start | |
| unknown_type | $length | |
| unknown_type | $stringencoding |
Definition at line 804 of file functions.lib.php.
Referenced by Stats::_getAmountByMonth(), Stats::_getNbByMonth(), dol_print_date(), and dol_trunc().
| dol_syslog | ( | $ | message, | |
| $ | level = LOG_INFO | |||
| ) |
Write log message in a file or to syslog process Pour fichier: fichier defined by SYSLOG_FILE Pour syslog: facility defined by SYSLOG_FACILITY Warning, les fonctions syslog sont buggues sous Windows et generent des fautes de protection memoire.
Pour resoudre, utiliser le loggage fichier, au lieu du loggage syslog (configuration du module). Si SYSLOG_FILE_NO_ERROR defini, on ne gere pas erreur ecriture log
| message | Line to log. Ne doit pas etre traduit si level = LOG_ERR | |
| level | Log level |
This must must not use any call to other function calling dol_syslog (avoid infinite loop).
On Windows LOG_ERR=4, LOG_WARNING=5, LOG_NOTICE=LOG_INFO=LOG_DEBUG=6 On Linux LOG_ERR=3, LOG_WARNING=4, LOG_INFO=6, LOG_DEBUG=7
Definition at line 155 of file functions.lib.php.
References print.
Referenced by DolibarrModules::_active(), ProductLivre::_calculate_prix_revient(), MouvementStock::_create(), MouvementStock::_createProductComposition(), MouvementStock::_createSubProduct(), DolibarrModules::_dbactive(), DolibarrModules::_dbunactive(), CMailFile::_encode_file(), BonPrelevement::_get_list_factures(), Stats::_getAllByYear(), Stats::_getAmountByMonth(), Stats::_getAverageByMonth(), Stats::_getNbByMonth(), Stats::_getNbByYear(), DolibarrModules::_init(), Product::_log_price(), CommActionRapport::_pages(), Product::_setErrNo(), pdf_oursin::_tableau_versements(), pdf_crabe::_tableau_versements(), DolibarrModules::_unactive(), Contrat::active_line(), Webcal::add(), Phenix::add(), ActionComm::add(), CommonObject::add_contact(), Product::add_photo(), Product::add_photo_web(), Propal::add_product(), Adherent::add_to_mailman(), Adherent::add_to_spip(), mailing_pomme::add_to_target(), mailing_poire::add_to_target(), MailingTargets::add_to_target(), mailing_kiwi::add_to_target(), mailing_fraise::add_to_target(), Account::add_url_line(), Propal::addline(), FactureFournisseur::addline(), CommandeFournisseur::addline(), Facture::addline(), Contrat::addline(), FactureRec::addline(), Account::addline(), Commande::addline(), Tva::addPayment(), User::addrights(), ComptaExportPoivre::Agregate(), CommandeFournisseur::approve(), Contrat::array_detail(), DoliDb::begin(), Webcal::build_calfile(), build_calfile(), ActionComm::build_exportfile(), ModeleExports::build_file(), Export::build_file(), Categorie::build_path_from_id_categ(), build_rssfile(), CommandeFournisseur::Cancel(), Commande::cancel(), EcmDirectory::changeNbOfFiles(), Societe::check_codeclient(), Societe::check_codefournisseur(), check_user_password_dolibarr(), check_user_password_forceuser(), check_user_password_http(), check_user_password_ldap(), check_value(), checkBanForAccount(), MailingTargets::clear_target(), DoliDb::close(), Commande::cloture(), CMailFile::CMailFile(), Societe::codeclient_modifiable(), Societe::codefournisseur_modifiable(), CommandeFournisseur::commande(), DoliDb::commit(), Propal::cond_reglement(), Facture::cond_reglement(), Commande::cond_reglement(), DoliDb::connect(), Product::correct_stock(), Adherent::cotisation(), Notify::countDefinedNotifications(), UserGroup::create(), User::create(), Societe::create(), Propal::create(), ProductLivre::Create(), Product::create(), Livraison::create(), FactureFournisseur::create(), CommandeFournisseur::create(), PaiementFourn::create(), Facture::create(), Export::create(), EcmDirectory::create(), Don::create(), DiscountAbsolute::create(), Menubase::create(), Events::create(), Contrat::create(), Contact::create(), Tva::create(), BonPrelevement::Create(), RemiseCheque::Create(), Deplacement::create(), ComptaCompte::create(), Account::create(), Mailing::create(), AdresseLivraison::create(), PaiementCharge::create(), ChargeSociales::create(), Commande::create(), Bookmark::create(), Cotisation::create(), AdherentType::create(), AdherentOptions::create(), Adherent::create(), AccountancySystem::create(), AccountancyAccount::create(), Fournisseur::create_commande(), create_exdir(), User::create_from_contact(), User::create_from_member(), Societe::create_from_member(), Commande::create_from_propale(), AdherentOptions::create_label(), Fournisseur::CreateCategory(), Facture::createFromCurrent(), Project::CreateTask(), DoliDb::DDLAddField(), DoliDb::DDLCreateDb(), DoliDb::DDLCreateTable(), DoliDb::DDLCreateUser(), DoliDb::DDLDescTable(), DoliDb::DDLDropField(), Adherent::del_to_mailman(), Societe::delete(), Propal::delete(), Project::delete(), FactureFournisseur::delete(), CommandeFournisseur::delete(), Facture::delete(), Export::delete(), EcmDirectory::delete(), Contrat::delete(), RemiseCheque::Delete(), AccountLine::delete(), Mailing::delete(), AdresseLivraison::delete(), ChargeSociales::delete(), CommandeLigne::delete(), Cotisation::delete(), AdherentOptions::delete(), Adherent::delete(), ActionComm::delete(), DolibarrModules::delete_boxes(), CommonObject::delete_contact(), CommandeFournisseur::delete_line(), FichinterLigne::delete_line(), Contrat::delete_line(), DolibarrModules::delete_menus(), DolibarrModules::delete_permissions(), DolibarrModules::delete_style_sheet(), DolibarrModules::delete_tabs(), Facture::deleteline(), Facture::demande_prelevement(), Facture::demande_prelevement_delete(), dol_delete_file(), dol_dir_list(), dol_move_uploaded_file(), dol_print_date(), dol_print_error(), dol_print_file(), dol_set_user_param(), DolEditor::DolEditor(), dolibarr_del_const(), dolibarr_get_const(), dolibarr_set_const(), DoliDb::DoliDb(), don_create(), FormCompany::effectif_array(), encodedecode_dbpassconf(), expedition_pdf_create(), ComptaExport::Export(), Product::fastappro(), UserGroup::fetch(), User::fetch(), Societe::fetch(), Propal::fetch(), Project::fetch(), Product::fetch(), Paiement::fetch(), Osc_product::fetch(), Osc_order::fetch(), Osc_customer::fetch(), Livraison::fetch(), ModeleBoxes::fetch(), FactureFournisseur::fetch(), CommandeFournisseur::fetch(), FichinterLigne::fetch(), Facture::fetch(), Export::fetch(), Expedition::fetch(), EcmDirectory::fetch(), DiscountAbsolute::fetch(), ContratLigne::fetch(), Contrat::fetch(), LignePrelevement::fetch(), RemiseCheque::Fetch(), FactureRec::fetch(), AccountLine::fetch(), Mailing::fetch(), AdresseLivraison::fetch(), ChargeSociales::fetch(), Categorie::fetch(), Commande::fetch(), Bookmark::fetch(), Cotisation::fetch(), AdherentType::fetch(), Adherent::fetch(), ActionComm::fetch(), AdresseLivraison::fetch_adresse(), Contrat::fetch_lignes(), FactureFournisseur::fetch_lines(), Facture::fetch_lines(), FactureRec::fetch_lines(), Commande::fetch_lines(), AdherentOptions::fetch_name_optionals_label(), Adherent::fetch_optionals(), Adherent::fetch_subscriptions(), fichinter_create(), FormCompany::form_prospect_level(), RemiseCheque::GeneratePdf(), Product::get_buyprice(), mod_codecompta_aquarium::get_code(), Societe::get_codeclient(), Societe::get_codefournisseur(), get_default_tva(), Project::get_element_list(), EcmDirectory::get_full_arbo(), Categorie::get_full_arbo(), get_next_value(), Categorie::get_type(), DiscountAbsolute::getAvailableDiscounts(), Paiement::getBillsArray(), PaiementFourn::getBillsArray(), getCountryLabel(), DolibarrModules::getDbVersion(), getFormeJuridiqueLabel(), CommonObject::getIdContact(), Translate::getLabelFromKey(), Contrat::getListOfContracts(), RemiseCheque::getNextNumber(), mod_codeclient_monkey::getNextValue(), mod_propale_marbre::getNextValue(), mod_facture_terre::getNextValue(), mod_commande_marbre::getNextValue(), User::getrights(), Facture::getSommePaiement(), ChargeSociales::getSommePaiement(), DiscountAbsolute::getSumCreditNotesUsed(), DiscountAbsolute::getSumDepositsUsed(), Project::getTasksArray(), Adherent::info(), ActionComm::info(), CommandeFournisseur::initAsSpecimen(), Expedition::initAsSpecimen(), Commande::initAsSpecimen(), FichinterLigne::insert(), FactureLigne::insert(), CommandeLigne::insert(), DolibarrModules::insert_boxes(), DolibarrModules::insert_const(), DolibarrModules::insert_menus(), DolibarrModules::insert_permissions(), DolibarrModules::insert_style_sheet(), DolibarrModules::insert_tabs(), Propal::InvoiceArrayList(), CommonObject::line_order(), DiscountAbsolute::link_to_invoice(), Facture::list_qualified_avoir_invoices(), Facture::list_replacable_invoices(), InfoBox::listBoxes(), CommonObject::liste_contact(), ModelePDFPropales::liste_modeles(), ModeleImports::liste_modeles(), ModeleExports::liste_modeles(), UserGroup::listGroupsForUser(), CommandeFournisseur::Livraison(), Import::load_arrays(), Export::load_arrays(), Form::load_cache_conditions_paiements(), Form::load_cache_types_paiements(), ModeleImports::load_file(), EcmDirectory::load_motherof(), CommonObject::load_previous_next_ref(), Product::load_stock(), Commande::loadExpeditions(), FormProduct::loadWarehouses(), CommandeFournisseur::log(), Product::log_price_delete(), makesalt(), Menubase::menuLeftCharger(), Menubase::menuTopCharger(), Propal::mode_reglement(), Facture::mode_reglement(), Commande::mode_reglement(), BonPrelevement::NbFactureAPrelever(), ImportCsv::open_file(), ExportExcel::open_file(), ExportCsv::open_file(), print_paybox_redirect(), propale_pdf_create(), ComptaExport::ReadLines(), ComptaExport::ReadLinesPayment(), Categorie::rechercher(), EcmDirectory::refreshcachenboffile(), CommandeFournisseur::refuse(), Bookmark::remove(), RemiseCheque::RemoveCheck(), Mailing::reset_targets_status(), Adherent::resiliate(), restrictedArea(), DoliDb::rollback(), run_sql(), InterfaceWebcalsynchro::run_trigger(), InterfacePhenixsynchro::run_trigger(), InterfaceNotification::run_trigger(), InterfaceLdapsynchro::run_trigger(), InterfaceActionsAuto::run_trigger(), InterfaceLogevents::run_trigger(), Interfaces::run_triggers(), InfoBox::saveboxorder(), Form::select_adresse_livraison(), FormCompany::select_civilite(), Form::select_comptes(), Form::select_contacts(), DoliDb::select_db(), FormCompany::select_departement(), FormCompany::select_forme_juridique(), Form::select_product_fourn_price(), Form::select_produits_do(), Form::select_produits_fournisseurs_do(), select_projects(), Form::select_propal_statut(), FormCompany::select_region(), Form::select_remises(), Form::select_societes(), Form::select_type_socialcontrib(), Form::select_types_paiements(), Form::select_users(), FormProduct::selectWarehouses(), Notify::send(), User::send_password(), CMailFile::sendfile(), Propal::set_adresse_livraison(), Commande::set_adresse_livraison(), Facture::set_canceled(), Propal::set_date(), Propal::set_date_livraison(), Commande::set_date_livraison(), Facture::set_draft(), Commande::set_draft(), Propal::set_echeance(), Facture::set_payed(), Propal::set_ref_client(), Commande::set_ref_client(), Propal::set_remise_absolue(), Facture::set_remise_absolue(), Commande::set_remise_absolue(), Societe::set_remise_client(), Propal::set_remise_percent(), Facture::set_unpayed(), FactureFournisseur::set_valid(), Facture::set_valid(), CommonObject::setDocModel(), User::setPassword(), Adherent::setPassword(), CommonObject::setProject(), User::setstatus(), Conf::setValues(), show_actions_done(), show_actions_todo(), show_list_sending_receive(), FormActions::showactions(), ModeleBoxes::showBox(), supplier_order_pdf_create(), Project::TaskAddTime(), Osc_product::transcode(), Osc_order::transcode(), Osc_customer::transcode(), FormCompany::typent_array(), UnActivate(), DiscountAbsolute::unlink_invoice(), Translate::UnLoad(), User::update(), Societe::update(), Product::update(), FichinterLigne::update(), FactureLigne::update(), Facture::update(), EcmDirectory::update(), Don::update(), AccountLine::update(), Account::update(), Mailing::update(), AdresseLivraison::update(), ChargeSociales::update(), Categorie::update(), Bookmark::update(), Cotisation::update(), Adherent::update(), ActionComm::update(), Product::update_barcode(), Product::update_barcode_type(), AccountLine::update_conciliation(), Adherent::update_end_date(), PaiementCharge::update_fk_bank(), User::update_last_login_date(), MailingTargets::update_nb(), CommonObject::update_note(), CommonObject::update_note_public(), Product::update_price(), CommonObject::update_price(), CommandeFournisseurLigne::update_total(), FichinterLigne::update_total(), FactureLigne::update_total(), ContratLigne::update_total(), CommandeLigne::update_total(), RemiseCheque::UpdateAmount(), ProductLivreContrat::UpdateCanvas(), ProductLivre::UpdateCanvas(), Propal::updateline(), FactureFournisseur::updateline(), CommandeFournisseur::updateline(), Facture::updateline(), Contrat::updateline(), Commande::updateline(), CommandeFournisseur::UpdateNote(), Livraison::valid(), CommandeFournisseur::valid(), Expedition::valid(), Mailing::valid(), Commande::valid(), RemiseCheque::Validate(), Adherent::validate(), Paiement::valide(), PaiementFourn::valide(), vat_by_quarter(), vat_by_thirdparty(), mod_codecompta_aquarium::verif(), mod_codeclient_monkey::verif(), mod_codeclient_elephant::verif(), vignette(), pdf_paiement::write_file(), html_cerfafr::write_file(), CMailFile::write_files(), CMailFile::write_mimeheaders(), and CMailFile::write_smtpheaders().
| dol_time_plus_duree | ( | $ | time, | |
| $ | duration_value, | |||
| $ | duration_unit | |||
| ) |
Add a delay to a date.
| time | Date timestamp ou au format YYYY-MM-DD | |
| duration_value | Value of delay to add | |
| duration_unit | Unit of added delay (d, m, y) |
Definition at line 316 of file functions.lib.php.
Referenced by Adherent::cotisation().
| dol_trunc | ( | $ | string, | |
| $ | size = 40, |
|||
| $ | trunc = 'right', |
|||
| $ | stringencoding = '' | |||
| ) |
Truncate a string to a particular length adding '.
..' if string larger than length
| string | String to truncate | |
| size | Max string size. 0 for no limit. | |
| trunc | Where to trunc: right, left, middle |
Definition at line 837 of file functions.lib.php.
References dol_strlen(), and dol_substr().
Referenced by CommActionRapport::_pages(), dol_fiche_head(), dol_print_email(), dol_print_url(), mailing_kiwi::formFilter(), Societe::getNomUrl(), Product::getNomUrl(), FactureFournisseur::getNomUrl(), Facture::getNomUrl(), Contrat::getNomUrl(), Contact::getNomUrl(), ChargeSociales::getNomUrl(), AdherentType::getNomUrl(), Adherent::getNomUrl(), ActionComm::getNomUrl(), Form::select_all_categories(), Form::select_array(), Form::select_produits_do(), Form::select_produits_fournisseurs_do(), select_projects(), Form::select_remises(), FormCompany::selectCompaniesForNewContact(), show_actions_done(), FormFile::show_documents(), FormActions::showactions(), ModeleBoxes::showBox(), Societe::thirdparty_and_contact_email_array(), and Translate::trans().
| get_default_npr | ( | $ | societe_vendeuse, | |
| $ | societe_acheteuse, | |||
| $ | taux_produit | |||
| ) |
Fonction qui renvoie si tva doit etre tva percue r�cup�rable.
| societe_vendeuse | Objet soci�t� vendeuse | |
| societe_acheteuse | Objet soci�t� acheteuse | |
| taux_produit | Taux par defaut du produit vendu |
Definition at line 2232 of file functions.lib.php.
Referenced by Form::select_tva().
| get_default_tva | ( | $ | societe_vendeuse, | |
| $ | societe_acheteuse, | |||
| $ | taux_produit, | |||
| $ | idprod = 0 | |||
| ) |
Fonction qui renvoie la tva d'une ligne (en fonction du vendeur, acheteur et taux du produit).
| societe_vendeuse | Objet societe vendeuse | |
| societe_acheteuse | Objet societe acheteuse | |
| taux_produit | Taux par defaut du produit vendu (old way to get product vat rate) | |
| idprod | Id product (new way to get product vat rate) |
Definition at line 2175 of file functions.lib.php.
References dol_syslog(), and get_product_vat_for_country().
Referenced by Propal::add_product(), Commande::add_product(), Facture::create(), load_tva(), and Form::select_tva().
| get_exdir | ( | $ | num, | |
| $ | level = 3 | |||
| ) |
Return a path to class a directory according to an id.
| $num | Id to develop | |
| $level | Level of development (1, 2 or 3 level) |
Definition at line 2271 of file functions.lib.php.
Referenced by Product::add_photo(), Product::add_photo_web(), Product::is_photo_available(), FormFile::list_of_documents(), FormFile::show_documents(), Product::show_photos(), and html_cerfafr::write_file().
| img_action | ( | $ | alt = "default", |
|
| $ | numaction | |||
| ) |
Affiche logo action.
| alt | Texte sur le alt de l'image | |
| numaction | Determine image action |
Definition at line 928 of file functions.lib.php.
Referenced by Prospect::LibStatut().
| img_allow | ( | $ | allow | ) |
Affiche le logo tick si allow.
| allow | Authorise ou non |
Definition at line 1251 of file functions.lib.php.
| img_delete | ( | $ | alt = "default" |
) |
Affiche logo effacer.
| alt | Texte sur le alt de l'image |
Definition at line 1065 of file functions.lib.php.
Referenced by FormFile::list_of_documents().
| img_down | ( | $ | alt = "default", |
|
| $ | selected = 0 | |||
| ) |
Affiche logo bas.
| alt | Texte sur le alt de l'image | |
| selected | Affiche version "selected" du logo |
Definition at line 1184 of file functions.lib.php.
Referenced by print_liste_field_titre().
| img_edit | ( | $ | alt = "default", |
|
| $ | float = 0, |
|||
| $ | other = '' | |||
| ) |
Affiche logo editer/modifier fiche.
| alt | Texte sur le alt de l'image | |
| float | Si il faut y mettre le style "float: right" |
Definition at line 1032 of file functions.lib.php.
Referenced by show_contacts().
| img_edit_add | ( | $ | alt = "default" |
) |
Affiche logo +.
| alt | Texte sur le alt de l'image |
Definition at line 1008 of file functions.lib.php.
| img_edit_remove | ( | $ | alt = "default" |
) |
Affiche logo -.
| alt | Texte sur le alt de l'image |
Definition at line 1019 of file functions.lib.php.
| img_error | ( | $ | alt = "default" |
) |
Affiche logo error.
| alt | Texte sur le alt de l'image |
Definition at line 1128 of file functions.lib.php.
| img_file | ( | $ | alt = "default" |
) |
Affiche logo fichier.
| alt | Texte sur le alt de l'image |
Definition at line 947 of file functions.lib.php.
| img_file_new | ( | $ | alt = "default" |
) |
Affiche logo nouveau fichier.
| alt | Texte sur le alt de l'image |
Definition at line 983 of file functions.lib.php.
| img_folder | ( | $ | alt = "default" |
) |
Affiche logo dossier.
| alt | Texte sur le alt de l'image |
Definition at line 971 of file functions.lib.php.
| img_help | ( | $ | usehelpcursor = 1, |
|
| $ | usealttitle = 1 | |||
| ) |
Affiche logo help avec curseur "?".
| usehelpcursor | ||
| usealttitle |
Definition at line 1079 of file functions.lib.php.
| img_info | ( | $ | alt = "default" |
) |
Affiche logo info.
| alt | Texte sur le alt de l'image |
Definition at line 1099 of file functions.lib.php.
| img_left | ( | $ | alt = "default", |
|
| $ | selected = 0 | |||
| ) |
Affiche logo gauche.
| alt | Texte sur le alt de l'image | |
| selected | Affiche version "selected" du logo |
Definition at line 1212 of file functions.lib.php.
| img_mime | ( | $ | file, | |
| $ | alt = '' | |||
| ) |
Show mime picto.
| file | Filename | |
| alt | Alternate text |
Definition at line 1273 of file functions.lib.php.
Referenced by FormFile::list_of_documents(), FormFile::show_documents(), and FormMail::show_form().
| img_next | ( | $ | alt = "default" |
) |
Affiche logo suivant.
| alt | Texte sur le alt de l'image |
Definition at line 1157 of file functions.lib.php.
Referenced by print_fleche_navigation(), and Form::showrefnav().
| img_object | ( | $ | alt, | |
| $ | object | |||
| ) |
Affiche picto propre a une notion/module (fonction g�n�rique).
| alt | Texte sur le alt de l'image | |
| object | Objet pour lequel il faut afficher le logo (exemple: user, group, action, bill, contract, propal, product, ...) |
Definition at line 884 of file functions.lib.php.
Referenced by Notify::confirmMessage(), dol_print_email(), dol_print_phone(), ActionComm::fetch(), show_actions_done(), show_actions_todo(), show_contacts(), show_list_sending_receive(), FormActions::showactions(), ModeleBoxes::showBox(), mailing_pomme::url(), mailing_poire::url(), mailing_kiwi::url(), and mailing_fraise::url().
| img_pdf | ( | $ | alt = "default", |
|
| $ | size = 3 | |||
| ) |
Affiche logo pdf.
| alt | Texte sur le alt de l'image | |
| $size | Taille de l'icone : 3 = 16x16px , 2 = 14x14px |
Definition at line 996 of file functions.lib.php.
Referenced by FormFile::show_documents().
| img_phone | ( | $ | alt = "default", |
|
| $ | option = 0 | |||
| ) |
Affiche logo telephone.
| alt | Texte sur le alt de l'image | |
| option | Choose of logo |
Definition at line 1141 of file functions.lib.php.
| img_picto | ( | $ | alt, | |
| $ | picto, | |||
| $ | options = '', |
|||
| $ | pictoisfullpath = 0 | |||
| ) |
Show picto (generic function).
| alt | Texte sur le alt de l'image | |
| picto | Nom de l'image a afficher (Si pas d'extension, on met '.png') | |
| options | Attribut supplementaire a la balise img | |
| pictoisfullpath | If 1, image path is a full path |
Definition at line 898 of file functions.lib.php.
Referenced by info_admin(), User::LibStatut(), Propal::LibStatut(), Entrepot::LibStatut(), Product::LibStatut(), Paiement::LibStatut(), Livraison::LibStatut(), CommandeFournisseur::LibStatut(), PaiementFourn::LibStatut(), Facture::LibStatut(), Expedition::LibStatut(), Don::LibStatut(), ContratLigne::LibStatut(), Contrat::LibStatut(), Contact::LibStatut(), RemiseCheque::LibStatut(), Account::LibStatut(), Mailing::LibStatut(), ChargeSociales::LibStatut(), Commande::LibStatut(), Adherent::LibStatut(), ActionComm::LibStatut(), show_day_events(), and ModeleBoxes::showBox().
| img_picto_common | ( | $ | alt, | |
| $ | picto, | |||
| $ | options = '', |
|||
| $ | pictoisfullpath = 0 | |||
| ) |
Show picto (generic function).
| alt | Texte sur le alt de l'image | |
| picto | Nom de l'image a afficher (Si pas d'extension, on met '.png') | |
| options | Attribut supplementaire a la balise img | |
| pictoisfullpath | If 1, image path is a full path |
Definition at line 914 of file functions.lib.php.
Referenced by tree_showpad().
| img_previous | ( | $ | alt = "default" |
) |
Affiche logo pr�c�dent.
| alt | Texte sur le alt de l'image |
Definition at line 1171 of file functions.lib.php.
Referenced by print_fleche_navigation(), and Form::showrefnav().
| img_refresh | ( | $ | alt = "default" |
) |
Affiche logo refresh.
| alt | Texte sur le alt de l'image |
Definition at line 959 of file functions.lib.php.
Referenced by dol_loginfunction().
| img_right | ( | $ | alt = "default", |
|
| $ | selected = 0 | |||
| ) |
Affiche logo droite.
| alt | Texte sur le alt de l'image | |
| selected | Affiche version "selected" du logo |
Definition at line 1226 of file functions.lib.php.
| img_tick | ( | $ | alt = "default" |
) |
Affiche logo tick.
| alt | Texte sur le alt de l'image |
Definition at line 1239 of file functions.lib.php.
| img_up | ( | $ | alt = "default", |
|
| $ | selected = 0 | |||
| ) |
Affiche logo haut.
| alt | Texte sur le alt de l'image | |
| selected | Affiche version "selected" du logo |
Definition at line 1198 of file functions.lib.php.
Referenced by print_liste_field_titre().
| img_view | ( | $ | alt = "default", |
|
| $ | float = 0, |
|||
| $ | other = '' | |||
| ) |
Affiche logo voir fiche.
| alt | Texte sur le alt de l'image | |
| float | Si il faut y mettre le style "float: right" |
Definition at line 1049 of file functions.lib.php.
| img_warning | ( | $ | alt = "default", |
|
| $ | float = 0 | |||
| ) |
Affiche logo warning.
| alt | Texte sur le alt de l'image | |
| float | Si il faut afficher le style "float: right" |
Definition at line 1112 of file functions.lib.php.
Referenced by Product::fetch_prod_arbo(), and show_array_actions_to_do().
| info_admin | ( | $ | texte, | |
| $ | infoonimgalt = 0 | |||
| ) |
Show information for admin users.
| text | Text info | |
| infoonimgalt | Info is shown on alt of star picto, otherwise it is show on output |
Definition at line 1299 of file functions.lib.php.
References img_picto().
Referenced by FormCompany::select_civilite(), Form::select_conditions_paiements(), Form::select_currency(), FormCompany::select_departement(), FormCompany::select_forme_juridique(), FormActions::select_type_actions(), Form::select_type_fees(), Form::select_type_socialcontrib(), and Form::select_types_paiements().
| make_substitutions | ( | $ | chaine, | |
| $ | substitutionarray | |||
| ) |
Effectue les substitutions des mots cl�s par les donn�es en fonction du tableau.
| chaine | Chaine dans laquelle faire les substitutions | |
| substitutionarray | Tableau cl� substitution => valeur a mettre |
Definition at line 2583 of file functions.lib.php.
Referenced by FormMail::show_form().
| monthArrayOrSelected | ( | $ | selected = 0 |
) |
Retourne un tableau des mois ou le mois selectionne.
| selected | Mois a selectionner ou -1 |
Definition at line 2628 of file functions.lib.php.
Referenced by Form::select_month().
| picto_required | ( | ) |
Retourne le picto champ obligatoire.
Definition at line 2345 of file functions.lib.php.
| price | ( | $ | amount, | |
| $ | html = 0, |
|||
| $ | outlangs = '', |
|||
| $ | trunc = 1, |
|||
| $ | rounding = 2 | |||
| ) |
Fonction qui formate un montant pour visualisation.
| amount | Montant a formater | |
| html | Type de formatage, html ou pas (par defaut) | |
| outlangs | Objet langs pour formatage text | |
| trunc | 1=Tronque affichage si trop de decimales,0=Force le non troncage | |
| rounding | Nbre decimals minimum. |
Definition at line 2014 of file functions.lib.php.
Referenced by Product::_log_price(), pdf_muscadet::_tableau_tot(), pdf_oursin::_tableau_tot(), pdf_crabe::_tableau_tot(), pdf_oursin::_tableau_versements(), pdf_crabe::_tableau_versements(), ProductLivre::assign_smarty_values(), Product::create(), Product::fetch(), FactureLigne::fetch(), CommandeLigne::fetch(), Form::form_remise_dispo(), BordereauChequeBlochet::Header(), FactureLigne::insert(), CommandeLigne::insert(), FormOther::select_ecotaxes(), Form::select_product_fourn_price(), Form::select_produits_do(), Form::select_produits_fournisseurs_do(), Form::select_remises(), FactureLigne::update(), Product::update_price(), ProductLivre::UpdateCanvas(), vatrate(), pdf_muscadet::write_file(), pdf_paiement::write_file(), pdf_propale_jaune::write_file(), pdf_propale_azur::write_file(), pdf_oursin::write_file(), pdf_crabe::write_file(), pdf_einstein::write_file(), and pdf_edison::write_file().
| price2num | ( | $ | amount, | |
| $ | rounding = '', |
|||
| $ | alreadysqlnb = 0 | |||
| ) |
Function that return a number with universal decimal format (decimal separator is '.
') from an amount typed by a user.
| amount | Amount to convert/clean | |
| rounding | ''=No rounding 'MU'=Round to Max unit price (MAIN_MAX_DECIMALS_UNIT) 'MT'=Round to Max for totals with Tax (MAIN_MAX_DECIMALS_TOT) 'MS'=Round to Max Shown (MAIN_MAX_DECIMALS_SHOWN) | |
| alreadysqlnb | Put 1 if you know that content is already universal format number |
Definition at line 2079 of file functions.lib.php.
Referenced by pdf_oursin::_tableau_tot(), pdf_crabe::_tableau_tot(), Propal::addline(), FactureFournisseur::addline(), CommandeFournisseur::addline(), Facture::addline(), Contrat::addline(), Account::addline(), Commande::addline(), Tva::addPayment(), batch_fournisseur_updateturnover(), calcul_price_total(), ProductLivre::Create(), Product::create(), Paiement::create(), PaiementFourn::create(), Don::create(), DiscountAbsolute::create(), Account::create(), PaiementCharge::create(), ChargeSociales::create(), FactureLigne::insert(), Facture::set_remise(), Commande::set_remise(), Propal::set_remise_absolue(), Facture::set_remise_absolue(), Commande::set_remise_absolue(), Societe::set_remise_except(), Propal::set_remise_percent(), Product::update(), Product::update_price(), CommonObject::update_price(), ProductLivre::UpdateCanvas(), CommandeFournisseur::updateFromCommandeClient(), Propal::updateline(), FactureFournisseur::updateline(), CommandeFournisseur::updateline(), Facture::updateline(), Contrat::updateline(), Commande::updateline(), and pdf_edison::write_file().
| print_barre_liste | ( | $ | titre, | |
| $ | page, | |||
| $ | file, | |||
| $ | options = '', |
|||
| $ | sortfield = '', |
|||
| $ | sortorder = '', |
|||
| $ | center = '', |
|||
| $ | num = -1, |
|||
| $ | totalnboflines = 0, |
|||
| $ | picto = 'title.gif', |
|||
| $ | pictoisfullpath = 0 | |||
| ) |
Print a title with navigation controls for pagination.
| titre | Title to show (required) | |
| page | Numero of page (required) | |
| file | Url of page (required) | |
| options | parametres complementaires lien ('' par defaut) | |
| sortfield | champ de tri ('' par defaut) | |
| sortorder | ordre de tri ('' par defaut) | |
| center | chaine du centre ('' par defaut) | |
| num | number of records found by select with limit+1 | |
| totalnboflines | Total number of records/lines for all pages (if known) | |
| picto | Icon to use before title (should be a 32x32 transparent png file) | |
| pictoisfullpath | 1=Icon name is a full absolute url of image |
Definition at line 1798 of file functions.lib.php.
References print, and print_fleche_navigation().
| print_date_range | ( | $ | date_start, | |
| $ | date_end, | |||
| $ | format = '', |
|||
| $ | outputlangs = '' | |||
| ) |
Format output for start and end date.
| date_start | Start date | |
| date_end | End date | |
| format | Output format |
See http://matelli.fr/showcases/patchs-dolibarr/update-date-range-format.html for details
Definition at line 2601 of file functions.lib.php.
Referenced by show_list_sending_receive().
| print_fiche_titre | ( | $ | titre, | |
| $ | mesg = '', |
|||
| $ | picto = 'title.gif', |
|||
| $ | pictoisfullpath = 0 | |||
| ) |
Affichage d'un titre d'une fiche, align� a gauche.
| titre | Le titre a afficher | |
| mesg | Message suplementaire a afficher a droite | |
| picto | Icon to use before title (should be a 32x32 transparent png file) | |
| pictoisfullpath | 1=Icon name is a full absolute url of image |
Definition at line 1769 of file functions.lib.php.
References print.
| print_fleche_navigation | ( | $ | page, | |
| $ | file, | |||
| $ | options = '', |
|||
| $ | nextpage, | |||
| $ | betweenarrows = '' | |||
| ) |
Fonction servant a afficher les fleches de navigation dans les pages de listes.
| page | Numero of page | |
| file | Lien | |
| options | Autres parametres d'url a propager dans les liens ("" par defaut) | |
| nextpage | Faut-il une page suivante | |
| betweenarraows | HTML Content to show between arrows |
Definition at line 1895 of file functions.lib.php.
References img_next(), img_previous(), and print.
Referenced by print_barre_liste().
| print_liste_field_titre | ( | $ | name, | |
| $ | file, | |||
| $ | field, | |||
| $ | begin = "", |
|||
| $ | options = "", |
|||
| $ | td = "", |
|||
| $ | sortfield = "", |
|||
| $ | sortorder = "" | |||
| ) |
Show title line of an array.
| name | libelle champ | |
| file | url pour clic sur tri | |
| field | champ de tri | |
| begin | ("" par defaut) | |
| options | ("" par defaut) | |
| td | options de l'attribut td ("" par defaut) | |
| sortfield | field currently used to sort | |
| sortorder | ordre du tri |
Definition at line 1703 of file functions.lib.php.
References img_down(), img_up(), and print.
Referenced by FormFile::list_of_documents().
| print_titre | ( | $ | titre | ) |
Affichage d'un titre.
| titre | Le titre a afficher |
Definition at line 1757 of file functions.lib.php.
References print.
Referenced by FormFile::form_attach_new_file(), FormFile::list_of_documents(), show_actions_todo(), show_contacts(), FormFile::show_documents(), show_list_sending_receive(), and FormActions::showactions().
| restrictedArea | ( | $ | user, | |
| $ | feature = 'societe', |
|||
| $ | objectid = 0, |
|||
| $ | dbtablename = '', |
|||
| $ | feature2 = '', |
|||
| $ | dbt_socfield = 'fk_soc' | |||
| ) |
Check permissions of a user to show a page and an object.
| user | User to check | |
| feature | Feature to check (in most cases, it's module name) | |
| objectid | Object ID if we want to check permission on on object (optionnal) | |
| dbtablename | Table name where object is stored. Not used if objectid is null (optionnel) | |
| feature2 | Feature to check (second level of permission) | |
| dbt_socfield | Field name for socid foreign key if not fk_soc. (optionnel) |
Definition at line 1328 of file functions.lib.php.
References $resql, accessforbidden(), and dol_syslog().
| sanitizeFileName | ( | $ | str, | |
| $ | newstr = '_' | |||
| ) |
Clean a string to use it as a file name.
| str | String to clean | |
| newstr | String to replace bad chars by |
Definition at line 45 of file functions.lib.php.
References dol_string_nospecial(), and dol_string_unaccent().
Referenced by Product::check(), commande_delete_preview(), Expedition::create(), Propal::delete(), Livraison::delete(), Expedition::delete(), Commande::delete(), facture_delete_preview(), facture_meta_create(), fichinter_delete_preview(), EcmDirectory::getRelativePath(), FormFile::list_of_documents(), propale_delete_preview(), InterfaceNotification::run_trigger(), Facture::set_valid(), FormFile::show_documents(), Societe::update(), Livraison::valid(), Expedition::valid(), Commande::valid(), pdf_muscadet::write_file(), pdf_propale_jaune::write_file(), pdf_propale_azur::write_file(), pdf_typhon::write_file(), pdf_sirocco::write_file(), pdf_soleil::write_file(), pdf_oursin::write_file(), pdf_crabe::write_file(), html_cerfafr::write_file(), pdf_einstein::write_file(), and pdf_edison::write_file().
| stopwithmem | ( | ) |
This function output memory used by PHP and exit everything.
Used for debugging purpose.
Definition at line 2703 of file functions.lib.php.
| utf8_check | ( | $ | Str | ) |
Check if a string is in UTF8.
| $Str | String to check |
Definition at line 2743 of file functions.lib.php.
Referenced by dol_print_file(), and dol_string_unaccent().
| vatrate | ( | $ | rate, | |
| $ | addpercent = false, |
|||
| $ | info_bits = 0 | |||
| ) |
Fonction qui retourne un taux de tva formate pour visualisation.
| rate | Rate value to format (19.6 19,6 19.6% 19,6%,...) | |
| foundpercent | Add a percent % sign in output | |
| info_bits | Miscellanous information on vat |
Definition at line 1983 of file functions.lib.php.
References price().
Referenced by pdf_muscadet::_tableau_tot(), pdf_oursin::_tableau_tot(), pdf_crabe::_tableau_tot(), pdf_propale_jaune::write_file(), pdf_propale_azur::write_file(), pdf_crabe::write_file(), pdf_einstein::write_file(), and pdf_edison::write_file().
| yn | ( | $ | yesno, | |
| $ | case = 1, |
|||
| $ | color = 0 | |||
| ) |
Renvoie oui ou non dans la langue choisie.
| yesno | Variable pour test si oui ou non | |
| case | 1=Yes/No, 0=yes/no | |
| color | 0=texte only, 1=Text is formated with a color font style (red or blue), 2=Text is formated with blue color. |
Definition at line 2245 of file functions.lib.php.
Referenced by AccountLine::getNomUrl(), ModeleThirdPartyCode::getToolTip(), Adherent::send_an_email(), and FormMail::show_form().
1.5.8