noalyss Version-9
|
common utilities for a lot of procedure, classe More...
Go to the source code of this file.
Functions | |
add_http_link ($text) | |
ajax_disconnected ($p_div) | |
Should a dialog box when you are disconnected from an ajax call propose to reload or to connect in another tab. More... | |
ajax_xml_error ($p_code, $p_string) | |
alert ($p_msg, $buffer=false) | |
alert in javascript More... | |
check_password_strength ($password) | |
returns an double array with the error found and code , if the count is 0 then the password is very string, 5 means it is empty ,4 weak, ... the array contains the errors, [msg]=>array message [code] => array of code Codes are More... | |
cmpDate ($p_date, $p_date_oth) | |
Compare 2 dates. More... | |
complete_default_menu ($pa_menu) | |
Check if there is a default menu for this user and add it. More... | |
compute_variable ($p_string) | |
the string has the format a=b&c=d, it is parsed and an array[][key,value] is returned More... | |
confirm_with_string ($p_ctl_name, $p_car) | |
generate a string of p_car character and a input text with name p_ctl_name work like a kind of captcha.The control code for checking is ctlcode. More... | |
if(!function_exists( 'tracedebug')) | convert_to_rtf ($p_string) |
encode the string for RTF, return a string More... | |
Decode ($p_html) | |
Decode the html for the widegt richtext and remove newline. More... | |
display_menu ($p_menuid) | |
Display a menu @global type $g_user. More... | |
echo_error ($p_log, $p_line="", $p_message="") | |
log error into the /tmp/noalyss_error.log it doesn't work on windows More... | |
echo_warning ($p_string) | |
warns More... | |
factory_Ledger (Database &$p_cn, $ledger_id) | |
This function create a ledger object and return the right one. More... | |
FaxTo ($p_tel) | |
compose a HTML string with fax More... | |
find_default_menu ($pn_menu) | |
Find the menu marked as default in the given profile. More... | |
find_default_module () | |
findSide ($p_number) | |
return D if the number is smaller than 0 , C if bigger and an empty string if equal to 0. More... | |
format_date ($p_date, $p_from_format='YYYY-MM-DD', $p_to_format='DD.MM.YYYY') | |
format the date, when taken from the database the format is MM-DD-YYYY More... | |
FormatString ($p_string) | |
replaced by sql_string More... | |
generate_random_password ($car) | |
generate a strong random password More... | |
generate_random_string ($p_length, $special=1) | |
Create randomly a string. More... | |
get_array_column ($p_array, $key) | |
getPeriodeFromMonth ($p_cn, $p_date) | |
Return the period corresponding to the date. More... | |
getPeriodeName ($p_cn, $p_id, $pos='p_start') | |
Show the periode which found thanks its id. More... | |
h ($p_string) | |
to protect again bad characters which can lead to a cross scripting attack the string to be diplayed must be protected. More... | |
h1 ($p_string, $p_class="") | |
h2 ($p_string, $p_class="", $raw="") | |
h2info ($p_string) | |
hb ($p_string) | |
header_csv ($p_filename) | |
Send an header CSV with a filename. More... | |
hi ($p_string) | |
html_min_page_start ($p_theme="", $p_script="", $p_script2="") | |
Minimal page header for each page, used for small popup window. More... | |
html_page_start ($p_theme="", $p_script="", $p_script2="") | |
Default page header for each page. More... | |
html_page_stop () | |
end tag More... | |
is_msie () | |
Check if we use IE 8 or 9. More... | |
isDate ($p_date) | |
isNumber ($p_int) | |
j ($p_string) | |
escape correctly php string to javascript More... | |
linkTo ($p_url) | |
mailTo ($p_email) | |
compose a HTML string with email More... | |
MaintenanceMode ($p_file) | |
When you want to prevent users to connect, create a file in noalyss/ (NOALYSS_BASE) with the message in Html. More... | |
nb ($p_number) | |
format the number for the CSV export More... | |
nbm ($p_number, $p_dec=2) | |
format the number with a sep. More... | |
NoAccess ($js=1) | |
Echo no access and stop. More... | |
noalyss_bcadd ($p_first, $p_second, $p_decimal=4) | |
noalyss_bcmul ($p_first, $p_second) | |
noalyss_bcsub ($p_first, $p_second, $p_decimal=4) | |
noalyss_explode ($separator, $string) | |
to avoid deprecated in PHP8.1 : explode cannot use a null More... | |
noalyss_round ($p_first, $p_second) | |
noalyss_str_replace ($search, $replace, $string) | |
noalyss_strip_tags ($p_string) | |
noalyss_strlen ($p_string) | |
noalyss_strlentrim ($p_string) | |
noalyss_trim ($p_string) | |
p ($p_string) | |
phoneTo ($p_tel) | |
compose a HTML string with phone More... | |
put_global ($array) | |
Put in superglobal (get,post,request) the value contained in the parameter field (me_parameter) More... | |
rebuild_access_code ($pan_code) | |
rebuild the access code More... | |
record_log ($p_message) | |
Record an error message into the log file of the server. More... | |
remove_divide_zero ($p_formula) | |
When it is needed to eval a formula , this function prevent the divide by zero. More... | |
sanitize_filename ($filename) | |
removed invalid character when computing a filename, the suffix is kept More... | |
set_language () | |
set the lang thanks the _SESSION['g_lang'] var. More... | |
show_menu ($module) | |
show_module ($selected) | |
Show the modules. More... | |
ShowItem ($p_array, $p_dir='V', $class="nav-item", $class_ref="nav-link", $default="", $p_extra="nav nav-pills nav-fill") | |
store the string which print the content of p_array in a table used to display the menu More... | |
shrink_date ($p_date) | |
shrink the date, make a date shorter for the printing More... | |
smaller_date ($p_date) | |
shrink the date, make a date shorter for the printing More... | |
span ($p_string, $p_extra='') | |
sql_filter_per ($p_cn, $p_from, $p_to, $p_form='p_id', $p_field='jr_tech_per') | |
Create the condition to filter on the j_tech_per thanks a from and to date. More... | |
sql_string ($p_string) | |
Fix the problem with the quote char for the database. More... | |
td ($p_string='', $p_extra='') | |
surround the string with td More... | |
th ($p_string, $p_extra='', $raw='') | |
tr ($p_string, $p_extra='') | |
transform_sql_filter_per ($p_sql) | |
transform the SQL for ANALYTIC table operation_analytique More... | |
what_os () | |
try to determine on what os you are running the pĥpcompte server More... | |
common utilities for a lot of procedure, classe
Definition in file ac_common.php.
add_http_link | ( | $text | ) |
Definition at line 1527 of file ac_common.php.
ajax_disconnected | ( | $p_div | ) |
Should a dialog box when you are disconnected from an ajax call propose to reload or to connect in another tab.
Definition at line 907 of file ac_common.php.
ajax_xml_error | ( | $p_code, | |
$p_string | |||
) |
Definition at line 1265 of file ac_common.php.
References $html, escape_xml(), and value.
alert | ( | $p_msg, | |
$buffer = false |
|||
) |
alert in javascript
$p_msg | is the message |
$buffer | if false, echo directly and execute the javascript, if $buffer is true, the alert javascript is in the return string |
Definition at line 738 of file ac_common.php.
References $p_msg, $r, and j().
Referenced by Fiche_Def\Add(), Extension\check_version(), Anc_Acc_List\display_html(), Anc_Group\display_html(), Anc_Table\display_html(), Acc_Ledger_Fin\input(), Todo_List\insert(), Extension\insert_plugin(), js_include(), Fiche\remove(), Extension\remove_plugin(), Acc_Parm_Code\save(), Document_Type\set_number(), Acc_Ledger\test_me(), ICard\test_me(), Extension\update_plugin(), Acc_Report\upload(), and Menu_Ref\verify().
check_password_strength | ( | $password | ) |
returns an double array with the error found and code , if the count is 0 then the password is very string, 5 means it is empty ,4 weak, ... the array contains the errors, [msg]=>array message [code] => array of code Codes are
If the password is strong returns an empty array
$password | string $error = check_password_strength($password);
echo "password to weak";
echo "error $item_error";
}
} else {
echo "OK password strong";
}
check_password_strength($password) returns an double array with the error found and code , if the count is 0 then the password is very s... Definition: ac_common.php:1700 |
Definition at line 1700 of file ac_common.php.
Referenced by generate_random_password().
cmpDate | ( | $p_date, | |
$p_date_oth | |||
) |
Compare 2 dates.
p_date | |
p_date_oth |
Definition at line 188 of file ac_common.php.
References $p_date, and isDate().
Referenced by Fiche\HtmlTable(), Acc_Ledger_Fin\verify_operation(), Acc_Ledger_Purchase\verify_operation(), and Acc_Ledger_Sale\verify_operation().
complete_default_menu | ( | $pa_menu | ) |
Check if there is a default menu for this user and add it.
The array is filling from 1 to 3
* * COMPTA 0 - 0 - 173 * COMPTA/MENUACH 0 - 173 - 3 * COMPTA/MENUACH/ACH 173 - 3 - 85 * *
array | $pa_menu | if the array of option ; index pm_id_v1 , pm_id_v2 and pm_id_v3 |
Definition at line 1482 of file ac_common.php.
References $tmp, and find_default_menu().
compute_variable | ( | $p_string | ) |
the string has the format a=b&c=d, it is parsed and an array[][key,value] is returned
$p_string |
Definition at line 1250 of file ac_common.php.
References $array, $i, and $var.
Referenced by Noalyss\Mobile\execute_menu().
confirm_with_string | ( | $p_ctl_name, | |
$p_car | |||
) |
generate a string of p_car character and a input text with name p_ctl_name work like a kind of captcha.The control code for checking is ctlcode.
You compare the content of the variable p_ctl_name with ctlcode
$p_ctl_name | name of the HTML input text |
$p_car | length of the string |
Definition at line 1444 of file ac_common.php.
References $code, $ctl, $r, generate_random_string(), and HtmlInput\hidden().
if(!function_exists('tracedebug')) convert_to_rtf | ( | $p_string | ) |
encode the string for RTF, return a string
$p_string | string to convert |
Definition at line 1382 of file ac_common.php.
Referenced by Acc_Bilan\generate_plain().
Decode | ( | $p_html | ) |
Decode the html for the widegt richtext and remove newline.
$p_html | string to decode |
Definition at line 648 of file ac_common.php.
References noalyss_str_replace().
display_menu | ( | $p_menuid | ) |
Display a menu @global type $g_user.
type | $p_menuid |
Definition at line 1150 of file ac_common.php.
echo_error | ( | $p_log, | |
$p_line = "" , |
|||
$p_message = "" |
|||
) |
log error into the /tmp/noalyss_error.log it doesn't work on windows
p_log | message |
p_line | line number |
p_message | is the message |
Definition at line 169 of file ac_common.php.
References $msg.
Referenced by Database\format_name(), Fiche\get_row(), Fiche\get_row_date(), getPeriodeName(), isValid_deprecrated(), Document_modele\Save(), sql_filter_per(), Document_modele\update(), and DatabaseCore\upload().
echo_warning | ( | $p_string | ) |
warns
p_string | error message gen :
|
Definition at line 589 of file ac_common.php.
Referenced by Acc_Tax_Purchase_Sale\display(), Acc_Bilan\display_form(), Noalyss\Mobile\execute_menu(), Stock_Goods\input(), Extension\read_definition(), Dossier\synchro_admin(), and Dossier\upgrade().
factory_Ledger | ( | Database & | $p_cn, |
$ledger_id | |||
) |
This function create a ledger object and return the right one.
It uses the factory pattern
Database | $p_cn | |
type | $ledger_id |
Exception |
Definition at line 1299 of file ac_common.php.
References $ledger, $ledger_id, $obj, and $type.
FaxTo | ( | $p_tel | ) |
compose a HTML string with fax
string | $p_fax | fax number |
Definition at line 1642 of file ac_common.php.
find_default_menu | ( | $pn_menu | ) |
Find the menu marked as default in the given profile.
number | $pn_menu | (profile_menu.id) |
Definition at line 1457 of file ac_common.php.
References $cn, $sql, and Dossier\connect().
Referenced by complete_default_menu().
find_default_module | ( | ) |
Definition at line 991 of file ac_common.php.
findSide | ( | $p_number | ) |
return D if the number is smaller than 0 , C if bigger and an empty string if equal to 0.
Used for displaying saldo D / C (debit / credit )
float | $p_number |
Definition at line 121 of file ac_common.php.
Referenced by Anc_Listing\display_html().
format_date | ( | $p_date, | |
$p_from_format = 'YYYY-MM-DD' , |
|||
$p_to_format = 'DD.MM.YYYY' |
|||
) |
format the date, when taken from the database the format is MM-DD-YYYY
$p_date | format |
1 | if invalid format DOMEntity |
return date in the format DD.MM.YYYY
Definition at line 852 of file ac_common.php.
Referenced by Stock\build_tmp_table(), Anticipation\display(), Operation_Exercice\display_result(), Periode_Ledger_Table\display_row(), Periode\display_row_global(), Acc_Bilan\filter_date(), Acc_Account_Ledger\HtmlTable(), Fiche\HtmlTable(), Follow_Up\myList(), and Document\replace().
FormatString | ( | $p_string | ) |
replaced by sql_string
Definition at line 500 of file ac_common.php.
References sql_string().
generate_random_password | ( | $car | ) |
generate a strong random password
$car | int length of the password, minimum 8 |
Definition at line 1748 of file ac_common.php.
References $i, $string, and check_password_strength().
generate_random_string | ( | $p_length, | |
$special = 1 |
|||
) |
Create randomly a string.
int | $p_length | length of the generate string |
Definition at line 1420 of file ac_common.php.
Referenced by confirm_with_string(), and display_file_config().
get_array_column | ( | $p_array, | |
$key | |||
) |
Definition at line 1278 of file ac_common.php.
getPeriodeFromMonth | ( | $p_cn, | |
$p_date | |||
) |
Return the period corresponding to the date.
p_cn | database connection |
p_date | the month + year 'MM.YYYY' |
Definition at line 633 of file ac_common.php.
References $p_date.
getPeriodeName | ( | $p_cn, | |
$p_id, | |||
$pos = 'p_start' |
|||
) |
Show the periode which found thanks its id.
$p_cn | database connection |
p_id | |
pos | Start or end |
Definition at line 605 of file ac_common.php.
References $p_id, $pos, $ret, echo_error(), and isNumber().
h | ( | $p_string | ) |
to protect again bad characters which can lead to a cross scripting attack the string to be diplayed must be protected.
Side effects with htmlentities, especially for the date (transform dot in &periode;) and number
Definition at line 35 of file ac_common.php.
References ENT_QUOTES.
Referenced by FaxTo(), h1(), h2info(), hb(), hi(), mailTo(), phoneTo(), and th().
h1 | ( | $p_string, | |
$p_class = "" |
|||
) |
Definition at line 72 of file ac_common.php.
References h().
Referenced by Fiche\test_me().
h2 | ( | $p_string, | |
$p_class = "" , |
|||
$raw = "" |
|||
) |
Definition at line 68 of file ac_common.php.
Referenced by Acc_Ledger\display_additional_tax(), Noalyss\Dbg\display_request(), Operation_Closing\display_result(), Operation_Opening\display_result(), Print_Operation_Currency\export_html(), Acc_Ledger_Fin\input(), Template_Card_Category\input(), Acc_Ledger\input_additional_tax(), Anticipation\input_form(), Document_modele\myList(), Tag\show_form_add(), Default_Menu\test_me(), HtmlInput\title_box(), and Follow_Up\update().
h2info | ( | $p_string | ) |
Definition at line 63 of file ac_common.php.
References h().
Referenced by Anc_Balance_Double\display_html().
hb | ( | $p_string | ) |
Definition at line 53 of file ac_common.php.
References h().
Referenced by Acc_Ledger_Purchase\confirm(), and Acc_Ledger_Sale\confirm().
header_csv | ( | $p_filename | ) |
Send an header CSV with a filename.
string | $p_filename,file | name , caution , it must be sanitized BEFORE calling this function |
Definition at line 1217 of file ac_common.php.
hi | ( | $p_string | ) |
Definition at line 48 of file ac_common.php.
References h().
Referenced by Template_Card_Category\input().
html_min_page_start | ( | $p_theme = "" , |
|
$p_script = "" , |
|||
$p_script2 = "" |
|||
) |
Minimal page header for each page, used for small popup window.
p_theme | default theme |
$p_script | |
$p_script2 | another js script |
Definition at line 408 of file ac_common.php.
References $_REQUEST, $cn, $noalyss_appearance, $Res, $s, $style, DatabaseCore\fetch_array(), and DatabaseCore\num_row().
html_page_start | ( | $p_theme = "" , |
|
$p_script = "" , |
|||
$p_script2 = "" |
|||
) |
Default page header for each page.
p_theme | default theme |
$p_script | |
$p_script2 | another js script Must be called only once |
Definition at line 275 of file ac_common.php.
References $_REQUEST, $ac, $cn, $m, $noalyss_appearance, $Res, $s, $style, $title, $version_noalyss, HtmlInput\button_action(), content, DatabaseCore\fetch_array(), is_msie(), load_all_script(), name, DatabaseCore\num_row(), set_language(), HtmlInput\title_box(), and type.
Referenced by Acc_Ledger\test_me().
html_page_stop | ( | ) |
end tag
Definition at line 468 of file ac_common.php.
is_msie | ( | ) |
Check if we use IE 8 or 9.
Definition at line 1328 of file ac_common.php.
Referenced by html_page_start().
isDate | ( | $p_date | ) |
Definition at line 236 of file ac_common.php.
References $p_date, COMPTA_MAX_YEAR, COMPTA_MIN_YEAR, and noalyss_strlentrim().
Referenced by Acc_Ledger_Search\build_search_sql(), Todo_List\check(), Anc_Print\check(), Currency_MTable\check(), HttpInput\check_type(), cmpDate(), Acc_Ledger_Fin\confirm(), Follow_Up\create_query(), Anc_Table\create_temp_table_account(), Anc_Table\create_temp_table_card(), Acc_Bilan\filter_date(), Acc_Reconciliation\filter_date(), Follow_Up\fromArray(), Acc_Currency\get_rate_date(), Acc_Account_Ledger\get_used_accounting(), Periode\insert(), Acc_Operation\operation_update_date_limit(), Stock_Goods\record_save(), Acc_Ledger\reverse(), Tax_Summary\set_date_end(), Tax_Summary\set_date_start(), Anc_Acc_Link\set_sql_filter(), sql_filter_per(), Follow_Up\verify(), Todo_List\verify(), Acc_Ledger_Fin\verify_operation(), Acc_Ledger_Purchase\verify_operation(), and Acc_Ledger_Sale\verify_operation().
isNumber | ( | $p_int | ) |
Definition at line 215 of file ac_common.php.
References noalyss_trim().
Referenced by Fiche\__construct(), Acc_Ledger_Search\build_search_sql(), Todo_List\check(), Card_Attribut_MTable\check(), Currency_MTable\check(), Mobile_Device_MTable\check(), Tva_Rate_MTable\check(), HttpInput\check_type(), Acc_Ledger\convert_from_follow(), Follow_Up\create_query(), Stock\create_query_histo(), Acc_Ledger\display_ledger(), Follow_Up\filter_by_tag(), contact\filter_category(), Follow_Up_Detail\from_array(), Lettering_Account\get_filter(), Lettering_Card\get_filter(), Acc_Ledger\get_last_pj(), getPeriodeName(), ITva_Popup\input(), Acc_Reconciliation\insert(), Acc_Ledger_Fin\insert(), Periode\insert(), Periode\insert_exercice(), Acc_Reconciliation\insert_rapt(), Noalyss_Csv\nb(), Acc_Reconciliation\remove(), Document\replace_special_tag(), Document_modele\Save(), IDate\set_firstDate(), Acc_Operation\set_id(), Acc_Ledger\verify_ledger(), Acc_Ledger_Fin\verify_operation(), Acc_Ledger_Purchase\verify_operation(), and Acc_Ledger_Sale\verify_operation().
j | ( | $p_string | ) |
escape correctly php string to javascript
Definition at line 96 of file ac_common.php.
References $a, and noalyss_str_replace().
Referenced by alert().
linkTo | ( | $p_url | ) |
Definition at line 1649 of file ac_common.php.
References $p_url.
Referenced by Card_Property\add_link().
mailTo | ( | $p_email | ) |
compose a HTML string with email
string | $p_email | email or emails separated by a comma |
Definition at line 1615 of file ac_common.php.
References $r, h(), and Icon_Action\warnbulle().
Referenced by Card_Property\add_link().
MaintenanceMode | ( | $p_file | ) |
When you want to prevent users to connect, create a file in noalyss/ (NOALYSS_BASE) with the message in Html.
string | $p_file | file in NOALYSS_BASE |
Definition at line 1663 of file ac_common.php.
References exit.
nb | ( | $p_number | ) |
format the number for the CSV export
$p_number | number |
Definition at line 107 of file ac_common.php.
References $r, and noalyss_str_replace().
Referenced by Acc_Ledger\__construct(), Sort_Table\__construct(), Sort_Table\add(), Acc_Ledger\convert_from_follow(), Anc_Balance_Double\display_pdf(), Sort_Table\get_header(), Acc_Ledger\input(), and PDF_Operation\print_operation_info().
nbm | ( | $p_number, | |
$p_dec = 2 |
|||
) |
format the number with a sep.
for the thousand
$p_number | number |
$p_dec | number of decimal to display |
Definition at line 137 of file ac_common.php.
References $a, $r, exit, and noalyss_trim().
Referenced by Acc_Ledger_Fin\confirm(), Acc_Ledger\confirm(), Acc_Ledger_Purchase\confirm(), Acc_Ledger_Sale\confirm(), Anc_GrandLivre\display_html(), Anc_Acc_List\display_html(), Anc_Balance_Double\display_html(), Anc_Balance_Simple\display_html(), Anc_Listing\display_html(), Anc_Table\display_html(), Anc_Balance_Simple\display_pdf(), Operation_Exercice\display_row(), Additional_Tax\display_row(), Forecast_Item_MTable\display_row(), Manage_Table_SQL\display_row(), Operation_Exercice\display_total(), Print_Ledger_Detail\export(), Print_Ledger_Detail_Item\export(), Print_Ledger_Financial\export(), Print_Ledger_Misc\export(), Print_Ledger_Simple\export(), Print_Operation_Currency\export_csv(), Print_Operation_Currency\export_html(), Acc_Ledger_History_Generic\export_oneline_html(), Print_Ledger_Financial\Footer(), Print_Ledger_Simple\Footer(), Print_Ledger_Financial\Header(), Print_Ledger_Simple\Header(), Acc_Account_Ledger\HtmlTable(), Fiche\HtmlTable(), Acc_Ledger_Fin\insert(), Acc_Ledger_Search\list_operation(), Acc_Ledger_Search\list_operation_to_reconcile(), PDF_Anc_Acc_List\pdf_card(), PDF_Operation\print_acc_writing(), PDF_Operation\print_anc_detail(), PDF_Operation\print_operation_info(), PDF_Operation\print_other_tax(), PDF_Operation\print_purchase(), PDF_Operation\print_sale(), PDF_Anc_Acc_List\put_total(), Fiche\Summary(), Acc_Balance\summary_display(), and Acc_Balance\summary_display_pdf().
NoAccess | ( | $js = 1 | ) |
Echo no access and stop.
Definition at line 480 of file ac_common.php.
noalyss_bcadd | ( | $p_first, | |
$p_second, | |||
$p_decimal = 4 |
|||
) |
Definition at line 1563 of file ac_common.php.
Referenced by Print_Ledger_Detail_Item\export(), and Document\replace().
noalyss_bcmul | ( | $p_first, | |
$p_second | |||
) |
Definition at line 1574 of file ac_common.php.
Referenced by Document\replace().
noalyss_bcsub | ( | $p_first, | |
$p_second, | |||
$p_decimal = 4 |
|||
) |
Definition at line 1557 of file ac_common.php.
Referenced by Print_Ledger_Detail_Item\export(), and Acc_Ledger\previous_amount().
noalyss_explode | ( | $separator, | |
$string | |||
) |
to avoid deprecated in PHP8.1 : explode cannot use a null
$separator | |
$string |
Definition at line 1593 of file ac_common.php.
References $string.
Referenced by Acc_Ledger\display_ledger().
noalyss_round | ( | $p_first, | |
$p_second | |||
) |
Definition at line 1580 of file ac_common.php.
Referenced by Document\replace().
noalyss_str_replace | ( | $search, | |
$replace, | |||
$string | |||
) |
Definition at line 1553 of file ac_common.php.
References $string.
Referenced by Lettering\__construct(), Select_Box\add_javascript(), Acc_Ledger_Search\build_search_filter(), Fiche\build_sql(), Noalyss_Parameter_Folder\check(), Anc_Account_Table\check(), Impress\check_formula(), clean_filename(), Impress\compute_amount(), Document\compute_filename(), Acc_Bilan\compute_formula(), Noalyss_Csv\correct_name(), Decode(), escape_xml(), Noalyss\Mobile\execute_menu(), Acc_Ledger_History_Generic\export_csv(), Document_Export\export_receipt(), Anc_Key\fill_table(), Menu_Ref\format_code(), Acc_Bilan\generate_odt(), Acc_Bilan\generate_plain(), Acc_Operation\get_jrnx_detail(), Acc_Ledger\get_last(), Acc_Account_Ledger\get_row_date(), INum\input(), IText\input(), j(), Acc_Reconciliation\ledger_filter(), navigation_bar(), nb(), Impress\parse_formula(), Document\parseDocument(), PDF_Core\print_row(), Anc_Group\remove(), remove_divide_zero(), Document\replace(), Document\replace_value(), Acc_Ledger_Search\search_form(), sql_string(), Fiche_Def\to_array(), toNumber(), transform_sql_filter_per(), unescape_xml(), and Noalyss_Csv\write().
noalyss_strip_tags | ( | $p_string | ) |
Definition at line 1569 of file ac_common.php.
Referenced by Card_Property\update().
noalyss_strlen | ( | $p_string | ) |
Definition at line 1541 of file ac_common.php.
Referenced by Manage_Table_SQL\input().
noalyss_strlentrim | ( | $p_string | ) |
Definition at line 1549 of file ac_common.php.
Referenced by Fiche_Def\Add(), Card_Property\build_input(), Fiche\build_sql(), Todo_List\check(), Acc_Plan_MTable\check(), Acc_Bilan\compute_formula(), Acc_Ledger_Fin\confirm(), Acc_Ledger_Purchase\confirm(), Acc_Ledger_Sale\confirm(), Acc_Ledger\create_document(), Follow_Up\create_query(), Pre_op_ach\display(), Pre_op_ven\display(), Follow_Up\display(), Acc_Operation\display_jrnx_detail(), Acc_Account_Ledger\get_account_ledger(), Acc_Ledger_History_Generic\get_detail(), Acc_Ledger_History_Generic\get_row(), Acc_Ledger_Purchase\input(), Acc_Ledger_Sale\input(), Acc_Ledger_Fin\insert(), Acc_Ledger_Purchase\insert(), Acc_Ledger_Sale\insert(), Periode\insert(), Acc_Operation\insert_jrn(), isDate(), Follow_Up\myList(), Document\replace(), Pre_op_ach\save(), Pre_op_ven\save(), Acc_Ledger_Info\save_extra(), Acc_Operation\set_pj(), Dossier\update(), Card_Property\update(), Acc_Report\upload(), Forecast\verify(), Acc_Ledger_Fin\verify_operation(), Acc_Ledger_Purchase\verify_operation(), and Acc_Ledger_Sale\verify_operation().
noalyss_trim | ( | $p_string | ) |
Definition at line 1545 of file ac_common.php.
Referenced by Fiche\build_sql(), Fiche\empty_attribute(), isNumber(), Noalyss_Csv\nb(), nbm(), Follow_Up\save(), Fiche\strAttribut(), Fiche\Summary(), Acc_Account\verify(), Data_SQL\verify(), and Acc_Ledger\verify_autonumber().
p | ( | $p_string | ) |
Definition at line 39 of file ac_common.php.
Referenced by Fiche_Def\input_detail(), and Fiche\test_me().
phoneTo | ( | $p_tel | ) |
compose a HTML string with phone
string | $p_tel |
Definition at line 1602 of file ac_common.php.
put_global | ( | $array | ) |
Put in superglobal (get,post,request) the value contained in the parameter field (me_parameter)
$array | [key] [value] |
Definition at line 1233 of file ac_common.php.
References $_GET, $_POST, $_REQUEST, $array, $i, and $value.
Referenced by Noalyss\Mobile\execute_menu(), and Dossier\set_current().
rebuild_access_code | ( | $pan_code | ) |
rebuild the access code
array | of number $pan_code index row [0] = index pm_id_v1 , pm_id_v2 and pm_id_v3 |
Definition at line 1508 of file ac_common.php.
References $cn, $i, $ix, $sep, and Dossier\connect().
record_log | ( | $p_message | ) |
Record an error message into the log file of the server.
Record also the GET and POST data
string | $p_message |
Definition at line 1342 of file ac_common.php.
Referenced by Anc_Group_Operation\add(), Sendmail_Core\compose(), Noalyss_Csv\correct_name(), Action_Document_Type_MTable\delete(), Acc_Ledger\delete_ledger(), Card_Multiple\display_option(), DatabaseCore\exec_sql(), Document\generate(), Table_Data_SQL\get_all_to_array(), Anc_Operation\get_balance(), Fiche\get_bank_ledger(), Acc_Ledger\input(), Acc_Ledger_Purchase\input(), Acc_Ledger_Fin\insert(), Acc_Ledger_Sale\insert(), Periode\insert(), Fiche\insert(), Acc_Ledger_Info\insert(), Periode\insert_exercice(), Acc_Bilan\load(), Document\parseDocument(), Stock_Goods\record_save(), Acc_Ledger\reverse(), Anc_Key\save(), Pre_op_ach\save(), Pre_Op_Advanced\save(), Pre_op_ven\save(), Pre_op_ods\save(), Anc_Group_Operation\save(), Default_Menu\save(), Document_modele\Save(), Pre_op_fin\save(), Pre_operation\save_insert(), Acc_Ledger_History\set_ledger_type(), Document_Type\set_number(), Follow_Up\sql_security_filter(), Dossier\synchro_admin(), Acc_Ledger\test_me(), Document\transform2pdf(), Document_modele\update(), Acc_Ledger_Info\update(), Card_Property\update(), and Acc_Ledger\verify_ledger().
remove_divide_zero | ( | $p_formula | ) |
When it is needed to eval a formula , this function prevent the divide by zero.
the formula is a math operation to evaluate like : 1.0+2.0/1 (...) , it is used in "report", it removes the operation "divide by 0 "
string | $p_formula | string containing a operation to evaluate |
Definition at line 1408 of file ac_common.php.
References noalyss_str_replace().
Referenced by Impress\parse_formula().
sanitize_filename | ( | $filename | ) |
removed invalid character when computing a filename, the suffix is kept
$filename | String filename to sanitize |
Definition at line 1784 of file ac_common.php.
Referenced by Card_PDF\export().
set_language | ( | ) |
set the lang thanks the _SESSION['g_lang'] var.
Definition at line 754 of file ac_common.php.
Referenced by html_page_start(), and Noalyss\Mobile\page_start().
show_menu | ( | $module | ) |
Show the submenus
Definition at line 1071 of file ac_common.php.
show_module | ( | $selected | ) |
Show the modules.
int | $selected | module selected profile_menu.pm_id |
Definition at line 932 of file ac_common.php.
ShowItem | ( | $p_array, | |
$p_dir = 'V' , |
|||
$class = "nav-item" , |
|||
$class_ref = "nav-link" , |
|||
$default = "" , |
|||
$p_extra = "nav nav-pills nav-fill" |
|||
) |
store the string which print the content of p_array in a table used to display the menu
$p_array | array like ( 0=>HREF reference, 1=>visible item (name),2=>Help(opt), 3=>selected (opt) 4=>javascript (normally a onclick event) (opt) |
$p_dir | direction of the menu (H Horizontal V vertical) |
$class | CSS for li tag |
$class_ref | CSS for the A tag |
$default | selected item |
$p_extra | extra code for the table tag (CSS or javascript) |
Definition at line 535 of file ac_common.php.
References $all, $href, $p_array, $ret, and $title.
Referenced by MenuAdmin().
shrink_date | ( | $p_date | ) |
shrink the date, make a date shorter for the printing
$p_date | format DD.MM.YYYY |
Definition at line 826 of file ac_common.php.
smaller_date | ( | $p_date | ) |
shrink the date, make a date shorter for the printing
$p_date | format DD.MM.YYYY |
Definition at line 837 of file ac_common.php.
Referenced by Print_Ledger_Misc\export().
span | ( | $p_string, | |
$p_extra = '' |
|||
) |
Definition at line 43 of file ac_common.php.
Referenced by Acc_Ledger_Purchase\confirm(), Acc_Ledger_Sale\confirm(), Anc_Print\display_form(), Operation_Exercice\display_total(), Document\generate(), Acc_Ledger\input(), Forecast_Item_MTable\input(), Inplace_Edit\input(), Profile_Menu\sub_menu(), and Acc_Ledger\warn_manual_receipt().
sql_filter_per | ( | $p_cn, | |
$p_from, | |||
$p_to, | |||
$p_form = 'p_id' , |
|||
$p_field = 'jr_tech_per' |
|||
) |
Create the condition to filter on the j_tech_per thanks a from and to date.
$p_cn | database conx |
$p_from | start date (date) |
$p_to | end date (date) |
$p_form | if the p_from and p_to are date or p_id |
$p_field | column name |
Definition at line 682 of file ac_common.php.
References $periode, $pPeriode, echo_error(), exit, isDate(), and sql_string().
Referenced by Impress\compute_periode(), Anc_Operation\get_balance(), Acc_Account_Ledger\get_row(), Fiche\get_row(), Acc_Ledger_History_Financial\get_row(), Acc_Ledger_History_Purchase\get_row(), Acc_Ledger_History_Sale\get_row(), Acc_Ledger_History_Generic\get_row(), Acc_Ledger_History_Generic\get_rowSimple(), Acc_Ledger\get_solde(), Impress\parse_formula(), Acc_Bilan\verify(), and Acc_Bilan\warning().
sql_string | ( | $p_string | ) |
Fix the problem with the quote char for the database.
$p_string |
Definition at line 511 of file ac_common.php.
References noalyss_str_replace().
Referenced by Fiche_Def\Add(), Anc_Plan\add(), Acc_Ledger_Search\build_search_sql(), contact\build_sql(), Fiche\build_sql(), Card_Multiple\build_sql(), Card_Multiple\count_sql(), Follow_Up\create_query(), Stock\create_query_histo(), Follow_Up\filter_by_tag(), FormatString(), Pre_operation\get_operation(), Acc_Ledger_Fin\insert(), Acc_Ledger_Purchase\insert(), Acc_Ledger_Sale\insert(), Fiche\insert(), Acc_Ledger_Purchase\insert_no_deductible(), Acc_Parm_Code\save(), Fiche_Def\save_class_base(), Fiche_Def\SaveLabel(), HtmlInput\select_stock(), sql_filter_per(), Fiche\Summary(), Anc_Plan\update(), and Card_Property\update().
td | ( | $p_string = '' , |
|
$p_extra = '' |
|||
) |
surround the string with td
$p_string | string to surround by TD |
$p_extra | extra info (class, style, javascript...) |
Definition at line 83 of file ac_common.php.
Referenced by Acc_Ledger_Fin\confirm(), Acc_Ledger\confirm(), Acc_Ledger_Purchase\confirm(), Acc_Ledger_Sale\confirm(), Pre_Op_Advanced\display(), Fiche\Display(), Acc_Bilan\display_form(), Anc_Print\display_form(), Anc_GrandLivre\display_html(), Anc_Acc_List\display_html(), Anc_Balance_Double\display_html(), Anc_Balance_Simple\display_html(), Anc_Listing\display_html(), Anc_Table\display_html(), Operation_Exercice\display_row(), Follow_Up_Other_Concerned\display_row(), Additional_Tax\display_row(), Acc_Plan_MTable\display_row(), Forecast_Item_MTable\display_row(), Manage_Table_SQL\display_row(), Periode_Ledger_Table\display_row(), Fiche\display_row(), Acc_Report_MTable\display_row_custom(), Card_Attribut_MTable\display_row_custom(), Mobile_Device_MTable\display_row_custom(), Manage_Table_SQL\display_row_custom(), Periode\display_row_global(), display_security_fieldset(), Acc_Ledger_History_Generic\export_accounting_html(), Print_Operation_Currency\export_html(), Acc_Ledger_History_Generic\export_oneline_html(), Anc_Group_Operation\form(), Document_modele\form(), Periode\form_periode_add(), Anc_Operation\html_table(), Acc_Account_Ledger\HtmlTable(), Fiche\HtmlTable(), Acc_Ledger\input(), Acc_Ledger_Purchase\input(), Card_Property\input(), IAncCard\input(), ICard\input(), IPoste\input(), ITva_Popup\input(), Template_Card_Category\input(), Mobile_Device_MTable\input_custom(), Acc_Ledger_Fin\insert(), Acc_Ledger_Search\list_operation(), Acc_Ledger_Search\list_operation_to_reconcile(), Follow_Up\myList(), Document_modele\myList(), Html_Table\sql2table(), Fiche\Summary(), Acc_Balance\summary_display(), and Acc_Bilan\verify().
th | ( | $p_string, | |
$p_extra = '' , |
|||
$raw = '' |
|||
) |
Definition at line 58 of file ac_common.php.
References h().
Referenced by Anc_GrandLivre\display_html(), Anc_Balance_Double\display_html(), Anc_Listing\display_html(), Anc_Table\display_html(), Periode\display_periode_global(), Operation_Exercice\display_result(), Periode_Ledger_Table\display_table(), Manage_Table_SQL\display_table_header(), Print_Operation_Currency\export_html(), Acc_Ledger_History_Generic\export_oneline_html(), Anc_Group_Operation\form(), Anc_Operation\html_table(), Acc_Account_Ledger\HtmlTable(), Fiche\HtmlTable(), Acc_Ledger_Fin\insert(), Acc_Ledger_Search\list_operation(), Acc_Ledger_Search\list_operation_to_reconcile(), Follow_Up\myList(), Document_modele\myList(), and Acc_Ledger_Search\select_ledger().
tr | ( | $p_string, | |
$p_extra = '' |
|||
) |
Definition at line 88 of file ac_common.php.
Referenced by Acc_Ledger_Fin\confirm(), Acc_Ledger\confirm(), Acc_Ledger_Purchase\confirm(), Acc_Ledger_Sale\confirm(), Pre_Op_Advanced\display(), Fiche\Display(), Anc_Print\display_form(), Anc_Operation\display_form_plan(), Follow_Up_Other_Concerned\display_row(), display_security_fieldset(), Print_Operation_Currency\export_html(), Periode\form_periode_add(), Acc_Ledger\input(), Template_Card_Category\input(), Acc_Ledger_Fin\insert(), and Acc_Bilan\verify().
transform_sql_filter_per | ( | $p_sql | ) |
transform the SQL for ANALYTIC table operation_analytique
string | $p_sql |
Definition at line 660 of file ac_common.php.
References $result, and noalyss_str_replace().
what_os | ( | ) |
try to determine on what os you are running the pĥpcompte server
Definition at line 806 of file ac_common.php.