28define(
'NOALYSS_VERSION', 10000 );
31define(
"DBVERSION", 207);
34define(
"MONO_DATABASE", 25);
37define(
"DBVERSIONREPO", 21);
50if (file_exists(
$dirname .
'/config.inc.php')) require_once
$dirname .
'/config.inc.php';
52if (!defined(
"NOALYSS_HOME")) define(
"NOALYSS_HOME", dirname(
$dirname) .
"/html");
53if (!defined(
"NOALYSS_BASE")) define(
"NOALYSS_BASE", dirname(
$dirname) );
54if (!defined(
"NOALYSS_PLUGIN")) define(
"NOALYSS_PLUGIN",
$g_ext_dir);
55if (!defined(
"NOALYSS_INCLUDE")) define(
"NOALYSS_INCLUDE",
$g_include_dir);
56if (!defined(
"NOALYSS_TEMPLATE")) define(
"NOALYSS_TEMPLATE",
$g_template_dir);
59if (!defined(
"FIX_BROKEN_PDF")) define(
"FIX_BROKEN_PDF",
'NO');
62if (!defined(
'NOALYSS_ADMINISTRATOR')) {
63 define(
'NOALYSS_ADMINISTRATOR',
'phpcompta');
65if (!defined(
"SESSION_KEY")) {
66 define(
"SESSION_KEY",
"RtYu0uu");
69if ( !defined (
'ADMIN_WEB')) {
71 define(
'ADMIN_WEB',
"noalyss-no-reply@$a");
73require_once NOALYSS_INCLUDE .
'/constant.security.php';
82set_include_path($new_path);
83@ini_set(
'default_charset',
"UTF-8");
84@ini_set(
'session.use_cookies', 1);
86@ini_set(
'magic_quotes_gpc',
'off');
88if (!defined(
'OVERRIDE_PARAM')) {
89 ini_set(
'max_execution_time', 240);
90 ini_set(
'memory_limit',
'256M');
92@ini_set(
'session.use_trans_sid',
'on');
99if (!defined(
'NOALYSS_CAPTCHA')) {
100 define(
"NOALYSS_CAPTCHA",
false);
104$g_failed =
"<span style=\"font-size:18px;color:red\">x</span>";
105$g_succeed =
"<span style=\"font-size:18px;color:green\">✓</span>";
106define(
'SMALLX',
'#xe816;');
107define(
'BUTTONADD',
"✚");
108define(
'ICON_SEARCH',
'🔎');
109define(
'ICON_CLEAN',
'✕');
113if (!defined(
'DEBUGNOALYSS')) {
114 define(
"DEBUGNOALYSS", 0);
117if (!defined(
'LOGINPUT')) {
118 define(
"LOGINPUT",
false);
124if (!defined(
"SITE_UPDATE"))
125 define(
"SITE_UPDATE",
'https://www.noalyss.eu/last_version.txt');
126if (!defined(
"SITE_UPDATE_PLUGIN"))
127 define(
"SITE_UPDATE_PLUGIN",
'https://www.noalyss.eu/plugin_last_version.txt');
128if (!defined(
"NOALYSS_PACKAGE_REPOSITORY")) {
129 define(
"NOALYSS_PACKAGE_REPOSITORY",
"https://package.noalyss.eu/");
132if (!defined(
"SYSINFO_DISPLAY")) {
133 define(
"SYSINFO_DISPLAY", TRUE);
135define(
'NOTFOUND',
'--not found--');
136define(
"MAX_COMPTE", 4);
137define(
'MAX_ARTICLE', 5);
138define(
'MAX_ARTICLE_STOCK', 10);
139define(
'MAX_CAT', 15);
140define(
'MAX_CARD_SEARCH', 550);
141define(
'MAX_FORECAST_ITEM', 10);
142define(
'MAX_PREDEFINED_OPERATION', 50);
143define(
'MAX_COMPTE_CARD', 4);
144define(
'COMPTA_MAX_YEAR', 2100);
145define(
'COMPTA_MIN_YEAR', 1900);
146define(
'MAX_RECONCILE', 25);
147define(
'MAX_QCODE', 4);
148if (!defined(
'MAX_SEARCH_CARD')) {
149 define(
'MAX_SEARCH_CARD', 20);
152define(
'MAX_FOLDER_TO_SHOW', 80);
153define(
'MAX_ACTION_SHOW', 20);
155if (DEBUGNOALYSS == 0) {
157 error_reporting(E_ERROR | E_WARNING);
158 ini_set(
"display_errors", 0);
159 ini_set(
"html_errors", 0);
160 ini_set(
'log_errors', 1);
161 ini_set(
'log_errors_max_len', 0);
162 if(function_exists(
'xdebug_disable')) { xdebug_disable(); }
163}
elseif (DEBUGNOALYSS == 1) {
165 error_reporting(2147483647);
166 ini_set(
"display_errors", 1);
167 ini_set(
"display_startup_errors", 1);
168 ini_set(
"html_errors", 1);
169 ini_set(
'log_errors', 1);
170 ini_set(
'log_errors_max_len', 0);
171 ini_set(
'xdebug.show_exception_trace',
false);
173}
elseif (DEBUGNOALYSS == 2) {
175 error_reporting(2147483647);
176 ini_set(
"display_errors", 1);
177 ini_set(
"display_startup_errors", 1);
178 ini_set(
"html_errors", 1);
179 ini_set(
'log_errors', 1);
180 ini_set(
'log_errors_max_len', 0);
181 ini_set(
'xdebug.show_exception_trace',
true);
188define(
"NOTPERIODE", 3);
189define(
"PERIODCLOSED", 4);
190define(
"INVALID_ECH", 5);
191define(
"RAPPT_ALREADY_USED", 6);
192define(
"RAPPT_NOT_EXIST", 7);
193define(
"DIFF_AMOUNT", 8);
194define(
"RAPPT_NOMATCH_AMOUNT", 9);
195define(
"NO_PERIOD_SELECTED", 10);
196define(
"NO_POST_SELECTED", 11);
202define(
'ACTION',
'1,5,6,7,8');
209define(
"NOTCENTRALIZED", 3);
211define(
"INVOICE_STD", -2);
214define(
"MENU_FACT", 1);
215define(
"MENU_FICHE", 2);
216define(
"MENU_PARAM", 3);
219define(
"ALL_FICHE_DEF_REF", 1000);
222define(
"ATTR_DEF_ACCOUNT", 5);
223define(
"ATTR_DEF_NAME", 1);
224define(
"ATTR_DEF_BQ_NO", 3);
225define(
"ATTR_DEF_BQ_NAME", 4);
226define(
"ATTR_DEF_PRIX_ACHAT", 7);
227define(
"ATTR_DEF_PRIX_VENTE", 6);
228define(
"ATTR_DEF_TVA", 2);
229define(
"ATTR_DEF_NUMTVA", 13);
230define(
"ATTR_DEF_ADRESS", 14);
231define(
"ATTR_DEF_POSTCODE", 15);
232define(
"ATTR_DEF_COUNTRY", 16);
233define(
"ATTR_DEF_STOCK", 19);
234define(
"ATTR_DEF_PHONE", 17);
235define(
"ATTR_DEF_EMAIL", 18);
236define(
"ATTR_DEF_CITY", 24);
237define(
"ATTR_DEF_COMPANY", 25);
238define(
"ATTR_DEF_FAX", 26);
239define(
"ATTR_DEF_NUMBER_CUSTOMER", 30);
240define(
"ATTR_DEF_DEP_PRIV", 31);
241define(
"ATTR_DEF_DEPENSE_NON_DEDUCTIBLE", 20);
242define(
"ATTR_DEF_TVA_NON_DEDUCTIBLE", 21);
243define(
"ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP", 22);
244define(
"ATTR_DEF_QUICKCODE", 23);
245define(
"ATTR_DEF_FIRST_NAME", 32);
246define(
"ATTR_DEF_WEBSITE", 34);
248define(
'ATTR_DEF_ACCOUNT_ND_TVA', 50);
249define(
'ATTR_DEF_ACCOUNT_ND_TVA_ND', 51);
250define(
'ATTR_DEF_ACCOUNT_ND_PERSO', 52);
251define(
'ATTR_DEF_ACCOUNT_ND', 53);
252define(
'ATTR_DEF_ENABLE', 54);
253define(
'ATTR_DEF_SIREN', 55);
254define(
'ATTR_DEF_SIRET', 56);
255define(
'ATTR_DEF_COUNTRY_CODE', 57);
256define(
'ATTR_DEF_PEPPOLID', 58);
257define(
'ATTR_DEF_QUANTITY_TYPE', 59);
259define(
"FICHE_TYPE_CLIENT", 9);
260define(
"FICHE_TYPE_VENTE", 1);
261define(
"FICHE_TYPE_FOURNISSEUR", 8);
262define(
"FICHE_TYPE_FIN", 4);
263define(
"FICHE_TYPE_CONTACT", 16);
264define(
"FICHE_TYPE_EMPL", 25);
265define(
"FICHE_TYPE_ADM_TAX", 14);
266define(
"FICHE_TYPE_ACH_MAR", 2);
267define(
"FICHE_TYPE_ACH_SER", 3);
268define(
"FICHE_TYPE_ACH_MAT", 7);
269define(
"FICHE_TYPE_PROJET", 26);
270define(
"FICHE_TYPE_MATERIAL", 7);
272if (!defined(
"MAX_FILE_SIZE")) {
273 define(
"MAX_FILE_SIZE", 2097152);
282if (!defined(
'OFFICE')) define(
'OFFICE',
'');
283if (!defined(
'GENERATE_PDF')) define(
'GENERATE_PDF',
'NO');
292 define(
'CONVERT_GIF_PDF',
'NOT');
301 define(
'PDF2PS',
'NOT');
310 define(
'PS2PDF',
'NOT');
318if (!isset ($pdftk)) {
319 $pdftk =
'/usr/bin/pdftk';
321if (file_exists($pdftk)) {
322 define(
'PDFTK', $pdftk);
324 define(
'PDFTK',
'NOT');
328if (!defined(
'MULTI')) {
332define(
'JS_INFOBULLE',
'
333 <DIV id="bulle" class="infobulle"></DIV>
334 <script type="text/javascript" language="javascript" src="js/infobulle.js">
339define(
"SQL_LIST_ALL_INVOICE",
"");
341define(
"SQL_LIST_UNPAID_INVOICE",
" (jr_rapt is null or jr_rapt = '') and jr_valid = true "
345define(
"SQL_LIST_UNPAID_INVOICE_DATE_LIMIT",
"
346 where (jr_rapt is null or jr_rapt = '')
347 and to_date(to_char(jr_ech,'DD.MM.YYYY'),'DD.MM.YYYY') < to_date(to_char(now(),'DD.MM.YYYY'),'DD.MM.YYYY')
348 and jr_valid = true");
354define(
'EMAIL_LIMIT', 1002);
355define(
'EXC_PARAM_VALUE', 1005);
356define(
'EXC_PARAM_TYPE', 1006);
357define(
'EXC_DUPLICATE', 1200);
358define(
'EXC_INVALID', 1400);
359define(
'EXC_FORBIDDEN', 1500);
360define(
'EXC_DATA_SQL', 2001);
362define(
'EXC_BALANCE', 1501);
363define(
"UNPINDG",
"");
364define(
"PINDG",
"");
365define(
"ARROWLEFT",
"⇦");
366define(
"ARROWRIGHT",
"⇨");
367define(
"ARROWDOWN",
"⇩");
368define(
"ARROWUP",
"⇧");
371if (!defined(
"NOALYSS_URL")) {
372 if ( isset ( $_SERVER)) {
374 if (isset ($_SERVER[
'REQUEST_SCHEME'])) {
375 $protocol = $_SERVER[
'REQUEST_SCHEME'];
377 $base = $protocol .
'://' .
378 $_SERVER[
'SERVER_NAME'] .
379 ":" . $_SERVER[
'SERVER_PORT'] .
380 dirname($_SERVER[
'PHP_SELF']);
381 define(
"NOALYSS_URL",
$base);
383 define(
"NOALYSS_URL",
"command-line");
386if (!defined(
"DEFAULT_SERVER_VIDEO_CONF")) {
387 define(
"DEFAULT_SERVER_VIDEO_CONF",
"https://www.free-solutions.org/");
390define (
"VATCHECK_URL",
"https://ec.europa.eu/taxation_customs/vies/rest-api/");
393define (
"MAIL_SETTING_NOALYSS",
"noalyss");
403 foreach (array(
"class",
"lib",
"database") as
$path) {
404 if ( file_exists(NOALYSS_INCLUDE.
'/'.
$path.
'/'.
$class.
'.class.php')) {
405 require_once NOALYSS_INCLUDE.
'/'.
$path.
'/'.
$class.
'.class.php';
411 "trait_card"=>
"class/trait_card.php",
412 "database" =>
"class/database.class.php",
413 "acc_detail" =>
"class/acc_operation.class.php",
414 "acc_sold" =>
"class/acc_operation.class.php",
415 "acc_misc" =>
"class/acc_operation.class.php",
416 "acc_purchase" =>
"class/acc_operation.class.php",
417 "acc_fin" =>
"class/acc_operation.class.php",
418 "lettering_card" =>
"class/lettering.class.php",
419 "lettering_account" =>
"class/lettering.class.php",
420 "print_ledger_financial" =>
"class/print_ledger_fin.class.php",
421 "anc_key_ledger_sql" =>
"database/anc_key_sql.class.php",
422 "anc_key_detail_sql" =>
"database/anc_key_sql.class.php",
423 "anc_key_activity_sql" =>
"database/anc_key_sql.class.php",
424 "databasecore" =>
"lib/database_core.class.php",
425 "httpinput" =>
"lib/http_input.class.php",
426 "ismallbutton" =>
"lib/ibutton.class.php",
427 "inputswitch" =>
"lib/input_switch.class.php",
428 'noalyss\mobile' =>
"class/mobile.class.php",
429 "htmlinput" =>
"lib/html_input.class.php",
430 'noalyss\dbg'=>
"lib/dbg.php",
431 'noalyss\file_cache'=>
"lib/file_cache.class.php",
432 "pdfland"=>
"class/pdf_land.class.php",
433 "noalyss\widget\widget"=>
"widget/widget.php",
434 "noalyss\otp"=>
"lib/otp.class.php",
435 'noalyss\xmldocument\xmlinvoice'=>
'XMLDocument/xmlinvoice.class.php',
436 'noalyss\xmldocument\facturx'=>
'XMLDocument/facturx.class.php',
437 'noalyss\xmldocument\invoiceubl21'=>
'XMLDocument/invoiceubl21.class.php',
438 'noalyss\xmldocument\error_message'=>
'XMLDocument/error_message.class.php',
439 "noalyss\invoice_pdf"=>
"class/invoice_pdf.class.php",
440 'noalyss\xmldocument\xmlinvoice_reader'=>
'XMLDocument/xmlinvoice_reader.class.php',
441 'noalyss\mail_parameter'=>
'lib/mail_parameter.class.php',
442 'noalyss\smtpmail'=>
'lib/smtpmail.class.php',
443 'noalyss\iban_number'=>
'lib/iban_number.class.php',
444 'noalyss\xmldocument\document_reference'=>
'XMLDocument/document_reference_type.class.php',
445 'noalyss\xmldocument\binary_object'=>
'XMLDocument/document_reference_type.class.php',
446 'noalyss\xmldocument\xml_reader'=>
'XMLDocument/xml_reader.class.php',
447 "noalyss\xmldocument\xmlcreditnote_reader"=>
"XMLDocument/xmlcreditnote_reader.class.php",
448 "noalyss\xmldocument\pdf"=>
"XMLDocument/pdf.class.php"
450 if (isset ($aClass[
$class])) {
451 require_once NOALYSS_INCLUDE .
"/" . $aClass[
$class];
456spl_autoload_register(
'\noalyss_class_autoloader',
true);
458require_once NOALYSS_BASE.
'/vendor/autoload.php';
if(LOGINPUT) if($op=='widget') $path
for widget we call immediately a file outside the ajax folder
$class
Display the Plugin and for each profile were it is installed or not.
$convert_gif_pdf
Pour conversion GIF en PDF.
$pdf2ps
PDF2PS is used when the PDF is broken , used with FIX_BROKEN_PDF.
$ps2pdf
PS2PDF is used when the PDF is broken , used with FIX_BROKEN_PDF.
noalyss_class_autoloader($class)
load automatically class
if( $delta< 0) elseif( $delta==0)