ryxeo-glpi-git / front / report.dynamic.php @ b67d8923
Historique | Voir | Annoter | Télécharger (4,34 ko)
1 | b67d8923 | Eric Seigne | <?php
|
---|---|---|---|
2 | /*
|
||
3 | * @version $Id: report.dynamic.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("search", |
||
38 | "user",
|
||
39 | "computer",
|
||
40 | "printer",
|
||
41 | "monitor",
|
||
42 | "peripheral",
|
||
43 | "networking",
|
||
44 | "software",
|
||
45 | "phone",
|
||
46 | "cartridge",
|
||
47 | "consumable",
|
||
48 | "stat",
|
||
49 | "tracking",
|
||
50 | "contract",
|
||
51 | "infocom",
|
||
52 | "enterprise",
|
||
53 | "device",
|
||
54 | "document",
|
||
55 | "knowbase",
|
||
56 | "group"
|
||
57 | ); |
||
58 | |||
59 | |||
60 | define('GLPI_ROOT', '..'); |
||
61 | include (GLPI_ROOT . "/inc/includes.php"); |
||
62 | |||
63 | |||
64 | checkCentralAccess(); |
||
65 | |||
66 | if (isset($_GET["item_type"])&&isset($_GET["display_type"])){ |
||
67 | |||
68 | |||
69 | if ($_GET["display_type"]<0) { |
||
70 | $_GET["display_type"]=-$_GET["display_type"]; |
||
71 | $_GET["export_all"]=1; |
||
72 | } |
||
73 | |||
74 | // PDF case
|
||
75 | if ($_GET["display_type"]==PDF_OUTPUT_LANDSCAPE || $_GET["display_type"]==PDF_OUTPUT_PORTRAIT){ |
||
76 | include (GLPI_ROOT . "/lib/ezpdf/class.ezpdf.php"); |
||
77 | } |
||
78 | |||
79 | switch ($_GET["item_type"]){ |
||
80 | case KNOWBASE_TYPE : |
||
81 | showKbItemList($_SERVER['PHP_SELF'],$_GET["contains"],$_GET["start"],$_GET["parentID"],$_GET["faq"]); |
||
82 | break;
|
||
83 | case TRACKING_TYPE : |
||
84 | showTrackingList($_SERVER['PHP_SELF'],$_GET["start"],$_GET["sort"],$_GET["order"],$_GET["status"],$_GET["tosearch"],$_GET["search"],$_GET["author"],$_GET["group"],$_GET["showfollowups"],$_GET["category"],$_GET["assign"],$_GET["assign_ent"],$_GET["assign_group"],$_GET["priority"],$_GET["request_type"],$_GET["item"],$_GET["type"],$_GET["field"],$_GET["contains"],$_GET["date1"],$_GET["date2"],$_GET["only_computers"],$_GET["enddate1"],$_GET["enddate2"],$_GET["datemod1"],$_GET["datemod2"]); |
||
85 | break;
|
||
86 | case STAT_TYPE : |
||
87 | |||
88 | if (isset($_GET["item_type_param"])){ |
||
89 | $params=unserialize(stripslashes($_GET["item_type_param"])); |
||
90 | switch ($params["type"]){ |
||
91 | case "comp_champ": |
||
92 | $val=getStatsItems($params["date1"],$params["date2"],$params["table"]); |
||
93 | displayStats($params["type"],$params["field"],$params["date1"],$params["date2"],$params["start"],$val,$params["field"]); |
||
94 | break;
|
||
95 | case "device": |
||
96 | $val=getStatsItems($params["date1"],$params["date2"],$params["field"]); |
||
97 | displayStats($params["type"],$params["field"],$params["date1"],$params["date2"],$params["start"],$val,$params["field"]); |
||
98 | break;
|
||
99 | default:
|
||
100 | $val=getStatsItems($params["date1"],$params["date2"],$params["type"]); |
||
101 | displayStats($params["type"],$params["field"],$params["date1"],$params["date2"],$params["start"],$val); |
||
102 | break;
|
||
103 | } |
||
104 | } else if (isset($_GET["type"])&&$_GET["type"]=="hardwares"){ |
||
105 | showItemStats("",$_GET["date1"],$_GET["date2"],$_GET['start']); |
||
106 | } |
||
107 | break;
|
||
108 | default :
|
||
109 | // Plugin case
|
||
110 | if ($_GET["item_type"]>1000){ |
||
111 | if (isset($PLUGIN_HOOKS['plugin_types'][$_GET["item_type"]])){ |
||
112 | $function='plugin_'.$PLUGIN_HOOKS['plugin_types'][$_GET["item_type"]].'_dynamicReport'; |
||
113 | if (function_exists($function)){ |
||
114 | if ($function($_GET)){ |
||
115 | // If display done exit else do normal display
|
||
116 | exit();
|
||
117 | } |
||
118 | } |
||
119 | } |
||
120 | } |
||
121 | |||
122 | |||
123 | manageGetValuesInSearch($_GET["item_type"]); |
||
124 | |||
125 | showList($_GET["item_type"],$_SERVER['PHP_SELF'],$_GET["field"],$_GET["contains"],$_GET["sort"],$_GET["order"],$_GET["start"],$_GET["deleted"],$_GET["link"],$_GET["distinct"],$_GET["link2"],$_GET["contains2"],$_GET["field2"],$_GET["type2"]); |
||
126 | break;
|
||
127 | } |
||
128 | } |
||
129 | ?> |