Ejemplo n.º 1
0
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
/**
 *  \file       htdocs/expensereport/stats/index.php
 *  \ingroup    expensereport
 *  \brief      Page for statistics of module trips and expenses
 */
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/dolgraph.class.php';
require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereportstats.class.php';
$langs->load("trips");
$WIDTH = DolGraph::getDefaultGraphSizeForStats('width');
$HEIGHT = DolGraph::getDefaultGraphSizeForStats('height');
$userid = GETPOST('userid', 'int');
$socid = GETPOST('socid', 'int');
if ($socid < 0) {
    $socid = 0;
}
$id = GETPOST('id', 'int');
// Security check
if ($user->societe_id > 0) {
    $action = '';
    $socid = $user->societe_id;
}
if ($user->societe_id) {
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'expensereport', $id, '');
Ejemplo n.º 2
0
 * 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
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
/**
 *	    \file       htdocs/adherents/stats/geo.php
 *      \ingroup    member
 *		\brief      Page with geographical statistics on members
 */
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/member.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/dolgraph.class.php';
$graphwidth = DolGraph::getDefaultGraphSizeForStats('width', 700);
$mapratio = 0.5;
$graphheight = round($graphwidth * $mapratio);
$mode = GETPOST('mode') ? GETPOST('mode') : '';
// Security check
if ($user->societe_id > 0) {
    $action = '';
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'adherent', '', '', 'cotisation');
$year = strftime("%Y", time());
$startyear = $year - 2;
$endyear = $year;
$langs->load("members");
$langs->load("companies");
/*