31 require
'../../main.inc.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
34 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
35 require_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
38 $langs->loadLangs(array(
'admin',
'errors',
'other',
'projects'));
44 $value =
GETPOST(
'value',
'alpha');
45 $action =
GETPOST(
'action',
'aZ09');
46 $label =
GETPOST(
'label',
'alpha');
47 $scandir =
GETPOST(
'scan_dir',
'alpha');
55 include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
57 if ($action ==
'updateMask') {
58 $maskconstproject =
GETPOST(
'maskconstproject',
'aZ09');
59 $maskproject =
GETPOST(
'maskproject',
'alpha');
61 if ($maskconstproject && preg_match(
'/_MASK$/', $maskconstproject)) {
62 $res =
dolibarr_set_const($db, $maskconstproject, $maskproject,
'chaine', 0,
'', $conf->entity);
76 if ($action ==
'updateMaskTask') {
77 $maskconstmasktask =
GETPOST(
'maskconsttask',
'aZ09');
78 $masktaskt =
GETPOST(
'masktask',
'alpha');
80 if ($maskconstmasktask && preg_match(
'/_MASK$/', $maskconstmasktask)) {
81 $res =
dolibarr_set_const($db, $maskconstmasktask, $masktaskt,
'chaine', 0,
'', $conf->entity);
93 } elseif ($action ==
'specimen') {
94 $modele =
GETPOST(
'module',
'alpha');
97 $project->initAsSpecimen();
100 $file =
''; $classname =
''; $filefound = 0;
101 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
102 foreach ($dirmodels as $reldir) {
103 $file =
dol_buildpath($reldir.
"core/modules/project/doc/pdf_".$modele.
".modules.php", 0);
104 if (file_exists($file)) {
106 $classname =
"pdf_".$modele;
114 $module =
new $classname($db);
116 if ($module->write_file($project, $langs) > 0) {
117 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=project&file=SPECIMEN.pdf");
125 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
127 } elseif ($action ==
'specimentask') {
128 $modele =
GETPOST(
'module',
'alpha');
131 $project->initAsSpecimen();
134 $file =
''; $classname =
''; $filefound = 0;
135 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
136 foreach ($dirmodels as $reldir) {
137 $file =
dol_buildpath($reldir.
"core/modules/project/task/doc/pdf_".$modele.
".modules.php", 0);
138 if (file_exists($file)) {
140 $classname =
"pdf_".$modele;
148 $module =
new $classname($db);
150 if ($module->write_file($project, $langs) > 0) {
151 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=project_task&file=SPECIMEN.pdf");
159 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
161 } elseif ($action ==
'set') {
164 } elseif ($action ==
'settask') {
167 } elseif ($action ==
'del') {
170 if ($conf->global->PROJECT_ADDON_PDF ==
"$value") {
174 } elseif ($action ==
'deltask') {
177 if ($conf->global->PROJECT_TASK_ADDON_PDF ==
"$value") {
181 } elseif ($action ==
'setdoc') {
190 } elseif ($action ==
'setdoctask') {
191 if (
dolibarr_set_const($db,
"PROJECT_TASK_ADDON_PDF", $value,
'chaine', 0,
'', $conf->entity)) {
194 $conf->global->PROJECT_TASK_ADDON_PDF = $value;
202 } elseif ($action ==
'setmod') {
207 } elseif ($action ==
'setmodtask') {
211 dolibarr_set_const($db,
"PROJECT_TASK_ADDON", $value,
'chaine', 0,
'', $conf->entity);
212 } elseif ($action ==
'updateoptions') {
213 if (
GETPOST(
'PROJECT_USE_SEARCH_TO_SELECT')) {
214 $companysearch =
GETPOST(
'activate_PROJECT_USE_SEARCH_TO_SELECT',
'alpha');
215 if (
dolibarr_set_const($db,
"PROJECT_USE_SEARCH_TO_SELECT", $companysearch,
'chaine', 0,
'', $conf->entity)) {
216 $conf->global->PROJECT_USE_SEARCH_TO_SELECT = $companysearch;
219 if (
GETPOST(
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY')) {
220 $projectToSelect =
GETPOST(
'projectToSelect',
'alpha');
221 dolibarr_set_const($db,
'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY', $projectToSelect,
'chaine', 0,
'', $conf->entity);
223 if (
GETPOST(
'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS')) {
224 $timesheetFreezeDuration =
GETPOST(
'timesheetFreezeDuration',
'alpha');
225 dolibarr_set_const($db,
'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS', intval($timesheetFreezeDuration),
'chaine', 0,
'', $conf->entity);
227 } elseif (preg_match(
'/^(set|del)_?([A-Z_]+)$/', $action, $reg)) {
229 if (!
dolibarr_set_const($db, $reg[2], ($reg[1] ===
'set' ?
'1' :
'0'),
'chaine', 0,
'', $conf->entity) > 0) {
238 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
240 llxHeader(
"", $langs->trans(
"ProjectsSetup"));
244 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
245 print
load_fiche_titre($langs->trans(
"ProjectsSetup"), $linkback,
'title_setup');
256 print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
257 print
'<input type="hidden" name="token" value="'.newToken().
'">';
258 print
'<input type="hidden" name="action" value="setmainoptions">';
260 print
'<table class="noborder centpercent">';
261 print
'<tr class="liste_titre">';
262 print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
263 print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
264 print
'<td width="80"> </td></tr>'.
"\n";
266 print
'<tr class="oddeven">';
267 print
'<td width="80%">'.$langs->trans(
"ManageOpportunitiesStatus").
'</td>';
268 print
'<td width="60" class="right">';
270 print
'</td><td class="right">';
275 print
'<tr class="oddeven">';
276 print
'<td width="80%">'.$langs->trans(
"ManageTasks").
'</td>';
277 print
'<td width="60" class="right">';
279 print
'</td><td class="right">';
283 print
'</table></form>';
295 print
'<table class="noborder centpercent">';
296 print
'<tr class="liste_titre">';
297 print
'<td width="100">'.$langs->trans(
"Name").
'</td>';
298 print
'<td>'.$langs->trans(
"Description").
'</td>';
299 print
'<td>'.$langs->trans(
"Example").
'</td>';
300 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
'</td>';
301 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
306 foreach ($dirmodels as $reldir) {
310 $handle = opendir($dir);
311 if (is_resource($handle)) {
312 while (($file = readdir($handle)) !==
false) {
313 if (preg_match(
'/^(mod_.*)\.php$/i', $file, $reg)) {
315 $classname = substr($file, 4);
317 require_once $dir.$file.
'.php';
322 if ($module->version ==
'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
325 if ($module->version ==
'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
329 if ($module->isEnabled()) {
330 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
331 print $module->info();
335 print
'<td class="nowrap">';
336 $tmp = $module->getExample();
337 if (preg_match(
'/^Error/', $tmp)) {
338 $langs->load(
"errors");
339 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
340 } elseif ($tmp ==
'NotConfigured') {
341 print $langs->trans($tmp);
347 print
'<td class="center">';
348 if ($conf->global->PROJECT_ADDON ==
'mod_'.$classname) {
349 print
img_picto($langs->trans(
"Activated"),
'switch_on');
351 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>';
356 $project->initAsSpecimen();
360 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
361 $nextval = $module->getNextValue($mysoc, $project);
362 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
363 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
365 $htmltooltip .= $nextval.
'<br>';
367 $htmltooltip .= $langs->trans($module->error).
'<br>';
371 print
'<td class="center">';
372 print
$form->textwithpicto(
'', $htmltooltip, 1, 0);
384 print
'</table><br>';
387 if (empty($conf->global->PROJECT_HIDE_TASKS)) {
391 print
'<table class="noborder centpercent">';
392 print
'<tr class="liste_titre">';
393 print
'<td width="100">'.$langs->trans(
"Name").
'</td>';
394 print
'<td>'.$langs->trans(
"Description").
'</td>';
395 print
'<td>'.$langs->trans(
"Example").
'</td>';
396 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
'</td>';
397 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
402 foreach ($dirmodels as $reldir) {
406 $handle = opendir($dir);
407 if (is_resource($handle)) {
408 while (($file = readdir($handle)) !==
false) {
409 if (preg_match(
'/^(mod_.*)\.php$/i', $file, $reg)) {
411 $classname = substr($file, 4);
413 require_once $dir.$file.
'.php';
418 if ($module->version ==
'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
421 if ($module->version ==
'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
425 if ($module->isEnabled()) {
426 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
427 print $module->info();
431 print
'<td class="nowrap">';
432 $tmp = $module->getExample();
433 if (preg_match(
'/^Error/', $tmp)) {
434 $langs->load(
"errors");
435 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
436 } elseif ($tmp ==
'NotConfigured') {
437 print $langs->trans($tmp);
443 print
'<td class="center">';
444 if ($conf->global->PROJECT_TASK_ADDON ==
'mod_'.$classname) {
445 print
img_picto($langs->trans(
"Activated"),
'switch_on');
447 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>';
452 $project->initAsSpecimen();
456 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
457 $nextval = $module->getNextValue($mysoc, $project);
458 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
459 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
461 $htmltooltip .= $nextval.
'<br>';
463 $htmltooltip .= $langs->trans($module->error).
'<br>';
467 print
'<td class="center">';
468 print
$form->textwithpicto(
'', $htmltooltip, 1, 0);
480 print
'</table><br>';
495 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
496 $sql .=
" WHERE type = '".$db->escape($type).
"'";
497 $sql .=
" AND entity = ".$conf->entity;
499 $resql = $db->query($sql);
502 $num_rows = $db->num_rows(
$resql);
503 while ($i < $num_rows) {
504 $array = $db->fetch_array(
$resql);
505 array_push($def, $array[0]);
512 print
"<table class=\"noborder\" width=\"100%\">\n";
513 print
"<tr class=\"liste_titre\">\n";
514 print
' <td width="100">'.$langs->trans(
"Name").
"</td>\n";
515 print
" <td>".$langs->trans(
"Description").
"</td>\n";
516 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
"</td>\n";
517 print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
518 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
519 print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
524 foreach ($dirmodels as $reldir) {
525 foreach (array(
'',
'/doc') as $valdir) {
526 $dir =
dol_buildpath($reldir.
"core/modules/project/".$valdir);
529 $handle = opendir($dir);
530 if (is_resource($handle)) {
531 while (($file = readdir($handle)) !==
false) {
537 foreach ($filelist as $file) {
538 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
539 if (file_exists($dir.
'/'.$file)) {
540 $name = substr($file, 4,
dol_strlen($file) - 16);
541 $classname = substr($file, 0,
dol_strlen($file) - 12);
543 require_once $dir.
'/'.$file;
544 $module =
new $classname($db);
546 $modulequalified = 1;
547 if ($module->version ==
'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
548 $modulequalified = 0;
550 if ($module->version ==
'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
551 $modulequalified = 0;
554 if ($modulequalified) {
555 print
'<tr class="oddeven"><td width="100">';
556 print (empty($module->name) ? $name : $module->name);
558 if (method_exists($module,
'info')) {
559 print $module->info($langs);
561 print $module->description;
566 if (in_array($name, $def)) {
567 print
"<td class=\"center\">\n";
568 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">';
569 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
573 print
"<td class=\"center\">\n";
574 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.
newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
579 print
"<td class=\"center\">";
580 if ($conf->global->PROJECT_ADDON_PDF ==
"$name") {
581 print
img_picto($langs->trans(
"Default"),
'on');
583 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setdoc&token='.
newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'off').
'</a>';
588 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
589 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
590 if ($module->type ==
'pdf') {
591 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
593 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
594 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
596 print
'<td class="center">';
597 print
$form->textwithpicto(
'', $htmltooltip, 1, 0);
601 print
'<td class="center">';
602 if ($module->type ==
'pdf') {
603 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'bill').
'</a>';
605 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
619 print
'</table><br>';
623 if (empty($conf->global->PROJECT_HIDE_TASKS)) {
631 $type =
'project_task';
635 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
636 $sql .=
" WHERE type = '".$db->escape($type).
"'";
637 $sql .=
" AND entity = ".$conf->entity;
639 $resql = $db->query($sql);
642 $num_rows = $db->num_rows(
$resql);
643 while ($i < $num_rows) {
644 $array = $db->fetch_array(
$resql);
645 array_push($def, $array[0]);
652 print
"<table class=\"noborder\" width=\"100%\">\n";
653 print
"<tr class=\"liste_titre\">\n";
654 print
' <td width="100">'.$langs->trans(
"Name").
"</td>\n";
655 print
" <td>".$langs->trans(
"Description").
"</td>\n";
656 print
'<td class="center" width="60">'.$langs->trans(
"Activated").
"</td>\n";
657 print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
658 print
'<td class="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
659 print
'<td class="center" width="80">'.$langs->trans(
"Preview").
'</td>';
664 foreach ($dirmodels as $reldir) {
665 foreach (array(
'',
'/doc') as $valdir) {
666 $dir =
dol_buildpath($reldir.
"core/modules/project/task/".$valdir);
669 $handle = opendir($dir);
670 if (is_resource($handle)) {
671 while (($file = readdir($handle)) !==
false) {
677 foreach ($filelist as $file) {
678 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
679 if (file_exists($dir.
'/'.$file)) {
680 $name = substr($file, 4,
dol_strlen($file) - 16);
681 $classname = substr($file, 0,
dol_strlen($file) - 12);
683 require_once $dir.
'/'.$file;
684 $module =
new $classname($db);
686 $modulequalified = 1;
687 if ($module->version ==
'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
688 $modulequalified = 0;
690 if ($module->version ==
'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
691 $modulequalified = 0;
694 if ($modulequalified) {
695 print
'<tr class="oddeven"><td width="100">';
696 print (empty($module->name) ? $name : $module->name);
698 if (method_exists($module,
'info')) {
699 print $module->info($langs);
701 print $module->description;
706 if (in_array($name, $def)) {
707 print
"<td class=\"center\">\n";
708 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=deltask&token='.
newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">';
709 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
713 print
"<td class=\"center\">\n";
714 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=settask&token='.
newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
719 print
"<td class=\"center\">";
720 if ($conf->global->PROJECT_TASK_ADDON_PDF ==
"$name") {
721 print
img_picto($langs->trans(
"Default"),
'on');
723 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setdoctask&token='.
newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'off').
'</a>';
728 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
729 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
730 if ($module->type ==
'pdf') {
731 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
733 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
734 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
736 print
'<td class="center">';
737 print
$form->textwithpicto(
'', $htmltooltip, 1, 0);
741 print
'<td class="center">';
742 if ($module->type ==
'pdf') {
743 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimentask&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'bill').
'</a>';
745 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
758 print
'</table><br>';
767 print
'<form method="POST" action="'.$_SERVER[
'PHP_SELF'].
'">';
768 print
'<input type="hidden" name="token" value="'.newToken().
'">';
769 print
'<input type="hidden" name="action" value="updateoptions">';
770 print
'<input type="hidden" name="page_y" value="">';
772 print
'<table class="noborder centpercent">';
773 print
'<tr class="liste_titre">';
774 print
"<td>".$langs->trans(
"Parameters").
"</td>\n";
775 print
'<td class="right" width="60">'.$langs->trans(
"Value").
'</td>'.
"\n";
776 print
'<td width="80"> </td></tr>'.
"\n";
778 print
'<tr class="oddeven">';
779 print
'<td width="80%">'.$langs->trans(
"UseSearchToSelectProject").
'</td>';
780 if (!$conf->use_javascript_ajax) {
781 print
'<td class="nowrap right" colspan="2">';
782 print $langs->trans(
"NotAvailableWhenAjaxDisabled");
785 print
'<td width="60" class="right">';
786 $arrval = array(
'0'=>$langs->trans(
"No"),
787 '1'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 1).
')',
788 '2'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 2).
')',
789 '3'=>$langs->trans(
"Yes").
' ('.$langs->trans(
"NumberOfKeyToSearch", 3).
')',
791 print
$form->selectarray(
"activate_PROJECT_USE_SEARCH_TO_SELECT", $arrval, $conf->global->PROJECT_USE_SEARCH_TO_SELECT);
792 print
'</td><td class="right">';
793 print
'<input type="submit" class="button small reposition" name="PROJECT_USE_SEARCH_TO_SELECT" value="'.$langs->trans(
"Modify").
'">';
798 print
'<tr class="oddeven">';
799 print
'<td>'.$langs->trans(
"AllowToSelectProjectFromOtherCompany").
'</td>';
801 print
'<td class="right" width="60" colspan="2">';
802 print
'<input type="text" id="projectToSelect" name="projectToSelect" value="'.$conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.
'"/> ';
803 print
$form->textwithpicto(
'', $langs->trans(
'AllowToLinkFromOtherCompany'));
804 print
'<input type="submit" class="button small reposition" name="PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY" value="'.$langs->trans(
"Modify").
'">';
808 $key =
'PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE';
809 echo
'<tr class="oddeven">',
811 $form->textwithpicto($langs->transnoentities($key), $langs->transnoentities($key .
'_help')),
813 '<td class="right" colspan="2">',
818 print
'<tr class="oddeven">';
819 print
'<td>'.$langs->trans(
"TimesheetPreventAfterFollowingMonths").
'</td>';
821 print
'<td class="right" width="60" colspan="2">';
822 print
'<input type="number" class="width50" id="timesheetFreezeDuration" name="timesheetFreezeDuration" min="0" step="1" value="'.$conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS.
'"/> ';
823 print
'<input type="submit" class="button small reposition" name="PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS" value="'.$langs->trans(
"Modify").
'">';
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
delDocumentModel($name, $type)
Delete document model used by doc generator.
ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0, $strict=0, $forcereload=0, $marginleftonlyshort=2, $forcenoajax=0, $setzeroinsteadofdel=0, $suffix='', $mode='', $morecss='')
On/off button for constant.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage projects.
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
project_admin_prepare_head()
Prepare array with list of tabs.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.