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