2004-10-20 22:06:49 +02:00
< ? php
2005-04-05 13:22:28 +02:00
/* Copyright ( C ) 2001 - 2005 Rodolphe Quiedeville < rodolphe @ quiedeville . org >
2022-11-03 16:13:35 +01:00
* Copyright ( C ) 2004 - 2022 Laurent Destailleur < eldy @ users . sourceforge . net >
2018-10-27 14:43:12 +02:00
* Copyright ( C ) 2005 - 2010 Regis Houssin < regis . houssin @ inodbox . com >
2019-06-18 14:07:52 +02:00
* Copyright ( C ) 2019 Nicolas ZABOURI < info @ inovea - conseil . com >
2024-11-04 23:53:20 +01:00
* Copyright ( C ) 2024 Frédéric France < frederic . france @ free . fr >
2024-12-30 18:24:06 +01:00
* Copyright ( C ) 2024 MDW < mdeweerd @ users . noreply . github . com >
2014-07-17 01:28:01 +02:00
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
2019-09-23 21:55:30 +02:00
* along with this program . If not , see < https :// www . gnu . org / licenses />.
2014-07-17 01:28:01 +02:00
*/
2004-08-14 15:16:01 +02:00
2005-04-07 02:03:07 +02:00
/**
2008-09-10 22:49:21 +02:00
* \file htdocs / projet / index . php
* \ingroup projet
2010-02-15 02:21:47 +01:00
* \brief Main project home page
2008-09-10 22:49:21 +02:00
*/
2004-08-14 15:16:01 +02:00
2022-09-07 20:08:59 +02:00
// Load Dolibarr environment
2012-08-22 23:24:21 +02:00
require '../main.inc.php' ;
2012-08-22 23:11:24 +02:00
require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php' ;
2015-03-01 14:03:14 +01:00
require_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php' ;
2017-11-16 18:33:56 +01:00
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php' ;
2012-08-22 23:11:24 +02:00
require_once DOL_DOCUMENT_ROOT . '/core/lib/project.lib.php' ;
2014-03-12 02:43:31 +01:00
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php' ;
2010-02-20 21:24:09 +01:00
2024-11-04 23:53:20 +01:00
/**
* @ var Conf $conf
* @ var DoliDB $db
* @ var HookManager $hookmanager
* @ var Translate $langs
* @ var User $user
*/
2024-07-01 01:22:04 +02:00
// Load translation files required by the page
$langs -> loadLangs ( array ( 'projects' , 'companies' ));
2019-06-18 14:07:52 +02:00
$hookmanager = new HookManager ( $db );
2024-06-30 21:02:50 +02:00
// Initialize a technical object to manage hooks. Note that conf->hooks_modules contains array
2019-06-18 14:07:52 +02:00
$hookmanager -> initHooks ( array ( 'projectsindex' ));
2020-09-16 19:39:50 +02:00
$action = GETPOST ( 'action' , 'aZ09' );
2024-07-01 01:22:04 +02:00
$search_project_user = GETPOST ( 'search_project_user' );
$mine = ( GETPOST ( 'mode' , 'aZ09' ) == 'mine' || $search_project_user == $user -> id ) ? 1 : 0 ;
2021-02-26 18:49:22 +01:00
if ( $mine == 0 && $search_project_user === '' ) {
2024-07-01 01:22:04 +02:00
$search_project_user = getDolGlobalString ( 'MAIN_SEARCH_PROJECT_USER_PROJECTSINDEX' );
2021-02-26 18:49:22 +01:00
}
if ( $search_project_user == $user -> id ) {
$mine = 1 ;
}
2010-05-23 20:51:03 +02:00
2024-04-03 15:30:10 +02:00
$sortfield = GETPOST ( 'sortfield' , 'aZ09comma' );
$sortorder = GETPOST ( 'sortorder' , 'aZ09comma' );
$max = getDolGlobalInt ( 'MAIN_SIZE_SHORTLIST_LIMIT' , 5 );
2008-09-10 22:49:21 +02:00
// Security check
2020-04-10 10:59:32 +02:00
$socid = 0 ;
2024-01-12 17:55:52 +01:00
//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.
2023-09-05 21:37:53 +02:00
if ( ! $user -> hasRight ( 'projet' , 'lire' )) {
2021-02-26 18:49:22 +01:00
accessforbidden ();
}
2003-09-04 13:08:03 +02:00
2019-01-25 15:22:36 +01:00
2020-05-27 15:51:25 +02:00
/*
* Actions
*/
$parameters = array ();
$reshook = $hookmanager -> executeHooks ( 'doActions' , $parameters , $object , $action ); // Note that $action and $object may have been modified by some hooks
2021-02-26 18:49:22 +01:00
if ( $reshook < 0 ) {
setEventMessages ( $hookmanager -> error , $hookmanager -> errors , 'errors' );
}
2020-05-27 15:51:25 +02:00
if ( empty ( $reshook )) {
2024-09-30 11:38:29 +02:00
if ( $action == 'refresh_search_project_user' && $user -> hasRight ( 'projet' , 'lire' )) {
Fix: GETPOST(...,'int') to GETPOSTINT(...) (#28448)
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: Update spelling exceptions
* Qual: Ignore Phan Notice
2024-02-27 14:05:53 +01:00
$search_project_user = GETPOSTINT ( 'search_project_user' );
2020-05-27 15:51:25 +02:00
$tabparam = array ( " MAIN_SEARCH_PROJECT_USER_PROJECTSINDEX " => $search_project_user );
2020-10-31 14:32:18 +01:00
include_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php' ;
2020-05-27 15:51:25 +02:00
$result = dol_set_user_param ( $db , $conf , $user , $tabparam );
}
}
2008-09-10 22:49:21 +02:00
/*
* View
2014-07-17 01:28:01 +02:00
*/
2008-09-10 22:49:21 +02:00
2020-04-10 10:59:32 +02:00
$companystatic = new Societe ( $db );
$projectstatic = new Project ( $db );
$form = new Form ( $db );
$formfile = new FormFile ( $db );
2009-10-17 00:46:16 +02:00
2024-02-09 15:58:49 +01:00
$projectset = ( $mine ? $mine : ( ! $user -> hasRight ( 'projet' , 'all' , 'lire' ) ? 0 : 2 ));
2019-09-17 12:08:33 +02:00
$projectsListId = $projectstatic -> getProjectsAuthorizedForUser ( $user , $projectset , 1 );
2019-05-18 15:11:12 +02:00
//var_dump($projectsListId);
2011-04-20 01:21:10 +02:00
2004-07-21 16:26:46 +02:00
2021-04-19 18:24:19 +02:00
$title = $langs -> trans ( 'ProjectsArea' );
$help_url = 'EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos|DE:Modul_Projekte' ;
2024-07-13 18:10:40 +02:00
llxHeader ( '' , $title , $help_url , '' , 0 , 0 , '' , '' , '' , 'mod-project page-dashboard' );
2021-04-19 18:24:19 +02:00
2017-03-14 13:49:04 +01:00
//if ($mine) $title=$langs->trans("MyProjectsArea");
2010-02-07 10:49:10 +01:00
2017-03-14 13:49:04 +01:00
// Title for combo list see all projects
2020-04-10 10:59:32 +02:00
$titleall = $langs -> trans ( " AllAllowedProjects " );
2023-10-15 18:39:13 +02:00
if ( $user -> hasRight ( 'projet' , 'all' , 'lire' ) && ! $socid ) {
2021-02-26 18:49:22 +01:00
$titleall = $langs -> trans ( " AllProjects " );
} else {
$titleall = $langs -> trans ( " AllAllowedProjects " ) . '<br><br>' ;
}
2020-04-10 10:59:32 +02:00
$morehtml = '' ;
2024-07-01 01:22:04 +02:00
$morehtml .= '<form name="projectform" method="POST" action="' . $_SERVER [ " PHP_SELF " ] . '">' ;
2020-04-10 10:59:32 +02:00
$morehtml .= '<input type="hidden" name="token" value="' . newToken () . '">' ;
2020-05-27 15:51:25 +02:00
$morehtml .= '<input type="hidden" name="action" value="refresh_search_project_user">' ;
2024-07-01 01:22:04 +02:00
2023-02-18 20:49:38 +01:00
$morehtml .= '<SELECT name="search_project_user" id="search_project_user">' ;
2020-04-10 10:59:32 +02:00
$morehtml .= '<option name="all" value="0"' . ( $mine ? '' : ' selected' ) . '>' . $titleall . '</option>' ;
$morehtml .= '<option name="mine" value="' . $user -> id . '"' . (( $search_project_user == $user -> id ) ? ' selected' : '' ) . '>' . $langs -> trans ( " ProjectsImContactFor " ) . '</option>' ;
$morehtml .= '</SELECT>' ;
2023-02-18 20:49:38 +01:00
$morehtml .= ajax_combobox ( " search_project_user " , array (), 0 , 0 , 'resolve' , '-1' , 'small' );
2020-12-11 01:20:40 +01:00
$morehtml .= '<input type="submit" class="button smallpaddingimp" name="refresh" value="' . $langs -> trans ( " Refresh " ) . '">' ;
2020-04-10 10:59:32 +02:00
$morehtml .= '</form>' ;
2017-03-14 13:49:04 +01:00
2021-02-26 18:49:22 +01:00
if ( $mine ) {
2024-12-30 18:24:06 +01:00
$htmltooltip = $langs -> trans ( " MyProjectsDesc " );
2021-02-26 18:49:22 +01:00
} else {
2023-10-15 18:39:13 +02:00
if ( $user -> hasRight ( 'projet' , 'all' , 'lire' ) && ! $socid ) {
2024-12-30 18:24:06 +01:00
$htmltooltip = $langs -> trans ( " ProjectsDesc " );
2021-02-26 18:49:22 +01:00
} else {
2024-12-30 18:24:06 +01:00
$htmltooltip = $langs -> trans ( " ProjectsPublicDesc " );
2021-02-26 18:49:22 +01:00
}
2005-08-21 14:09:51 +02:00
}
2020-03-28 15:20:26 +01:00
2024-12-30 18:24:06 +01:00
print_barre_liste ( $form -> textwithpicto ( $title , $htmltooltip ), 0 , $_SERVER [ " PHP_SELF " ], '' , '' , '' , '' , 0 , - 1 , 'project' , 0 , $morehtml );
2020-03-28 15:20:26 +01:00
2013-04-12 16:16:39 +02:00
2020-04-13 01:42:10 +02:00
// Get list of ponderated percent and colors for each status
2021-04-06 22:18:32 +02:00
include DOL_DOCUMENT_ROOT . '/theme/' . $conf -> theme . '/theme_vars.inc.php' ;
2024-12-30 18:24:06 +01:00
// Available from theme_vars:
'
@ phan - var - force string $badgeStatus0
@ phan - var - force string $badgeStatus1
@ phan - var - force string $badgeStatus2
@ phan - var - force string $badgeStatus3
@ phan - var - force string $badgeStatus4
@ phan - var - force string $badgeStatus5
@ phan - var - force string $badgeStatus6
@ phan - var - force string $badgeStatus7
@ phan - var - force string $badgeStatus8
@ phan - var - force string $badgeStatus9
' ;
$listofoppstatus = array ();
$listofopplabel = array ();
$listofoppcode = array ();
$colorseries = array ();
2015-07-04 18:20:17 +02:00
$sql = " SELECT cls.rowid, cls.code, cls.percent, cls.label " ;
2019-11-14 12:09:46 +01:00
$sql .= " FROM " . MAIN_DB_PREFIX . " c_lead_status as cls " ;
$sql .= " WHERE active=1 " ;
2015-07-04 18:20:17 +02:00
$resql = $db -> query ( $sql );
2021-02-26 18:49:22 +01:00
if ( $resql ) {
2015-07-04 18:20:17 +02:00
$num = $db -> num_rows ( $resql );
$i = 0 ;
2021-02-26 18:49:22 +01:00
while ( $i < $num ) {
2015-07-04 18:20:17 +02:00
$objp = $db -> fetch_object ( $resql );
2019-11-14 12:09:46 +01:00
$listofoppstatus [ $objp -> rowid ] = $objp -> percent ;
2021-10-06 14:26:48 +02:00
$listofopplabel [ $objp -> rowid ] = $objp -> label ; // default label if translation from "OppStatus".code not found.
2019-11-14 12:09:46 +01:00
$listofoppcode [ $objp -> rowid ] = $objp -> code ;
2020-04-25 13:52:07 +02:00
switch ( $objp -> code ) {
2020-04-13 01:42:10 +02:00
case 'PROSP' :
$colorseries [ $objp -> rowid ] = " - " . $badgeStatus0 ;
break ;
case 'QUAL' :
$colorseries [ $objp -> rowid ] = " - " . $badgeStatus1 ;
break ;
case 'PROPO' :
$colorseries [ $objp -> rowid ] = $badgeStatus1 ;
break ;
case 'NEGO' :
$colorseries [ $objp -> rowid ] = $badgeStatus4 ;
break ;
case 'LOST' :
$colorseries [ $objp -> rowid ] = $badgeStatus9 ;
break ;
case 'WON' :
$colorseries [ $objp -> rowid ] = $badgeStatus6 ;
break ;
default :
$colorseries [ $objp -> rowid ] = $badgeStatus2 ;
break ;
}
2015-07-04 18:20:17 +02:00
$i ++ ;
}
2021-02-26 18:49:22 +01:00
} else {
dol_print_error ( $db );
}
2020-04-13 01:42:10 +02:00
//var_dump($listofoppcode);
2015-07-04 18:20:17 +02:00
2013-04-12 16:16:39 +02:00
2024-06-27 10:41:55 +02:00
print '<div class="fichecenter">' ;
print '<div class="twocolumns">' ;
print '<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">' ;
2013-04-12 16:16:39 +02:00
2023-02-18 20:49:38 +01:00
// Statistics
2015-11-28 17:35:52 +01:00
include DOL_DOCUMENT_ROOT . '/projet/graph_opportunities.inc.php' ;
2015-07-04 18:20:17 +02:00
2015-06-30 01:34:17 +02:00
// List of draft projects
2023-02-19 13:58:57 +01:00
print_projecttasks_array ( $db , $form , $socid , $projectsListId , 0 , 0 , $listofoppstatus , array ( 'projectlabel' , 'plannedworkload' , 'declaredprogress' , 'prospectionstatus' , 'projectstatus' ), $max );
2005-08-21 14:09:51 +02:00
2013-04-12 16:16:39 +02:00
2024-06-27 10:41:55 +02:00
print '</div><div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">' ;
2013-04-12 16:16:39 +02:00
2019-11-01 23:16:08 +01:00
// Latest modified projects
2024-01-14 12:10:09 +01:00
$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 " ;
2020-12-08 15:03:02 +01:00
$sql .= " , s.rowid as socid, s.nom as name, s.name_alias " ;
$sql .= " , s.code_client, s.code_compta, s.client " ;
$sql .= " , s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur " ;
$sql .= " , s.logo, s.email, s.entity " ;
$sql .= " , s.canvas, s.status as thirdpartystatus " ;
2019-11-14 12:09:46 +01:00
$sql .= " FROM " . MAIN_DB_PREFIX . " projet as p " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " societe as s on p.fk_soc = s.rowid " ;
$sql .= " WHERE p.entity IN ( " . getEntity ( 'project' ) . " ) " ;
2023-10-15 18:39:13 +02:00
if ( $mine || ! $user -> hasRight ( 'projet' , 'all' , 'lire' )) {
2021-03-22 11:30:18 +01:00
$sql .= " AND p.rowid IN ( " . $db -> sanitize ( $projectsListId ) . " ) " ; // If we have this test true, it also means projectset is not 2
2021-02-26 18:49:22 +01:00
}
if ( $socid ) {
2021-06-09 15:36:47 +02:00
$sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = " . (( int ) $socid ) . " ) " ;
2021-02-26 18:49:22 +01:00
}
2019-11-14 12:09:46 +01:00
$sql .= " ORDER BY p.tms DESC " ;
$sql .= $db -> plimit ( $max , 0 );
$resql = $db -> query ( $sql );
2021-02-26 18:49:22 +01:00
if ( $resql ) {
2024-04-03 15:40:24 +02:00
startSimpleTable ( $langs -> trans ( " LatestModifiedProjects " , $max ), " projet/list.php " , " sortfield=p.tms&sortorder=DESC " , 3 , - 1 , 'project' );
2017-11-16 18:33:56 +01:00
$num = $db -> num_rows ( $resql );
2020-12-08 20:06:33 +01:00
2021-02-26 18:49:22 +01:00
if ( $num ) {
2017-11-16 18:33:56 +01:00
$i = 0 ;
2021-02-26 18:49:22 +01:00
while ( $i < $num ) {
2017-11-16 18:33:56 +01:00
$obj = $db -> fetch_object ( $resql );
print '<tr class="oddeven">' ;
2020-03-14 03:24:46 +01:00
print '<td class="nowrap">' ;
2017-11-16 18:33:56 +01:00
2019-11-14 12:09:46 +01:00
$projectstatic -> id = $obj -> rowid ;
$projectstatic -> ref = $obj -> ref ;
$projectstatic -> title = $obj -> title ;
$projectstatic -> thirdparty_name = $obj -> name ;
2020-02-25 13:28:11 +01:00
$projectstatic -> status = $obj -> status ;
2024-01-14 12:10:09 +01:00
$projectstatic -> date_start = $db -> jdate ( $obj -> date_start );
$projectstatic -> date_end = $db -> jdate ( $obj -> date_end );
2019-11-14 12:09:46 +01:00
$companystatic -> id = $obj -> socid ;
$companystatic -> name = $obj -> name ;
2024-05-29 00:56:56 +02:00
$companystatic -> name_alias = $obj -> name_alias ;
2020-12-08 15:03:02 +01:00
//$companystatic->code_client = $obj->code_client;
$companystatic -> code_compta = $obj -> code_compta ;
2024-05-29 00:56:56 +02:00
$companystatic -> code_compta_client = $obj -> code_compta ;
2019-11-14 12:09:46 +01:00
$companystatic -> client = $obj -> client ;
2020-12-08 15:03:02 +01:00
//$companystatic->code_fournisseur = $obj->code_fournisseur;
$companystatic -> code_compta_fournisseur = $obj -> code_compta_fournisseur ;
2019-11-14 12:09:46 +01:00
$companystatic -> fournisseur = $obj -> fournisseur ;
2020-12-08 15:03:02 +01:00
$companystatic -> logo = $obj -> logo ;
$companystatic -> email = $obj -> email ;
$companystatic -> entity = $obj -> entity ;
2019-11-14 12:09:46 +01:00
$companystatic -> canvas = $obj -> canvas ;
2020-02-25 13:28:11 +01:00
$companystatic -> status = $obj -> thirdpartystatus ;
2017-11-16 18:33:56 +01:00
print '<table class="nobordernopadding"><tr class="nocellnopadd">' ;
2022-10-06 17:36:52 +02:00
print '<td width="96" class="nobordernopadding nowraponall">' ;
2017-11-16 18:33:56 +01:00
print $projectstatic -> getNomUrl ( 1 );
print '</td>' ;
print '<td width="16" class="nobordernopadding nowrap">' ;
print ' ' ;
print '</td>' ;
2019-02-23 22:24:26 +01:00
print '<td width="16" class="right nobordernopadding hideonsmartphone">' ;
2019-11-14 12:09:46 +01:00
$filename = dol_sanitizeFileName ( $obj -> ref );
2023-11-05 18:27:53 +01:00
$filedir = $conf -> projet -> dir_output . '/' . dol_sanitizeFileName ( $obj -> ref );
2019-11-14 12:09:46 +01:00
$urlsource = $_SERVER [ 'PHP_SELF' ] . '?id=' . $obj -> rowid ;
2017-11-16 18:33:56 +01:00
print $formfile -> getDocumentsLink ( $projectstatic -> element , $filename , $filedir );
print '</td></tr></table>' ;
print '</td>' ;
2021-09-16 21:23:02 +02:00
// Label
print '<td class="tdoverflowmax150" title="' . dol_escape_htmltag ( $obj -> title ) . '">' ;
2024-02-27 11:29:53 +01:00
print dol_escape_htmltag ( $projectstatic -> title );
2021-09-16 21:23:02 +02:00
print '</td>' ;
// Thirdparty
2024-02-27 11:29:53 +01:00
print '<td class="tdoverflowmax150" title="' . dol_escape_htmltag ( $companystatic -> name ) . '">' ;
2021-02-26 18:49:22 +01:00
if ( $companystatic -> id > 0 ) {
2019-01-27 11:55:16 +01:00
print $companystatic -> getNomUrl ( 1 , 'company' , 16 );
2017-11-16 18:33:56 +01:00
}
print '</td>' ;
2021-09-16 21:23:02 +02:00
// Date
2022-05-18 00:17:46 +02:00
$datem = $db -> jdate ( $obj -> datem );
print '<td class="center" title="' . dol_escape_htmltag ( $langs -> trans ( " DateModification " ) . ': ' . dol_print_date ( $datem , 'dayhour' , 'tzuserrel' )) . '">' ;
print dol_print_date ( $datem , 'day' , 'tzuserrel' );
print '</td>' ;
2021-09-16 21:23:02 +02:00
// Status
2020-02-25 13:28:11 +01:00
print '<td class="right">' . $projectstatic -> LibStatut ( $obj -> status , 3 ) . '</td>' ;
2017-11-16 18:33:56 +01:00
print '</tr>' ;
$i ++ ;
}
2020-12-08 20:06:33 +01:00
} else {
print '<tr><td colspan="4"><span class="opacitymedium">' . $langs -> trans ( " None " ) . '</span></td></tr>' ;
2017-11-16 18:33:56 +01:00
}
2024-04-03 15:40:24 +02:00
finishSimpleTable ( true );
2021-02-26 18:49:22 +01:00
} else {
dol_print_error ( $db );
}
2017-11-16 18:33:56 +01:00
2019-11-14 12:09:46 +01:00
$companystatic = new Societe ( $db ); // We need a clean new object for next loop because current one has some properties set.
2019-09-13 11:05:50 +02:00
2024-06-19 02:58:06 +02:00
if ( empty ( $sortfield )) {
$sortfield = 'nb' ;
$sortorder = 'desc' ;
}
2022-12-21 21:00:44 +01:00
// List of open projects per thirdparty
2015-07-04 18:20:17 +02:00
$sql = " SELECT COUNT(p.rowid) as nb, SUM(p.opp_amount) " ;
2020-12-08 15:03:02 +01:00
$sql .= " , s.rowid as socid, s.nom as name, s.name_alias " ;
$sql .= " , s.code_client, s.code_compta, s.client " ;
$sql .= " , s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur " ;
$sql .= " , s.logo, s.email, s.entity " ;
$sql .= " , s.canvas, s.status " ;
2019-11-14 12:09:46 +01:00
$sql .= " FROM " . MAIN_DB_PREFIX . " projet as p " ;
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . " societe as s on p.fk_soc = s.rowid " ;
$sql .= " WHERE p.entity IN ( " . getEntity ( 'project' ) . " ) " ;
$sql .= " AND p.fk_statut = 1 " ;
2023-10-15 18:39:13 +02:00
if ( $mine || ! $user -> hasRight ( 'projet' , 'all' , 'lire' )) {
2021-03-22 11:30:18 +01:00
$sql .= " AND p.rowid IN ( " . $db -> sanitize ( $projectsListId ) . " ) " ; // If we have this test true, it also means projectset is not 2
2021-02-26 18:49:22 +01:00
}
2021-03-22 11:30:18 +01:00
if ( $socid > 0 ) {
$sql .= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = " . (( int ) $socid ) . " ) " ;
2021-02-26 18:49:22 +01:00
}
2021-01-28 08:53:13 +01:00
$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 " ;
2019-11-14 12:09:46 +01:00
$sql .= $db -> order ( $sortfield , $sortorder );
2020-02-19 13:59:01 +01:00
//$sql .= $db->plimit($max + 1, 0);
2003-09-04 13:08:03 +02:00
2005-04-05 13:22:28 +02:00
$resql = $db -> query ( $sql );
2021-02-26 18:49:22 +01:00
if ( $resql ) {
2009-01-15 00:36:51 +01:00
$num = $db -> num_rows ( $resql );
$i = 0 ;
2020-02-19 13:59:01 +01:00
$othernb = 0 ;
2009-01-15 00:36:51 +01:00
2020-12-08 20:06:33 +01:00
if ( $num ) {
// Open project per thirdparty
print '<div class="div-table-responsive-no-min">' ;
print '<table class="noborder centpercent">' ;
print '<tr class="liste_titre">' ;
print_liste_field_titre ( " OpenedProjectsByThirdparties " , $_SERVER [ " PHP_SELF " ], " " , " " , " " , '' , $sortfield , $sortorder );
2024-02-27 11:29:53 +01:00
print_liste_field_titre ( " Number " , $_SERVER [ " PHP_SELF " ], " nb " , " " , " " , '' , $sortfield , $sortorder , 'right ' );
2020-12-08 20:06:33 +01:00
print " </tr> \n " ;
}
2021-02-26 18:49:22 +01:00
while ( $i < $num ) {
2009-06-11 03:05:43 +02:00
$obj = $db -> fetch_object ( $resql );
2017-07-31 04:52:27 +02:00
2020-02-19 13:59:01 +01:00
if ( $i >= $max ) {
$othernb += $obj -> nb ;
$i ++ ;
continue ;
}
2017-04-14 11:22:48 +02:00
print '<tr class="oddeven">' ;
2020-05-15 17:14:28 +02:00
print '<td class="nowraponall tdoverflowmax100">' ;
2021-02-26 18:49:22 +01:00
if ( $obj -> socid > 0 ) {
2019-11-14 12:09:46 +01:00
$companystatic -> id = $obj -> socid ;
$companystatic -> name = $obj -> name ;
2020-12-08 15:03:02 +01:00
$companystatic -> name_alias = $obj -> name_alias ;
$companystatic -> code_client = $obj -> code_client ;
$companystatic -> code_compta = $obj -> code_compta ;
2024-08-14 16:51:53 +02:00
$companystatic -> code_compta_client = $obj -> code_compta ;
2020-08-30 19:45:46 +02:00
$companystatic -> client = $obj -> client ;
2020-12-08 15:03:02 +01:00
$companystatic -> code_fournisseur = $obj -> code_fournisseur ;
$companystatic -> code_compta_fournisseur = $obj -> code_compta_fournisseur ;
2020-08-30 19:45:46 +02:00
$companystatic -> fournisseur = $obj -> fournisseur ;
2020-12-08 15:03:02 +01:00
$companystatic -> logo = $obj -> logo ;
$companystatic -> email = $obj -> email ;
$companystatic -> entity = $obj -> entity ;
$companystatic -> canvas = $obj -> canvas ;
2020-02-25 13:28:11 +01:00
$companystatic -> status = $obj -> status ;
2017-11-16 18:33:56 +01:00
print $companystatic -> getNomUrl ( 1 );
2020-05-21 15:05:19 +02:00
} else {
2010-02-15 02:21:47 +01:00
print $langs -> trans ( " OthersNotLinkedToThirdParty " );
2009-06-11 03:05:43 +02:00
}
print '</td>' ;
2019-02-23 22:24:26 +01:00
print '<td class="right">' ;
2021-02-26 18:49:22 +01:00
if ( $obj -> socid ) {
print '<a href="' . DOL_URL_ROOT . '/projet/list.php?socid=' . $obj -> socid . '&search_status=1">' . $obj -> nb . '</a>' ;
} else {
print '<a href="' . DOL_URL_ROOT . '/projet/list.php?search_societe=' . urlencode ( '^$' ) . '&search_status=1">' . $obj -> nb . '</a>' ;
}
2018-05-14 15:16:19 +02:00
print '</td>' ;
2009-01-15 00:36:51 +01:00
print " </tr> \n " ;
$i ++ ;
}
2020-02-19 13:59:01 +01:00
if ( $othernb ) {
print '<tr class="oddeven">' ;
print '<td class="nowrap">' ;
2023-04-10 01:55:31 +02:00
print '<span class="opacitymedium">' . $langs -> trans ( " More " ) . '...</span>' ;
2020-02-19 13:59:01 +01:00
print '</td>' ;
print '<td class="nowrap right">' ;
print $othernb ;
print '</td>' ;
print " </tr> \n " ;
}
2009-01-15 00:36:51 +01:00
2020-12-08 20:06:33 +01:00
if ( $num ) {
print " </table> " ;
print '</div>' ;
}
2009-01-15 00:36:51 +01:00
$db -> free ( $resql );
2020-05-21 15:05:19 +02:00
} else {
2009-02-20 23:53:15 +01:00
dol_print_error ( $db );
2003-09-04 13:08:03 +02:00
}
2023-12-14 12:44:09 +01:00
if (( ! getDolGlobalInt ( 'PROJECT_USE_OPPORTUNITIES' ) || getDolGlobalInt ( 'PROJECT_SHOW_OPEN_PROJECTS_LIST_ON_PROJECT_AREA' )) && ! getDolGlobalInt ( 'PROJECT_HIDE_OPEN_PROJECTS_LIST_ON_PROJECT_AREA' )) {
2023-04-21 13:36:35 +02:00
// 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
// we really want it and to allow interface backward compatibility.
2020-10-31 14:32:18 +01:00
print '<br>' ;
2017-07-31 04:52:27 +02:00
2020-10-31 14:32:18 +01:00
print_projecttasks_array ( $db , $form , $socid , $projectsListId , 0 , 1 , $listofoppstatus , array ());
2016-01-18 16:43:15 +01:00
}
2015-02-02 21:33:09 +01:00
2024-06-27 10:41:55 +02:00
print '</div></div></div>' ;
2013-05-13 17:08:36 +02:00
2019-06-18 14:07:52 +02:00
$parameters = array ( 'user' => $user );
2020-02-19 13:59:01 +01:00
$reshook = $hookmanager -> executeHooks ( 'dashboardProjects' , $parameters , $projectstatic ); // Note that $action and $object may have been modified by hook
2019-06-18 14:07:52 +02:00
2018-08-15 12:48:13 +02:00
// End of page
2011-08-27 16:24:16 +02:00
llxFooter ();
2012-02-04 18:34:52 +01:00
$db -> close ();