dolibarr 25.0.0-alpha
index.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2022 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com>
5 * Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
6 * Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
7 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <https://www.gnu.org/licenses/>.
21 */
22
29// Load Dolibarr environment
30require '../main.inc.php';
38require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
39require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
40require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
41require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
42require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
43require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
44
45// Load translation files required by the page
46$langs->loadLangs(array('projects', 'companies'));
47
48// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
49$hookmanager->initHooks(array('projectsindex'));
50
51$action = GETPOST('action', 'aZ09');
52$search_project_user = GETPOST('search_project_user');
53$mine = (GETPOST('mode', 'aZ09') == 'mine' || $search_project_user == $user->id) ? 1 : 0;
54if ($mine == 0 && $search_project_user === '') {
55 $search_project_user = getDolGlobalString('MAIN_SEARCH_PROJECT_USER_PROJECTSINDEX');
56}
57if ($search_project_user == $user->id) {
58 $mine = 1;
59}
60
61$sortfield = GETPOST('sortfield', 'aZ09comma');
62$sortorder = GETPOST('sortorder', 'aZ09comma');
63
64$max = getDolUserInt('MAIN_SIZE_SHORTLIST_LIMIT', getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT', 5));
65
66// Security check
67$socid = 0;
68//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignment.
69if (!$user->hasRight('projet', 'lire')) {
71}
72
73
74/*
75 * Actions
76 */
77
78$parameters = array();
79$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
80if ($reshook < 0) {
81 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
82}
83if (empty($reshook)) {
84 if ($action == 'refresh_search_project_user' && $user->hasRight('projet', 'lire')) {
85 $search_project_user = GETPOSTINT('search_project_user');
86 $tabparam = array("MAIN_SEARCH_PROJECT_USER_PROJECTSINDEX" => $search_project_user);
87
88 include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
89 $result = dol_set_user_param($db, $conf, $user, $tabparam);
90 }
91}
92
93if (GETPOST('addbox')) {
94 // Add box (when submit is done from a form when ajax disabled)
95 require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
96 $zone = GETPOSTINT('areacode');
97 $userid = GETPOSTINT('userid');
98 $boxorder = GETPOST('boxorder', 'aZ09');
99 $boxorder .= GETPOST('boxcombo', 'aZ09');
100 $result = InfoBox::saveboxorder($db, $zone, $boxorder, $userid);
101 if ($result > 0) {
102 setEventMessages($langs->trans("BoxAdded"), null);
103 }
104}
105
106
107/*
108 * View
109 */
110
111$companystatic = new Societe($db);
112$projectstatic = new Project($db);
113$form = new Form($db);
114$formfile = new FormFile($db);
115
116$projectset = ($mine ? $mine : (!$user->hasRight('projet', 'all', 'lire') ? 0 : 2));
117$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, $projectset, 1);
118//var_dump($projectsListId);
119
120
121$title = $langs->trans('ProjectsArea');
122
123$help_url = 'EN:Module_Projects|FR:Module_Projets|ES:M&oacute;dulo_Proyectos|DE:Modul_Projekte';
124
125// Load $resultboxes
126$resultboxes = FormOther::getBoxesArea($user, "8");
127
128llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-project page-dashboard');
129
130
131//if ($mine) $title=$langs->trans("MyProjectsArea");
132
133
134// Title for combo list see all projects
135$titleall = $langs->trans("AllAllowedProjects");
136if ($user->hasRight('projet', 'all', 'lire') && !$socid) {
137 $titleall = $langs->trans("AllProjects");
138} else {
139 $titleall = $langs->trans("AllAllowedProjects").'<br><br>';
140}
141
142$morehtml = '<form name="projectform" method="POST" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
143$morehtml .= '<input type="hidden" name="token" value="'.newToken().'">';
144$morehtml .= '<input type="hidden" name="action" value="refresh_search_project_user">';
145
146$morehtml .= '<select name="search_project_user" id="search_project_user">';
147$morehtml .= '<option name="all" value="0"'.($mine ? '' : ' selected').'>'.$titleall.'</option>';
148$morehtml .= '<option name="mine" value="'.$user->id.'"'.(($search_project_user == $user->id) ? ' selected' : '').'>'.$langs->trans("ProjectsImContactFor").'</option>';
149$morehtml .= '</select>';
150$morehtml .= ajax_combobox("search_project_user", array(), 0, 0, 'resolve', '-1', 'small');
151$morehtml .= '<input type="submit" class="button smallpaddingimp" name="refresh" value="'.$langs->trans("Refresh").'">';
152$morehtml .= '</form>';
153
154$morehtml .= $resultboxes['selectboxlist'];
155
156if ($mine) {
157 $htmltooltip = $langs->trans("MyProjectsDesc");
158} else {
159 if ($user->hasRight('projet', 'all', 'lire') && !$socid) {
160 $htmltooltip = $langs->trans("ProjectsDesc");
161 } else {
162 $htmltooltip = $langs->trans("ProjectsPublicDesc");
163 }
164}
165
166print_barre_liste($form->textwithpicto($title, $htmltooltip), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'project', 0, $morehtml);
167
168
169// Get list of ponderated percent and colors for each status
170include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
179// Available from theme_vars:
180'
181@phan-var-force string $badgeStatus0
182@phan-var-force string $badgeStatus1
183@phan-var-force string $badgeStatus2
184@phan-var-force string $badgeStatus3
185@phan-var-force string $badgeStatus4
186@phan-var-force string $badgeStatus5
187@phan-var-force string $badgeStatus6
188@phan-var-force string $badgeStatus7
189@phan-var-force string $badgeStatus8
190@phan-var-force string $badgeStatus9
191';
192$listofoppstatus = array();
193$listofopplabel = array();
194$listofoppcode = array();
195$colorseries = array();
196$sql = "SELECT cls.rowid, cls.code, cls.percent, cls.label";
197$sql .= " FROM ".MAIN_DB_PREFIX."c_lead_status as cls";
198$sql .= " WHERE active=1";
199$resql = $db->query($sql);
200if ($resql) {
201 $num = $db->num_rows($resql);
202 $i = 0;
203
204 while ($i < $num) {
205 $objp = $db->fetch_object($resql);
206 $listofoppstatus[$objp->rowid] = $objp->percent;
207 $listofopplabel[$objp->rowid] = $objp->label; // default label if translation from "OppStatus".code not found.
208 $listofoppcode[$objp->rowid] = $objp->code;
209 switch ($objp->code) {
210 case 'PROSP':
211 $colorseries[$objp->rowid] = "-".$badgeStatus0;
212 break;
213 case 'QUAL':
214 $colorseries[$objp->rowid] = "-".$badgeStatus1;
215 break;
216 case 'PROPO':
217 $colorseries[$objp->rowid] = $badgeStatus1;
218 break;
219 case 'NEGO':
220 $colorseries[$objp->rowid] = $badgeStatus4;
221 break;
222 case 'LOST':
223 $colorseries[$objp->rowid] = $badgeStatus9;
224 break;
225 case 'WON':
226 $colorseries[$objp->rowid] = $badgeStatus6;
227 break;
228 default:
229 $colorseries[$objp->rowid] = $badgeStatus2;
230 break;
231 }
232 $i++;
233 }
234} else {
236}
237
238
239print '<div class="fichecenter">';
240
241print '<div class="twocolumns">';
242
243print '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
244
245
246// Statistics
247include DOL_DOCUMENT_ROOT.'/projet/graph_opportunities.inc.php';
248
249// List of draft projects
250print_projecttasks_array($db, $form, $socid, $projectsListId, 0, 0, $listofoppstatus, array('projectlabel', 'plannedworkload', 'declaredprogress', 'prospectionstatus', 'projectstatus'), $max);
251
252
253print $resultboxes['boxlista'];
254
255print '</div><div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
256
257
258// Latest modified projects
259$sql = "SELECT p.rowid, p.ref, p.title, p.dateo as date_start, p.datee as date_end, p.fk_statut as status, p.tms as datem";
260$sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
261$sql .= ", s.code_client, s.code_compta, s.client";
262$sql .= ", s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur";
263$sql .= ", s.logo, s.email, s.entity";
264$sql .= ", s.canvas, s.status as thirdpartystatus";
265$sql .= " FROM ".MAIN_DB_PREFIX."projet as p";
266$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
267$sql .= " WHERE p.entity IN (".getEntity('project').")";
268if ($mine || !$user->hasRight('projet', 'all', 'lire')) {
269 $sql .= " AND p.rowid IN (".$db->sanitize($projectsListId).")"; // If we have this test true, it also means projectset is not 2
270}
271if ($socid) {
272 $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".((int) $socid).")";
273}
274$sql .= " ORDER BY p.tms DESC";
275$sql .= $db->plimit($max, 0);
276
277$resql = $db->query($sql);
278if ($resql) {
279 startSimpleTable($langs->trans("LatestModifiedProjects", $max), "projet/list.php", "sortfield=p.tms&sortorder=DESC", 3, -1, 'project');
280
281 $num = $db->num_rows($resql);
282
283 if ($num) {
284 $i = 0;
285 while ($i < $num) {
286 $obj = $db->fetch_object($resql);
287
288 print '<tr class="oddeven">';
289 print '<td class="nowrap">';
290
291 $projectstatic->id = $obj->rowid;
292 $projectstatic->ref = $obj->ref;
293 $projectstatic->title = $obj->title;
294 $projectstatic->thirdparty_name = $obj->name;
295 $projectstatic->status = $obj->status;
296 $projectstatic->date_start = $db->jdate($obj->date_start);
297 $projectstatic->date_end = $db->jdate($obj->date_end);
298
299 $companystatic->id = $obj->socid;
300 $companystatic->name = $obj->name;
301 $companystatic->name_alias = $obj->name_alias;
302 $companystatic->client = $obj->client;
303 $companystatic->fournisseur = $obj->fournisseur;
304
305 //$companystatic->code_client = $obj->code_client;
306 $companystatic->code_compta = $obj->code_compta;
307 $companystatic->code_compta_client = $obj->code_compta;
308 $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
309
310 $companystatic->logo = $obj->logo;
311 $companystatic->email = $obj->email;
312 $companystatic->entity = $obj->entity;
313 $companystatic->canvas = $obj->canvas;
314 $companystatic->status = $obj->thirdpartystatus;
315
316 print '<table class="nobordernopadding"><tr class="nocellnopadd">';
317 print '<td width="96" class="nobordernopadding nowraponall">';
318 print $projectstatic->getNomUrl(1);
319 print '</td>';
320
321 print '<td width="16" class="nobordernopadding nowrap">';
322 print '&nbsp;';
323 print '</td>';
324
325 print '<td width="16" class="right nobordernopadding hideonsmartphone">';
326 $filename = dol_sanitizeFileName($obj->ref);
327 $filedir = $conf->project->dir_output.'/'.dol_sanitizeFileName($obj->ref);
328 print $formfile->getDocumentsLink($projectstatic->element, $filename, $filedir);
329 print '</td></tr></table>';
330
331 print '</td>';
332
333 // Label
334 print '<td class="" title="'.dolPrintHTMLForAttribute($obj->title).'">';
335 print '<div class="twolinesmax-normallineheight minwidth100onall">';
336 print dolPrintHTML($projectstatic->title);
337 print '</div>';
338 print '</td>';
339
340 // Thirdparty
341 print '<td class="tdoverflowmax125" title="'.dolPrintHTMLForAttribute($companystatic->name).'">';
342 if ($companystatic->id > 0) {
343 print $companystatic->getNomUrl(1, 'company', 16);
344 }
345 print '</td>';
346
347 // Date
348 $datem = $db->jdate($obj->datem);
349 print '<td class="center" title="'.dolPrintHTMLForAttribute($langs->trans("DateModification").': '.dol_print_date($datem, 'dayhour', 'tzuserrel')).'">';
350 print dol_print_date($datem, 'day', 'tzuserrel');
351 print '</td>';
352
353 // Status
354 print '<td class="right">'.$projectstatic->LibStatut($obj->status, 3).'</td>';
355 print '</tr>';
356 $i++;
357 }
358 } else {
359 print '<tr><td colspan="4"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
360 }
361
362 finishSimpleTable(true);
363} else {
365}
366
367
368$companystatic = new Societe($db); // We need a clean new object for next loop because current one has some properties set.
369
370if (empty($sortfield)) {
371 $sortfield = 'nb';
372 $sortorder = 'desc';
373}
374
375// List of open projects per thirdparty
376$sql = "SELECT COUNT(p.rowid) as nb, SUM(p.opp_amount)";
377$sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
378$sql .= ", s.code_client, s.code_compta, s.client";
379$sql .= ", s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur";
380$sql .= ", s.logo, s.email, s.entity";
381$sql .= ", s.canvas, s.status";
382$sql .= " FROM ".MAIN_DB_PREFIX."projet as p";
383$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
384$sql .= " WHERE p.entity IN (".getEntity('project').")";
385$sql .= " AND p.fk_statut = 1";
386if ($mine || !$user->hasRight('projet', 'all', 'lire')) {
387 $sql .= " AND p.rowid IN (".$db->sanitize($projectsListId).")"; // If we have this test true, it also means projectset is not 2
388}
389if ($socid > 0) {
390 $sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".((int) $socid).")";
391}
392$sql .= " GROUP BY s.rowid, s.nom, s.name_alias, s.code_client, s.code_compta, s.client, s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur, s.logo, s.email, s.entity, s.canvas, s.status";
393$sql .= $db->order($sortfield, $sortorder);
394//$sql .= $db->plimit($max + 1, 0);
395
396$resql = $db->query($sql);
397if ($resql) {
398 $num = $db->num_rows($resql);
399 $i = 0;
400 $othernb = 0;
401
402 if ($num) {
403 // Open project per thirdparty
404 print '<div class="div-table-responsive-no-min">';
405 print '<table class="noborder centpercent">';
406 print '<tr class="liste_titre">';
407 print_liste_field_titre("OpenedProjectsByThirdparties", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder);
408 print_liste_field_titre("Number", $_SERVER["PHP_SELF"], "nb", "", "", '', $sortfield, $sortorder, 'right ');
409 print "</tr>\n";
410 }
411
412 while ($i < $num) {
413 $obj = $db->fetch_object($resql);
414
415 if ($i >= $max) {
416 $othernb += $obj->nb;
417 $i++;
418 continue;
419 }
420
421 print '<tr class="oddeven">';
422 print '<td class="nowraponall tdoverflowmax100">';
423 if ($obj->socid > 0) {
424 $companystatic->id = $obj->socid;
425 $companystatic->name = $obj->name;
426 $companystatic->name_alias = $obj->name_alias;
427 $companystatic->code_client = $obj->code_client;
428 $companystatic->code_compta = $obj->code_compta;
429 $companystatic->code_compta_client = $obj->code_compta;
430 $companystatic->client = $obj->client;
431 $companystatic->code_fournisseur = $obj->code_fournisseur;
432 $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur;
433 $companystatic->fournisseur = $obj->fournisseur;
434 $companystatic->logo = $obj->logo;
435 $companystatic->email = $obj->email;
436 $companystatic->entity = $obj->entity;
437 $companystatic->canvas = $obj->canvas;
438 $companystatic->status = $obj->status;
439
440 print $companystatic->getNomUrl(1);
441 } else {
442 print $langs->trans("OthersNotLinkedToThirdParty");
443 }
444 print '</td>';
445 print '<td class="right">';
446 if ($obj->socid) {
447 print '<a href="'.DOL_URL_ROOT.'/projet/list.php?socid='.$obj->socid.'&search_status=1">'.$obj->nb.'</a>';
448 } else {
449 print '<a href="'.DOL_URL_ROOT.'/projet/list.php?search_societe='.urlencode('^$').'&search_status=1">'.$obj->nb.'</a>';
450 }
451 print '</td>';
452 print "</tr>\n";
453
454 $i++;
455 }
456 if ($othernb) {
457 print '<tr class="oddeven">';
458 print '<td class="nowrap">';
459 print '<span class="opacitymedium">'.$langs->trans("More").'...</span>';
460 print '</td>';
461 print '<td class="nowrap right">';
462 print $othernb;
463 print '</td>';
464 print "</tr>\n";
465 }
466
467 if ($num) {
468 print "</table>";
469 print '</div>';
470 }
471
472 $db->free($resql);
473} else {
475}
476
477if ((!getDolGlobalInt('PROJECT_USE_OPPORTUNITIES') || getDolGlobalInt('PROJECT_SHOW_OPEN_PROJECTS_LIST_ON_PROJECT_AREA')) && !getDolGlobalInt('PROJECT_HIDE_OPEN_PROJECTS_LIST_ON_PROJECT_AREA')) {
478 // This list is surely very long and useless when we are using opportunities, so we hide it for this use case, but we allow to show it if
479 // we really want it and to allow interface backward compatibility.
480 print '<br>';
481
482 print_projecttasks_array($db, $form, $socid, $projectsListId, 0, 1, $listofoppstatus, array());
483}
484
485print $resultboxes['boxlistb'];
486
487print '</div></div></div>';
488
489$parameters = array('user' => $user);
490$reshook = $hookmanager->executeHooks('dashboardProjects', $parameters, $projectstatic); // Note that $action and $object may have been modified by hook
491
492// End of page
493llxFooter();
494$db->close();
ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete='resolve', $idforemptyvalue='-1', $morecss='')
Convert a html select field into an ajax combobox.
Definition ajax.lib.php:476
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:73
Class to offer components to list and upload files.
Class to manage generation of HTML components Only common components must be here.
static getBoxesArea($user, $areacode)
Get array with HTML tabs with widgets/boxes of a particular area including personalized choices of us...
static saveboxorder($dbs, $zone, $boxorder, $userid=0)
Save order of boxes for area and user.
Class to manage projects.
Class to manage third parties objects (customers, suppliers, prospects...)
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
dol_set_user_param($db, $conf, &$user, $tab, $entity=-1)
Save personal parameter.
getDolUserInt($key, $default=0, $tmpuser=null)
Return Dolibarr user constant int value.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
finishSimpleTable($addLineBreak=false)
Add the correct HTML close tags for "startSimpleTable(...)" (use after the last table line)
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
print_liste_field_titre($name, $file="", $field="", $begin="", $param="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
dolPrintHTML($s, $allowiframe=0, $moreallowedtags=array())
Return a string (that can be on several lines) ready to be output on a HTML page.
Definition html.lib.php:73
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
startSimpleTable($header, $link="", $arguments="", $emptyColumns=0, $number=-1, $pictofulllist='')
Start a table with headers and a optional clickable number (don't forget to use "finishSimpleTable()"...
print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=0, $status=-1, $listofoppstatus=array(), $hiddenfields=array(), $max=0)
Return HTML table with list of projects and number of opened tasks.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.