llxHeader(); $dir=$conf->propale->dir_temp; $mesg = '<a href="month.php?year='.($year - 1).'">'.img_previous().'</a> '; $mesg.= $langs->trans("Year")." $year"; $mesg.= ' <a href="month.php?year='.($year + 1).'">'.img_next().'</a>'; print_fiche_titre($langs->trans("ProposalsStatistics"), $mesg); create_exdir($dir); $stats = new PropaleStats($db, $socid); $data = $stats->getNbByMonth($year); if (!$user->rights->societe->client->voir || $user->societe_id) { $filename = $dir.'/proposalsnb-'.$user->id.'-'.$year.'.png'; $fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=proposalsnb-'.$user->id.'-'.$year.'.png'; } else { $filename = $dir.'/proposalsnb-'.$year.'.png'; $fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&file=proposalsnb-'.$year.'.png'; } $px = new DolGraph(); $mesg = $px->isGraphKo(); if (! $mesg)