ryxeo-glpi-git / front / report.php @ b67d8923
Historique | Voir | Annoter | Télécharger (3,76 ko)
1 | b67d8923 | Eric Seigne | <?php
|
---|---|---|---|
2 | /*
|
||
3 | * @version $Id: report.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 | // Based on:
|
||
32 | // IRMA, Information Resource-Management and Administration
|
||
33 | // Christian Bauer
|
||
34 | // ----------------------------------------------------------------------
|
||
35 | // Original Author of file:
|
||
36 | // Purpose of file:
|
||
37 | // ----------------------------------------------------------------------
|
||
38 | |||
39 | |||
40 | |||
41 | define('GLPI_ROOT', '..'); |
||
42 | include (GLPI_ROOT . "/inc/includes.php"); |
||
43 | |||
44 | checkRight("reports","r"); |
||
45 | |||
46 | commonHeader($LANG["Menu"][6],$_SERVER['PHP_SELF'],"utils","report"); |
||
47 | |||
48 | |||
49 | echo "<div align='center'><table class='tab_cadre' cellpadding='5'>"; |
||
50 | echo "<tr><th>".$LANG["reports"][0].":</th></tr>"; |
||
51 | |||
52 | // Report generation
|
||
53 | // Default Report included
|
||
54 | $report_list["default"]["name"] = $LANG["reports"][26]; |
||
55 | $report_list["default"]["file"] = "report.default.php"; |
||
56 | |||
57 | // Vous pouvez faire vos propres rapports :
|
||
58 | // My Own Report:
|
||
59 | // $report_list["my_own"]["name"] = "My Own Report";
|
||
60 | // $report_list["my_own"]["file"] = "reports/my_own.php";
|
||
61 | |||
62 | |||
63 | |||
64 | if (haveRight("contract_infocom","r")){ |
||
65 | // Rapport ajout� par GLPI V0.2
|
||
66 | $report_list["Contrats"]["name"] = $LANG["reports"][27]; |
||
67 | $report_list["Contrats"]["file"] = "report.contract.php"; |
||
68 | $report_list["Par_annee"]["name"] = $LANG["reports"][28]; |
||
69 | $report_list["Par_annee"]["file"] = "report.year.php"; |
||
70 | $report_list["Infocoms"]["name"]=$LANG["reports"][62]; |
||
71 | $report_list["Infocoms"]["file"]="report.infocom.php"; |
||
72 | $report_list["Infocoms2"]["name"]=$LANG["reports"][63]; |
||
73 | $report_list["Infocoms2"]["file"]="report.infocom.conso.php"; |
||
74 | } |
||
75 | if (haveRight("networking","r")){ |
||
76 | $report_list["Rapport prises reseau"]["name"]=$LANG["reports"][33]; |
||
77 | $report_list["Rapport prises reseau"]["file"]="report.networking.php"; |
||
78 | } |
||
79 | if (haveRight("reservation_central","r")){ |
||
80 | $report_list["reservation"]["name"]=$LANG["financial"][50]; |
||
81 | $report_list["reservation"]["file"]="report.reservation.php"; |
||
82 | } |
||
83 | |||
84 | |||
85 | $i = 0; |
||
86 | $count = count($report_list); |
||
87 | while($data = each($report_list)) { |
||
88 | $val = $data[0]; |
||
89 | $name = $report_list["$val"]["name"]; |
||
90 | $file = $report_list["$val"]["file"]; |
||
91 | echo "<tr class='tab_bg_1'><td align='center'><a href=\"$file\"><b>$name</b></a></td></tr>"; |
||
92 | $i++;
|
||
93 | } |
||
94 | |||
95 | |||
96 | $names=array(); |
||
97 | if (isset($PLUGIN_HOOKS["reports"]) && is_array($PLUGIN_HOOKS["reports"])) { |
||
98 | foreach ($PLUGIN_HOOKS["reports"] as $plug => $pages){ |
||
99 | $function="plugin_version_$plug"; |
||
100 | $plugname=$function(); |
||
101 | if (is_array($pages)&&count($pages)){ |
||
102 | foreach ($pages as $page => $name){ |
||
103 | $names[$plug.'/'.$page]=$plugname['name'].' - '.$name; |
||
104 | } |
||
105 | } |
||
106 | } |
||
107 | asort($names); |
||
108 | } |
||
109 | |||
110 | foreach ($names as $key => $val) { |
||
111 | echo "<tr class='tab_bg_1'><td align='center'><a href='".$CFG_GLPI["root_doc"]."/plugins/$key'><strong>".$val."</strong></a></td></tr>"; |
||
112 | } |
||
113 | |||
114 | |||
115 | echo "</table></div>"; |
||
116 | |||
117 | |||
118 | commonFooter(); |
||
119 | ?> |