ryxeo-glpi-git / front / stat.global.php @ b67d8923
Historique | Voir | Annoter | Télécharger (3,76 ko)
1 |
<?php
|
---|---|
2 |
/*
|
3 |
* @version $Id: stat.global.php 7763 2009-01-06 18:44:50Z moyo $
|
4 |
-------------------------------------------------------------------------
|
5 |
GLPI - Gestionnaire Libre de Parc Informatique
|
6 |
Copyright (C) 2003-2009 by the INDEPNET Development Team.
|
7 |
|
8 |
http://indepnet.net/ http://glpi-project.org
|
9 |
-------------------------------------------------------------------------
|
10 |
|
11 |
LICENSE
|
12 |
|
13 |
This file is part of GLPI.
|
14 |
|
15 |
GLPI is free software; you can redistribute it and/or modify
|
16 |
it under the terms of the GNU General Public License as published by
|
17 |
the Free Software Foundation; either version 2 of the License, or
|
18 |
(at your option) any later version.
|
19 |
|
20 |
GLPI is distributed in the hope that it will be useful,
|
21 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23 |
GNU General Public License for more details.
|
24 |
|
25 |
You should have received a copy of the GNU General Public License
|
26 |
along with GLPI; if not, write to the Free Software
|
27 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
28 |
--------------------------------------------------------------------------
|
29 |
*/
|
30 |
|
31 |
// ----------------------------------------------------------------------
|
32 |
// Original Author of file:
|
33 |
// Purpose of file:
|
34 |
// ----------------------------------------------------------------------
|
35 |
|
36 |
|
37 |
$NEEDED_ITEMS=array("tracking","stat"); |
38 |
|
39 |
define('GLPI_ROOT', '..'); |
40 |
include (GLPI_ROOT . "/inc/includes.php"); |
41 |
|
42 |
|
43 |
commonHeader($LANG["Menu"][13],$_SERVER['PHP_SELF'],"maintain","stat"); |
44 |
|
45 |
checkRight("statistic","1"); |
46 |
|
47 |
if(empty($_POST["date1"])&&empty($_POST["date2"])) { |
48 |
$year=date("Y")-1; |
49 |
$_POST["date1"]=date("Y-m-d",mktime(1,0,0,date("m"),date("d"),$year)); |
50 |
|
51 |
$_POST["date2"]=date("Y-m-d"); |
52 |
} |
53 |
|
54 |
if(empty($_POST["date1"])) $_POST["date1"] = ""; |
55 |
if(empty($_POST["date2"])) $_POST["date2"] = ""; |
56 |
if ($_POST["date1"]!=""&&$_POST["date2"]!=""&&strcmp($_POST["date2"],$_POST["date1"])<0){ |
57 |
$tmp=$_POST["date1"]; |
58 |
$_POST["date1"]=$_POST["date2"]; |
59 |
$_POST["date2"]=$tmp; |
60 |
} |
61 |
|
62 |
|
63 |
echo "<div align='center'><form method=\"post\" name=\"form\" action=\"stat.global.php\">"; |
64 |
echo "<table class='tab_cadre'><tr class='tab_bg_2'><td align='right'>"; |
65 |
echo $LANG["search"][8]." :</td><td>"; |
66 |
showCalendarForm("form","date1",$_POST["date1"]); |
67 |
echo "</td><td rowspan='2' align='center'><input type=\"submit\" class='button' name=\"submit\" Value=\"". $LANG["buttons"][7] ."\" /></td></tr>"; |
68 |
echo "<tr class='tab_bg_2'><td align='right'>".$LANG["search"][9]." :</td><td>"; |
69 |
showCalendarForm("form","date2",$_POST["date2"]); |
70 |
echo "</td></tr>"; |
71 |
echo "</table></form></div>"; |
72 |
|
73 |
|
74 |
///////// Stats nombre intervention
|
75 |
// Total des interventions
|
76 |
$entrees_total=constructEntryValues("inter_total",$_POST["date1"],$_POST["date2"]); |
77 |
if (count($entrees_total)>0) |
78 |
graphBy($entrees_total,$LANG["stats"][5],$LANG["stats"][35],1,"month"); |
79 |
|
80 |
// Total des interventions r�olues
|
81 |
$entrees_solved=constructEntryValues("inter_solved",$_POST["date1"],$_POST["date2"]); |
82 |
if (count($entrees_solved)>0) |
83 |
graphBy($entrees_solved,$LANG["stats"][11],$LANG["stats"][35],1,"month"); |
84 |
|
85 |
//Temps moyen de resolution d'intervention
|
86 |
$entrees_avgtime=constructEntryValues("inter_avgsolvedtime",$_POST["date1"],$_POST["date2"]); |
87 |
if (count($entrees_avgtime)>0) |
88 |
graphBy($entrees_avgtime,$LANG["stats"][6],$LANG["job"][21],0,"month"); |
89 |
|
90 |
//Temps moyen d'intervention r�l
|
91 |
$entrees_avgtime=constructEntryValues("inter_avgrealtime",$_POST["date1"],$_POST["date2"]); |
92 |
if (count($entrees_avgtime)>0) |
93 |
graphBy($entrees_avgtime,$LANG["stats"][25],$LANG["stats"][33],0,"month"); |
94 |
|
95 |
//Temps moyen de prise en compte de l'intervention
|
96 |
$entrees_avgtime=constructEntryValues("inter_avgtakeaccount",$_POST["date1"],$_POST["date2"]); |
97 |
if (count($entrees_avgtime)>0) |
98 |
graphBy($entrees_avgtime,$LANG["stats"][30],$LANG["job"][21],0,"month"); |
99 |
|
100 |
commonFooter(); |
101 |
?>
|