21 |
* |
* |
22 |
* $Id$ |
* $Id$ |
23 |
* $Source$ |
* $Source$ |
|
* |
|
24 |
*/ |
*/ |
25 |
|
|
26 |
/** |
/** |
1325 |
|
|
1326 |
/** |
/** |
1327 |
* \brief Charge indicateurs this->nbtodo et this->nbtodolate de tableau de bord |
* \brief Charge indicateurs this->nbtodo et this->nbtodolate de tableau de bord |
1328 |
|
* \param user Objet user |
1329 |
* \return int <0 si ko, >0 si ok |
* \return int <0 si ko, >0 si ok |
1330 |
*/ |
*/ |
1331 |
function load_board() |
function load_board($user) |
1332 |
{ |
{ |
1333 |
global $conf; |
global $conf; |
1334 |
|
|
1335 |
|
if ($user->societe_id) return -1; // protection pour eviter appel par utilisateur externe |
1336 |
|
|
1337 |
$this->nbtodo=$this->nbtodolate=0; |
$this->nbtodo=$this->nbtodolate=0; |
1338 |
$sql = "SELECT a.rowid,".$this->db->pdate("a.datefin")." as datefin"; |
$sql = "SELECT a.rowid,".$this->db->pdate("a.datefin")." as datefin"; |
1339 |
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a"; |
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a"; |