Projet

Général

Profil

Paste
Statistiques
| Branche: | Révision:

ryxeo-glpi-git / front / stat.item.php @ b67d8923

Historique | Voir | Annoter | Télécharger (2,9 ko)

1
<?php
2
/*
3
 * @version $Id: stat.item.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

    
38
$NEEDED_ITEMS=array("tracking","computer","printer","monitor","peripheral","networking","software","phone","stat");
39

    
40
define('GLPI_ROOT', '..');
41
include (GLPI_ROOT . "/inc/includes.php");
42

    
43
commonHeader($LANG["Menu"][13],$_SERVER['PHP_SELF'],"maintain","stat");
44

    
45
checkRight("statistic","1");
46

    
47
echo "<div align ='center'><p><b><span class='icon_consol'>".$LANG["stats"][46]."</span></b></p></div>";
48

    
49
if (isset($_GET["date1"])) $_POST["date1"] = $_GET["date1"];
50
if (isset($_GET["date2"])) $_POST["date2"] = $_GET["date2"];
51

    
52
if(empty($_POST["date1"])&&empty($_POST["date2"])) {
53
        $year=date("Y")-1;
54
        $_POST["date1"]=date("Y-m-d",mktime(1,0,0,date("m"),date("d"),$year));
55

    
56
        $_POST["date2"]=date("Y-m-d");
57
}
58

    
59
if ($_POST["date1"]!=""&&$_POST["date2"]!=""&&strcmp($_POST["date2"],$_POST["date1"])<0){
60
        $tmp=$_POST["date1"];
61
        $_POST["date1"]=$_POST["date2"];
62
        $_POST["date2"]=$tmp;
63
}
64

    
65
if(!isset($_GET["start"])) $_GET["start"] = 0;
66

    
67
echo "<div align='center'><form method=\"post\" name=\"form\" action=\"stat.item.php\">";
68
echo "<table class='tab_cadre'><tr class='tab_bg_2'><td align='right'>";
69
echo $LANG["search"][8]." :</td><td>";
70
showCalendarForm("form","date1",$_POST["date1"]);
71
echo "</td><td rowspan='2' align='center'><input type=\"submit\" class='button' name=\"submit\" Value=\"". $LANG["buttons"][7] ."\" /></td></tr>";
72
echo "<tr class='tab_bg_2'><td align='right'>".$LANG["search"][9]." :</td><td>";
73
showCalendarForm("form","date2",$_POST["date2"]);
74
echo "</td></tr>";
75
echo "</table></form></div>";
76

    
77
showItemStats($_SERVER['PHP_SELF'],$_POST["date1"],$_POST["date2"],$_GET['start']);
78

    
79
commonFooter();
80
?>
Redmine Appliance - Powered by TurnKey Linux