30 require
'../../main.inc.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
33 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
34 require_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
37 $langs->loadLangs(array(
'admin',
'errors',
'other',
'projects'));
41 $value =
GETPOST(
'value',
'alpha');
42 $action =
GETPOST(
'action',
'aZ09');
43 $label =
GETPOST(
'label',
'alpha');
44 $scandir =
GETPOST(
'scan_dir',
'alpha');
52 include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
54 if ($action ==
'updateMask')
56 $maskconstproject =
GETPOST(
'maskconstproject',
'alpha');
57 $maskproject =
GETPOST(
'maskproject',
'alpha');
59 if ($maskconstproject) $res =
dolibarr_set_const($db, $maskconstproject, $maskproject,
'chaine', 0,
'', $conf->entity);
61 if (!($res > 0)) $error++;
71 if ($action ==
'updateMaskTask')
73 $maskconstmasktask =
GETPOST(
'maskconsttask',
'alpha');
74 $masktaskt =
GETPOST(
'masktask',
'alpha');
76 if ($maskconstmasktask) $res =
dolibarr_set_const($db, $maskconstmasktask, $masktaskt,
'chaine', 0,
'', $conf->entity);
78 if (!($res > 0)) $error++;
86 } elseif ($action ==
'specimen')
88 $modele =
GETPOST(
'module',
'alpha');
91 $project->initAsSpecimen();
94 $file =
''; $classname =
''; $filefound = 0;
95 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
96 foreach ($dirmodels as $reldir)
98 $file =
dol_buildpath($reldir.
"core/modules/project/doc/pdf_".$modele.
".modules.php", 0);
99 if (file_exists($file))
102 $classname =
"pdf_".$modele;
111 $module =
new $classname($db);
113 if ($module->write_file($project, $langs) > 0)
115 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=project&file=SPECIMEN.pdf");
123 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
125 } elseif ($action ==
'specimentask')
127 $modele =
GETPOST(
'module',
'alpha');
130 $project->initAsSpecimen();
133 $file =
''; $classname =
''; $filefound = 0;
134 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
135 foreach ($dirmodels as $reldir)
137 $file =
dol_buildpath($reldir.
"core/modules/project/task/doc/pdf_".$modele.
".modules.php", 0);
138 if (file_exists($file))
141 $classname =
"pdf_".$modele;
150 $module =
new $classname($db);
152 if ($module->write_file($project, $langs) > 0)
154 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=project_task&file=SPECIMEN.pdf");
162 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
167 elseif ($action ==
'set')
172 elseif ($action ==
'settask')
175 } elseif ($action ==
'del')
180 if ($conf->global->PROJECT_ADDON_PDF ==
"$value")
dolibarr_del_const($db,
'PROJECT_ADDON_PDF', $conf->entity);
183 if ($action ==
'deltask')
188 if ($conf->global->PROJECT_TASK_ADDON_PDF ==
"$value")
dolibarr_del_const($db,
'PROJECT_TASK_ADDON_PDF', $conf->entity);
193 elseif ($action ==
'setdoc')
203 } elseif ($action ==
'setdoctask')
205 if (
dolibarr_set_const($db,
"PROJECT_TASK_ADDON_PDF", $value,
'chaine', 0,
'', $conf->entity))
209 $conf->global->PROJECT_TASK_ADDON_PDF = $value;
218 } elseif ($action ==
'setmod')
224 } elseif ($action ==
'setmodtask')
229 dolibarr_set_const($db,
"PROJECT_TASK_ADDON", $value,
'chaine', 0,
'', $conf->entity);
230 } elseif ($action ==
'updateoptions')
232 if (
GETPOST(
'PROJECT_USE_SEARCH_TO_SELECT'))
234 $companysearch =
GETPOST(
'activate_PROJECT_USE_SEARCH_TO_SELECT',
'alpha');
235 if (
dolibarr_set_const($db,
"PROJECT_USE_SEARCH_TO_SELECT", $companysearch,
'chaine', 0,
'', $conf->entity))
237 $conf->global->PROJECT_USE_SEARCH_TO_SELECT = $companysearch;
240 if (
GETPOST(
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY'))
242 $projectToSelect =
GETPOST(
'projectToSelect',
'alpha');
243 dolibarr_set_const($db,
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY', $projectToSelect,
'chaine', 0,
'', $conf->entity);
252 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
254 llxHeader(
"", $langs->trans(
"ProjectsSetup"));
256 $form =
new Form($db);
258 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
268 $form =
new Form($db);
270 print '<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
271 print '<input type="hidden" name="token" value="'.newToken().
'">';
272 print '<input type="hidden" name="action" value="setmainoptions">';
274 print '<table class="noborder centpercent">';
275 print '<tr class="liste_titre">';
276 print "<td>".$langs->trans(
"Parameters").
"</td>\n";
277 print '<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
278 print '<td width="80"> </td></tr>'.
"\n";
280 print '<tr class="oddeven">';
281 print '<td width="80%">'.$langs->trans(
"ManageOpportunitiesStatus").
'</td>';
282 print '<td width="60" class="right">';
284 print '</td><td class="right">';
289 print '<tr class="oddeven">';
290 print '<td width="80%">'.$langs->trans(
"ManageTasks").
'</td>';
291 print '<td width="60" class="right">';
293 print '</td><td class="right">';
297 print '</table></form>';
309 print '<table class="noborder centpercent">';
310 print
'<tr class="liste_titre">';
311 print
'<td width="100">'.$langs->trans(
"Name").
'</td>';
312 print
'<td>'.$langs->trans(
"Description").
'</td>';
313 print
'<td>'.$langs->trans(
"Example").
'</td>';
314 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
'</td>';
315 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
320 foreach ($dirmodels as $reldir)
326 $handle = opendir($dir);
327 if (is_resource($handle))
329 while (($file = readdir($handle)) !==
false)
331 if (preg_match(
'/^(mod_.*)\.php$/i', $file, $reg))
334 $classname = substr($file, 4);
336 require_once $dir.$file.
'.php';
341 if ($module->version ==
'development' && $conf->global->MAIN_FEATURES_LEVEL < 2)
continue;
342 if ($module->version ==
'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1)
continue;
344 if ($module->isEnabled())
346 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
347 print $module->info();
351 print
'<td class="nowrap">';
352 $tmp = $module->getExample();
353 if (preg_match(
'/^Error/', $tmp)) {
354 $langs->load(
"errors");
355 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
356 } elseif ($tmp ==
'NotConfigured') print $langs->trans($tmp);
360 print '<td class="center">';
361 if ($conf->global->PROJECT_ADDON == 'mod_'.$classname)
363 print
img_picto($langs->trans(
"Activated"),
'switch_on');
365 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=setmod&token='.
newToken().
'&value=mod_'.$classname.
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
370 $project->initAsSpecimen();
374 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
375 $nextval = $module->getNextValue($mysoc, $project);
376 if (
"$nextval" != $langs->trans(
"NotAvailable"))
378 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
381 $htmltooltip .= $nextval.
'<br>';
383 $htmltooltip .= $langs->trans($module->error).
'<br>';
387 print
'<td class="center">';
388 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
400 print
'</table><br>';
403 if (empty($conf->global->PROJECT_HIDE_TASKS))
408 print
'<table class="noborder centpercent">';
409 print
'<tr class="liste_titre">';
410 print
'<td width="100">'.$langs->trans(
"Name").
'</td>';
411 print
'<td>'.$langs->trans(
"Description").
'</td>';
412 print
'<td>'.$langs->trans(
"Example").
'</td>';
413 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
'</td>';
414 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
419 foreach ($dirmodels as $reldir)
425 $handle = opendir($dir);
426 if (is_resource($handle))
428 while (($file = readdir($handle)) !==
false)
430 if (preg_match(
'/^(mod_.*)\.php$/i', $file, $reg))
433 $classname = substr($file, 4);
435 require_once $dir.$file.
'.php';
440 if ($module->version ==
'development' && $conf->global->MAIN_FEATURES_LEVEL < 2)
continue;
441 if ($module->version ==
'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1)
continue;
443 if ($module->isEnabled())
445 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
446 print $module->info();
450 print
'<td class="nowrap">';
451 $tmp = $module->getExample();
452 if (preg_match(
'/^Error/', $tmp)) {
453 $langs->load(
"errors");
454 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
455 } elseif ($tmp ==
'NotConfigured') print $langs->trans($tmp);
459 print '<td class="center">';
460 if ($conf->global->PROJECT_TASK_ADDON == 'mod_'.$classname)
462 print
img_picto($langs->trans(
"Activated"),
'switch_on');
464 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=setmodtask&token='.
newToken().
'&value=mod_'.$classname.
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
469 $project->initAsSpecimen();
473 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
474 $nextval = $module->getNextValue($mysoc, $project);
475 if (
"$nextval" != $langs->trans(
"NotAvailable"))
477 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
480 $htmltooltip .= $nextval.
'<br>';
482 $htmltooltip .= $langs->trans($module->error).
'<br>';
486 print
'<td class="center">';
487 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
499 print
'</table><br>';
514 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
515 $sql .=
" WHERE type = '".$db->escape($type).
"'";
516 $sql .=
" AND entity = ".$conf->entity;
518 $resql = $db->query($sql);
522 $num_rows = $db->num_rows(
$resql);
523 while ($i < $num_rows)
525 $array = $db->fetch_array(
$resql);
526 array_push($def, $array[0]);
533 print
"<table class=\"noborder\" width=\"100%\">\n";
534 print
"<tr class=\"liste_titre\">\n";
535 print
' <td width="100">'.$langs->trans(
"Name").
"</td>\n";
536 print
" <td>".$langs->trans(
"Description").
"</td>\n";
537 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
"</td>\n";
538 print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
539 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
540 print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
545 foreach ($dirmodels as $reldir)
547 foreach (array(
'',
'/doc') as $valdir)
549 $dir =
dol_buildpath($reldir.
"core/modules/project/".$valdir);
553 $handle = opendir($dir);
554 if (is_resource($handle))
556 while (($file = readdir($handle)) !==
false)
563 foreach ($filelist as $file)
565 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file))
567 if (file_exists($dir.
'/'.$file))
569 $name = substr($file, 4,
dol_strlen($file) - 16);
570 $classname = substr($file, 0,
dol_strlen($file) - 12);
572 require_once $dir.
'/'.$file;
573 $module =
new $classname($db);
575 $modulequalified = 1;
576 if ($module->version ==
'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified = 0;
577 if ($module->version ==
'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified = 0;
579 if ($modulequalified)
581 print
'<tr class="oddeven"><td width="100">';
582 print (empty($module->name) ? $name : $module->name);
584 if (method_exists($module,
'info')) print $module->info($langs);
585 else print $module->description;
589 if (in_array($name, $def))
591 print
"<td class=\"center\">\n";
592 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.$name.
'&scan_dir='.$module->scandir.
'&label='.urlencode($module->name).
'">';
593 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
597 print
"<td class=\"center\">\n";
598 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.
newToken().
'&value='.$name.
'&scan_dir='.$module->scandir.
'&label='.urlencode($module->name).
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
603 print
"<td class=\"center\">";
604 if ($conf->global->PROJECT_ADDON_PDF ==
"$name")
606 print
img_picto($langs->trans(
"Default"),
'on');
608 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setdoc&token='.
newToken().
'&value='.$name.
'&scan_dir='.$module->scandir.
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'off').
'</a>';
613 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
614 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
615 if ($module->type ==
'pdf')
617 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
619 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
620 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
622 print
'<td class="center">';
623 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
627 print
'<td class="center">';
628 if ($module->type ==
'pdf')
630 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'bill').
'</a>';
632 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
646 print
'</table><br/>';
650 if (empty($conf->global->PROJECT_HIDE_TASKS))
659 $type =
'project_task';
663 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
664 $sql .=
" WHERE type = '".$db->escape($type).
"'";
665 $sql .=
" AND entity = ".$conf->entity;
667 $resql = $db->query($sql);
671 $num_rows = $db->num_rows(
$resql);
672 while ($i < $num_rows)
674 $array = $db->fetch_array(
$resql);
675 array_push($def, $array[0]);
682 print
"<table class=\"noborder\" width=\"100%\">\n";
683 print
"<tr class=\"liste_titre\">\n";
684 print
' <td width="100">'.$langs->trans(
"Name").
"</td>\n";
685 print
" <td>".$langs->trans(
"Description").
"</td>\n";
686 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
"</td>\n";
687 print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
688 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
689 print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
694 foreach ($dirmodels as $reldir)
696 foreach (array(
'',
'/doc') as $valdir)
698 $dir =
dol_buildpath($reldir.
"core/modules/project/task/".$valdir);
702 $handle = opendir($dir);
703 if (is_resource($handle))
705 while (($file = readdir($handle)) !==
false)
712 foreach ($filelist as $file)
714 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file))
716 if (file_exists($dir.
'/'.$file))
718 $name = substr($file, 4,
dol_strlen($file) - 16);
719 $classname = substr($file, 0,
dol_strlen($file) - 12);
721 require_once $dir.
'/'.$file;
722 $module =
new $classname($db);
724 $modulequalified = 1;
725 if ($module->version ==
'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified = 0;
726 if ($module->version ==
'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified = 0;
728 if ($modulequalified)
730 print
'<tr class="oddeven"><td width="100">';
731 print (empty($module->name) ? $name : $module->name);
733 if (method_exists($module,
'info')) print $module->info($langs);
734 else print $module->description;
738 if (in_array($name, $def))
740 print
"<td class=\"center\">\n";
741 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=deltask&value='.$name.
'&scan_dir='.$module->scandir.
'&label='.urlencode($module->name).
'">';
742 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
746 print
"<td class=\"center\">\n";
747 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=settask&token='.
newToken().
'&value='.$name.
'&scan_dir='.$module->scandir.
'&label='.urlencode($module->name).
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
752 print
"<td class=\"center\">";
753 if ($conf->global->PROJECT_TASK_ADDON_PDF ==
"$name")
755 print
img_picto($langs->trans(
"Default"),
'on');
757 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setdoctask&token='.
newToken().
'&value='.$name.
'&scan_dir='.$module->scandir.
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'off').
'</a>';
762 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
763 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
764 if ($module->type ==
'pdf')
766 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
768 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
769 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
771 print
'<td class="center">';
772 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
776 print
'<td class="center">';
777 if ($module->type ==
'pdf')
779 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimentask&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'bill').
'</a>';
781 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
794 print
'</table><br/>';
801 $form =
new Form($db);
803 print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
804 print
'<input type="hidden" name="token" value="'.newToken().
'">';
805 print
'<input type="hidden" name="action" value="updateoptions">';
807 print
'<table class="noborder centpercent">';
808 print
'<tr class="liste_titre">';
809 print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
810 print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
811 print
'<td width="80"> </td></tr>'.
"\n";
813 print
'<tr class="oddeven">';
814 print
'<td width="80%">'.$langs->trans(
"UseSearchToSelectProject").
'</td>';
815 if (!$conf->use_javascript_ajax)
817 print
'<td class="nowrap right" colspan="2">';
818 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
821 print
'<td width="60" class="right">';
822 $arrval = array(
'0'=>$langs->trans(
"No"),
823 '1'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
824 '2'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
825 '3'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
827 print $form->selectarray(
"activate_PROJECT_USE_SEARCH_TO_SELECT", $arrval, $conf->global->PROJECT_USE_SEARCH_TO_SELECT);
828 print
'</td><td class="right">';
829 print
'<input type="submit" class="button" name="PROJECT_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
834 print
'<tr class="oddeven">';
835 print
'<td>'.$langs->trans(
"AllowToSelectProjectFromOtherCompany").
'</td>';
837 print
'<td class="right" width="60" colspan="2">';
838 print
'<input type="text" id="projectToSelect" name="projectToSelect" value="'.$conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.
'"/> ';
839 print $form->textwithpicto(
'', $langs->trans(
'AllowToLinkFromOtherCompany'));
840 print
'<input type="submit" class="button" name="PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY" value="'.$langs->trans(
"Modify").
'">';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
delDocumentModel($name, $type)
Delete document model used by doc generator.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
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).
addDocumentModel($name, $type, $label= '', $description= '')
Add document model used by doc generator.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
Class to manage projects.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
dol_strlen($string, $stringencoding= 'UTF-8')
Make a strlen call.
dolibarr_del_const($db, $name, $entity=1)
Effacement d'une constante dans la base de donnees.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0, $strict=0, $forcereload=0, $marginleftonlyshort=2, $forcenoajax=0)
On/off button for constant.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
if(!GETPOST('transkey', 'alphanohtml')&&!GETPOST('transphrase', 'alphanohtml')) else
View.
img_object($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->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)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
newToken()
Return the value of token currently saved into session with name 'newtoken'.
print $_SERVER["PHP_SELF"] n
Edit parameters.
project_admin_prepare_head()
Prepare array with list of tabs.
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.