dolibarr  9.0.0
company.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
5  * Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
6  * Copyright (C) 2011-2017 Philippe Grand <philippe.grand@atoo-net.com>
7  * Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
8  * Copyright (C) 2017 Rui Strecht <rui.strecht@aliartalentos.com>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  */
23 
30 require '../main.inc.php';
31 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
32 require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
33 require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
34 require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
35 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
36 require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
37 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
38 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
39 
40 $action=GETPOST('action','aZ09');
41 $contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'admincompany'; // To manage different context of search
42 
43 // Load translation files required by the page
44 $langs->loadLangs(array('admin', 'companies'));
45 
46 if (! $user->admin) accessforbidden();
47 
48 $error=0;
49 
50 // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
51 $hookmanager->initHooks(array('admincompany','globaladmin'));
52 
53 
54 /*
55  * Actions
56  */
57 
58 $parameters=array();
59 $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
60 if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
61 
62 if ( ($action == 'update' && ! GETPOST("cancel",'alpha'))
63 || ($action == 'updateedit') )
64 {
65  $tmparray=getCountry(GETPOST('country_id','int'),'all',$db,$langs,0);
66  if (! empty($tmparray['id']))
67  {
68  $mysoc->country_id =$tmparray['id'];
69  $mysoc->country_code =$tmparray['code'];
70  $mysoc->country_label=$tmparray['label'];
71 
72  $s=$mysoc->country_id.':'.$mysoc->country_code.':'.$mysoc->country_label;
73  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_COUNTRY", $s,'chaine',0,'',$conf->entity);
74 
75  activateModulesRequiredByCountry($mysoc->country_code);
76  }
77 
78  $db->begin();
79 
80  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM", GETPOST("nom",'nohtml'),'chaine',0,'',$conf->entity);
81  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADDRESS", GETPOST("MAIN_INFO_SOCIETE_ADDRESS",'nohtml'),'chaine',0,'',$conf->entity);
82  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TOWN", GETPOST("MAIN_INFO_SOCIETE_TOWN",'nohtml'),'chaine',0,'',$conf->entity);
83  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ZIP", GETPOST("MAIN_INFO_SOCIETE_ZIP",'alpha'),'chaine',0,'',$conf->entity);
84  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_STATE", GETPOST("state_id",'alpha'),'chaine',0,'',$conf->entity);
85  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_REGION", GETPOST("region_code",'alpha'),'chaine',0,'',$conf->entity);
86  dolibarr_set_const($db, "MAIN_MONNAIE", GETPOST("currency",'aZ09'),'chaine',0,'',$conf->entity);
87  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_TEL", GETPOST("tel",'alpha'),'chaine',0,'',$conf->entity);
88  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FAX", GETPOST("fax",'alpha'),'chaine',0,'',$conf->entity);
89  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MAIL", GETPOST("mail",'alpha'),'chaine',0,'',$conf->entity);
90  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_WEB", GETPOST("web",'alpha'),'chaine',0,'',$conf->entity);
91  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOTE", GETPOST("note",'none'),'chaine',0,'',$conf->entity);
92  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_GENCOD", GETPOST("barcode",'alpha'),'chaine',0,'',$conf->entity);
93 
94  $varforimage='logo'; $dirforimage=$conf->mycompany->dir_output.'/logos/';
95  if ($_FILES[$varforimage]["tmp_name"])
96  {
97  if (preg_match('/([^\\/:]+)$/i',$_FILES[$varforimage]["name"],$reg))
98  {
99  $original_file=$reg[1];
100 
101  $isimage=image_format_supported($original_file);
102  if ($isimage >= 0)
103  {
104  dol_syslog("Move file ".$_FILES[$varforimage]["tmp_name"]." to ".$dirforimage.$original_file);
105  if (! is_dir($dirforimage))
106  {
107  dol_mkdir($dirforimage);
108  }
109  $result=dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"],$dirforimage.$original_file,1,0,$_FILES[$varforimage]['error']);
110  if ($result > 0)
111  {
112  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO",$original_file,'chaine',0,'',$conf->entity);
113 
114  // Create thumbs of logo (Note that PDF use original file and not thumbs)
115  if ($isimage > 0)
116  {
117  // Create thumbs
118  //$object->addThumbs($newfile); // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get...
119 
120  // Create small thumb, Used on logon for example
121  $imgThumbSmall = vignette($dirforimage.$original_file, $maxwidthsmall, $maxheightsmall, '_small', $quality);
122  if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i',$imgThumbSmall,$reg))
123  {
124  $imgThumbSmall = $reg[1]; // Save only basename
125  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL",$imgThumbSmall,'chaine',0,'',$conf->entity);
126  }
127  else dol_syslog($imgThumbSmall);
128 
129  // Create mini thumb, Used on menu or for setup page for example
130  $imgThumbMini = vignette($dirforimage.$original_file, $maxwidthmini, $maxheightmini, '_mini', $quality);
131  if (image_format_supported($imgThumbMini) >= 0 && preg_match('/([^\\/:]+)$/i',$imgThumbMini,$reg))
132  {
133  $imgThumbMini = $reg[1]; // Save only basename
134  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI",$imgThumbMini,'chaine',0,'',$conf->entity);
135  }
136  else dol_syslog($imgThumbMini);
137  }
138  else dol_syslog("ErrorImageFormatNotSupported",LOG_WARNING);
139  }
140  else if (preg_match('/^ErrorFileIsInfectedWithAVirus/',$result))
141  {
142  $error++;
143  $langs->load("errors");
144  $tmparray=explode(':',$result);
145  setEventMessages($langs->trans('ErrorFileIsInfectedWithAVirus',$tmparray[1]), null, 'errors');
146  }
147  else
148  {
149  $error++;
150  setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors');
151  }
152  }
153  else
154  {
155  $error++;
156  $langs->load("errors");
157  setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors');
158  }
159  }
160  }
161 
162  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_MANAGERS", GETPOST("MAIN_INFO_SOCIETE_MANAGERS",'nohtml'),'chaine',0,'',$conf->entity);
163  dolibarr_set_const($db, "MAIN_INFO_GDPR", GETPOST("MAIN_INFO_GDPR",'nohtml'),'chaine',0,'',$conf->entity);
164  dolibarr_set_const($db, "MAIN_INFO_CAPITAL", GETPOST("capital",'nohtml'),'chaine',0,'',$conf->entity);
165  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_FORME_JURIDIQUE", GETPOST("forme_juridique_code",'nohtml'),'chaine',0,'',$conf->entity);
166  dolibarr_set_const($db, "MAIN_INFO_SIREN", GETPOST("siren",'nohtml'),'chaine',0,'',$conf->entity);
167  dolibarr_set_const($db, "MAIN_INFO_SIRET", GETPOST("siret",'nohtml'),'chaine',0,'',$conf->entity);
168  dolibarr_set_const($db, "MAIN_INFO_APE", GETPOST("ape",'nohtml'),'chaine',0,'',$conf->entity);
169  dolibarr_set_const($db, "MAIN_INFO_RCS", GETPOST("rcs",'nohtml'),'chaine',0,'',$conf->entity);
170  dolibarr_set_const($db, "MAIN_INFO_PROFID5", GETPOST("MAIN_INFO_PROFID5",'nohtml'),'chaine',0,'',$conf->entity);
171  dolibarr_set_const($db, "MAIN_INFO_PROFID6", GETPOST("MAIN_INFO_PROFID6",'nohtml'),'chaine',0,'',$conf->entity);
172 
173  dolibarr_set_const($db, "MAIN_INFO_TVAINTRA", GETPOST("tva",'nohtml'),'chaine',0,'',$conf->entity);
174  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_OBJECT", GETPOST("object",'nohtml'),'chaine',0,'',$conf->entity);
175 
176  dolibarr_set_const($db, "SOCIETE_FISCAL_MONTH_START", GETPOST("SOCIETE_FISCAL_MONTH_START",'int'),'chaine',0,'',$conf->entity);
177 
178  // Sale tax options
179  $usevat = GETPOST("optiontva",'aZ09');
180  $uselocaltax1 = GETPOST("optionlocaltax1",'aZ09');
181  $uselocaltax2 = GETPOST("optionlocaltax2",'aZ09');
182  if ($uselocaltax1 == 'localtax1on' && ! $usevat)
183  {
184  setEventMessages($langs->trans("IfYouUseASecondTaxYouMustSetYouUseTheMainTax"), null, 'errors');
185  $error++;
186  }
187  if ($uselocaltax2 == 'localtax2on' && ! $usevat)
188  {
189  setEventMessages($langs->trans("IfYouUseAThirdTaxYouMustSetYouUseTheMainTax"), null, 'errors');
190  $error++;
191  }
192 
193  dolibarr_set_const($db, "FACTURE_TVAOPTION", $usevat,'chaine',0,'',$conf->entity);
194  dolibarr_set_const($db, "FACTURE_LOCAL_TAX1_OPTION", $uselocaltax1,'chaine',0,'',$conf->entity);
195  dolibarr_set_const($db, "FACTURE_LOCAL_TAX2_OPTION", $uselocaltax2,'chaine',0,'',$conf->entity);
196 
197  if($_POST["optionlocaltax1"]=="localtax1on")
198  {
199  if(!isset($_REQUEST['lt1']))
200  {
201  dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", 0,'chaine',0,'',$conf->entity);
202  }
203  else
204  {
205  dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX1", GETPOST('lt1','aZ09'),'chaine',0,'',$conf->entity);
206  }
207  dolibarr_set_const($db,"MAIN_INFO_LOCALTAX_CALC1", GETPOST("clt1",'aZ09'),'chaine',0,'',$conf->entity);
208  }
209  if($_POST["optionlocaltax2"]=="localtax2on")
210  {
211  if(!isset($_REQUEST['lt2']))
212  {
213  dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", 0,'chaine',0,'',$conf->entity);
214  }
215  else
216  {
217  dolibarr_set_const($db, "MAIN_INFO_VALUE_LOCALTAX2", GETPOST('lt2','aZ09'),'chaine',0,'',$conf->entity);
218  }
219  dolibarr_set_const($db,"MAIN_INFO_LOCALTAX_CALC2", GETPOST("clt2",'aZ09'),'chaine',0,'',$conf->entity);
220  }
221 
222  if (! $error)
223  {
224  $db->commit();
225  }
226  else
227  {
228  $db->rollback();
229  }
230 
231  if ($action != 'updateedit' && ! $error)
232  {
233  header("Location: ".$_SERVER["PHP_SELF"]);
234  exit;
235  }
236 }
237 
238 if ($action == 'addthumb') // Regenerate thumbs
239 {
240  if (file_exists($conf->mycompany->dir_output.'/logos/'.$_GET["file"]))
241  {
242  $isimage=image_format_supported($_GET["file"]);
243 
244  // Create thumbs of logo
245  if ($isimage > 0)
246  {
247  // Create thumbs
248  //$object->addThumbs($newfile); // We can't use addThumbs here yet because we need name of generated thumbs to add them into constants. TODO Check if need such constants. We should be able to retreive value with get...
249 
250  // Create small thumb. Used on logon for example
251  $imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], $maxwidthsmall, $maxheightsmall, '_small',$quality);
252  if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i',$imgThumbSmall,$reg))
253  {
254  $imgThumbSmall = $reg[1]; // Save only basename
255  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL",$imgThumbSmall,'chaine',0,'',$conf->entity);
256  }
257  else dol_syslog($imgThumbSmall);
258 
259  // Create mini thumbs. Used on menu or for setup page for example
260  $imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], $maxwidthmini, $maxheightmini, '_mini',$quality);
261  if (image_format_supported($imgThumbSmall) >= 0 && preg_match('/([^\\/:]+)$/i',$imgThumbMini,$reg))
262  {
263  $imgThumbMini = $reg[1]; // Save only basename
264  dolibarr_set_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI",$imgThumbMini,'chaine',0,'',$conf->entity);
265  }
266  else dol_syslog($imgThumbMini);
267 
268  header("Location: ".$_SERVER["PHP_SELF"]);
269  exit;
270  }
271  else
272  {
273  $error++;
274  $langs->load("errors");
275  setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors');
276  dol_syslog($langs->transnoentities("ErrorBadImageFormat"),LOG_WARNING);
277  }
278  }
279  else
280  {
281  $error++;
282  $langs->load("errors");
283  setEventMessages($langs->trans("ErrorFileDoesNotExists",$_GET["file"]), null, 'errors');
284  dol_syslog($langs->transnoentities("ErrorFileDoesNotExists",$_GET["file"]),LOG_WARNING);
285  }
286 }
287 
288 if ($action == 'removelogo')
289 {
290  require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
291 
292  $logofile=$conf->mycompany->dir_output.'/logos/'.$mysoc->logo;
293  if ($mysoc->logo != '') dol_delete_file($logofile);
294  dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO",$conf->entity);
295  $mysoc->logo='';
296 
297  $logosmallfile=$conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small;
298  if ($mysoc->logo_small != '') dol_delete_file($logosmallfile);
299  dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_SMALL",$conf->entity);
300  $mysoc->logo_small='';
301 
302  $logominifile=$conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini;
303  if ($mysoc->logo_mini != '') dol_delete_file($logominifile);
304  dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO_MINI",$conf->entity);
305  $mysoc->logo_mini='';
306 }
307 
308 
309 /*
310  * View
311  */
312 
313 $wikihelp='EN:First_setup|FR:Premiers_param├ętrages|ES:Primeras_configuraciones';
314 llxHeader('',$langs->trans("Setup"),$wikihelp);
315 
316 $form=new Form($db);
317 $formother=new FormOther($db);
318 $formcompany=new FormCompany($db);
319 
320 $countrynotdefined='<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
321 
322 print load_fiche_titre($langs->trans("CompanyFoundation"),'','title_setup');
323 
325 
326 dol_fiche_head($head, 'company', $langs->trans("Company"), -1, 'company');
327 
328 print '<span class="opacitymedium">'.$langs->trans("CompanyFundationDesc", $langs->transnoentities("Modify"), $langs->transnoentities("Save"))."</span><br>\n";
329 print "<br>\n";
330 
331 if ($action == 'edit' || $action == 'updateedit')
332 {
336  print "\n".'<script type="text/javascript" language="javascript">';
337  print '$(document).ready(function () {
338  $("#selectcountry_id").change(function() {
339  document.form_index.action.value="updateedit";
340  document.form_index.submit();
341  });
342  });';
343  print '</script>'."\n";
344 
345  print '<form enctype="multipart/form-data" method="POST" action="'.$_SERVER["PHP_SELF"].'" name="form_index">';
346  print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
347  print '<input type="hidden" name="action" value="update">';
348 
349  print '<table class="noborder" width="100%">';
350  print '<tr class="liste_titre"><th class="titlefield wordbreak">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
351 
352  // Name
353 
354  print '<tr class="oddeven"><td class="fieldrequired"><label for="name">'.$langs->trans("CompanyName").'</label></td><td>';
355  print '<input name="nom" id="name" class="minwidth200" value="'. dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_NOM?$conf->global->MAIN_INFO_SOCIETE_NOM: GETPOST("nom",'nohtml')) . '" autofocus="autofocus"></td></tr>'."\n";
356 
357  // Addresse
358 
359  print '<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ADDRESS">'.$langs->trans("CompanyAddress").'</label></td><td>';
360  print '<textarea name="MAIN_INFO_SOCIETE_ADDRESS" id="MAIN_INFO_SOCIETE_ADDRESS" class="quatrevingtpercent" rows="'.ROWS_3.'">'. ($conf->global->MAIN_INFO_SOCIETE_ADDRESS?$conf->global->MAIN_INFO_SOCIETE_ADDRESS:GETPOST("MAIN_INFO_SOCIETE_ADDRESS",'nohtml')) . '</textarea></td></tr>'."\n";
361 
362 
363  print '<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_ZIP">'.$langs->trans("CompanyZip").'</label></td><td>';
364  print '<input class="minwidth100" name="MAIN_INFO_SOCIETE_ZIP" id="MAIN_INFO_SOCIETE_ZIP" value="'. dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_ZIP?$conf->global->MAIN_INFO_SOCIETE_ZIP:GETPOST("MAIN_INFO_SOCIETE_ZIP",'alpha')) . '"></td></tr>'."\n";
365 
366 
367  print '<tr class="oddeven"><td><label for="MAIN_INFO_SOCIETE_TOWN">'.$langs->trans("CompanyTown").'</label></td><td>';
368  print '<input name="MAIN_INFO_SOCIETE_TOWN" class="minwidth100" id="MAIN_INFO_SOCIETE_TOWN" value="'. dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_TOWN?$conf->global->MAIN_INFO_SOCIETE_TOWN:GETPOST("MAIN_INFO_SOCIETE_TOWN",'nohtml')) . '"></td></tr>'."\n";
369 
370  // Country
371 
372  print '<tr class="oddeven"><td class="fieldrequired"><label for="selectcountry_id">'.$langs->trans("Country").'</label></td><td class="maxwidthonsmartphone">';
373  //if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization
374  print $form->select_country($mysoc->country_id, 'country_id');
375  if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
376  print '</td></tr>'."\n";
377 
378 
379  print '<tr class="oddeven"><td><label for="state_id">'.$langs->trans("State").'</label></td><td class="maxwidthonsmartphone">';
380  $formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_STATE, $mysoc->country_code, 'state_id');
381  print '</td></tr>'."\n";
382 
383 
384  print '<tr class="oddeven"><td><label for="currency">'.$langs->trans("CompanyCurrency").'</label></td><td>';
385  print $form->selectCurrency($conf->currency, "currency");
386  print '</td></tr>'."\n";
387 
388 
389  print '<tr class="oddeven"><td><label for="phone">'.$langs->trans("Phone").'</label></td><td>';
390  print '<input name="tel" id="phone" value="'. dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_TEL) . '"></td></tr>';
391  print '</td></tr>'."\n";
392 
393 
394  print '<tr class="oddeven"><td><label for="fax">'.$langs->trans("Fax").'</label></td><td>';
395  print '<input name="fax" id="fax" value="'. dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_FAX) . '"></td></tr>';
396  print '</td></tr>'."\n";
397 
398 
399  print '<tr class="oddeven"><td><label for="email">'.$langs->trans("EMail").'</label></td><td>';
400  print '<input name="mail" id="email" class="minwidth200" value="'. dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_MAIL) . '"></td></tr>';
401  print '</td></tr>'."\n";
402 
403  // Web
404  print '<tr class="oddeven"><td><label for="web">'.$langs->trans("Web").'</label></td><td>';
405  print '<input name="web" id="web" class="minwidth300" value="'. dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_WEB) . '"></td></tr>';
406  print '</td></tr>'."\n";
407 
408  // Barcode
409  if (! empty($conf->barcode->enabled)) {
410 
411  print '<tr class="oddeven"><td><label for="barcode">'.$langs->trans("Gencod").'</label></td><td>';
412  print '<input name="barcode" id="barcode" class="minwidth150" value="'. dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_GENCOD) . '"></td></tr>';
413  print '</td></tr>';
414  }
415 
416  // Logo
417  print '<tr class="oddeven hideonsmartphone"><td><label for="logo">'.$langs->trans("Logo").' (png,jpg)</label></td><td>';
418  print '<table width="100%" class="nobordernopadding"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
419  print '<input type="file" class="flat class=minwidth200" name="logo" id="logo">';
420  print '</td><td class="nocellnopadd" valign="middle" align="right">';
421  if (! empty($mysoc->logo_mini)) {
422  print '<a href="'.$_SERVER["PHP_SELF"].'?action=removelogo">'.img_delete($langs->trans("Delete")).'</a>';
423  if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) {
424  print ' &nbsp; ';
425  print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('logos/thumbs/'.$mysoc->logo_mini).'">';
426  }
427  } else {
428  print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
429  }
430  print '</td></tr></table>';
431  print '</td></tr>';
432 
433  // Note
434  print '<tr class="oddeven"><td class="tdtop"><label for="note">'.$langs->trans("Note").'</label></td><td>';
435  print '<textarea class="flat quatrevingtpercent" name="note" id="note" rows="'.ROWS_5.'">'.(GETPOST('note','none') ? GETPOST('note','none') : $conf->global->MAIN_INFO_SOCIETE_NOTE).'</textarea></td></tr>';
436  print '</td></tr>';
437 
438  print '</table>';
439 
440  print '<br>';
441 
442  // IDs of the company (country-specific)
443  print '<table class="noborder" width="100%">';
444  print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
445 
446  $langs->load("companies");
447 
448  // Managing Director(s)
449 
450  print '<tr class="oddeven"><td><label for="director">'.$langs->trans("ManagingDirectors").'</label></td><td>';
451  print '<input name="MAIN_INFO_SOCIETE_MANAGERS" id="director" class="minwidth200" value="' . dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_MANAGERS) . '"></td></tr>';
452 
453  // GDPR contact
454 
455  print '<tr class="oddeven"><td>';
456  print $form->textwithpicto($langs->trans("GDPRContact"), $langs->trans("GDPRContactDesc"));
457  print '</td><td>';
458  print '<input name="MAIN_INFO_GDPR" id="director" class="minwidth500" value="' . dol_escape_htmltag($conf->global->MAIN_INFO_GDPR) . '"></td></tr>';
459 
460  // Capital
461 
462  print '<tr class="oddeven"><td><label for="capital">'.$langs->trans("Capital").'</label></td><td>';
463  print '<input name="capital" id="capital" class="minwidth100" value="' . dol_escape_htmltag($conf->global->MAIN_INFO_CAPITAL) . '"></td></tr>';
464 
465  // Juridical Status
466 
467  print '<tr class="oddeven"><td><label for="forme_juridique_code">'.$langs->trans("JuridicalStatus").'</label></td><td>';
468  if ($mysoc->country_code) {
469  print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE, $mysoc->country_code, '', 'forme_juridique_code');
470  } else {
471  print $countrynotdefined;
472  }
473  print '</td></tr>';
474 
475  // ProfID1
476  if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-')
477  {
478 
479  print '<tr class="oddeven"><td><label for="profid1">'.$langs->transcountry("ProfId1",$mysoc->country_code).'</label></td><td>';
480  if (! empty($mysoc->country_code))
481  {
482  print '<input name="siren" id="profid1" class="minwidth200" value="' . dol_escape_htmltag(! empty($conf->global->MAIN_INFO_SIREN) ? $conf->global->MAIN_INFO_SIREN : '') . '">';
483  }
484  else
485  {
486  print $countrynotdefined;
487  }
488  print '</td></tr>';
489  }
490 
491  // ProfId2
492  if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-')
493  {
494 
495  print '<tr class="oddeven"><td><label for="profid2">'.$langs->transcountry("ProfId2",$mysoc->country_code).'</label></td><td>';
496  if (! empty($mysoc->country_code))
497  {
498  print '<input name="siret" id="profid2" class="minwidth200" value="' . dol_escape_htmltag(! empty($conf->global->MAIN_INFO_SIRET) ? $conf->global->MAIN_INFO_SIRET : '' ) . '">';
499  }
500  else
501  {
502  print $countrynotdefined;
503  }
504  print '</td></tr>';
505  }
506 
507  // ProfId3
508  if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-')
509  {
510 
511  print '<tr class="oddeven"><td><label for="profid3">'.$langs->transcountry("ProfId3",$mysoc->country_code).'</label></td><td>';
512  if (! empty($mysoc->country_code))
513  {
514  print '<input name="ape" id="profid3" class="minwidth200" value="' . dol_escape_htmltag(! empty($conf->global->MAIN_INFO_APE) ? $conf->global->MAIN_INFO_APE : '') . '">';
515  }
516  else
517  {
518  print $countrynotdefined;
519  }
520  print '</td></tr>';
521  }
522 
523  // ProfId4
524  if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-')
525  {
526 
527  print '<tr class="oddeven"><td><label for="profid4">'.$langs->transcountry("ProfId4",$mysoc->country_code).'</label></td><td>';
528  if (! empty($mysoc->country_code))
529  {
530  print '<input name="rcs" id="profid4" class="minwidth200" value="' . dol_escape_htmltag(! empty($conf->global->MAIN_INFO_RCS) ? $conf->global->MAIN_INFO_RCS : '') . '">';
531  }
532  else
533  {
534  print $countrynotdefined;
535  }
536  print '</td></tr>';
537  }
538 
539  // ProfId5
540  if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-')
541  {
542 
543  print '<tr class="oddeven"><td><label for="profid5">'.$langs->transcountry("ProfId5",$mysoc->country_code).'</label></td><td>';
544  if (! empty($mysoc->country_code))
545  {
546  print '<input name="MAIN_INFO_PROFID5" id="profid5" class="minwidth200" value="' . dol_escape_htmltag(! empty($conf->global->MAIN_INFO_PROFID5) ? $conf->global->MAIN_INFO_PROFID5 : '') . '">';
547  }
548  else
549  {
550  print $countrynotdefined;
551  }
552  print '</td></tr>';
553  }
554 
555  // ProfId6
556  if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-')
557  {
558 
559  print '<tr class="oddeven"><td><label for="profid6">'.$langs->transcountry("ProfId6",$mysoc->country_code).'</label></td><td>';
560  if (! empty($mysoc->country_code))
561  {
562  print '<input name="MAIN_INFO_PROFID6" id="profid6" class="minwidth200" value="' . dol_escape_htmltag(! empty($conf->global->MAIN_INFO_PROFID6) ? $conf->global->MAIN_INFO_PROFID6 : '') . '">';
563  }
564  else
565  {
566  print $countrynotdefined;
567  }
568  print '</td></tr>';
569  }
570 
571  // TVA Intra
572 
573  print '<tr class="oddeven"><td><label for="intra_vat">'.$langs->trans("VATIntra").'</label></td><td>';
574  print '<input name="tva" id="intra_vat" class="minwidth200" value="' . dol_escape_htmltag(! empty($conf->global->MAIN_INFO_TVAINTRA) ? $conf->global->MAIN_INFO_TVAINTRA : '') . '">';
575  print '</td></tr>';
576 
577  // Object of the company
578 
579  print '<tr class="oddeven"><td><label for="object">'.$langs->trans("CompanyObject").'</label></td><td>';
580  print '<textarea class="flat quatrevingtpercent" name="object" id="object" rows="'.ROWS_5.'">'.(! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? $conf->global->MAIN_INFO_SOCIETE_OBJECT : '').'</textarea></td></tr>';
581  print '</td></tr>';
582 
583  print '</table>';
584 
585 
586  // Fiscal year start
587  print '<br>';
588  print '<table class="noborder" width="100%">';
589  print '<tr class="liste_titre">';
590  print '<td class="titlefield">'.$langs->trans("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>';
591  print "</tr>\n";
592 
593 
594  print '<tr class="oddeven"><td><label for="SOCIETE_FISCAL_MONTH_START">'.$langs->trans("FiscalMonthStart").'</label></td><td>';
595  print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START,'SOCIETE_FISCAL_MONTH_START',0,1) . '</td></tr>';
596 
597  print "</table>";
598 
599 
600  // Fiscal options
601  print '<br>';
602  print '<table class="noborder" width="100%">';
603  print '<tr class="liste_titre">';
604  print '<td width="140">'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>';
605  print '<td align="right">&nbsp;</td>';
606  print "</tr>\n";
607 
608 
609  print "<tr class=\"oddeven\"><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" id=\"use_vat\" value=\"1\"".(empty($conf->global->FACTURE_TVAOPTION)?"":" checked")."> ".$langs->trans("VATIsUsed")."</label></td>";
610  print '<td colspan="2">';
611  print "<table>";
612  print "<tr><td><label for=\"use_vat\">".$langs->trans("VATIsUsedDesc")."</label></td></tr>";
613  if ($mysoc->country_code == 'FR') print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."</i></td></tr>\n";
614  print "</table>";
615  print "</td></tr>\n";
616 
617 
618  print "<tr class=\"oddeven\"><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" id=\"no_vat\" value=\"0\"".(empty($conf->global->FACTURE_TVAOPTION)?" checked":"")."> ".$langs->trans("VATIsNotUsed")."</label></td>";
619  print '<td colspan="2">';
620  print "<table>";
621  print "<tr><td><label for=\"no_vat\">".$langs->trans("VATIsNotUsedDesc")."</label></td></tr>";
622  if ($mysoc->country_code == 'FR') print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."</i></td></tr>\n";
623  print "</table>";
624  print "</td></tr>\n";
625 
626  print "</table>";
627 
628  /*
629  * Local Taxes
630  */
631  if ($mysoc->useLocalTax(1))
632  {
633  // Local Tax 1
634  print '<br>';
635  print '<table class="noborder" width="100%">';
636  print '<tr class="liste_titre">';
637  print '<td width="140">'.$langs->transcountry("LocalTax1Management",$mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
638  print '<td align="right">&nbsp;</td>';
639  print "</tr>\n";
640 
641  // Note: When option is not set, it must not appears as set on on, because there is no default value for this option
642  print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax1\" id=\"lt1\" value=\"localtax1on\"".(($conf->global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."</td>";
643  print '<td colspan="2">';
644  print '<table class="nobordernopadding">';
645  print "<tr><td><label for=\"lt1\">".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."</label></td></tr>";
646  $example=$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code);
647  print ($example!="LocalTax1IsUsedExample"?"<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code)."</i></td></tr>\n":"");
648  if(! isOnlyOneLocalTax(1))
649  {
650  print '<tr><td align="left"><label for="lt1">'.$langs->trans("LTRate").'</label>: ';
651  $formcompany->select_localtax(1,$conf->global->MAIN_INFO_VALUE_LOCALTAX1, "lt1");
652  print '</td></tr>';
653  }
654 
655  $opcions=array($langs->trans("CalcLocaltax1").' '.$langs->trans("CalcLocaltax1Desc"),$langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc"),$langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc"));
656 
657  print '<tr><td align="left"></label for="clt1">'.$langs->trans("CalcLocaltax").'</label>: ';
658  print $form->selectarray("clt1", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC1);
659  print '</td></tr>';
660  print "</table>";
661  print "</td></tr>\n";
662 
663 
664  print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax1\" id=\"nolt1\" value=\"localtax1off\"".((empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."</td>";
665  print '<td colspan="2">';
666  print "<table>";
667  print "<tr><td><label for=\"nolt1\">".$langs->transcountry("LocalTax1IsNotUsedDesc",$mysoc->country_code)."</label></td></tr>";
668  $example=$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code);
669  print ($example!="LocalTax1IsNotUsedExample"?"<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code)."</i></td></tr>\n":"");
670  print "</table>";
671  print "</td></tr>\n";
672  print "</table>";
673  }
674  if ($mysoc->useLocalTax(2))
675  {
676  // Local Tax 2
677  print '<br>';
678  print '<table class="noborder" width="100%">';
679  print '<tr class="liste_titre">';
680  print '<td>'.$langs->transcountry("LocalTax2Management",$mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
681  print '<td align="right">&nbsp;</td>';
682  print "</tr>\n";
683 
684 
685  // Note: When option is not set, it must not appears as set on on, because there is no default value for this option
686  print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax2\" id=\"lt2\" value=\"localtax2on\"".(($conf->global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."</td>";
687  print '<td colspan="2">';
688  print '<table class="nobordernopadding">';
689  print "<tr><td><label for=\"lt2\">".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)."</label></td></tr>";
690  $example=$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code);
691  print ($example!="LocalTax2IsUsedExample"?"<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code)."</i></td></tr>\n":"");
692  if(! isOnlyOneLocalTax(2))
693  {
694  print '<tr><td align="left"><label for="lt2">'.$langs->trans("LTRate").'</label>: ';
695  $formcompany->select_localtax(2,$conf->global->MAIN_INFO_VALUE_LOCALTAX2, "lt2");
696  print '</td></tr>';
697  }
698  print '<tr><td align="left"><label for="clt2">'.$langs->trans("CalcLocaltax").'</label>: ';
699  print $form->selectarray("clt2", $opcions, $conf->global->MAIN_INFO_LOCALTAX_CALC2);
700  print '</td></tr>';
701  print "</table>";
702  print "</td></tr>\n";
703 
704 
705  print "<tr class=\"oddeven\"><td width=\"140\"><input type=\"radio\" name=\"optionlocaltax2\" id=\"nolt2\" value=\"localtax2off\"".((empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."</td>";
706  print '<td colspan="2">';
707  print "<table>";
708  print "<tr><td><label for=\"nolt2\">".$langs->transcountry("LocalTax2IsNotUsedDesc",$mysoc->country_code)."</label></td></tr>";
709  $example=$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code);
710  print ($example!="LocalTax2IsNotUsedExample"?"<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code)."</i></td></tr>\n":"");
711  print "</table>";
712  print "</td></tr>\n";
713  print "</table>";
714  }
715 
716 
717  print '<br><div class="center">';
718  print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
719  print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
720  print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
721  print '</div>';
722  print '<br>';
723 
724  print '</form>';
725 }
726 else
727 {
728  /*
729  * Show parameters
730  */
731 
732  // Actions buttons
733  //print '<div class="tabsAction">';
734  //print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
735  //print '</div><br>';
736 
737  print '<div class="div-table-responsive-no-min">';
738  print '<table class="noborder" width="100%">';
739  print '<tr class="liste_titre"><td>'.$langs->trans("CompanyInfo").'</td><td>'.$langs->trans("Value").'</td></tr>';
740 
741 
742  print '<tr class="oddeven"><td class="titlefield wordbreak">'.$langs->trans("CompanyName").'</td><td>';
743  if (! empty($conf->global->MAIN_INFO_SOCIETE_NOM)) print $conf->global->MAIN_INFO_SOCIETE_NOM;
744  else print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyName")).'</font>';
745  print '</td></tr>';
746 
747 
748  print '<tr class="oddeven"><td>'.$langs->trans("CompanyAddress").'</td><td>' . nl2br(empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS) . '</td></tr>';
749 
750 
751  print '<tr class="oddeven"><td>'.$langs->trans("CompanyZip").'</td><td>' . (empty($conf->global->MAIN_INFO_SOCIETE_ZIP)?'':$conf->global->MAIN_INFO_SOCIETE_ZIP) . '</td></tr>';
752 
753 
754  print '<tr class="oddeven"><td>'.$langs->trans("CompanyTown").'</td><td>' . (empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN) . '</td></tr>';
755 
756 
757  print '<tr class="oddeven"><td>'.$langs->trans("CompanyCountry").'</td><td>';
758  if ($mysoc->country_code)
759  {
760  $img=picto_from_langcode($mysoc->country_code);
761  print $img?$img.' ':'';
762  print getCountry($mysoc->country_code,1);
763  }
764  else print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
765  print '</td></tr>';
766 
767 
768  if (! empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT)) print '<tr class="oddeven"><td>'.$langs->trans("Region-State").'</td><td>';
769  else print '<tr class="oddeven"><td>'.$langs->trans("State").'</td><td>';
770  if (! empty($conf->global->MAIN_INFO_SOCIETE_STATE)) print getState($conf->global->MAIN_INFO_SOCIETE_STATE,$conf->global->MAIN_SHOW_STATE_CODE,0,$conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT);
771  else print '&nbsp;';
772  print '</td></tr>';
773 
774 
775  print '<tr class="oddeven"><td>'.$langs->trans("CompanyCurrency").'</td><td>';
776  print currency_name($conf->currency,0);
777  print ' ('.$conf->currency;
778  print ($conf->currency != $langs->getCurrencySymbol($conf->currency) ? ' - '.$langs->getCurrencySymbol($conf->currency) : '');
779  print ')';
780  print ' - '.$langs->trans("PriceFormatInCurrentLanguage", $langs->defaultlang).' : '.price(price2num('99.333333333','MT'), 1, $langs, 1, -1, -1, $conf->currency);
781  print '</td></tr>';
782 
783 
784  print '<tr class="oddeven"><td>'.$langs->trans("Phone").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_TEL,$mysoc->country_code) . '</td></tr>';
785 
786 
787  print '<tr class="oddeven"><td>'.$langs->trans("Fax").'</td><td>' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_FAX,$mysoc->country_code) . '</td></tr>';
788 
789 
790  print '<tr class="oddeven"><td>'.$langs->trans("Mail").'</td><td>' . dol_print_email($conf->global->MAIN_INFO_SOCIETE_MAIL,0,0,0,80) . '</td></tr>';
791 
792  // Web
793 
794  print '<tr class="oddeven"><td>'.$langs->trans("Web").'</td><td>';
795  $arrayofurl = preg_split('/\s/', $conf->global->MAIN_INFO_SOCIETE_WEB);
796  foreach($arrayofurl as $urltoshow)
797  {
798  if ($urltoshow) print dol_print_url($urltoshow,'_blank',80);
799  }
800  print '</td></tr>';
801 
802  // Barcode
803  if (! empty($conf->barcode->enabled))
804  {
805 
806  print '<tr class="oddeven"><td>'.$langs->trans("Gencod").'</td><td>' . $conf->global->MAIN_INFO_SOCIETE_GENCOD . '</td></tr>';
807  }
808 
809  // Logo
810 
811  print '<tr class="oddeven"><td>'.$langs->trans("Logo").'</td><td>';
812 
813  $tagtd='tagtd ';
814  if ($conf->browser->layout == 'phone') $tagtd='';
815  print '<div class="tagtable centpercent"><div class="tagtr inline-block centpercent valignmiddle"><div class="'.$tagtd.'inline-block valignmiddle left">';
816  print $mysoc->logo;
817  print '</div><div class="'.$tagtd.'inline-block valignmiddle left">';
818 
819  // It offers the generation of the thumbnail if it does not exist
820  if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && preg_match('/(\.jpg|\.jpeg|\.png)$/i',$mysoc->logo))
821  {
822  print '<a class="img_logo" href="'.$_SERVER["PHP_SELF"].'?action=addthumb&amp;file='.urlencode($mysoc->logo).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').'</a>&nbsp;&nbsp;';
823  }
824  else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
825  {
826  print '<img class="img_logo" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;file='.urlencode('logos/thumbs/'.$mysoc->logo_mini).'">';
827  }
828  else
829  {
830  print '<img class="img_logo" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
831  }
832  print '</div></div></div>';
833 
834  print '</td></tr>';
835 
836 
837  print '<tr class="oddeven"><td class="tdtop">'.$langs->trans("Note").'</td><td>' . (! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) : '') . '</td></tr>';
838 
839  print '</table>';
840  print "</div>";
841 
842  print '<br>';
843 
844 
845  // IDs of the company (country-specific)
846  print '<form name="formsoc" method="post">';
847  print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
848 
849  print '<div class="div-table-responsive-no-min">';
850  print '<table class="noborder" width="100%">';
851  print '<tr class="liste_titre"><td class="titlefield wordbreak">'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
852 
853  // Managing Director(s)
854 
855  print '<tr class="oddeven"><td>'.$langs->trans("ManagingDirectors").'</td><td>';
856  print $conf->global->MAIN_INFO_SOCIETE_MANAGERS . '</td></tr>';
857 
858  // GDPR Contact
859 
860  print '<tr class="oddeven"><td>'.$langs->trans("GDPRContact").'</td><td>';
861  print $conf->global->MAIN_INFO_GDPR . '</td></tr>';
862 
863  // Capital
864 
865  print '<tr class="oddeven"><td>'.$langs->trans("Capital").'</td><td>';
866  print $conf->global->MAIN_INFO_CAPITAL . '</td></tr>';
867 
868  // Juridical Status
869 
870  print '<tr class="oddeven"><td>'.$langs->trans("JuridicalStatus").'</td><td>';
871  print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE);
872  print '</td></tr>';
873 
874  // ProfId1
875  if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-')
876  {
877 
878  print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId1",$mysoc->country_code).'</td><td>';
879  if (! empty($conf->global->MAIN_INFO_SIREN))
880  {
881  print $conf->global->MAIN_INFO_SIREN;
882  $s = $mysoc->id_prof_url(1,$mysoc);
883  if ($s) print ' - '.$s;
884  } else {
885  print '&nbsp;';
886  }
887  print '</td></tr>';
888  }
889 
890  // ProfId2
891  if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-')
892  {
893 
894  print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId2",$mysoc->country_code).'</td><td>';
895  if (! empty($conf->global->MAIN_INFO_SIRET))
896  {
897  print $conf->global->MAIN_INFO_SIRET;
898  $s = $mysoc->id_prof_url(2,$mysoc);
899  if ($s) print ' - '.$s;
900  } else {
901  print '&nbsp;';
902  }
903  print '</td></tr>';
904  }
905 
906  // ProfId3
907  if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-')
908  {
909 
910  print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId3",$mysoc->country_code).'</td><td>';
911  if (! empty($conf->global->MAIN_INFO_APE))
912  {
913  print $conf->global->MAIN_INFO_APE;
914  $s = $mysoc->id_prof_url(3,$mysoc);
915  if ($s) print ' - '.$s;
916  } else {
917  print '&nbsp;';
918  }
919  print '</td></tr>';
920  }
921 
922  // ProfId4
923  if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-')
924  {
925 
926  print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId4",$mysoc->country_code).'</td><td>';
927  if (! empty($conf->global->MAIN_INFO_RCS))
928  {
929  print $conf->global->MAIN_INFO_RCS;
930  $s = $mysoc->id_prof_url(4,$mysoc);
931  if ($s) print ' - '.$s;
932  } else {
933  print '&nbsp;';
934  }
935  print '</td></tr>';
936  }
937 
938  // ProfId5
939  if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-')
940  {
941 
942  print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId5",$mysoc->country_code).'</td><td>';
943  if (! empty($conf->global->MAIN_INFO_PROFID5))
944  {
945  print $conf->global->MAIN_INFO_PROFID5;
946  $s = $mysoc->id_prof_url(5,$mysoc);
947  if ($s) print ' - '.$s;
948  } else {
949  print '&nbsp;';
950  }
951  print '</td></tr>';
952  }
953 
954  // ProfId6
955  if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-')
956  {
957 
958  print '<tr class="oddeven"><td>'.$langs->transcountry("ProfId6",$mysoc->country_code).'</td><td>';
959  if (! empty($conf->global->MAIN_INFO_PROFID6))
960  {
961  print $conf->global->MAIN_INFO_PROFID6;
962  $s = $mysoc->id_prof_url(6,$mysoc);
963  if ($s) print ' - '.$s;
964  } else {
965  print '&nbsp;';
966  }
967  print '</td></tr>';
968  }
969 
970  // VAT
971 
972  print '<tr class="oddeven"><td>'.$langs->trans("VATIntra").'</td>';
973  print '<td>';
974  if (! empty($conf->global->MAIN_INFO_TVAINTRA))
975  {
976  $s='';
977  $s.=$conf->global->MAIN_INFO_TVAINTRA;
978  $s.='<input type="hidden" name="tva_intra" size="12" maxlength="20" value="'.$conf->global->MAIN_INFO_TVAINTRA.'">';
979  if (empty($conf->global->MAIN_DISABLEVATCHECK) && $mysoc->isInEEC())
980  {
981  $s.=' - ';
982  if (! empty($conf->use_javascript_ajax))
983  {
984  print "\n";
985  print '<script language="JavaScript" type="text/javascript">';
986  print "function CheckVAT(a) {\n";
987  print "newpopup('".DOL_URL_ROOT."/societe/checkvat/checkVatPopup.php?vatNumber='+a,'".dol_escape_js($langs->trans("VATIntraCheckableOnEUSite"))."',500,285);\n";
988  print "}\n";
989  print '</script>';
990  print "\n";
991  $s.='<a href="#" onClick="javascript: CheckVAT(document.formsoc.tva_intra.value);">'.$langs->trans("VATIntraCheck").'</a>';
992  $s = $form->textwithpicto($s,$langs->trans("VATIntraCheckDesc",$langs->trans("VATIntraCheck")),1);
993  }
994  else
995  {
996  $s.='<a href="'.$langs->transcountry("VATIntraCheckURL",$soc->id_country).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').'</a>';
997  }
998  }
999  print $s;
1000  }
1001  else
1002  {
1003  print '&nbsp;';
1004  }
1005  print '</td>';
1006  print '</tr>';
1007 
1008 
1009  print '<tr class="oddeven"><td class="tdtop">'.$langs->trans("CompanyObject").'</td><td>' . (! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? nl2br($conf->global->MAIN_INFO_SOCIETE_OBJECT) : '') . '</td></tr>';
1010 
1011  print '</table>';
1012  print "</div>";
1013 
1014  print '</form>';
1015 
1016  /*
1017  * fiscal year beginning
1018  */
1019  print '<br>';
1020 
1021  print '<div class="div-table-responsive-no-min">';
1022  print '<table class="noborder" width="100%">';
1023  print '<tr class="liste_titre">';
1024  print '<td class="titlefield">'.$langs->trans("FiscalYearInformation").'</td><td>'.$langs->trans("Value").'</td>';
1025  print "</tr>\n";
1026 
1027 
1028  print '<tr class="oddeven"><td>'.$langs->trans("FiscalMonthStart").'</td><td>';
1029  $monthstart=(! empty($conf->global->SOCIETE_FISCAL_MONTH_START)) ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1;
1030  print dol_print_date(dol_mktime(12,0,0,$monthstart,1,2000,1),'%B','gm') . '</td></tr>';
1031 
1032  print "</table>";
1033  print "</div>";
1034 
1035  /*
1036  * tax options
1037  */
1038  print '<br>';
1039  print '<div class="div-table-responsive-no-min">';
1040  print '<table class="noborder" width="100%">';
1041  print '<tr class="liste_titre">';
1042  print '<td class="titlefield">'.$langs->trans("VATManagement").'</td><td>'.$langs->trans("Description").'</td>';
1043  print '<td align="right">&nbsp;</td>';
1044  print "</tr>\n";
1045 
1046 
1047  print '<tr class="oddeven"><td class="titlefield">';
1048  print "<input class=\"oddeven\" type=\"radio\" name=\"optiontva\" id=\"use_vat\" disabled value=\"1\"".(empty($conf->global->FACTURE_TVAOPTION)?"":" checked")."> ".$langs->trans("VATIsUsed")."</td>";
1049  print '<td colspan="2">';
1050  print "<table>";
1051  print "<tr><td><label for=\"use_vat\">".$langs->trans("VATIsUsedDesc")."</label></td></tr>";
1052  if ($mysoc->country_code == 'FR') print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsUsedExampleFR")."</i></td></tr>\n";
1053  print "</table>";
1054  print "</td></tr>\n";
1055 
1056 
1057  print '<tr class="oddeven"><td class="titlefield">';
1058  print "<input class=\"oddeven\" type=\"radio\" name=\"optiontva\" id=\"no_vat\" disabled value=\"0\"".(empty($conf->global->FACTURE_TVAOPTION)?" checked":"")."> ".$langs->trans("VATIsNotUsed")."</td>";
1059  print '<td colspan="2">';
1060  print "<table>";
1061  print "<tr><td><label=\"no_vat\">".$langs->trans("VATIsNotUsedDesc")."</label></td></tr>";
1062  if ($mysoc->country_code == 'FR') print "<tr><td><i>".$langs->trans("Example").': '.$langs->trans("VATIsNotUsedExampleFR")."</i></td></tr>\n";
1063  print "</table>";
1064  print "</td></tr>\n";
1065 
1066  print "</table>";
1067  print "</div>";
1068 
1069  /*
1070  * Local Taxes
1071  */
1072  if ($mysoc->useLocalTax(1)) // True if we found at least on vat with a setup adding a localtax 1
1073  {
1074  // Local Tax 1
1075  print '<br>';
1076  print '<div class="div-table-responsive-no-min">';
1077  print '<table class="noborder" width="100%">';
1078  print '<tr class="liste_titre">';
1079  print '<td class="titlefield">'.$langs->transcountry("LocalTax1Management",$mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
1080  print '<td align="right">&nbsp;</td>';
1081  print "</tr>\n";
1082 
1083 
1084  print "<tr class=\"oddeven\"><td>";
1085  print "<input class=\"oddeven\" type=\"radio\" name=\"optionlocaltax1\" id=\"lt1\" disabled value=\"localtax1on\"".(($conf->global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."</td>";
1086  print '<td colspan="2">';
1087  print "<table>";
1088  print "<tr><td></label for=\"lt1\">".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."</label></td></tr>";
1089  $example=$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code);
1090  print ($example!="LocalTax1IsUsedExample"?"<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code)."</i></td></tr>\n":"");
1091  if($conf->global->MAIN_INFO_VALUE_LOCALTAX1!=0)
1092  {
1093  print '<tr><td>'.$langs->trans("LTRate").': '. $conf->global->MAIN_INFO_VALUE_LOCALTAX1 .'</td></tr>';
1094  }
1095  print '<tr><td align="left">'.$langs->trans("CalcLocaltax").': ';
1096  if($conf->global->MAIN_INFO_LOCALTAX_CALC1==0)
1097  {
1098  print $langs->trans("CalcLocaltax1").' - '.$langs->trans("CalcLocaltax1Desc");
1099  }
1100  else if($conf->global->MAIN_INFO_LOCALTAX_CALC1==1)
1101  {
1102  print $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc");
1103  }
1104  else if($conf->global->MAIN_INFO_LOCALTAX_CALC1==2){
1105  print $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc");
1106  }
1107 
1108  print '</td></tr>';
1109  print "</table>";
1110  print "</td></tr>\n";
1111 
1112 
1113  print '<tr class="oddeven"><td>';
1114  print "<input class=\"oddeven\" type=\"radio\" name=\"optionlocaltax1\" id=\"nolt1\" disabled value=\"localtax1off\"".((empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."</td>";
1115  print '<td colspan="2">';
1116  print "<table>";
1117  print "<tr><td><label for=\"no_lt1\">".$langs->transcountry("LocalTax1IsNotUsedDesc",$mysoc->country_code)."</label></td></tr>";
1118  $example=$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code);
1119  print ($example!="LocalTax1IsNotUsedExample"?"<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code)."</i></td></tr>\n":"");
1120  print "</table>";
1121  print "</td></tr>\n";
1122 
1123  print "</table>";
1124  print "</div>";
1125  }
1126  if ($mysoc->useLocalTax(2)) // True if we found at least on vat with a setup adding a localtax 1
1127  {
1128  // Local Tax 2
1129  print '<br>';
1130  print '<div class="div-table-responsive-no-min">';
1131  print '<table class="noborder" width="100%">';
1132  print '<tr class="liste_titre">';
1133  print '<td class="titlefield">'.$langs->transcountry("LocalTax2Management",$mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
1134  print '<td align="right">&nbsp;</td>';
1135  print "</tr>\n";
1136 
1137 
1138  print "<tr class=\"oddeven\"><td>";
1139  print "<input class=\"oddeven\" type=\"radio\" name=\"optionlocaltax2\" id=\"lt2\" disabled value=\"localtax2on\"".(($conf->global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."</td>";
1140  print '<td colspan="2">';
1141  print "<table>";
1142  print "<tr><td><label for=\"lt2\">".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)."</label></td></tr>";
1143  $example=$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code);
1144  print ($example!="LocalTax2IsUsedExample"?"<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code)."</i></td></tr>\n":"");
1145  if($conf->global->MAIN_INFO_VALUE_LOCALTAX2!=0)
1146  {
1147  print '<tr><td>'.$langs->trans("LTRate").': '. $conf->global->MAIN_INFO_VALUE_LOCALTAX2 .'</td></tr>';
1148  }
1149  print '<tr><td align="left">'.$langs->trans("CalcLocaltax").': ';
1150  if($conf->global->MAIN_INFO_LOCALTAX_CALC2==0)
1151  {
1152  print $langs->trans("CalcLocaltax1").' - '.$langs->trans("CalcLocaltax1Desc");
1153  }
1154  else if($conf->global->MAIN_INFO_LOCALTAX_CALC2==1)
1155  {
1156  print $langs->trans("CalcLocaltax2").' - '.$langs->trans("CalcLocaltax2Desc");
1157  }
1158  else if($conf->global->MAIN_INFO_LOCALTAX_CALC2==2)
1159  {
1160  print $langs->trans("CalcLocaltax3").' - '.$langs->trans("CalcLocaltax3Desc");
1161  }
1162 
1163  print '</td></tr>';
1164  print "</table>";
1165  print "</td></tr>\n";
1166 
1167 
1168  print "<tr class=\"oddeven\"><td width=\"160\"><input class=\"oddeven\" type=\"radio\" name=\"optionlocaltax2\" id=\"nolt2\" disabled value=\"localtax2off\"".((empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."</td>";
1169  print '<td colspan="2">';
1170  print "<table>";
1171  print "<tr><td><label for=\"nolt2\">".$langs->transcountry("LocalTax2IsNotUsedDesc",$mysoc->country_code)."</label></td></tr>";
1172  $example=$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code);
1173  print ($example!="LocalTax2IsNotUsedExample"?"<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code)."</i></td></tr>\n":"");
1174  print "</table>";
1175  print "</td></tr>\n";
1176 
1177  print "</table>";
1178  print "</div>";
1179  }
1180 
1181 
1182  // Actions buttons
1183  print '<div class="tabsAction">';
1184  print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a></div>';
1185  print '</div>';
1186 }
1187 
1188 // End of page
1189 llxFooter();
1190 $db->close();
image_format_supported($file)
Return if a filename is file name of a supported image format.
Definition: images.lib.php:38
img_warning($titlealt='default', $moreatt='')
Show warning logo.
llxFooter()
Empty footer.
Definition: wrapper.php:56
load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOST($paramname, $check='none', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
print
Draft customers invoices.
Definition: index.php:91
dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $varfiles='addedfile')
Make control on an uploaded file from an GUI page and move it to final destination.
Definition: files.lib.php:996
setEventMessages($mesg, $mesgs, $style='mesgs')
Set event messages in dol_events session object.
dol_print_url($url, $target='_blank', $max=32, $withpicto=0)
Show Url link.
picto_from_langcode($codelang, $moreatt='')
Return img flag of country for a language code or country code.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm=false, $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0)
Returns text escaped for inclusion into javascript code.
getState($id, $withcode='', $dbtouse=0, $withregion=0, $outputlangs='', $entconv=1)
Return state translated from an id.
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).
Definition: admin.lib.php:510
getCountry($searchkey, $withcode='', $dbtouse=0, $outputlangs='', $entconv=1, $searchlabel='')
Return country label, code or id from an id, code or label.
isOnlyOneLocalTax($local)
Return true if LocalTax (1 or 2) is unique.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields...
img_delete($titlealt='default', $other='class="pictodelete"')
Show delete logo.
company_admin_prepare_head()
Return array head with list of tabs to view object informations.
Definition: admin.lib.php:1703
Class to build HTML component for third parties management Only common components are here...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Class to manage generation of HTML components Only common components must be here.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='')
Write log message into outputs.
getFormeJuridiqueLabel($code)
Retourne le nom traduit de la forme juridique.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='')
Show information for admin users or standard users.
dolibarr_del_const($db, $name, $entity=1)
Effacement d&#39;une constante dans la base de donnees.
Definition: admin.lib.php:435
Classe permettant la generation de composants html autre Only common components are here...
llxHeader()
Empty header.
Definition: wrapper.php:44
dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1)
Remove a file or several files with a mask.
Definition: files.lib.php:1139
activateModulesRequiredByCountry($country_code)
Activate external modules mandatory when country is country_code.
Definition: admin.lib.php:1198
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages...
dol_print_date($time, $format='', $tzoutput='tzserver', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_mkdir($dir, $dataroot='', $newmask=null)
Creation of a directory (this can create recursive subdir)
dol_print_email($email, $cid=0, $socid=0, $addlink=0, $max=64, $showinvalid=1, $withpicto=0)
Show EMail link.
dol_print_phone($phone, $countrycode='', $cid=0, $socid=0, $addlink='', $separ="&nbsp;", $withpicto='', $titlealt='', $adddivfloat=0)
Format phone numbers according to country.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='')
Show picto whatever it&#39;s its name (generic function)
price2num($amount, $rounding='', $alreadysqlnb=0)
Function that return a number with universal decimal format (decimal separator is &#39;...
dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='')
Show tab header of a card.
currency_name($code_iso, $withcode='', $outputlangs=null)
Return label of currency or code+label.
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)...
Definition: images.lib.php:352
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $wikihelp
View.
Definition: agenda.php:120