dolibarr  9.0.0
propal.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
5  * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
6  * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
7  * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
8  * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
9  * Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program. If not, see <http://www.gnu.org/licenses/>.
23  */
24 
31 require '../main.inc.php';
32 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
33 require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
34 require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
35 require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
36 
37 // Load translation files required by the page
38 $langs->loadLangs(array("admin", "other", "errors", "propal"));
39 
40 if (! $user->admin) accessforbidden();
41 
42 $action = GETPOST('action','alpha');
43 $value = GETPOST('value','alpha');
44 $label = GETPOST('label','alpha');
45 $scandir = GETPOST('scan_dir','alpha');
46 $type='propal';
47 
48 /*
49  * Actions
50  */
51 
52 include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
53 
54 $error=0;
55 if ($action == 'updateMask')
56 {
57  $maskconstpropal=GETPOST('maskconstpropal','alpha');
58  $maskpropal=GETPOST('maskpropal','alpha');
59  if ($maskconstpropal) $res = dolibarr_set_const($db,$maskconstpropal,$maskpropal,'chaine',0,'',$conf->entity);
60 
61  if (! $res > 0) $error++;
62 
63  if (! $error)
64  {
65  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
66  }
67  else
68  {
69  setEventMessages($langs->trans("Error"), null, 'errors');
70  }
71 }
72 
73 if ($action == 'specimen')
74 {
75  $modele=GETPOST('module','alpha');
76 
77  $propal = new Propal($db);
78  $propal->initAsSpecimen();
79 
80  // Search template files
81  $file=''; $classname=''; $filefound=0;
82  $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
83  foreach($dirmodels as $reldir)
84  {
85  $file=dol_buildpath($reldir."core/modules/propale/doc/pdf_".$modele.".modules.php");
86  if (file_exists($file))
87  {
88  $filefound=1;
89  $classname = "pdf_".$modele;
90  break;
91  }
92  }
93 
94  if ($filefound)
95  {
96  require_once $file;
97 
98  $module = new $classname($db);
99 
100  if ($module->write_file($propal,$langs) > 0)
101  {
102  header("Location: ".DOL_URL_ROOT."/document.php?modulepart=propal&file=SPECIMEN.pdf");
103  return;
104  }
105  else
106  {
107  setEventMessages($module->error, $module->errors, 'errors');
108  dol_syslog($module->error, LOG_ERR);
109  }
110  }
111  else
112  {
113  setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
114  dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
115  }
116 }
117 
118 if ($action == 'set_PROPALE_DRAFT_WATERMARK')
119 {
120  $draft = GETPOST('PROPALE_DRAFT_WATERMARK','alpha');
121 
122  $res = dolibarr_set_const($db, "PROPALE_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
123  if (! $res > 0) $error++;
124 
125  if (! $error)
126  {
127  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
128  }
129  else
130  {
131  setEventMessages($langs->trans("Error"), null, 'errors');
132  }
133 }
134 
135 if ($action == 'set_PROPOSAL_FREE_TEXT')
136 {
137  $freetext = GETPOST('PROPOSAL_FREE_TEXT','none'); // No alpha here, we want exact string
138 
139  $res = dolibarr_set_const($db, "PROPOSAL_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
140 
141  if (! $res > 0) $error++;
142 
143  if (! $error)
144  {
145  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
146  }
147  else
148  {
149  setEventMessages($langs->trans("Error"), null, 'errors');
150  }
151 }
152 
153 if ($action == 'setdefaultduration')
154 {
155  $res = dolibarr_set_const($db, "PROPALE_VALIDITY_DURATION",$value,'chaine',0,'',$conf->entity);
156 
157  if (! $res > 0) $error++;
158 
159  if (! $error)
160  {
161  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
162  }
163  else
164  {
165  setEventMessages($langs->trans("Error"), null, 'errors');
166  }
167 }
168 
169 if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL')
170 {
171  $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL",$value,'chaine',0,'',$conf->entity);
172 
173  if (! $res > 0) $error++;
174 
175  if (! $error)
176  {
177  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
178  }
179  else
180  {
181  setEventMessages($langs->trans("Error"), null, 'errors');
182  }
183 }
184 
185 // Activate a model
186 if ($action == 'set')
187 {
188  $ret = addDocumentModel($value, $type, $label, $scandir);
189 }
190 
191 else if ($action == 'del')
192 {
193  $ret = delDocumentModel($value, $type);
194  if ($ret > 0)
195  {
196  if ($conf->global->PROPALE_ADDON_PDF == "$value") dolibarr_del_const($db, 'PROPALE_ADDON_PDF',$conf->entity);
197  }
198 }
199 
200 else if ($action == 'setdoc')
201 {
202  if (dolibarr_set_const($db, "PROPALE_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
203  {
204  $conf->global->PROPALE_ADDON_PDF = $value;
205  }
206 
207  // On active le modele
208  $ret = delDocumentModel($value, $type);
209  if ($ret > 0)
210  {
211  $ret = addDocumentModel($value, $type, $label, $scandir);
212  }
213 }
214 
215 else if ($action == 'setmod')
216 {
217  // TODO Verifier si module numerotation choisi peut etre active
218  // par appel methode canBeActivated
219 
220  dolibarr_set_const($db, "PROPALE_ADDON",$value,'chaine',0,'',$conf->entity);
221 }
222 
223 
224 /*
225  * View
226  */
227 
228 $form=new Form($db);
229 
230 $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
231 
232 llxHeader('',$langs->trans("PropalSetup"));
233 
234 //if ($mesg) print $mesg;
235 
236 $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
237 print load_fiche_titre($langs->trans("PropalSetup"),$linkback,'title_setup');
238 
239 $head = propal_admin_prepare_head();
240 
241 dol_fiche_head($head, 'general', $langs->trans("Proposals"), -1, 'propal');
242 
243 /*
244  * Module numerotation
245  */
246 print load_fiche_titre($langs->trans("ProposalsNumberingModules"),'','');
247 
248 print '<table class="noborder" width="100%">';
249 print '<tr class="liste_titre">';
250 print '<td>'.$langs->trans("Name")."</td>\n";
251 print '<td>'.$langs->trans("Description")."</td>\n";
252 print '<td class="nowrap">'.$langs->trans("Example")."</td>\n";
253 print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
254 print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
255 print '</tr>'."\n";
256 
257 clearstatcache();
258 
259 foreach ($dirmodels as $reldir)
260 {
261  $dir = dol_buildpath($reldir."core/modules/propale/");
262 
263  if (is_dir($dir))
264  {
265  $handle = opendir($dir);
266  if (is_resource($handle))
267  {
268  while (($file = readdir($handle))!==false)
269  {
270  if (substr($file, 0, 12) == 'mod_propale_' && substr($file, dol_strlen($file)-3, 3) == 'php')
271  {
272  $file = substr($file, 0, dol_strlen($file)-4);
273 
274  require_once $dir.$file.'.php';
275 
276  $module = new $file;
277 
278  // Show modules according to features level
279  if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
280  if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
281 
282  if ($module->isEnabled())
283  {
284 
285  print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
286  print $module->info();
287  print '</td>';
288 
289  // Show example of numbering module
290  print '<td class="nowrap">';
291  $tmp=$module->getExample();
292  if (preg_match('/^Error/',$tmp)) print '<div class="error">'.$langs->trans($tmp).'</div>';
293  elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
294  else print $tmp;
295  print '</td>'."\n";
296 
297  print '<td align="center">';
298  if ($conf->global->PROPALE_ADDON == "$file")
299  {
300  print img_picto($langs->trans("Activated"),'switch_on');
301  }
302  else
303  {
304  print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;value='.$file.'">';
305  print img_picto($langs->trans("Disabled"),'switch_off');
306  print '</a>';
307  }
308  print '</td>';
309 
310  $propal=new Propal($db);
311  $propal->initAsSpecimen();
312 
313  // Info
314  $htmltooltip='';
315  $htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
316  $propal->type=0;
317  $nextval=$module->getNextValue($mysoc,$propal);
318  if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
319  $htmltooltip.=''.$langs->trans("NextValue").': ';
320  if ($nextval) {
321  if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
322  $nextval = $langs->trans($nextval);
323  $htmltooltip.=$nextval.'<br>';
324  } else {
325  $htmltooltip.=$langs->trans($module->error).'<br>';
326  }
327  }
328 
329  print '<td align="center">';
330  print $form->textwithpicto('',$htmltooltip,1,0);
331  print '</td>';
332 
333  print "</tr>\n";
334  }
335  }
336  }
337  closedir($handle);
338  }
339  }
340 }
341 print "</table><br>\n";
342 
343 
344 /*
345  * Document templates generators
346  */
347 
348 print load_fiche_titre($langs->trans("ProposalsPDFModules"),'','');
349 
350 // Load array def with activated templates
351 $def = array();
352 $sql = "SELECT nom";
353 $sql.= " FROM ".MAIN_DB_PREFIX."document_model";
354 $sql.= " WHERE type = '".$type."'";
355 $sql.= " AND entity = ".$conf->entity;
356 $resql=$db->query($sql);
357 if ($resql)
358 {
359  $i = 0;
360  $num_rows=$db->num_rows($resql);
361  while ($i < $num_rows)
362  {
363  $array = $db->fetch_array($resql);
364  array_push($def, $array[0]);
365  $i++;
366  }
367 }
368 else
369 {
370  dol_print_error($db);
371 }
372 
373 
374 print "<table class=\"noborder\" width=\"100%\">\n";
375 print "<tr class=\"liste_titre\">\n";
376 print " <td>".$langs->trans("Name")."</td>\n";
377 print " <td>".$langs->trans("Description")."</td>\n";
378 print '<td align="center" width="40">'.$langs->trans("Status")."</td>\n";
379 print '<td align="center" width="40">'.$langs->trans("Default")."</td>\n";
380 print '<td align="center" width="40">'.$langs->trans("ShortInfo").'</td>';
381 print '<td align="center" width="40">'.$langs->trans("Preview").'</td>';
382 print "</tr>\n";
383 
384 clearstatcache();
385 
386 foreach ($dirmodels as $reldir)
387 {
388  foreach (array('','/doc') as $valdir)
389  {
390  $dir = dol_buildpath($reldir."core/modules/propale".$valdir);
391 
392  if (is_dir($dir))
393  {
394  $handle=opendir($dir);
395  if (is_resource($handle))
396  {
397  while (($file = readdir($handle))!==false)
398  {
399  $filelist[]=$file;
400  }
401  closedir($handle);
402  arsort($filelist);
403 
404  foreach($filelist as $file)
405  {
406  if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file))
407  {
408  if (file_exists($dir.'/'.$file))
409  {
410  $name = substr($file, 4, dol_strlen($file) -16);
411  $classname = substr($file, 0, dol_strlen($file) -12);
412 
413  require_once $dir.'/'.$file;
414  $module = new $classname($db);
415 
416  $modulequalified=1;
417  if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
418  if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0;
419 
420  if ($modulequalified)
421  {
422  $var = !$var;
423  print '<tr class="oddeven"><td width="100">';
424  print (empty($module->name)?$name:$module->name);
425  print "</td><td>\n";
426  if (method_exists($module,'info')) print $module->info($langs);
427  else print $module->description;
428  print '</td>';
429 
430  // Active
431  if (in_array($name, $def))
432  {
433  print '<td align="center">'."\n";
434  print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'">';
435  print img_picto($langs->trans("Enabled"),'switch_on');
436  print '</a>';
437  print '</td>';
438  }
439  else
440  {
441  print "<td align=\"center\">\n";
442  print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
443  print "</td>";
444  }
445 
446  // Defaut
447  print "<td align=\"center\">";
448  if ($conf->global->PROPALE_ADDON_PDF == "$name")
449  {
450  print img_picto($langs->trans("Default"),'on');
451  }
452  else
453  {
454  print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
455  }
456  print '</td>';
457 
458  // Info
459  $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
460  $htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
461  if ($module->type == 'pdf')
462  {
463  $htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
464  }
465  $htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
466  $htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
467  $htmltooltip.='<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1);
468  $htmltooltip.='<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1);
469  $htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1);
470  //$htmltooltip.='<br>'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1);
471  //$htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
472  $htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftProposal").': '.yn($module->option_draft_watermark,1,1);
473 
474 
475  print '<td align="center">';
476  print $form->textwithpicto('',$htmltooltip,1,0);
477  print '</td>';
478 
479  // Preview
480  print '<td align="center">';
481  if ($module->type == 'pdf')
482  {
483  print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'bill').'</a>';
484  }
485  else
486  {
487  print img_object($langs->trans("PreviewNotAvailable"),'generic');
488  }
489  print '</td>';
490 
491  print "</tr>\n";
492  }
493  }
494  }
495  }
496  }
497  }
498  }
499 }
500 
501 print '</table>';
502 print '<br>';
503 
504 
505 /*
506  * Other options
507  */
508 
509 print load_fiche_titre($langs->trans("OtherOptions"),'','');
510 
511 print "<table class=\"noborder\" width=\"100%\">";
512 print "<tr class=\"liste_titre\">";
513 print "<td>".$langs->trans("Parameter")."</td>\n";
514 print '<td width="60" align="center">'.$langs->trans("Value")."</td>\n";
515 print "<td>&nbsp;</td>\n";
516 print "</tr>";
517 
518 
519 print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
520 print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
521 print "<input type=\"hidden\" name=\"action\" value=\"setdefaultduration\">";
522 print '<tr class="oddeven">';
523 print '<td>'.$langs->trans("DefaultProposalDurationValidity").'</td>';
524 print '<td width="60" align="center">'."<input size=\"3\" class=\"flat\" type=\"text\" name=\"value\" value=\"".$conf->global->PROPALE_VALIDITY_DURATION."\"></td>";
525 print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
526 print '</tr>';
527 print '</form>';
528 
529 /*
530 print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
531 print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
532 print '<input type="hidden" name="action" value="setusecustomercontactasrecipient">';
533 print '<tr class="oddeven"><td>';
534 print $langs->trans("UseCustomerContactAsPropalRecipientIfExist");
535 print '</td><td width="60" align="center">';
536 print $form->selectyesno("value",$conf->global->PROPALE_USE_CUSTOMER_CONTACT_AS_RECIPIENT,1);
537 print '</td><td align="right">';
538 print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
539 print "</td></tr>\n";
540 print '</form>';
541 */
542 
543 $substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2);
544 $substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation");
545 $htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
546 foreach($substitutionarray as $key => $val) $htmltext.=$key.'<br>';
547 $htmltext.='</i>';
548 
549 print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
550 print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
551 print '<input type="hidden" name="action" value="set_PROPOSAL_FREE_TEXT">';
552 print '<tr class="oddeven"><td colspan="2">';
553 print $form->textwithpicto($langs->trans("FreeLegalTextOnProposal"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
554 $variablename='PROPOSAL_FREE_TEXT';
555 if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
556 {
557  print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
558 }
559 else
560 {
561  include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
562  $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_notes');
563  print $doleditor->Create();
564 }
565 print '</td><td align="right">';
566 print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
567 print "</td></tr>\n";
568 print '</form>';
569 
570 
571 print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
572 print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
573 print "<input type=\"hidden\" name=\"action\" value=\"set_PROPALE_DRAFT_WATERMARK\">";
574 print '<tr class="oddeven"><td>';
575 print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
576 print '</td><td>';
577 print '<input class="flat minwidth200" type="text" name="PROPALE_DRAFT_WATERMARK" value="'.$conf->global->PROPALE_DRAFT_WATERMARK.'">';
578 print '</td><td align="right">';
579 print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
580 print "</td></tr>\n";
581 print '</form>';
582 
583 /* Seems to be not so used. So kept hidden for the moment to avoid dangerous options inflation.
584 if ($conf->banque->enabled)
585 {
586 
587  print '<tr class="oddeven"><td>';
588  print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL").'</td><td>&nbsp</td><td align="right">';
589  if (! empty($conf->use_javascript_ajax))
590  {
591  print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL');
592  }
593  else
594  {
595  if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL))
596  {
597  print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL&amp;value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
598  }
599  else
600  {
601  print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL&amp;value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
602  }
603  }
604  print '</td></tr>';
605 }
606 else
607 {
608 
609  print '<tr class="oddeven"><td>';
610  print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL").'</td><td>&nbsp;</td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
611 }
612 */
613 
614 print '</table>';
615 
616 
617 
618 /*
619  * Directory
620  */
621 print '<br>';
622 print load_fiche_titre($langs->trans("PathToDocuments"),'','');
623 
624 print "<table class=\"noborder\" width=\"100%\">\n";
625 print "<tr class=\"liste_titre\">\n";
626 print " <td>".$langs->trans("Name")."</td>\n";
627 print " <td>".$langs->trans("Value")."</td>\n";
628 print "</tr>\n";
629 print "<tr class=\"oddeven\">\n <td width=\"140\">".$langs->trans("PathDirectory")."</td>\n <td>".$conf->propal->multidir_output[$conf->entity]."</td>\n</tr>\n";
630 print "</table>\n<br>";
631 
632 
633 /*
634  * Notifications
635  */
636 
637 print load_fiche_titre($langs->trans("Notifications"),'','');
638 print '<table class="noborder" width="100%">';
639 print '<tr class="liste_titre">';
640 print '<td>'.$langs->trans("Parameter").'</td>';
641 print '<td align="center" width="60"></td>';
642 print '<td width="80">&nbsp;</td>';
643 print "</tr>\n";
644 
645 print '<tr class="oddeven"><td colspan="2">';
646 print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'<br>';
647 print '</td><td align="right">';
648 print "</td></tr>\n";
649 
650 print '</table>';
651 
652 // End of page
653 llxFooter();
654 $db->close();
delDocumentModel($name, $type)
Delete document model used by doc generator.
Definition: admin.lib.php:1643
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.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
print
Draft customers invoices.
Definition: index.php:91
setEventMessages($mesg, $mesgs, $style='mesgs')
Set event messages in dol_events session object.
if(! empty($conf->facture->enabled) && $user->rights->facture->lire) if(! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire) if(! empty($conf->don->enabled) && $user->rights->societe->lire) if(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) if(! empty($conf->facture->enabled) &&! empty($conf->commande->enabled) && $user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(! empty($conf->facture->enabled) && $user->rights->facture->lire) if(! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
Definition: index.php:1053
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
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
Definition: admin.lib.php:1609
dol_print_error($db='', $error='', $errors=null)
Affiche message erreur system avec toutes les informations pour faciliter le diagnostic et la remonte...
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
if(! GETPOST('transkey', 'alphanohtml') &&! GETPOST('transphrase', 'alphanohtml')) else
View.
Definition: notice.php:43
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.
propal_admin_prepare_head()
Return array head with list of tabs to view object informations.
Definition: propal.lib.php:112
dolibarr_del_const($db, $name, $entity=1)
Effacement d&#39;une constante dans la base de donnees.
Definition: admin.lib.php:435
llxHeader()
Empty header.
Definition: wrapper.php:44
if(GETPOST('cancel', 'alpha')) if(! GETPOST( 'confirmmassaction', 'alpha') &&$massaction !='presend' &&$massaction !='confirm_presend')
Draft customers invoices.
Definition: list.php:156
pdf_getSubstitutionArray($outputlangs, $exclude=null, $object=null, $onlykey=0)
Return array of possible substitutions for PDF content (without external module substitutions).
Definition: pdf.lib.php:623
Class to manage a WYSIWYG editor.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='')
Show picto whatever it&#39;s its name (generic function)
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
dol_fiche_head($links=array(), $active='0', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='')
Show tab header of a card.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
Class to manage proposals.