noalyss Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
|
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. | |
ajax_xml_error ($p_code, $p_string) | |
alert ($p_msg, $buffer=false) | |
alert in javascript | |
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 | |
cmpDate ($p_date, $p_date_oth) | |
Compare 2 dates. | |
complete_default_menu ($pa_menu) | |
Check if there is a default menu for this user and add it. | |
compute_variable ($p_string) | |
the string has the format a=b&c=d, it is parsed and an array[][key,value] is returned | |
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. | |
if(!function_exists( 'tracedebug')) | convert_to_rtf ($p_string) |
encode the string for RTF, return a string | |
Decode ($p_html) | |
Decode the html for the widegt richtext and remove newline. | |
display_menu ($p_menuid) | |
Display a menu @global type $g_user. | |
echo_error ($p_log, $p_line="", $p_message="") | |
log error into the /tmp/noalyss_error.log it doesn't work on windows | |
echo_warning ($p_string) | |
warns | |
factory_Ledger (Database &$p_cn, $ledger_id) | |
This function create a ledger object and return the right one. | |
FaxTo ($p_tel) | |
compose a HTML string with fax | |
find_default_menu ($pn_menu) | |
Find the menu marked as default in the given profile. | |
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. | |
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 | |
FormatString ($p_string) | |
replaced by sql_string | |
generate_random_password ($car) | |
generate a strong random password | |
generate_random_string ($p_length, $special=1) | |
Create randomly a string. | |
get_array_column ($p_array, $key) | |
getPeriodeFromMonth ($p_cn, $p_date) | |
Return the period corresponding to the date. | |
getPeriodeName ($p_cn, $p_id, $pos='p_start') | |
Show the periode which found thanks its id. | |
h ($p_string) | |
to protect again bad characters which can lead to a cross scripting attack the string to be diplayed must be protected. | |
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. | |
hi ($p_string) | |
html_min_page_start ($p_theme="", $p_script="", $p_script2="") | |
Minimal page header for each page, used for small popup window. | |
html_page_start ($p_theme="", $p_script="", $p_script2="") | |
Default page header for each page. | |
html_page_stop () | |
end tag | |
is_msie () | |
Check if we use IE 8 or 9. | |
isDate ($p_date) | |
isNumber ($p_int) | |
j ($p_string) | |
escape correctly php string to javascript | |
linkTo ($p_url) | |
mailTo ($p_email) | |
compose a HTML string with email | |
MaintenanceMode ($p_file) | |
When you want to prevent users to connect, create a file in noalyss/ (NOALYSS_BASE) with the message in Html. | |
nb ($p_number) | |
format the number for the CSV export | |
nbm ($p_number, $p_dec=2) | |
format the number with a sep. | |
NoAccess ($js=1) | |
Echo no access and stop. | |
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 | |
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 | |
put_global ($array) | |
Put in superglobal (get,post,request) the value contained in the parameter field (me_parameter) | |
rebuild_access_code ($pan_code) | |
rebuild the access code | |
record_log ($p_message) | |
Record an error message into the log file of the server or in the log folder of NOALYSS Record also the GET and POST data. | |
remove_divide_zero ($p_formula) | |
When it is needed to eval a formula , this function prevent the divide by zero. | |
sanitize_filename ($filename) | |
removed invalid character when computing a filename, the suffix is kept | |
set_language () | |
set the lang thanks the _SESSION['g_lang'] var. | |
show_menu ($module) | |
show_module ($selected) | |
Show the modules. | |
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 | |
shrink_date ($p_date) | |
shrink the date, make a date shorter for the printing | |
smaller_date ($p_date) | |
shrink the date, make a date shorter for the printing | |
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. | |
sql_string ($p_string) | |
Fix the problem with the quote char for the database. | |
td ($p_string='', $p_extra='') | |
surround the string with td | |
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 | |
what_os () | |
try to determine on what os you are running the pĥpcompte server | |
common utilities for a lot of procedure, classe
Definition in file ac_common.php.
add_http_link | ( | $text | ) |
Definition at line 1586 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 909 of file ac_common.php.
ajax_xml_error | ( | $p_code, | |
$p_string ) |
Definition at line 1267 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 740 of file ac_common.php.
References $p_msg, $r, and j().
Referenced by Fiche_Def\Add(), Extension\check_version(), Noalyss\Widget\Mini_Report\display(), 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:1759 |
Definition at line 1759 of file ac_common.php.
References _.
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 1541 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 1252 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 1503 of file ac_common.php.
References $code, $ctl, $r, and generate_random_string().
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 1441 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 650 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 1152 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 591 of file ac_common.php.
Referenced by Acc_Tax_Purchase_Sale\display(), Acc_Bilan\display_form(), Noalyss\Mobile\execute_menu(), Stock_Goods\input(), Template_Card_Category\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 1301 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 1701 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 1516 of file ac_common.php.
Referenced by complete_default_menu().
find_default_module | ( | ) |
Definition at line 993 of file ac_common.php.
References p_id.
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 854 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 502 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 1807 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 1479 of file ac_common.php.
Referenced by confirm_with_string(), and display_file_config().
get_array_column | ( | $p_array, | |
$key ) |
Definition at line 1280 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 635 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 607 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.
h1 | ( | $p_string, | |
$p_class = "" ) |
Definition at line 72 of file ac_common.php.
References h.
Referenced by Acc_Operation\test_me(), and Fiche\test_me().
h2 | ( | $p_string, | |
$p_class = "", | |||
$raw = "" ) |
Definition at line 68 of file ac_common.php.
Referenced by Noalyss\Widget\Widget\ajax_display(), Noalyss_User\can_print(), Noalyss_User\can_request(), 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 1219 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, _, content, DatabaseCore\fetch_array(), is_msie(), load_all_script(), name, DatabaseCore\num_row(), and type.
Referenced by Acc_Ledger\test_me().
html_page_stop | ( | ) |
end tag
Definition at line 470 of file ac_common.php.
is_msie | ( | ) |
Check if we use IE 8 or 9.
Definition at line 1330 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 Anc_Print\check(), Currency_MTable\check(), Todo_List\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(), 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(), Card_Attribut_MTable\check(), Currency_MTable\check(), Mobile_Device_MTable\check(), Todo_List\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_Ledger_Fin\insert(), Acc_Reconciliation\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(), ITva_Popup\set_vat_code(), 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 1708 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 1674 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 1722 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(), Tax_Detail\csv(), Anc_Balance_Double\display_pdf(), Calendar\fill_from_todo(), 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\confirm(), Acc_Ledger_Fin\confirm(), Acc_Ledger_Purchase\confirm(), Acc_Ledger_Sale\confirm(), Noalyss\Widget\Mini_Report\display(), Anc_Acc_List\display_html(), Anc_Balance_Double\display_html(), Anc_Balance_Simple\display_html(), Anc_GrandLivre\display_html(), Anc_Listing\display_html(), Anc_Table\display_html(), Anc_Balance_Simple\display_pdf(), Additional_Tax\display_row(), Forecast_Item_MTable\display_row(), Manage_Table_SQL\display_row(), Operation_Exercice\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(), Acc_Operation\form_clone_operation(), 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 482 of file ac_common.php.
noalyss_bcadd | ( | $p_first, | |
$p_second, | |||
$p_decimal = 4 ) |
Definition at line 1622 of file ac_common.php.
Referenced by Print_Ledger_Detail_Item\export(), and Document\replace().
noalyss_bcmul | ( | $p_first, | |
$p_second ) |
Definition at line 1633 of file ac_common.php.
Referenced by Document\replace().
noalyss_bcsub | ( | $p_first, | |
$p_second, | |||
$p_decimal = 4 ) |
Definition at line 1616 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 1652 of file ac_common.php.
References $string.
Referenced by Acc_Ledger\display_ledger().
noalyss_round | ( | $p_first, | |
$p_second ) |
Definition at line 1639 of file ac_common.php.
Referenced by Document\replace().
noalyss_str_replace | ( | $search, | |
$replace, | |||
$string ) |
Definition at line 1612 of file ac_common.php.
References $string.
Referenced by Lettering\__construct(), Select_Box\add_javascript(), Acc_Ledger_Search\build_search_filter(), Fiche\build_sql(), Acc_Reconciliation\build_temp_total_operation(), Anc_Account_Table\check(), Noalyss_Parameter_Folder\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_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 1628 of file ac_common.php.
Referenced by Card_Property\update().
noalyss_strlen | ( | $p_string | ) |
Definition at line 1600 of file ac_common.php.
Referenced by Manage_Table_SQL\input().
noalyss_strlentrim | ( | $p_string | ) |
Definition at line 1608 of file ac_common.php.
Referenced by Fiche_Def\Add(), Card_Property\build_input(), Fiche\build_sql(), Acc_Plan_MTable\check(), Todo_List\check(), Acc_Bilan\compute_formula(), Acc_Ledger_Fin\confirm(), Acc_Ledger_Purchase\confirm(), Acc_Ledger_Sale\confirm(), Follow_Up\create_query(), Follow_Up\display(), Pre_op_ach\display(), Pre_op_ven\display(), Acc_Operation\display_jrnx_detail(), 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(), Card_Property\update(), Dossier\update(), Acc_Operation\update_receipt(), 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 1604 of file ac_common.php.
Referenced by Fiche_Def\Add(), 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 ajax_disconnected(), and Fiche\test_me().
phoneTo | ( | $p_tel | ) |
compose a HTML string with phone
string | $p_tel |
Definition at line 1661 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 1235 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 1567 of file ac_common.php.
record_log | ( | $p_message | ) |
Record an error message into the log file of the server or in the log folder of NOALYSS Record also the GET and POST data.
$p_message | string message to display |
Definition at line 1344 of file ac_common.php.
References $_GET, $_POST, and $date.
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_Info\insert(), Acc_Ledger_Purchase\insert(), Acc_Ledger_Sale\insert(), Fiche\insert(), Periode\insert(), Periode\insert_exercice(), Acc_Bilan\load(), Document_Export\make_zip(), Document\parseDocument(), Stock_Goods\record_save(), Acc_Ledger\reverse(), Document_Modele\Save(), Anc_Group_Operation\save(), Anc_Key\save(), Default_Menu\save(), Pre_op_ach\save(), Pre_Op_Advanced\save(), Pre_op_fin\save(), Pre_op_ods\save(), Pre_op_ven\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(), Acc_Ledger_Info\update(), Card_Property\update(), Document_Modele\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 1467 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 1843 of file ac_common.php.
Referenced by Card_PDF\export().
set_language | ( | ) |
set the lang thanks the _SESSION['g_lang'] var.
Definition at line 756 of file ac_common.php.
References domaine, and span().
show_menu | ( | $module | ) |
Show the submenus
Definition at line 1073 of file ac_common.php.
show_module | ( | $selected | ) |
Show the modules.
int | $selected | module selected profile_menu.pm_id |
Definition at line 934 of file ac_common.php.
References from.
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 537 of file ac_common.php.
References $all, $class, $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 828 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 839 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(), Noalyss\Widget\Mini_Report\display_parameter(), Operation_Exercice\display_total(), Calendar\fill_from_todo(), Document\generate(), Acc_Ledger\input(), Forecast_Item_MTable\input(), Inplace_Edit\input(), set_language(), Profile_Menu\sub_menu(), Icon_Action\tips(), 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 684 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(), Acc_Ledger_History_Financial\get_row(), Acc_Ledger_History_Generic\get_row(), Acc_Ledger_History_Purchase\get_row(), Acc_Ledger_History_Sale\get_row(), Fiche\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 513 of file ac_common.php.
References noalyss_str_replace().
Referenced by Fiche_Def\Add(), Anc_Plan\add(), Card_Multiple\build_sql(), contact\build_sql(), Fiche\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\confirm(), Acc_Ledger_Fin\confirm(), Acc_Ledger_Purchase\confirm(), Acc_Ledger_Sale\confirm(), Fiche\Display(), Pre_Op_Advanced\display(), Acc_Bilan\display_form(), Anc_Print\display_form(), Anc_Acc_List\display_html(), Anc_Balance_Double\display_html(), Anc_Balance_Simple\display_html(), Anc_GrandLivre\display_html(), Anc_Listing\display_html(), Anc_Table\display_html(), Acc_Plan_MTable\display_row(), Additional_Tax\display_row(), Fiche\display_row(), Follow_Up_Other_Concerned\display_row(), Forecast_Item_MTable\display_row(), Manage_Table_SQL\display_row(), Operation_Exercice\display_row(), Periode_Ledger_Table\display_row(), Acc_Report_MTable\display_row_custom(), Card_Attribut_MTable\display_row_custom(), Manage_Table_SQL\display_row_custom(), Mobile_Device_MTable\display_row_custom(), Periode\display_row_global(), display_security_fieldset(), Anc_Operation\display_table(), 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(), Document_Modele\myList(), Follow_Up\myList(), Noalyss_User\show_dossier(), 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_Balance_Double\display_html(), Anc_GrandLivre\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(), 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\confirm(), Acc_Ledger_Fin\confirm(), Acc_Ledger_Purchase\confirm(), Acc_Ledger_Sale\confirm(), Fiche\Display(), Pre_Op_Advanced\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 662 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 808 of file ac_common.php.