27 require
"../../main.inc.php";
28 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
29 require_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/class/extrafields.class.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
34 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
35 require_once DOL_DOCUMENT_ROOT.
'/core/modules/project/task/modules_task.php';
38 $langs->loadlangs(array(
'projects',
'companies'));
40 $action =
GETPOST(
'action',
'aZ09');
41 $confirm =
GETPOST(
'confirm',
'alpha');
44 $ref =
GETPOST(
"ref",
'alpha', 1);
45 $taskref =
GETPOST(
"taskref",
'alpha');
46 $withproject =
GETPOST(
'withproject',
'int');
47 $project_ref =
GETPOST(
'project_ref',
'alpha');
48 $planned_workload = ((
GETPOST(
'planned_workloadhour',
'int') !=
'' ||
GETPOST(
'planned_workloadmin',
'int') !=
'') ? (
GETPOST(
'planned_workloadhour',
'int') > 0 ?
GETPOST(
'planned_workloadhour',
'int') * 3600 : 0) + (
GETPOST(
'planned_workloadmin',
'int') > 0 ?
GETPOST(
'planned_workloadmin',
'int') * 60 : 0) :
'');
51 $hookmanager->initHooks(array(
'projecttaskcard',
'globalcard'));
53 $object =
new Task($db);
55 $projectstatic =
new Project($db);
58 $extrafields->fetch_name_optionals_label($object->table_element);
60 $parameters = array(
'id'=>$id);
61 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
66 if ($id > 0 || $ref) {
67 $object->fetch($id, $ref);
73 restrictedArea($user,
'projet', $object->fk_project,
'projet&project');
81 if ($action ==
'update' && !
GETPOST(
"cancel") && $user->rights->projet->creer) {
84 if (empty($taskref)) {
86 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Ref")), null,
'errors');
90 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Label")), null,
'errors');
93 $object->oldcopy = clone $object;
95 $tmparray = explode(
'_',
GETPOST(
'task_parent'));
96 $task_parent = $tmparray[1];
97 if (empty($task_parent)) {
101 $object->ref = $taskref ? $taskref :
GETPOST(
"ref",
'alpha', 2);
102 $object->label =
GETPOST(
"label",
"alphanohtml");
103 if (empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) $object->description =
GETPOST(
'description',
"alphanohtml");
104 else $object->description =
GETPOST(
'description',
"restricthtml");
105 $object->fk_task_parent = $task_parent;
106 $object->planned_workload = $planned_workload;
107 $object->date_start =
dol_mktime(
GETPOST(
'dateohour',
'int'),
GETPOST(
'dateomin',
'int'), 0,
GETPOST(
'dateomonth',
'int'),
GETPOST(
'dateoday',
'int'),
GETPOST(
'dateoyear',
'int'));
108 $object->date_end =
dol_mktime(
GETPOST(
'dateehour',
'int'),
GETPOST(
'dateemin',
'int'), 0,
GETPOST(
'dateemonth',
'int'),
GETPOST(
'dateeday',
'int'),
GETPOST(
'dateeyear',
'int'));
110 $object->budget_amount =
price2num(
GETPOST(
'budget_amount',
'alphanohtml'));
113 $ret = $extrafields->setOptionalsFromPost(null, $object,
'@GETPOSTISSET');
119 $result = $object->update($user);
132 if ($action ==
'confirm_delete' && $confirm ==
"yes" && $user->rights->projet->supprimer) {
133 $result = $projectstatic->fetch($object->fk_project);
134 $projectstatic->fetch_thirdparty();
136 if ($object->delete($user) > 0) {
137 header(
'Location: '.DOL_URL_ROOT.
'/projet/tasks.php?restore_lastsearch_values=1&id='.$projectstatic->id.($withproject ?
'&withproject=1' :
''));
146 if (!empty($project_ref) && !empty($withproject)) {
147 if ($projectstatic->fetch(
'', $project_ref) > 0) {
148 $tasksarray = $object->getTasksArray(0, 0, $projectstatic->id, $socid, 0);
149 if (count($tasksarray) > 0) {
150 $id = $tasksarray[0]->id;
152 header(
"Location: ".DOL_URL_ROOT.
'/projet/tasks.php?id='.$projectstatic->id.(empty($mode) ?
'' :
'&mode='.$mode));
158 if ($action ==
'builddoc' && $user->rights->projet->creer) {
161 $object->setDocModel($user,
GETPOST(
'model',
'alpha'));
164 $outputlangs = $langs;
165 if (
GETPOST(
'lang_id',
'aZ09')) {
167 $outputlangs->setDefaultLang(
GETPOST(
'lang_id',
'aZ09'));
169 $result = $object->generateDocument($object->model_pdf, $outputlangs);
177 if ($action ==
'remove_file' && $user->rights->projet->creer) {
178 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
180 $langs->load(
"other");
181 $upload_dir = $conf->project->dir_output;
203 if ($id > 0 || !empty($ref)) {
204 $res = $object->fetch_optionals();
205 if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_TASK) && method_exists($object,
'fetchComments') && empty($object->comments)) {
206 $object->fetchComments();
209 $result = $projectstatic->fetch($object->fk_project);
210 if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($projectstatic,
'fetchComments') && empty($projectstatic->comments)) {
211 $projectstatic->fetchComments();
213 if (!empty($projectstatic->socid)) {
214 $projectstatic->fetch_thirdparty();
217 $object->project = clone $projectstatic;
221 if (!empty($withproject)) {
225 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($projectstatic->public ?
'projectpub' :
'project'), 0,
'',
'');
227 $param = ($mode ==
'mine' ?
'&mode=mine' :
'');
231 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
233 $morehtmlref =
'<div class="refidno">';
235 $morehtmlref .= $projectstatic->title;
237 if (!empty($projectstatic->thirdparty->id) &&$projectstatic->thirdparty->id > 0) {
238 $morehtmlref .=
'<br>'.$langs->trans(
'ThirdParty').
' : '.$projectstatic->thirdparty->getNomUrl(1,
'project');
240 $morehtmlref .=
'</div>';
243 if (empty($user->rights->projet->all->lire)) {
244 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
245 $projectstatic->next_prev_filter =
" rowid IN (".$db->sanitize(count($objectsListId) ?join(
',', array_keys($objectsListId)) :
'0').
")";
248 dol_banner_tab($projectstatic,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $param);
250 print
'<div class="fichecenter">';
251 print
'<div class="fichehalfleft">';
252 print
'<div class="underbanner clearboth"></div>';
254 print
'<table class="border tableforfield centpercent">';
257 if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES) || empty($conf->global->PROJECT_HIDE_TASKS) ||
isModEnabled(
'eventorganization')) {
258 print
'<tr><td class="tdtop">';
259 print $langs->trans(
"Usage");
262 if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
263 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
264 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
265 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
268 if (empty($conf->global->PROJECT_HIDE_TASKS)) {
269 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_task ?
' checked="checked"' :
'')).
'"> ';
270 $htmltext = $langs->trans(
"ProjectFollowTasks");
271 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
274 if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
275 print
'<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET(
'usage_bill_time') ? (
GETPOST(
'usage_bill_time',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_bill_time ?
' checked="checked"' :
'')).
'"> ';
276 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
277 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
281 print
'<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET(
'usage_organize_event') ? (
GETPOST(
'usage_organize_event',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_organize_event ?
' checked="checked"' :
'')).
'"> ';
282 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
283 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
289 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
290 if ($projectstatic->public) {
291 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
292 print $langs->trans(
'SharedProject');
294 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
295 print $langs->trans(
'PrivateProject');
300 print
'<tr><td>'.$langs->trans(
"DateStart").
' - '.$langs->trans(
"DateEnd").
'</td><td>';
302 print ($start ? $start :
'?');
305 print ($end ? $end :
'?');
306 if ($projectstatic->hasDelay()) {
312 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
313 if (strcmp($projectstatic->budget_amount,
'')) {
314 print
'<span class="amount">'.price($projectstatic->budget_amount,
'', $langs, 1, 0, 0, $conf->currency).
'</span>';
326 print
'<div class="fichehalfright">';
327 print
'<div class="underbanner clearboth"></div>';
329 print
'<table class="border tableforfield centpercent">';
332 print
'<td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td>';
333 print nl2br($projectstatic->description);
338 print
'<tr><td class="valignmiddle">'.$langs->trans(
"Categories").
'</td><td>';
339 print $form->showCategories($projectstatic->id,
'project', 1);
348 print
'<div class="clearboth"></div>';
385 if ($action ==
'edit' && $user->rights->projet->creer) {
386 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
387 print
'<input type="hidden" name="token" value="'.newToken().
'">';
388 print
'<input type="hidden" name="action" value="update">';
389 print
'<input type="hidden" name="withproject" value="'.$withproject.
'">';
390 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
392 print
dol_get_fiche_head($head,
'task_task', $langs->trans(
"Task"), 0,
'projecttask', 0,
'',
'');
394 print
'<table class="border centpercent">';
397 print
'<tr><td class="titlefield fieldrequired">'.$langs->trans(
"Ref").
'</td>';
398 print
'<td><input class="minwidth100" name="taskref" value="'.$object->ref.
'"></td></tr>';
401 print
'<tr><td class="fieldrequired">'.$langs->trans(
"Label").
'</td>';
402 print
'<td><input class="minwidth500" name="label" value="'.$object->label.
'"></td></tr>';
405 if (empty($withproject)) {
406 print
'<tr><td>'.$langs->trans(
"Project").
'</td><td colspan="3">';
407 print $projectstatic->getNomUrl(1);
411 print
'<td>'.$langs->trans(
"ThirdParty").
'</td><td colspan="3">';
412 if ($projectstatic->thirdparty->id) {
413 print $projectstatic->thirdparty->getNomUrl(1);
421 print
'<tr><td>'.$langs->trans(
"ChildOfProjectTask").
'</td><td>';
422 print $formother->selectProjectTasks($object->fk_task_parent, $projectstatic->id,
'task_parent', ($user->admin ? 0 : 1), 0, 0, 0, $object->id);
426 print
'<tr><td>'.$langs->trans(
"DateStart").
'</td><td>';
427 print $form->selectDate($object->date_start,
'dateo', 1, 1, 0,
'', 1, 0);
431 print
'<tr><td>'.$langs->trans(
"Deadline").
'</td><td>';
432 print $form->selectDate($object->date_end ? $object->date_end : -1,
'datee', 1, 1, 0,
'', 1, 0);
436 print
'<tr><td>'.$langs->trans(
"PlannedWorkload").
'</td><td>';
437 print $form->select_duration(
'planned_workload', $object->planned_workload, 0,
'text');
441 print
'<tr><td>'.$langs->trans(
"ProgressDeclared").
'</td><td>';
442 print $formother->select_percent($object->progress,
'progress', 0, 5, 0, 100, 1);
446 print
'<tr><td class="tdtop">'.$langs->trans(
"Description").
'</td>';
449 if (empty($conf->global->FCKEDITOR_ENABLE_SOCIETE)) {
450 print
'<textarea name="description" class="quatrevingtpercent" rows="'.ROWS_4.
'">'.$object->description.
'</textarea>';
453 include_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
454 $cked_enabled = (!empty($conf->global->FCKEDITOR_ENABLE_DETAILS) ? $conf->global->FCKEDITOR_ENABLE_DETAILS : 0);
455 if (!empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) {
456 $nbrows = $conf->global->MAIN_INPUT_DESC_HEIGHT;
458 $doleditor =
new DolEditor(
'description', $object->description,
'', 80,
'dolibarr_details',
'',
false,
true, $cked_enabled, $nbrows);
459 print $doleditor->Create();
463 print
'<tr><td>'.$langs->trans(
"Budget").
'</td>';
464 print
'<td><input size="5" type="text" name="budget_amount" value="'.dol_escape_htmltag(
GETPOSTISSET(
'budget_amount') ?
GETPOST(
'budget_amount') :
price2num($object->budget_amount)).
'"></td>';
468 $parameters = array();
469 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $object, $action);
470 print $hookmanager->resPrint;
471 if (empty($reshook)) {
472 print $object->showOptionals($extrafields,
'edit');
479 print $form->buttonsSaveCancel(
"Modify");
486 $param = ($withproject ?
'&withproject=1' :
'');
487 $linkback = $withproject ?
'<a href="'.DOL_URL_ROOT.
'/projet/tasks.php?id='.$projectstatic->id.
'&restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>' :
'';
489 print
dol_get_fiche_head($head,
'task_task', $langs->trans(
"Task"), -1,
'projecttask', 0,
'',
'reposition');
491 if ($action ==
'delete') {
492 print $form->formconfirm($_SERVER[
"PHP_SELF"].
"?id=".
GETPOST(
"id",
'int').
'&withproject='.$withproject, $langs->trans(
"DeleteATask"), $langs->trans(
"ConfirmDeleteATask"),
"confirm_delete");
495 if (!
GETPOST(
'withproject') || empty($projectstatic->id)) {
496 $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
497 $object->next_prev_filter =
" fk_projet IN (".$db->sanitize($projectsListId).
")";
499 $object->next_prev_filter =
" fk_projet = ".((int) $projectstatic->id);
505 if (empty($withproject)) {
506 $morehtmlref .=
'<div class="refidno">';
507 $morehtmlref .= $langs->trans(
"Project").
': ';
508 $morehtmlref .= $projectstatic->getNomUrl(1);
509 $morehtmlref .=
'<br>';
512 $morehtmlref .= $langs->trans(
"ThirdParty").
': ';
513 if (!empty($projectstatic->thirdparty) && is_object($projectstatic->thirdparty)) {
514 $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1);
516 $morehtmlref .=
'</div>';
519 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $param);
521 print
'<div class="fichecenter">';
522 print
'<div class="fichehalfleft">';
524 print
'<div class="underbanner clearboth"></div>';
525 print
'<table class="border centpercent tableforfield">';
528 print
'<tr><td>'.$langs->trans(
"ChildOfTask").
'</td><td>';
529 if ($object->fk_task_parent > 0) {
530 $tasktmp =
new Task($db);
531 $tasktmp->fetch($object->fk_task_parent);
532 print $tasktmp->getNomUrl(1);
537 print
'<tr><td class="titlefield">'.$langs->trans(
"DateStart").
' - '.$langs->trans(
"Deadline").
'</td><td colspan="3">';
539 print ($start ? $start :
'?');
542 print ($end ? $end :
'?');
543 if ($object->hasDelay()) {
549 print
'<tr><td>'.$langs->trans(
"PlannedWorkload").
'</td><td colspan="3">';
550 if ($object->planned_workload !=
'') {
556 print
'<td class="tdtop">'.$langs->trans(
"Description").
'</td><td colspan="3">';
563 print
'<div class="fichehalfright">';
565 print
'<div class="underbanner clearboth"></div>';
566 print
'<table class="border centpercent tableforfield">';
569 print
'<tr><td class="titlefield">'.$langs->trans(
"ProgressDeclared").
'</td><td colspan="3">';
570 if ($object->progress !=
'') {
571 print $object->progress.
' %';
576 print
'<tr><td>'.$langs->trans(
"ProgressCalculated").
'</td><td colspan="3">';
577 if ($object->planned_workload !=
'') {
578 $tmparray = $object->getSummaryOfTimeSpent();
579 if ($tmparray[
'total_duration'] > 0 && !empty($object->planned_workload)) {
580 print round($tmparray[
'total_duration'] / $object->planned_workload * 100, 2).
' %';
585 print
'<span class="opacitymedium">'.$langs->trans(
"WorkloadNotDefined").
'</span>';
590 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
591 if (strcmp($object->budget_amount,
'')) {
592 print
'<span class="amount">'.price($object->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).
'</span>';
598 $parameters = array(
'socid'=>$socid);
599 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
606 print
'<div class="clearboth"></div>';
612 if ($action !=
'edit') {
617 print
'<div class="tabsAction">';
619 $parameters = array();
620 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
622 if (empty($reshook)) {
624 if ($user->rights->projet->creer) {
625 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'&action=edit&token='.
newToken().
'&withproject='.((int) $withproject).
'">'.$langs->trans(
'Modify').
'</a>';
627 print
'<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
"NotAllowed").
'">'.$langs->trans(
'Modify').
'</a>';
631 if ($user->rights->projet->supprimer) {
632 if (!$object->hasChildren() && !$object->hasTimeSpent()) {
633 print
'<a class="butActionDelete" href="'.$_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'&action=delete&token='.
newToken().
'&withproject='.((int) $withproject).
'">'.$langs->trans(
'Delete').
'</a>';
635 print
'<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
"TaskHasChild").
'">'.$langs->trans(
'Delete').
'</a>';
638 print
'<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
"NotAllowed").
'">'.$langs->trans(
'Delete').
'</a>';
644 print
'<div class="fichecenter"><div class="fichehalfleft">';
645 print
'<a name="builddoc"></a>';
652 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".$object->id;
653 $genallowed = ($user->rights->projet->lire);
654 $delallowed = ($user->rights->projet->creer);
656 print $formfile->showdocuments(
'project_task', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf);
658 print
'</div><div class="fichehalfright">';
661 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formactions.class.php';
663 $defaultthirdpartyid = $socid > 0 ? $socid : $object->project->socid;
664 $formactions->showactions($object,
'task', $defaultthirdpartyid, 1,
'', 10,
'withproject='.$withproject);
666 print
'</div></div>';
project_prepare_head(Project $project, $moreparam= '')
Prepare array with list of tabs.
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if(preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) if(preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) if($action== 'set') elseif($action== 'specimen') elseif($action== 'setmodel') elseif($action== 'del') elseif($action== 'setdoc') $formactions
View.
if($cancel &&!$id) if($action== 'add'&&!$cancel) if($action== 'delete') if($id) $form
Actions.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm= 'auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom= 'UTF-8', $removelasteolbr=1)
This function is called to encode a string into a HTML string but differs from htmlentities because a...
img_warning($titlealt= 'default', $moreatt= '', $morecss= 'pictowarning')
Show warning logo.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form...
Class to manage projects.
price2num($amount, $rounding= '', $option=0)
Function that return a number with universal decimal format (decimal separator is '...
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Class to manage translations.
dol_sanitizeFileName($str, $newstr= '_', $unaccent=1)
Clean a string to use it as a file name.
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
isModEnabled($module)
Is Dolibarr module enabled.
Class to manage a WYSIWYG editor.
dol_banner_tab($object, $paramid, $morehtml= '', $shownav=1, $fieldid= 'rowid', $fieldref= 'ref', $morehtmlref= '', $moreparam= '', $nodbprefix=0, $morehtmlleft= '', $morehtmlstatus= '', $onlybanner=0, $morehtmlright= '')
Show tab footer of a card.
dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1, $nolog=0)
Remove a file or several files with a mask.
convertSecondToTime($iSecond, $format= 'all', $lengthOfDay=86400, $lengthOfWeek=7)
Return, in clear text, value of a number of seconds in days, hours and minutes.
task_prepare_head($object)
Prepare array with list of tabs.