34require
'../main.inc.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
45require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
46require_once DOL_DOCUMENT_ROOT.
'/core/lib/images.lib.php';
47require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
48require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
49require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
50require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
51require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
53$action =
GETPOST(
'action',
'aZ09');
54$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'admincompany';
58$langs->loadLangs(array(
'admin',
'companies',
'bills'));
67$maxwidthsmall = $tmparraysize[
'maxwidthsmall'];
68$maxheightsmall = $tmparraysize[
'maxheightsmall'];
69$maxwidthmini = $tmparraysize[
'maxwidthmini'];
70$maxheightmini = $tmparraysize[
'maxheightmini'];
71$quality = $tmparraysize[
'quality'];
74$hookmanager->initHooks(array(
'admincompany',
'globaladmin'));
84$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
89if (($action ==
'update' && !
GETPOST(
"cancel",
'alpha'))
90|| ($action ==
'updateedit')) {
94 if (!empty($tmparray[
'id'])) {
96 include_once DOL_DOCUMENT_ROOT.
'/blockedlog/lib/blockedlog.lib.php';
98 $langs->load(
"blockedlog");
99 setEventMessages($langs->trans(
"BlockedLogCountryChangeNotAllowedFR"),
null,
'errors');
102 if ($tmparray[
'code'] ==
'FR' && $tmparray[
'id'] !=
$mysoc->country_id) {
107 $mysoc->country_id = $tmparray[
'id'];
108 $mysoc->country_code = $tmparray[
'code'];
109 $mysoc->country_label = $tmparray[
'label'];
114 activateModulesRequiredByCountry(
$mysoc->country_code);
119 if (!empty($tmparray[
'id'])) {
120 $mysoc->state_id = $tmparray[
'id'];
121 $mysoc->state_code = $tmparray[
'code'];
122 $mysoc->state_label = $tmparray[
'label'];
144 $dirforimage =
$conf->mycompany->dir_output.
'/logos/';
146 $arrayofimages = array(
'logo',
'logo_squarred');
148 foreach ($arrayofimages as $varforimage) {
150 $langs->load(
"errors");
151 $mesg = $langs->trans(
"ErrorBadImageFormat");
152 if (!function_exists(
"imagecreate")) {
153 $mesg .=
' - '.$langs->trans(
"ErrorPHPDoesNotSupport",
"GD");
156 $supportedextensions = preg_replace(
'/\\\./',
'', $supportedextensions);
157 $mesg .=
' - '.$langs->trans(
"ErrorSupportedFormatAre", implode(
', ', explode(
'|', $supportedextensions)));
166 if (preg_match(
'/([^\\/:]+)$/i', $_FILES[$varforimage][
"name"], $reg)) {
167 $original_file = $reg[1];
171 dol_syslog(
"Move file ".$_FILES[$varforimage][
"tmp_name"].
" to ".$dirforimage.$original_file);
172 if (!is_dir($dirforimage)) {
175 $result =
dol_move_uploaded_file($_FILES[$varforimage][
"tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage][
'error']);
177 if (is_numeric($result) && $result > 0) {
178 $constant =
"MAIN_INFO_SOCIETE_LOGO";
179 if ($varforimage ==
'logo_squarred') {
180 $constant =
"MAIN_INFO_SOCIETE_LOGO_SQUARRED";
192 $imgThumbSmall =
vignette($dirforimage.$original_file, $maxwidthsmall, $maxheightsmall,
'_small', $quality);
194 $imgThumbSmall = $reg[1];
201 $imgThumbMini =
vignette($dirforimage.$original_file, $maxwidthmini, $maxheightmini,
'_mini', $quality);
203 $imgThumbMini = $reg[1];
209 dol_syslog(
"ErrorImageFormatNotSupported", LOG_WARNING);
211 } elseif (preg_match(
'/^ErrorFileIsInfectedWithAVirus/', $result)) {
213 $langs->load(
"errors");
214 $tmparray = explode(
':', $result);
215 setEventMessages($langs->trans(
'ErrorFileIsInfectedWithAVirus', $tmparray[1]),
null,
'errors');
216 } elseif (preg_match(
'/^ErrorFileSizeTooLarge/', $result)) {
225 $langs->load(
"errors");
253 $usevat =
GETPOST(
"optiontva",
'aZ09');
254 $uselocaltax1 =
GETPOST(
"optionlocaltax1",
'aZ09');
255 $uselocaltax2 =
GETPOST(
"optionlocaltax2",
'aZ09');
256 if ($uselocaltax1 ==
'localtax1on' && !$usevat) {
257 setEventMessages($langs->trans(
"IfYouUseASecondTaxYouMustSetYouUseTheMainTax"),
null,
'errors');
260 if ($uselocaltax2 ==
'localtax2on' && !$usevat) {
261 setEventMessages($langs->trans(
"IfYouUseAThirdTaxYouMustSetYouUseTheMainTax"),
null,
'errors');
269 if (
GETPOST(
"optionlocaltax1") ==
"localtax1on") {
270 if (!GETPOSTISSET(
'lt1')) {
277 if (
GETPOST(
"optionlocaltax2") ==
"localtax2on") {
278 if (!GETPOSTISSET(
'lt2')) {
287 if (
$mysoc->country_code ==
'GR') {
306 if ($action !=
'updateedit' && !$error) {
307 header(
"Location: ".$_SERVER[
"PHP_SELF"].($page_y ?
'?page_y='.$page_y :
''));
312if ($action ==
'addthumb' || $action ==
'addthumbsquarred') {
313 if (file_exists(
$conf->mycompany->dir_output.
'/logos/'.
GETPOST(
"file"))) {
318 $constant =
"MAIN_INFO_SOCIETE_LOGO";
319 if ($action ==
'addthumbsquarred') {
320 $constant =
"MAIN_INFO_SOCIETE_LOGO_SQUARRED";
329 $imgThumbSmall =
vignette(
$conf->mycompany->dir_output.
'/logos/'.
GETPOST(
"file"), $maxwidthsmall, $maxheightsmall,
'_small', $quality);
331 $imgThumbSmall = $reg[1];
338 $imgThumbMini =
vignette(
$conf->mycompany->dir_output.
'/logos/'.
GETPOST(
"file"), $maxwidthmini, $maxheightmini,
'_mini', $quality);
340 $imgThumbMini = $reg[1];
346 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
350 $langs->load(
"errors");
352 dol_syslog($langs->transnoentities(
"ErrorBadImageFormat"), LOG_INFO);
356 $langs->load(
"errors");
358 dol_syslog($langs->transnoentities(
"ErrorFileDoesNotExists",
GETPOST(
"file")), LOG_WARNING);
363if ($action ==
'removelogo' || $action ==
'removelogo_squarred') {
364 $constant =
"MAIN_INFO_SOCIETE_LOGO";
365 if ($action ==
'removelogo_squarred') {
366 $constant =
"MAIN_INFO_SOCIETE_LOGO_SQUARRED";
369 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
371 $logofilename =
$mysoc->logo;
372 $logofilenamebis =
$mysoc->logo_squarred;
373 if ($action ==
'removelogo_squarred') {
374 $logofilename =
$mysoc->logo_squarred;
375 $logofilenamebis =
$mysoc->logo;
378 $logofile =
$conf->mycompany->dir_output.
'/logos/'.$logofilename;
379 if ($logofilename !=
'' && $logofilename != $logofilenamebis) {
383 if ($action ==
'removelogo_squarred') {
384 $mysoc->logo_squarred =
'';
389 $logofilename =
$mysoc->logo_small;
390 $logofilenamebis =
$mysoc->logo_squarred_small;
391 if ($action ==
'removelogo_squarred') {
392 $logofilename =
$mysoc->logo_squarred_small;
393 $logofilenamebis =
$mysoc->logo_small;
396 $logosmallfile =
$conf->mycompany->dir_output.
'/logos/thumbs/'.$logofilename;
397 if ($logofilename !=
'' && $logofilename != $logofilenamebis) {
401 if ($action ==
'removelogo_squarred') {
402 $mysoc->logo_squarred_small =
'';
407 $logofilename =
$mysoc->logo_mini;
408 $logofilenamebis =
$mysoc->logo_squarred_mini;
409 if ($action ==
'removelogo_squarred') {
410 $logofilename =
$mysoc->logo_squarred_mini;
411 $logofilenamebis =
$mysoc->logo_mini;
414 $logominifile =
$conf->mycompany->dir_output.
'/logos/thumbs/'.$logofilename;
415 if ($logofilename !=
'' && $logofilename != $logofilenamebis) {
419 if ($action ==
'removelogo_squarred') {
420 $mysoc->logo_squarred_mini =
'';
431$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
432llxHeader(
'', $langs->trans(
"Setup"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-company');
439$countrynotdefined =
'<span class="error">'.$langs->trans(
"ErrorSetACountryFirst").
' <a href="" onclick="window.scrollTo({top: 0, behavior: \'smooth\'}); return false;">('.$langs->trans(
"SeeAbove").
')</a></span>';
441print
load_fiche_titre($langs->trans(
"CompanyFoundation"),
'',
'title_setup');
447print
'<span class="opacitymedium">'.$langs->trans(
"CompanyFundationDesc", $langs->transnoentities(
"Save")).
"</span><br>\n";
453if (!empty(
$conf->use_javascript_ajax)) {
454 print
"\n".
'<script type="text/javascript">';
455 print
'$(document).ready(function () {
456 $("#selectcountry_id").change(function() {
457 console.log("selectcountry_id change");
458 document.form_index.action.value="updateedit";
459 document.form_index.submit();
462 // Show/hide VAT exemption code field based on VAT option
463 $("input[name=\"optiontva\"]").change(function() {
464 if ($(this).val() == "0") {
465 $("#vat_exemption_code_div").show();
467 $("#vat_exemption_code_div").hide();
471 print
'</script>'.
"\n";
474print
'<form enctype="multipart/form-data" method="POST" action="'.$_SERVER[
"PHP_SELF"].
'" name="form_index" spellcheck="false">';
475print
'<input type="hidden" name="token" value="'.newToken().
'">';
476print
'<input type="hidden" name="action" value="update">';
477print
'<input type="hidden" name="page_y" value="">';
479print
'<table class="noborder centpercent editmode">';
480print
'<tr class="liste_titre"><th class="wordbreak" colspan="2">'.$langs->trans(
"CompanyInfo").
'</th></tr>'.
"\n";
483print
'<tr class="oddeven"><td class="fieldrequired titlefieldcreate wordbreak"><label for="name">'.$langs->trans(
"CompanyName").
'</label></td><td>';
484print
'<input name="name" id="name" maxlength="'.$mysoc->fields[
'nom'][
'length'].
'" class="minwidth250" value="'.
dolPrintHTMLForAttribute((GETPOSTISSET(
'name') ?
GETPOST(
'name',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_NOM'))).
'"'.(
getDolGlobalString(
'MAIN_INFO_SOCIETE_NOM') ?
'' :
' autofocus="autofocus"').
'></td></tr>'.
"\n";
487print
'<tr class="oddeven"><td class="fieldrequired"><label for="currency">'.$langs->trans(
"CompanyCurrency").
'</label></td><td>';
488print
img_picto(
'',
'multicurrency',
'class="pictofixedwidth"');
490print
'</td></tr>'.
"\n";
493print
'<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans(
"Country").
'</label></td><td>';
494print
img_picto(
'',
'globe-americas',
'class="pictofixedwidth"');
495print $form->select_country((
string)
$mysoc->country_id,
'country_id',
'', 0);
496print
info_admin($langs->trans(
"YouCanChangeValuesForThisListFromDictionarySetup"), 1);
497print
'</td></tr>'.
"\n";
500print
'<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ADDRESS">'.$langs->trans(
"CompanyAddress").
'</label></td><td>';
501print
'<textarea name="MAIN_INFO_SOCIETE_ADDRESS" id="MAIN_INFO_SOCIETE_ADDRESS" class="quatrevingtpercent" rows="'.ROWS_3.
'">'.(GETPOSTISSET(
'MAIN_INFO_SOCIETE_ADDRESS') ?
GETPOST(
'MAIN_INFO_SOCIETE_ADDRESS',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_ADDRESS')).
'</textarea></td></tr>'.
"\n";
504print
'<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ZIP">'.$langs->trans(
"CompanyZip").
'</label></td><td>';
505print
'<input class="width100" name="MAIN_INFO_SOCIETE_ZIP" id="MAIN_INFO_SOCIETE_ZIP" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'MAIN_INFO_SOCIETE_ZIP') ?
GETPOST(
'MAIN_INFO_SOCIETE_ZIP',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_ZIP'))).
'"></td></tr>'.
"\n";
507print
'<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_TOWN">'.$langs->trans(
"CompanyTown").
'</label></td><td>';
508print
'<input name="MAIN_INFO_SOCIETE_TOWN" class="minwidth200" id="MAIN_INFO_SOCIETE_TOWN" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'MAIN_INFO_SOCIETE_TOWN') ?
GETPOST(
'MAIN_INFO_SOCIETE_TOWN',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_TOWN'))).
'"></td></tr>'.
"\n";
511print
'<tr class="oddeven"><td class="wordbreak"><label for="state_id">'.$langs->trans(
"State").
'</label></td><td>';
517print
img_picto(
'',
'state',
'class="pictofixedwidth"');
518print $formcompany->select_state($state_id,
$mysoc->country_code,
'state_id',
'maxwidth200onsmartphone minwidth300');
519print
'</td></tr>'.
"\n";
522print
'<tr class="oddeven"><td><label for="phone">'.$langs->trans(
"Phone").
'</label></td><td>';
523print
img_picto(
'',
'object_phoning',
'', 0, 0, 0,
'',
'pictofixedwidth');
524print
'<input class="maxwidth150 widthcentpercentminusx" name="phone" id="phone" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'phone') ?
GETPOST(
'phone',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_TEL'))).
'"></td></tr>';
525print
'</td></tr>'.
"\n";
528print
'<tr class="oddeven"><td><label for="phone">'.$langs->trans(
"PhoneMobile").
'</label></td><td>';
529print
img_picto(
'',
'object_phoning_mobile',
'', 0, 0, 0,
'',
'pictofixedwidth');
530print
'<input class="maxwidth150 widthcentpercentminusx" name="phone_mobile" id="phone_mobile" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'phone_mobile') ?
GETPOST(
'phone_mobile',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_MOBILE'))).
'"></td></tr>';
531print
'</td></tr>'.
"\n";
534print
'<tr class="oddeven"><td><label for="fax">'.$langs->trans(
"Fax").
'</label></td><td>';
535print
img_picto(
'',
'object_phoning_fax',
'', 0, 0, 0,
'',
'pictofixedwidth');
536print
'<input class="maxwidth150" name="fax" id="fax" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'fax') ?
GETPOST(
'fax',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_FAX'))).
'"></td></tr>';
537print
'</td></tr>'.
"\n";
540print
'<tr class="oddeven"><td><label for="email">'.$langs->trans(
"EMail").
'</label></td><td>';
541print
img_picto(
'',
'object_email',
'', 0, 0, 0,
'',
'pictofixedwidth');
542print
'<input class="minwidth300 maxwidth500 widthcentpercentminusx" name="mail" id="email" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'mail') ?
GETPOST(
'mail',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_MAIL'))).
'"></td></tr>';
543print
'</td></tr>'.
"\n";
546print
'<tr class="oddeven"><td><label for="web">'.$langs->trans(
"Web").
'</label></td><td>';
547print
img_picto(
'',
'globe',
'', 0, 0, 0,
'',
'pictofixedwidth');
548print
'<input class="maxwidth300 widthcentpercentminusx" name="web" id="web" value="'.dol_escape_htmltag((GETPOSTISSET(
'web') ?
GETPOST(
'web',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_WEB'))).
'"></td></tr>';
549print
'</td></tr>'.
"\n";
553 print
'<tr class="oddeven"><td>';
554 print
'<label for="barcode">'.$langs->trans(
"Gencod").
'</label></td><td>';
555 print
'<span class="fa fa-barcode pictofixedwidth"></span>';
556 print
'<input name="barcode" id="barcode" class="minwidth150 widthcentpercentminusx maxwidth300" value="'.dolPrintHTMLForAttribute(GETPOSTISSET(
'barcode') ?
GETPOST(
'barcode',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_GENCOD')).
'"></td></tr>';
562$maxmin = $maxfilesizearray[
'maxmin'];
563$tooltiplogo = $langs->trans(
'AvailableFormats').
' : png, jpg, jpeg';
564$tooltiplogo .= ($maxmin > 0) ?
'<br>'.$langs->trans(
'MaxSize').
' : '.$maxmin.
' '.$langs->trans(
'Kb') :
'';
567print
'<tr class="oddeven"><td><label for="logo">'.$form->textwithpicto($langs->trans(
"Logo"), $tooltiplogo).
'</label></td><td>';
569$modulepart =
'mycompany';
570$dirformainimage =
$conf->mycompany->dir_output;
571$subdirformainimage =
'logos/';
572$fileformainimage =
$mysoc->logo;
574print $formfile->showImageToEdit(
'logo', $modulepart, $dirformainimage, $subdirformainimage, $fileformainimage);
579print
'<tr class="oddeven"><td><label for="logo_squarred">'.$form->textwithpicto($langs->trans(
"LogoSquarred"), $tooltiplogo).
'</label></td><td>';
581$modulepart =
'mycompany';
582$dirformainimage =
$conf->mycompany->dir_output;
583$subdirformainimage =
'logos/';
584$fileformainimage =
$mysoc->logo_squarred;
586print $formfile->showImageToEdit(
'logo_squarred', $modulepart, $dirformainimage, $subdirformainimage, $fileformainimage);
591print
'<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans(
"Note").
'</label></td><td>';
592print
'<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.
'">'.(GETPOSTISSET(
'note') ?
GETPOST(
'note',
'restricthtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_NOTE')).
'</textarea></td></tr>';
597print $form->buttonsSaveCancel(
"Save",
'', array(),
false,
'reposition');
603print
'<div class="div-table-responsive-no-min">';
604print
'<table class="noborder centpercent editmode">';
605print
'<tr class="liste_titre"><td class="wordbreak" colspan="2">'.$langs->trans(
"CompanyIds").
'</td></tr>';
607$langs->load(
"companies");
610print
'<tr class="oddeven"><td class="titlefieldcreate smallheight"><label for="director">'.$langs->trans(
"ManagingDirectors").
'</label></td><td>';
611print
'<input name="MAIN_INFO_SOCIETE_MANAGERS" id="directors" class="minwidth300" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'MAIN_INFO_SOCIETE_MANAGERS') ?
GETPOST(
'MAIN_INFO_SOCIETE_MANAGERS',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_MANAGERS'))).
'"></td></tr>';
614print
'<tr class="oddeven"><td class="smallheight">';
615print $form->textwithpicto($langs->trans(
"GDPRContact"), $langs->trans(
"GDPRContactDesc"));
617print
'<input name="MAIN_INFO_GDPR" id="infodirector" class="minwidth300" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
"MAIN_INFO_GDPR") ?
GETPOST(
"MAIN_INFO_GDPR",
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_GDPR'))).
'"></td></tr>';
620print
'<tr class="oddeven"><td><label for="capital">'.$langs->trans(
"Capital").
'</label></td><td>';
621print
'<input name="capital" id="capital" class="maxwidth100" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'capital') ?
GETPOST(
'capital',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_CAPITAL'))).
'"></td></tr>';
624print
'<tr class="oddeven"><td><label for="socialobject">'.$langs->trans(
"CompanyObject").
'</label></td><td>';
625print
'<textarea class="flat quatrevingtpercent" name="socialobject" id="socialobject" rows="'.ROWS_3.
'">'.
getDolGlobalString(
'MAIN_INFO_SOCIETE_OBJECT').
'</textarea></td></tr>';
629print
'<tr class="oddeven"><td><label for="intra_vat">'.$langs->trans(
"VATIntra").
'</label></td><td>';
630print
'<input name="tva" id="intra_vat" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_TVAINTRA')).
'">';
634print
'<tr class="oddeven"><td><label for="forme_juridique_code">'.$langs->trans(
"JuridicalStatus").
'</label></td><td>';
635if (
$mysoc->country_code) {
636 print $formcompany->select_juridicalstatus(
getDolGlobalInt(
'MAIN_INFO_SOCIETE_FORME_JURIDIQUE'),
$mysoc->country_code,
'',
'forme_juridique_code');
638 print $countrynotdefined;
643if ($langs->transcountry(
"ProfId1",
$mysoc->country_code) !=
'-') {
644 print
'<tr class="oddeven"><td><label for="profid1">'.$langs->transcountry(
"ProfId1",
$mysoc->country_code).
'</label></td><td>';
645 if (!empty(
$mysoc->country_code)) {
646 print
'<input name="siren" id="profid1" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_SIREN')).
'">';
648 print $countrynotdefined;
654if ($langs->transcountry(
"ProfId2",
$mysoc->country_code) !=
'-') {
655 print
'<tr class="oddeven"><td><label for="profid2">'.$langs->transcountry(
"ProfId2",
$mysoc->country_code).
'</label></td><td>';
656 if (!empty(
$mysoc->country_code)) {
657 print
'<input name="siret" id="profid2" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_SIRET')).
'">';
659 print $countrynotdefined;
665if ($langs->transcountry(
"ProfId3",
$mysoc->country_code) !=
'-') {
666 print
'<tr class="oddeven"><td><label for="profid3">'.$langs->transcountry(
"ProfId3",
$mysoc->country_code).
'</label></td><td>';
667 if (!empty(
$mysoc->country_code)) {
668 print
'<input name="ape" id="profid3" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_APE')).
'">';
670 print $countrynotdefined;
676if ($langs->transcountry(
"ProfId4",
$mysoc->country_code) !=
'-') {
677 print
'<tr class="oddeven"><td><label for="profid4">'.$langs->transcountry(
"ProfId4",
$mysoc->country_code).
'</label></td><td>';
678 if (!empty(
$mysoc->country_code)) {
679 print
'<input name="rcs" id="profid4" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_RCS')).
'">';
681 print $countrynotdefined;
687if ($langs->transcountry(
"ProfId5",
$mysoc->country_code) !=
'-') {
688 print
'<tr class="oddeven"><td><label for="profid5">'.$langs->transcountry(
"ProfId5",
$mysoc->country_code).
'</label></td><td>';
689 if (!empty(
$mysoc->country_code)) {
690 print
'<input name="MAIN_INFO_PROFID5" id="profid5" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID5')).
'">';
692 print $countrynotdefined;
698if ($langs->transcountry(
"ProfId6",
$mysoc->country_code) !=
'-') {
699 print
'<tr class="oddeven"><td><label for="profid6">'.$langs->transcountry(
"ProfId6",
$mysoc->country_code).
'</label></td><td>';
700 if (!empty(
$mysoc->country_code)) {
701 print
'<input name="MAIN_INFO_PROFID6" id="profid6" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID6')).
'">';
703 print $countrynotdefined;
709if ($langs->transcountry(
"ProfId7",
$mysoc->country_code) !=
'-') {
710 print
'<tr class="oddeven"><td><label for="profid7">'.$langs->transcountry(
"ProfId7",
$mysoc->country_code).
'</label></td><td>';
711 if (!empty(
$mysoc->country_code)) {
712 print
'<input name="MAIN_INFO_PROFID7" id="profid7" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID7')).
'">';
714 print $countrynotdefined;
720if ($langs->transcountry(
"ProfId8",
$mysoc->country_code) !=
'-') {
721 print
'<tr class="oddeven"><td><label for="profid8">'.$langs->transcountry(
"ProfId8",
$mysoc->country_code).
'</label></td><td>';
722 if (!empty(
$mysoc->country_code)) {
723 print
'<input name="MAIN_INFO_PROFID8" id="profid8" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID8')).
'">';
725 print $countrynotdefined;
731if ($langs->transcountry(
"ProfId9",
$mysoc->country_code) !=
'-') {
732 print
'<tr class="oddeven"><td><label for="profid9">'.$langs->transcountry(
"ProfId9",
$mysoc->country_code).
'</label></td><td>';
733 if (!empty(
$mysoc->country_code)) {
734 print
'<input name="MAIN_INFO_PROFID9" id="profid9" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID9')).
'">';
736 print $countrynotdefined;
742if ($langs->transcountry(
"ProfId10",
$mysoc->country_code) !=
'-') {
743 print
'<tr class="oddeven"><td><label for="profid10">'.$langs->transcountry(
"ProfId10",
$mysoc->country_code).
'</label></td><td>';
744 if (!empty(
$mysoc->country_code)) {
745 print
'<input name="MAIN_INFO_PROFID10" id="profid10" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID10')).
'">';
747 print $countrynotdefined;
758print
'<table class="noborder centpercent editmode">';
759print
'<tr class="liste_titre">';
760print
'<td class="titlefieldcreate">'.$langs->trans(
"FiscalYearInformation").
'</td><td></td>';
763print
'<tr class="oddeven"><td><label for="SOCIETE_FISCAL_MONTH_START">'.$langs->trans(
"FiscalMonthStart").
'</label></td><td>';
764print $formother->select_month(
getDolGlobalString(
'SOCIETE_FISCAL_MONTH_START'),
'SOCIETE_FISCAL_MONTH_START', 0, 1,
'maxwidth100').
'</td></tr>';
768print $form->buttonsSaveCancel(
"Save",
'', array(),
false,
'reposition');
774print
load_fiche_titre($langs->trans(
"TypeOfSaleTaxes"),
'',
'object_payment');
776print
'<table class="noborder centpercent editmode">';
777print
'<tr class="liste_titre">';
778print
'<td class="titlefieldcreate">'.$langs->trans(
"VATManagement").
'</td><td></td>';
779print
'<td class="right"> </td>';
783print
'<tr class="oddeven"><td><label><input type="radio" name="optiontva" id="use_vat" value="1"'.(!
getDolGlobalString(
'FACTURE_TVAOPTION') ?
"" :
" checked").
"> ".$langs->trans(
"VATIsUsed").
"</label></td>";
784print
'<td colspan="2">';
785$tooltiphelp = $langs->trans(
"VATIsUsedDesc");
786if (
$mysoc->country_code ==
'FR') {
787 $tooltiphelp .=
'<br><br><i>'.$langs->trans(
"Example").
': '.$langs->trans(
"VATIsUsedExampleFR").
"</i>";
789print
'<label for="use_vat">'.$form->textwithpicto($langs->trans(
"VATIsUsedStandard"), $tooltiphelp).
"</label>";
793print
'<tr class="oddeven"><td width="140"><label><input type="radio" name="optiontva" id="no_vat" value="0"'.(!
getDolGlobalString(
'FACTURE_TVAOPTION') ?
" checked" :
"").
"> ".$langs->trans(
"VATIsNotUsed").
"</label></td>";
794print
'<td colspan="2">';
796if (
$mysoc->country_code ==
'FR') {
797 $tooltiphelp =
"<i>".$langs->trans(
"Example").
': '.$langs->trans(
"VATIsNotUsedExampleFR").
"</i>\n";
799print
'<label for="no_vat">'.$form->textwithpicto($langs->trans(
"VATIsNotUsedDesc"), $tooltiphelp).
"</label>";
801print
'<div class="shownifvatnotused" id="vat_exemption_code_div"'.(getDolGlobalString(
'FACTURE_TVAOPTION') ?
' style="display: none;"' :
'').
'>';
802$placeholder = ((
$mysoc->country_code ==
'FR') ?
'VATEX-FR-FRANCHISE' :
'');
803$tooltiptext = $langs->trans(
"VATExemptionCodeDesc").
'<br>'.$langs->trans(
"VATExemptionCodeDesc2").
'<br>'.$langs->trans(
"VATExemptionCodeDesc3");
804if ((
$mysoc->country_code ==
'FR')) {
805 $tooltiptext .=
'<br><br>'.$langs->trans(
"Example").
':<br>';
806 $tooltiptext .=
'VATEX-FR-FRANCHISE, VATEX-FR-CGI261-4, VATEX-FR-J, VATEX-FR-I, VATEX-FR-D, ...';
808print $form->textwithpicto($langs->trans(
"VATExemptionCode"), $tooltiptext, 1,
'help',
'valignmiddle', 0, 3,
'exemptioncode').
' <input type="text" name="MAIN_INFO_SOCIETE_VAT_EXEMPTION_CODE" placeholder="'.$placeholder.
'" value="'.
getDolGlobalString(
'MAIN_INFO_SOCIETE_VAT_EXEMPTION_CODE').
'">';
817print
'<table class="noborder centpercent editmode">';
818print
'<tr class="liste_titre">';
819print
'<td class="titlefieldcreate">'.$form->textwithpicto($langs->transcountry(
"LocalTax1Management",
$mysoc->country_code), $langs->transcountry(
"LocalTax1IsUsedDesc",
$mysoc->country_code)).
'</td><td></td>';
820print
'<td class="right"> </td>';
823if (
$mysoc->useLocalTax(1)) {
825 print
'<tr class="oddeven"><td><input type="radio" name="optionlocaltax1" id="lt1" value="localtax1on"'.((getDolGlobalString(
'FACTURE_LOCAL_TAX1_OPTION') ==
'1' ||
getDolGlobalString(
'FACTURE_LOCAL_TAX1_OPTION') ==
"localtax1on") ?
" checked" :
"").
'> <label for="lt1">'.$langs->transcountry(
"LocalTax1IsUsed",
$mysoc->country_code).
"</label></td>";
826 print
'<td colspan="2">';
827 print
'<div class="nobordernopadding">';
828 $tooltiphelp = $langs->transcountry(
"LocalTax1IsUsedExample",
$mysoc->country_code);
829 $tooltiphelp = ($tooltiphelp !=
"LocalTax1IsUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax1IsUsedExample",
$mysoc->country_code).
"</i>\n" :
"");
830 print $form->textwithpicto($langs->transcountry(
"LocalTax1IsUsedDesc",
$mysoc->country_code), $tooltiphelp);
832 print
'<br><label for="lt1">'.$langs->trans(
"LTRate").
'</label>: ';
833 $formcompany->select_localtax(1,
getDolGlobalFloat(
'MAIN_INFO_VALUE_LOCALTAX1'),
"lt1");
836 $options = array($langs->trans(
"CalcLocaltax1").
' '.$langs->trans(
"CalcLocaltax1Desc"), $langs->trans(
"CalcLocaltax2").
' - '.$langs->trans(
"CalcLocaltax2Desc"), $langs->trans(
"CalcLocaltax3").
' - '.$langs->trans(
"CalcLocaltax3Desc"));
838 print
'<br><label for="clt1">'.$langs->trans(
"CalcLocaltax").
'</label>: ';
839 print $form->selectarray(
"clt1", $options,
getDolGlobalString(
'MAIN_INFO_LOCALTAX_CALC1'));
841 print
"</td></tr>\n";
843 print
'<tr class="oddeven"><td><input type="radio" name="optionlocaltax1" id="nolt1" value="localtax1off"'.((!
getDolGlobalString(
'FACTURE_LOCAL_TAX1_OPTION') ||
getDolGlobalString(
'FACTURE_LOCAL_TAX1_OPTION') ==
"localtax1off") ?
" checked" :
"").
'> <label for="nolt1">'.$langs->transcountry(
"LocalTax1IsNotUsed",
$mysoc->country_code).
"</label></td>";
844 print
'<td colspan="2">';
845 $tooltiphelp = $langs->transcountry(
"LocalTax1IsNotUsedExample",
$mysoc->country_code);
846 $tooltiphelp = ($tooltiphelp !=
"LocalTax1IsNotUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax1IsNotUsedExample",
$mysoc->country_code).
"</i>\n" :
"");
847 print $form->textwithpicto($langs->transcountry(
"LocalTax1IsNotUsedDesc",
$mysoc->country_code), $tooltiphelp);
848 print
"</td></tr>\n";
850 if (empty(
$mysoc->country_code)) {
851 print
'<tr class="oddeven nohover"><td class="" colspan="3">'.$countrynotdefined.
'</td></tr>';
853 print
'<tr class="oddeven nohover"><td class="" colspan="3"><span class="opacitymedium">'.$langs->trans(
"NoLocalTaxXForThisCountry", $langs->transnoentitiesnoconv(
"Setup"), $langs->transnoentitiesnoconv(
"Dictionaries"), $langs->transnoentitiesnoconv(
"DictionaryVAT"), $langs->transnoentitiesnoconv(
"LocalTax1Management")).
'</span></td></tr>';
861print
'<table class="noborder centpercent editmode">';
862print
'<tr class="liste_titre">';
863print
'<td class="titlefieldcreate">'.$form->textwithpicto($langs->transcountry(
"LocalTax2Management",
$mysoc->country_code), $langs->transcountry(
"LocalTax2IsUsedDesc",
$mysoc->country_code)).
'</td><td></td>';
864print
'<td class="right"> </td>';
867if (
$mysoc->useLocalTax(2)) {
869 print
'<tr class="oddeven"><td><input type="radio" name="optionlocaltax2" id="lt2" value="localtax2on"'.((getDolGlobalString(
'FACTURE_LOCAL_TAX2_OPTION') ==
'1' ||
getDolGlobalString(
'FACTURE_LOCAL_TAX2_OPTION') ==
"localtax2on") ?
" checked" :
"").
'> <label for="lt2">'.$langs->transcountry(
"LocalTax2IsUsed",
$mysoc->country_code).
"</label></td>";
870 print
'<td colspan="2">';
871 print
'<div class="nobordernopadding">';
872 print
'<label for="lt2">'.$langs->transcountry(
"LocalTax2IsUsedDesc",
$mysoc->country_code).
"</label>";
873 $tooltiphelp = $langs->transcountry(
"LocalTax2IsUsedExample",
$mysoc->country_code);
874 $tooltiphelp = ($tooltiphelp !=
"LocalTax2IsUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax2IsUsedExample",
$mysoc->country_code).
"</i>\n" :
"");
876 print
'<br><label for="lt2">'.$langs->trans(
"LTRate").
'</label>: ';
877 $formcompany->select_localtax(2,
getDolGlobalFloat(
'MAIN_INFO_VALUE_LOCALTAX2'),
"lt2");
880 $options = array($langs->trans(
"CalcLocaltax1").
' '.$langs->trans(
"CalcLocaltax1Desc"), $langs->trans(
"CalcLocaltax2").
' - '.$langs->trans(
"CalcLocaltax2Desc"), $langs->trans(
"CalcLocaltax3").
' - '.$langs->trans(
"CalcLocaltax3Desc"));
882 print
'<br><label for="clt2">'.$langs->trans(
"CalcLocaltax").
'</label>: ';
883 print $form->selectarray(
"clt2", $options,
getDolGlobalString(
'MAIN_INFO_LOCALTAX_CALC2'));
885 print
"</td></tr>\n";
887 print
'<tr class="oddeven"><td><input type="radio" name="optionlocaltax2" id="nolt2" value="localtax2off"'.((!
getDolGlobalString(
'FACTURE_LOCAL_TAX2_OPTION') ||
getDolGlobalString(
'FACTURE_LOCAL_TAX2_OPTION') ==
"localtax2off") ?
" checked" :
"").
'> <label for="nolt2">'.$langs->transcountry(
"LocalTax2IsNotUsed",
$mysoc->country_code).
"</label></td>";
888 print
'<td colspan="2">';
890 $tooltiphelp = $langs->transcountry(
"LocalTax2IsNotUsedExample",
$mysoc->country_code);
891 $tooltiphelp = ($tooltiphelp !=
"LocalTax2IsNotUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax2IsNotUsedExample",
$mysoc->country_code).
"</i>\n" :
"");
892 print
"<label for=\"nolt2\">".$form->textwithpicto($langs->transcountry(
"LocalTax2IsNotUsedDesc",
$mysoc->country_code), $tooltiphelp).
"</label>";
894 print
"</td></tr>\n";
896 if (empty(
$mysoc->country_code)) {
897 print
'<tr class="oddeven nohover"><td class="" colspan="3">'.$countrynotdefined.
'</td></tr>';
899 print
'<tr class="oddeven nohover"><td class="" colspan="3"><span class="opacitymedium">'.$langs->trans(
"NoLocalTaxXForThisCountry", $langs->transnoentitiesnoconv(
"Setup"), $langs->transnoentitiesnoconv(
"Dictionaries"), $langs->transnoentitiesnoconv(
"DictionaryVAT"), $langs->transnoentitiesnoconv(
"LocalTax2Management")).
'</span></td></tr>';
908print
'<table class="noborder centpercent editmode">';
909print
'<tr class="liste_titre">';
910print
'<td>'.$form->textwithpicto($langs->trans(
"RevenueStamp"), $langs->trans(
"RevenueStampDesc")).
'</td><td></td>';
911print
'<td class="right"> </td>';
913if (
$mysoc->useRevenueStamp()) {
915 print
'<tr class="oddeven"><td>';
916 print $langs->trans(
"UseRevenueStamp");
918 print
'<td colspan="2">';
919 print $langs->trans(
"UseRevenueStampExample", $langs->transnoentitiesnoconv(
"Setup"), $langs->transnoentitiesnoconv(
"Dictionaries"), $langs->transnoentitiesnoconv(
"DictionaryRevenueStamp"));
920 print
"</td></tr>\n";
922 if (empty(
$mysoc->country_code)) {
923 print
'<tr class="oddeven nohover"><td class="" colspan="3">'.$countrynotdefined.
'</td></tr>';
925 print
'<tr class="oddeven nohover"><td class="" colspan="3"><span class="opacitymedium">'.$langs->trans(
"NoLocalTaxXForThisCountry", $langs->transnoentitiesnoconv(
"Setup"), $langs->transnoentitiesnoconv(
"Dictionaries"), $langs->transnoentitiesnoconv(
"DictionaryRevenueStamp"), $langs->transnoentitiesnoconv(
"RevenueStamp")).
'</span></td></tr>';
932if (
$mysoc->country_code ==
'GR') {
934 print
'<table class="noborder centpercent editmode">';
935 print
'<tr class="liste_titre">';
936 print
'<td>'.$langs->trans(
"AccountParameter").
'</td>';
941 print
'<tr class="oddeven"><td>';
942 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"MYDATA_AADE_USER").
'</span></td><td>';
943 print
'<input class="minwidth300" type="text" name="MYDATA_AADE_USER" value="'.getDolGlobalString(
'MYDATA_AADE_USER').
'"';
944 print
'</td><td></td></tr>';
946 print
'<tr class="oddeven"><td>';
947 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"MYDATA_AADE_KEY").
'</span></td><td>';
948 print
'<input class="minwidth300" type="password" name="MYDATA_AADE_KEY" value="'.getDolGlobalString(
'MYDATA_AADE_KEY').
'"';
949 print
'</td><td></td></tr>';
951 print
'<tr class="oddeven"><td>';
952 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"AADE_WEBSERVICE_USER").
'</span></td><td>';
953 print
'<input class="minwidth300" type="text" name="AADE_WEBSERVICE_USER" value="'.getDolGlobalString(
'AADE_WEBSERVICE_USER').
'"';
954 print
'</td><td></td></tr>';
956 print
'<tr class="oddeven"><td>';
957 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"AADE_WEBSERVICE_KEY").
'</span></td><td>';
958 print
'<input class="minwidth300" type="password" name="AADE_WEBSERVICE_KEY" value="'.getDolGlobalString(
'AADE_WEBSERVICE_KEY').
'"';
959 print
'</td><td></td></tr>';
966print $form->buttonsSaveCancel(
"Save",
'', array(),
false,
'reposition');
if(! $sortfield) if(! $sortorder) $object
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
company_admin_prepare_head()
Return array head with list of tabs to view object information.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
isALNERunningVersion($blockedlogtestalreadydone=0, $blockedlogmodulealreadydone=0)
Return if the application is executed with the LNE requirements on.
Class to manage third parties objects (customers, suppliers, prospects...)
getCountry($searchkey, $withcode='', $dbtouse=null, $outputlangs=null, $entconv=1, $searchlabel='')
Return country label, code or id from an id, code or label.
getState($id, $withcode='0', $dbtouse=null, $withregion=0, $outputlangs=null, $entconv=1)
Return state translated from an id.
dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1, $nolog=0)
Remove a file or several files with a mask.
dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $keyforsourcefile='addedfile', $upload_dir='', $mode=0)
Check validity of a file upload from an GUI page, and move it to its final destination.
getDolGlobalFloat($key, $default=0)
Return a Dolibarr global constant float value.
isOnlyOneLocalTax($local)
Return true if LocalTax (1 or 2) is unique.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='', $textonpictotooltip='')
Show information in HTML for admin users or standard users.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dolPrintHTMLForAttribute($s, $escapeonlyhtmltags=0, $allowothertags=array())
Return a string ready to be output into an HTML attribute (alt, title, data-html, ....
getDolCurrency()
Return the main currency ('EUR', 'USD', ...)
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_mkdir($dir, $dataroot='', $newmask='')
Creation of a directory (this can create recursive subdir)
vignette($file, $maxWidth=160, $maxHeight=120, $extName='_small', $quality=50, $outdir='thumbs', $targetformat=0)
Create a thumbnail from an image file (Supported extensions are gif, jpg, png and bmp).
getListOfPossibleImageExt($acceptsvg=0)
Return if a filename is file name of a supported image format.
if(!defined( 'IMAGETYPE_WEBP')) getDefaultImageSizes()
Return default values for image sizes.
image_format_supported($file, $acceptsvg=0)
Return if a filename is file name of a supported image format.
getMaxFileSizeArray()
Return the max allowed for file upload.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.