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'));
79 $setupcompanynotcomplete = 1;
81 $setupcompanynotcomplete = 0;
90$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
95if (($action ==
'update' && !
GETPOST(
"cancel",
'alpha'))
96|| ($action ==
'updateedit')) {
100 if (!empty($tmparray[
'id'])) {
102 include_once DOL_DOCUMENT_ROOT.
'/blockedlog/lib/blockedlog.lib.php';
104 $langs->load(
"blockedlog");
105 setEventMessages($langs->trans(
"BlockedLogCountryChangeNotAllowedFR"),
null,
'errors');
108 if ($tmparray[
'code'] ==
'FR' && $tmparray[
'id'] !=
$mysoc->country_id) {
113 $mysoc->country_id = $tmparray[
'id'];
114 $mysoc->country_code = $tmparray[
'code'];
115 $mysoc->country_label = $tmparray[
'label'];
120 activateModulesRequiredByCountry(
$mysoc->country_code);
125 if (!empty($tmparray[
'id'])) {
126 $mysoc->state_id = $tmparray[
'id'];
127 $mysoc->state_code = $tmparray[
'code'];
128 $mysoc->state_label = $tmparray[
'label'];
150 $dirforimage =
$conf->mycompany->dir_output.
'/logos/';
152 $arrayofimages = array(
'logo',
'logo_squarred');
154 foreach ($arrayofimages as $varforimage) {
156 $langs->load(
"errors");
157 $mesg = $langs->trans(
"ErrorBadImageFormat");
158 if (!function_exists(
"imagecreate")) {
159 $mesg .=
' - '.$langs->trans(
"ErrorPHPDoesNotSupport",
"GD");
162 $supportedextensions = preg_replace(
'/\\\./',
'', $supportedextensions);
163 $mesg .=
' - '.$langs->trans(
"ErrorSupportedFormatAre", implode(
', ', explode(
'|', $supportedextensions)));
172 if (preg_match(
'/([^\\/:]+)$/i', $_FILES[$varforimage][
"name"], $reg)) {
173 $original_file = $reg[1];
177 dol_syslog(
"Move file ".$_FILES[$varforimage][
"tmp_name"].
" to ".$dirforimage.$original_file);
178 if (!is_dir($dirforimage)) {
181 $result =
dol_move_uploaded_file($_FILES[$varforimage][
"tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage][
'error']);
183 if (is_numeric($result) && $result > 0) {
184 $constant =
"MAIN_INFO_SOCIETE_LOGO";
185 if ($varforimage ==
'logo_squarred') {
186 $constant =
"MAIN_INFO_SOCIETE_LOGO_SQUARRED";
198 $imgThumbSmall =
vignette($dirforimage.$original_file, $maxwidthsmall, $maxheightsmall,
'_small', $quality);
200 $imgThumbSmall = $reg[1];
207 $imgThumbMini =
vignette($dirforimage.$original_file, $maxwidthmini, $maxheightmini,
'_mini', $quality);
209 $imgThumbMini = $reg[1];
215 dol_syslog(
"ErrorImageFormatNotSupported", LOG_WARNING);
217 } elseif (preg_match(
'/^ErrorFileIsInfectedWithAVirus/', $result)) {
219 $langs->load(
"errors");
220 $tmparray = explode(
':', $result);
221 setEventMessages($langs->trans(
'ErrorFileIsInfectedWithAVirus', $tmparray[1]),
null,
'errors');
222 } elseif (preg_match(
'/^ErrorFileSizeTooLarge/', $result)) {
231 $langs->load(
"errors");
259 $usevat =
GETPOST(
"optiontva",
'aZ09');
260 $uselocaltax1 =
GETPOST(
"optionlocaltax1",
'aZ09');
261 $uselocaltax2 =
GETPOST(
"optionlocaltax2",
'aZ09');
262 if ($uselocaltax1 ==
'localtax1on' && !$usevat) {
263 setEventMessages($langs->trans(
"IfYouUseASecondTaxYouMustSetYouUseTheMainTax"),
null,
'errors');
266 if ($uselocaltax2 ==
'localtax2on' && !$usevat) {
267 setEventMessages($langs->trans(
"IfYouUseAThirdTaxYouMustSetYouUseTheMainTax"),
null,
'errors');
278 if (
GETPOST(
"optionlocaltax1") ==
"localtax1on") {
279 if (!GETPOSTISSET(
'lt1')) {
286 if (
GETPOST(
"optionlocaltax2") ==
"localtax2on") {
287 if (!GETPOSTISSET(
'lt2')) {
296 if (
$mysoc->country_code ==
'GR') {
315 if ($action !=
'updateedit' && !$error) {
316 header(
"Location: ".$_SERVER[
"PHP_SELF"].($page_y ?
'?page_y='.$page_y :
''));
321if ($action ==
'addthumb' || $action ==
'addthumbsquarred') {
322 if (file_exists(
$conf->mycompany->dir_output.
'/logos/'.
GETPOST(
"file"))) {
327 $constant =
"MAIN_INFO_SOCIETE_LOGO";
328 if ($action ==
'addthumbsquarred') {
329 $constant =
"MAIN_INFO_SOCIETE_LOGO_SQUARRED";
338 $imgThumbSmall =
vignette(
$conf->mycompany->dir_output.
'/logos/'.
GETPOST(
"file"), $maxwidthsmall, $maxheightsmall,
'_small', $quality);
340 $imgThumbSmall = $reg[1];
347 $imgThumbMini =
vignette(
$conf->mycompany->dir_output.
'/logos/'.
GETPOST(
"file"), $maxwidthmini, $maxheightmini,
'_mini', $quality);
349 $imgThumbMini = $reg[1];
355 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
359 $langs->load(
"errors");
361 dol_syslog($langs->transnoentities(
"ErrorBadImageFormat"), LOG_INFO);
365 $langs->load(
"errors");
367 dol_syslog($langs->transnoentities(
"ErrorFileDoesNotExists",
GETPOST(
"file")), LOG_WARNING);
372if ($action ==
'removelogo' || $action ==
'removelogo_squarred') {
373 $constant =
"MAIN_INFO_SOCIETE_LOGO";
374 if ($action ==
'removelogo_squarred') {
375 $constant =
"MAIN_INFO_SOCIETE_LOGO_SQUARRED";
378 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
380 $logofilename =
$mysoc->logo;
381 $logofilenamebis =
$mysoc->logo_squarred;
382 if ($action ==
'removelogo_squarred') {
383 $logofilename =
$mysoc->logo_squarred;
384 $logofilenamebis =
$mysoc->logo;
387 $logofile =
$conf->mycompany->dir_output.
'/logos/'.$logofilename;
388 if ($logofilename !=
'' && $logofilename != $logofilenamebis) {
392 if ($action ==
'removelogo_squarred') {
393 $mysoc->logo_squarred =
'';
398 $logofilename =
$mysoc->logo_small;
399 $logofilenamebis =
$mysoc->logo_squarred_small;
400 if ($action ==
'removelogo_squarred') {
401 $logofilename =
$mysoc->logo_squarred_small;
402 $logofilenamebis =
$mysoc->logo_small;
405 $logosmallfile =
$conf->mycompany->dir_output.
'/logos/thumbs/'.$logofilename;
406 if ($logofilename !=
'' && $logofilename != $logofilenamebis) {
410 if ($action ==
'removelogo_squarred') {
411 $mysoc->logo_squarred_small =
'';
416 $logofilename =
$mysoc->logo_mini;
417 $logofilenamebis =
$mysoc->logo_squarred_mini;
418 if ($action ==
'removelogo_squarred') {
419 $logofilename =
$mysoc->logo_squarred_mini;
420 $logofilenamebis =
$mysoc->logo_mini;
423 $logominifile =
$conf->mycompany->dir_output.
'/logos/thumbs/'.$logofilename;
424 if ($logofilename !=
'' && $logofilename != $logofilenamebis) {
428 if ($action ==
'removelogo_squarred') {
429 $mysoc->logo_squarred_mini =
'';
440$wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
441llxHeader(
'', $langs->trans(
"Setup"), $wikihelp,
'', 0, 0,
'',
'',
'',
'mod-admin page-company');
448$countrynotdefined =
'<span class="error">'.$langs->trans(
"ErrorSetACountryFirst").
' <a href="" onclick="window.scrollTo({top: 0, behavior: \'smooth\'}); return false;">('.$langs->trans(
"SeeAbove").
')</a></span>';
450print
load_fiche_titre($langs->trans(
"CompanyFoundation"),
'',
'title_setup');
456print
'<div class="'.($setupcompanynotcomplete ?
'warning' :
'info').
'">'.$langs->trans(
"CompanyFundationDesc", $langs->transnoentities(
"Save")).
"</div>\n";
462if (!empty(
$conf->use_javascript_ajax)) {
463 print
"\n".
'<script type="text/javascript">';
464 print
'$(document).ready(function () {
465 $("#selectcountry_id").change(function() {
466 console.log("selectcountry_id change");
467 document.form_index.action.value="updateedit";
468 document.form_index.submit();
471 // Show/hide VAT exemption code field based on VAT option
472 $("input[name=\"optiontva\"]").change(function() {
473 if ($(this).val() == "0") {
474 $("#vat_exemption_code_div").show();
476 $("#vat_exemption_code_div").hide();
480 print
'</script>'.
"\n";
483print
'<form enctype="multipart/form-data" method="POST" action="'.$_SERVER[
"PHP_SELF"].
'" name="form_index" spellcheck="false">';
484print
'<input type="hidden" name="token" value="'.newToken().
'">';
485print
'<input type="hidden" name="action" value="update">';
486print
'<input type="hidden" name="page_y" value="">';
488print
'<table class="noborder centpercent editmode">';
489print
'<tr class="liste_titre"><th class="wordbreak" colspan="2">'.$langs->trans(
"CompanyInfo").
'</th></tr>'.
"\n";
492print
'<tr class="oddeven"><td class="fieldrequired titlefieldcreate wordbreak"><label for="name">'.$langs->trans(
"CompanyName").
'</label></td><td>';
493print
'<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";
496print
'<tr class="oddeven"><td class="fieldrequired"><label for="currency">'.$langs->trans(
"CompanyCurrency").
'</label></td><td>';
497print
img_picto(
'',
'multicurrency',
'class="pictofixedwidth"');
499print
'</td></tr>'.
"\n";
502print
'<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans(
"Country").
'</label></td><td>';
503print
img_picto(
'',
'globe-americas',
'class="pictofixedwidth"');
504print $form->select_country((
string)
$mysoc->country_id,
'country_id',
'', 0);
505print
info_admin($langs->trans(
"YouCanChangeValuesForThisListFromDictionarySetup"), 1);
506print
'</td></tr>'.
"\n";
509print
'<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ADDRESS">'.$langs->trans(
"CompanyAddress").
'</label></td><td>';
510print
'<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";
513print
'<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ZIP">'.$langs->trans(
"CompanyZip").
'</label></td><td>';
514print
'<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";
516print
'<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_TOWN">'.$langs->trans(
"CompanyTown").
'</label></td><td>';
517print
'<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";
520print
'<tr class="oddeven"><td class="wordbreak"><label for="state_id">'.$langs->trans(
"State").
'</label></td><td>';
526print
img_picto(
'',
'state',
'class="pictofixedwidth"');
527print $formcompany->select_state($state_id,
$mysoc->country_code,
'state_id',
'maxwidth200onsmartphone minwidth300');
528print
'</td></tr>'.
"\n";
531print
'<tr class="oddeven"><td><label for="phone">'.$langs->trans(
"Phone").
'</label></td><td>';
532print
img_picto(
'',
'object_phoning',
'', 0, 0, 0,
'',
'pictofixedwidth');
533print
'<input class="maxwidth150 widthcentpercentminusx" name="phone" id="phone" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'phone') ?
GETPOST(
'phone',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_TEL'))).
'"></td></tr>';
534print
'</td></tr>'.
"\n";
537print
'<tr class="oddeven"><td><label for="phone">'.$langs->trans(
"PhoneMobile").
'</label></td><td>';
538print
img_picto(
'',
'object_phoning_mobile',
'', 0, 0, 0,
'',
'pictofixedwidth');
539print
'<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>';
540print
'</td></tr>'.
"\n";
543print
'<tr class="oddeven"><td><label for="fax">'.$langs->trans(
"Fax").
'</label></td><td>';
544print
img_picto(
'',
'object_phoning_fax',
'', 0, 0, 0,
'',
'pictofixedwidth');
545print
'<input class="maxwidth150" name="fax" id="fax" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'fax') ?
GETPOST(
'fax',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_FAX'))).
'"></td></tr>';
546print
'</td></tr>'.
"\n";
549print
'<tr class="oddeven"><td><label for="email">'.$langs->trans(
"EMail").
'</label></td><td>';
550print
img_picto(
'',
'object_email',
'', 0, 0, 0,
'',
'pictofixedwidth');
551print
'<input class="minwidth300 maxwidth500 widthcentpercentminusx" name="mail" id="email" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'mail') ?
GETPOST(
'mail',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_MAIL'))).
'"></td></tr>';
552print
'</td></tr>'.
"\n";
555print
'<tr class="oddeven"><td><label for="web">'.$langs->trans(
"Web").
'</label></td><td>';
556print
img_picto(
'',
'globe',
'', 0, 0, 0,
'',
'pictofixedwidth');
557print
'<input class="maxwidth300 widthcentpercentminusx" name="web" id="web" value="'.dol_escape_htmltag((GETPOSTISSET(
'web') ?
GETPOST(
'web',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_WEB'))).
'"></td></tr>';
558print
'</td></tr>'.
"\n";
562 print
'<tr class="oddeven"><td>';
563 print
'<label for="barcode">'.$langs->trans(
"Gencod").
'</label></td><td>';
564 print
'<span class="fa fa-barcode pictofixedwidth"></span>';
565 print
'<input name="barcode" id="barcode" class="minwidth150 widthcentpercentminusx maxwidth300" value="'.dolPrintHTMLForAttribute(GETPOSTISSET(
'barcode') ?
GETPOST(
'barcode',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_GENCOD')).
'"></td></tr>';
571$maxmin = $maxfilesizearray[
'maxmin'];
572$tooltiplogo = $langs->trans(
'AvailableFormats').
' : png, jpg, jpeg';
573$tooltiplogo .= ($maxmin > 0) ?
'<br>'.$langs->trans(
'MaxSize').
' : '.$maxmin.
' '.$langs->trans(
'Kb') :
'';
576print
'<tr class="oddeven"><td><label for="logo">'.$form->textwithpicto($langs->trans(
"Logo"), $tooltiplogo).
'</label></td><td>';
578$modulepart =
'mycompany';
579$dirformainimage =
$conf->mycompany->dir_output;
580$subdirformainimage =
'logos/';
581$fileformainimage =
$mysoc->logo;
583print $formfile->showImageToEdit(
'logo', $modulepart, $dirformainimage, $subdirformainimage, $fileformainimage);
588print
'<tr class="oddeven"><td><label for="logo_squarred">'.$form->textwithpicto($langs->trans(
"LogoSquarred"), $tooltiplogo).
'</label></td><td>';
590$modulepart =
'mycompany';
591$dirformainimage =
$conf->mycompany->dir_output;
592$subdirformainimage =
'logos/';
593$fileformainimage =
$mysoc->logo_squarred;
595print $formfile->showImageToEdit(
'logo_squarred', $modulepart, $dirformainimage, $subdirformainimage, $fileformainimage);
600print
'<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans(
"Note").
'</label></td><td>';
601print
'<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.
'">'.(GETPOSTISSET(
'note') ?
GETPOST(
'note',
'restricthtml') :
getDolGlobalString(
'MAIN_INFO_SOCIETE_NOTE')).
'</textarea></td></tr>';
606print $form->buttonsSaveCancel(
"Save",
'', array(),
false,
'reposition');
612print
'<div class="div-table-responsive-no-min">';
613print
'<table class="noborder centpercent editmode">';
614print
'<tr class="liste_titre"><td class="wordbreak" colspan="2">'.$langs->trans(
"CompanyIds").
'</td></tr>';
616$langs->load(
"companies");
619print
'<tr class="oddeven"><td class="titlefieldcreate smallheight"><label for="director">'.$langs->trans(
"ManagingDirectors").
'</label></td><td>';
620print
'<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>';
623print
'<tr class="oddeven"><td class="smallheight">';
624print $form->textwithpicto($langs->trans(
"GDPRContact"), $langs->trans(
"GDPRContactDesc"));
626print
'<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>';
629print
'<tr class="oddeven"><td><label for="capital">'.$langs->trans(
"Capital").
'</label></td><td>';
630print
'<input name="capital" id="capital" class="maxwidth100" value="'.dolPrintHTMLForAttribute((GETPOSTISSET(
'capital') ?
GETPOST(
'capital',
'alphanohtml') :
getDolGlobalString(
'MAIN_INFO_CAPITAL'))).
'"></td></tr>';
633print
'<tr class="oddeven"><td><label for="socialobject">'.$langs->trans(
"CompanyObject").
'</label></td><td>';
634print
'<textarea class="flat quatrevingtpercent" name="socialobject" id="socialobject" rows="'.ROWS_3.
'">'.
getDolGlobalString(
'MAIN_INFO_SOCIETE_OBJECT').
'</textarea></td></tr>';
638print
'<tr class="oddeven"><td><label for="intra_vat">'.$langs->trans(
"VATIntra").
'</label></td><td>';
639print
'<input name="tva" id="intra_vat" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_TVAINTRA')).
'">';
643print
'<tr class="oddeven"><td><label for="forme_juridique_code">'.$langs->trans(
"JuridicalStatus").
'</label></td><td>';
644if (
$mysoc->country_code) {
645 print $formcompany->select_juridicalstatus(
getDolGlobalInt(
'MAIN_INFO_SOCIETE_FORME_JURIDIQUE'),
$mysoc->country_code,
'',
'forme_juridique_code');
647 print $countrynotdefined;
652if ($langs->transcountry(
"ProfId1",
$mysoc->country_code) !=
'-') {
653 print
'<tr class="oddeven"><td><label for="profid1">'.$langs->transcountry(
"ProfId1",
$mysoc->country_code).
'</label></td><td>';
654 if (!empty(
$mysoc->country_code)) {
655 print
'<input name="siren" id="profid1" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_SIREN')).
'">';
657 print $countrynotdefined;
663if ($langs->transcountry(
"ProfId2",
$mysoc->country_code) !=
'-') {
664 print
'<tr class="oddeven"><td><label for="profid2">'.$langs->transcountry(
"ProfId2",
$mysoc->country_code).
'</label></td><td>';
665 if (!empty(
$mysoc->country_code)) {
666 print
'<input name="siret" id="profid2" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_SIRET')).
'">';
668 print $countrynotdefined;
674if ($langs->transcountry(
"ProfId3",
$mysoc->country_code) !=
'-') {
675 print
'<tr class="oddeven"><td><label for="profid3">'.$langs->transcountry(
"ProfId3",
$mysoc->country_code).
'</label></td><td>';
676 if (!empty(
$mysoc->country_code)) {
677 print
'<input name="ape" id="profid3" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_APE')).
'">';
679 print $countrynotdefined;
685if ($langs->transcountry(
"ProfId4",
$mysoc->country_code) !=
'-') {
686 print
'<tr class="oddeven"><td><label for="profid4">'.$langs->transcountry(
"ProfId4",
$mysoc->country_code).
'</label></td><td>';
687 if (!empty(
$mysoc->country_code)) {
688 print
'<input name="rcs" id="profid4" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_RCS')).
'">';
690 print $countrynotdefined;
696if ($langs->transcountry(
"ProfId5",
$mysoc->country_code) !=
'-') {
697 print
'<tr class="oddeven"><td><label for="profid5">'.$langs->transcountry(
"ProfId5",
$mysoc->country_code).
'</label></td><td>';
698 if (!empty(
$mysoc->country_code)) {
699 print
'<input name="MAIN_INFO_PROFID5" id="profid5" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID5')).
'">';
701 print $countrynotdefined;
707if ($langs->transcountry(
"ProfId6",
$mysoc->country_code) !=
'-') {
708 print
'<tr class="oddeven"><td><label for="profid6">'.$langs->transcountry(
"ProfId6",
$mysoc->country_code).
'</label></td><td>';
709 if (!empty(
$mysoc->country_code)) {
710 print
'<input name="MAIN_INFO_PROFID6" id="profid6" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID6')).
'">';
712 print $countrynotdefined;
718if ($langs->transcountry(
"ProfId7",
$mysoc->country_code) !=
'-') {
719 print
'<tr class="oddeven"><td><label for="profid7">'.$langs->transcountry(
"ProfId7",
$mysoc->country_code).
'</label></td><td>';
720 if (!empty(
$mysoc->country_code)) {
721 print
'<input name="MAIN_INFO_PROFID7" id="profid7" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID7')).
'">';
723 print $countrynotdefined;
729if ($langs->transcountry(
"ProfId8",
$mysoc->country_code) !=
'-') {
730 print
'<tr class="oddeven"><td><label for="profid8">'.$langs->transcountry(
"ProfId8",
$mysoc->country_code).
'</label></td><td>';
731 if (!empty(
$mysoc->country_code)) {
732 print
'<input name="MAIN_INFO_PROFID8" id="profid8" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID8')).
'">';
734 print $countrynotdefined;
740if ($langs->transcountry(
"ProfId9",
$mysoc->country_code) !=
'-') {
741 print
'<tr class="oddeven"><td><label for="profid9">'.$langs->transcountry(
"ProfId9",
$mysoc->country_code).
'</label></td><td>';
742 if (!empty(
$mysoc->country_code)) {
743 print
'<input name="MAIN_INFO_PROFID9" id="profid9" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID9')).
'">';
745 print $countrynotdefined;
751if ($langs->transcountry(
"ProfId10",
$mysoc->country_code) !=
'-') {
752 print
'<tr class="oddeven"><td><label for="profid10">'.$langs->transcountry(
"ProfId10",
$mysoc->country_code).
'</label></td><td>';
753 if (!empty(
$mysoc->country_code)) {
754 print
'<input name="MAIN_INFO_PROFID10" id="profid10" class="minwidth200" value="'.dolPrintHTMLForAttribute(
getDolGlobalString(
'MAIN_INFO_PROFID10')).
'">';
756 print $countrynotdefined;
767print
'<table class="noborder centpercent editmode">';
768print
'<tr class="liste_titre">';
769print
'<td class="titlefieldcreate">'.$langs->trans(
"FiscalYearInformation").
'</td><td></td>';
772print
'<tr class="oddeven"><td><label for="SOCIETE_FISCAL_MONTH_START">'.$langs->trans(
"FiscalMonthStart").
'</label></td><td>';
773print $formother->select_month(
getDolGlobalString(
'SOCIETE_FISCAL_MONTH_START'),
'SOCIETE_FISCAL_MONTH_START', 0, 1,
'maxwidth100').
'</td></tr>';
777print $form->buttonsSaveCancel(
"Save",
'', array(),
false,
'reposition');
783print
load_fiche_titre($langs->trans(
"TypeOfSaleTaxes"),
'',
'object_payment');
785print
'<table class="noborder centpercent editmode">';
786print
'<tr class="liste_titre">';
787print
'<td class="titlefieldcreate">'.$langs->trans(
"VATManagement").
'</td><td></td>';
788print
'<td class="right"> </td>';
792print
'<tr class="oddeven"><td><label><input type="radio" name="optiontva" id="use_vat" value="1"'.(!
getDolGlobalString(
'FACTURE_TVAOPTION') ?
"" :
" checked").
"> ".$langs->trans(
"VATIsUsed").
"</label></td>";
793print
'<td colspan="2">';
794$tooltiphelp = $langs->trans(
"VATIsUsedDesc");
795if (
$mysoc->country_code ==
'FR') {
796 $tooltiphelp .=
'<br><br><i>'.$langs->trans(
"Example").
': '.$langs->trans(
"VATIsUsedExampleFR").
"</i>";
798print
'<label for="use_vat">'.$form->textwithpicto($langs->trans(
"VATIsUsedStandard"), $tooltiphelp).
"</label>";
802print
'<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>";
803print
'<td colspan="2">';
805if (
$mysoc->country_code ==
'FR') {
806 $tooltiphelp =
"<i>".$langs->trans(
"Example").
': '.$langs->trans(
"VATIsNotUsedExampleFR").
"</i>\n";
808print
'<label for="no_vat">'.$form->textwithpicto($langs->trans(
"VATIsNotUsedDesc"), $tooltiphelp).
"</label>";
810print
'<div class="shownifvatnotused" id="vat_exemption_code_div"'.(getDolGlobalString(
'FACTURE_TVAOPTION') ?
' style="display: none;"' :
'').
'>';
811$placeholder = ((
$mysoc->country_code ==
'FR') ?
'VATEX-FR-FRANCHISE' :
'');
812$tooltiptext = $langs->trans(
"VATExemptionCodeDesc").
'<br>'.$langs->trans(
"VATExemptionCodeDesc2").
'<br>'.$langs->trans(
"VATExemptionCodeDesc3");
813if ((
$mysoc->country_code ==
'FR')) {
814 $tooltiptext .=
'<br><br>'.$langs->trans(
"Example").
':<br>';
815 $tooltiptext .=
'VATEX-FR-FRANCHISE, VATEX-FR-CGI261-4, VATEX-FR-J, VATEX-FR-I, VATEX-FR-D, ...';
817print $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').
'">';
826print
'<table class="noborder centpercent editmode">';
827print
'<tr class="liste_titre">';
828print
'<td class="titlefieldcreate">'.$form->textwithpicto($langs->transcountry(
"LocalTax1Management",
$mysoc->country_code), $langs->transcountry(
"LocalTax1IsUsedDesc",
$mysoc->country_code)).
'</td><td></td>';
829print
'<td class="right"> </td>';
832if (
$mysoc->useLocalTax(1)) {
834 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>";
835 print
'<td colspan="2">';
836 print
'<div class="nobordernopadding">';
837 $tooltiphelp = $langs->transcountry(
"LocalTax1IsUsedExample",
$mysoc->country_code);
838 $tooltiphelp = ($tooltiphelp !=
"LocalTax1IsUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax1IsUsedExample",
$mysoc->country_code).
"</i>\n" :
"");
839 print $form->textwithpicto($langs->transcountry(
"LocalTax1IsUsedDesc",
$mysoc->country_code), $tooltiphelp);
841 print
'<br><label for="lt1">'.$langs->trans(
"LTRate").
'</label>: ';
842 $formcompany->select_localtax(1,
getDolGlobalFloat(
'MAIN_INFO_VALUE_LOCALTAX1'),
"lt1");
845 $options = array($langs->trans(
"CalcLocaltax1").
' '.$langs->trans(
"CalcLocaltax1Desc"), $langs->trans(
"CalcLocaltax2").
' - '.$langs->trans(
"CalcLocaltax2Desc"), $langs->trans(
"CalcLocaltax3").
' - '.$langs->trans(
"CalcLocaltax3Desc"));
847 print
'<br><label for="clt1">'.$langs->trans(
"CalcLocaltax").
'</label>: ';
848 print $form->selectarray(
"clt1", $options,
getDolGlobalString(
'MAIN_INFO_LOCALTAX_CALC1'));
850 print
"</td></tr>\n";
852 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>";
853 print
'<td colspan="2">';
854 $tooltiphelp = $langs->transcountry(
"LocalTax1IsNotUsedExample",
$mysoc->country_code);
855 $tooltiphelp = ($tooltiphelp !=
"LocalTax1IsNotUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax1IsNotUsedExample",
$mysoc->country_code).
"</i>\n" :
"");
856 print $form->textwithpicto($langs->transcountry(
"LocalTax1IsNotUsedDesc",
$mysoc->country_code), $tooltiphelp);
857 print
"</td></tr>\n";
859 if (empty(
$mysoc->country_code)) {
860 print
'<tr class="oddeven nohover"><td class="" colspan="3">'.$countrynotdefined.
'</td></tr>';
862 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>';
870print
'<table class="noborder centpercent editmode">';
871print
'<tr class="liste_titre">';
872print
'<td class="titlefieldcreate">'.$form->textwithpicto($langs->transcountry(
"LocalTax2Management",
$mysoc->country_code), $langs->transcountry(
"LocalTax2IsUsedDesc",
$mysoc->country_code)).
'</td><td></td>';
873print
'<td class="right"> </td>';
876if (
$mysoc->useLocalTax(2)) {
878 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>";
879 print
'<td colspan="2">';
880 print
'<div class="nobordernopadding">';
881 print
'<label for="lt2">'.$langs->transcountry(
"LocalTax2IsUsedDesc",
$mysoc->country_code).
"</label>";
882 $tooltiphelp = $langs->transcountry(
"LocalTax2IsUsedExample",
$mysoc->country_code);
883 $tooltiphelp = ($tooltiphelp !=
"LocalTax2IsUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax2IsUsedExample",
$mysoc->country_code).
"</i>\n" :
"");
885 print
'<br><label for="lt2">'.$langs->trans(
"LTRate").
'</label>: ';
886 $formcompany->select_localtax(2,
getDolGlobalFloat(
'MAIN_INFO_VALUE_LOCALTAX2'),
"lt2");
889 $options = array($langs->trans(
"CalcLocaltax1").
' '.$langs->trans(
"CalcLocaltax1Desc"), $langs->trans(
"CalcLocaltax2").
' - '.$langs->trans(
"CalcLocaltax2Desc"), $langs->trans(
"CalcLocaltax3").
' - '.$langs->trans(
"CalcLocaltax3Desc"));
891 print
'<br><label for="clt2">'.$langs->trans(
"CalcLocaltax").
'</label>: ';
892 print $form->selectarray(
"clt2", $options,
getDolGlobalString(
'MAIN_INFO_LOCALTAX_CALC2'));
894 print
"</td></tr>\n";
896 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>";
897 print
'<td colspan="2">';
899 $tooltiphelp = $langs->transcountry(
"LocalTax2IsNotUsedExample",
$mysoc->country_code);
900 $tooltiphelp = ($tooltiphelp !=
"LocalTax2IsNotUsedExample" ?
"<i>".$langs->trans(
"Example").
': '.$langs->transcountry(
"LocalTax2IsNotUsedExample",
$mysoc->country_code).
"</i>\n" :
"");
901 print
"<label for=\"nolt2\">".$form->textwithpicto($langs->transcountry(
"LocalTax2IsNotUsedDesc",
$mysoc->country_code), $tooltiphelp).
"</label>";
903 print
"</td></tr>\n";
905 if (empty(
$mysoc->country_code)) {
906 print
'<tr class="oddeven nohover"><td class="" colspan="3">'.$countrynotdefined.
'</td></tr>';
908 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>';
917print
'<table class="noborder centpercent editmode">';
918print
'<tr class="liste_titre">';
919print
'<td>'.$form->textwithpicto($langs->trans(
"RevenueStamp"), $langs->trans(
"RevenueStampDesc")).
'</td><td></td>';
920print
'<td class="right"> </td>';
922if (
$mysoc->useRevenueStamp()) {
924 print
'<tr class="oddeven"><td>';
925 print $langs->trans(
"UseRevenueStamp");
927 print
'<td colspan="2">';
928 print $langs->trans(
"UseRevenueStampExample", $langs->transnoentitiesnoconv(
"Setup"), $langs->transnoentitiesnoconv(
"Dictionaries"), $langs->transnoentitiesnoconv(
"DictionaryRevenueStamp"));
929 print
"</td></tr>\n";
931 if (empty(
$mysoc->country_code)) {
932 print
'<tr class="oddeven nohover"><td class="" colspan="3">'.$countrynotdefined.
'</td></tr>';
934 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>';
941if (
$mysoc->country_code ==
'GR') {
943 print
'<table class="noborder centpercent editmode">';
944 print
'<tr class="liste_titre">';
945 print
'<td>'.$langs->trans(
"AccountParameter").
'</td>';
950 print
'<tr class="oddeven"><td>';
951 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"MYDATA_AADE_USER").
'</span></td><td>';
952 print
'<input class="minwidth300" type="text" name="MYDATA_AADE_USER" value="'.getDolGlobalString(
'MYDATA_AADE_USER').
'"';
953 print
'</td><td></td></tr>';
955 print
'<tr class="oddeven"><td>';
956 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"MYDATA_AADE_KEY").
'</span></td><td>';
957 print
'<input class="minwidth300" type="password" name="MYDATA_AADE_KEY" value="'.getDolGlobalString(
'MYDATA_AADE_KEY').
'"';
958 print
'</td><td></td></tr>';
960 print
'<tr class="oddeven"><td>';
961 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"AADE_WEBSERVICE_USER").
'</span></td><td>';
962 print
'<input class="minwidth300" type="text" name="AADE_WEBSERVICE_USER" value="'.getDolGlobalString(
'AADE_WEBSERVICE_USER').
'"';
963 print
'</td><td></td></tr>';
965 print
'<tr class="oddeven"><td>';
966 print
'<span class="titlefield fieldrequired">'.$langs->trans(
"AADE_WEBSERVICE_KEY").
'</span></td><td>';
967 print
'<input class="minwidth300" type="password" name="AADE_WEBSERVICE_KEY" value="'.getDolGlobalString(
'AADE_WEBSERVICE_KEY').
'"';
968 print
'</td><td></td></tr>';
975print $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.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
getDolCurrency()
Return the main currency ('EUR', 'USD', ...)
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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)
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)
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.
dolPrintHTMLForAttribute($s, $escapeonlyhtmltags=0, $allowothertags=array())
Return a string ready to be output into an HTML attribute (alt, title, data-html, ....
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='', $textonpictotooltip='', $cssfordropdown='info_admin')
Show information in HTML for admin users or standard users.
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.