ryxeo-glpi-git / inc / registry.function.php @ b67d8923
Historique | Voir | Annoter | Télécharger (2,82 ko)
1 | b67d8923 | Eric Seigne | <?php
|
---|---|---|---|
2 | /*
|
||
3 | * @version $Id: registry.function.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: Olivier Andreotti
|
||
33 | // Purpose of file:
|
||
34 | // ----------------------------------------------------------------------
|
||
35 | |||
36 | /** Display registry values for a computer
|
||
37 | * @param $ID integer : computer ID
|
||
38 | */
|
||
39 | function showRegistry($ID){ |
||
40 | |||
41 | global $DB,$CFG_GLPI, $LANG; |
||
42 | |||
43 | if (!haveRight("computer","r")) return false; |
||
44 | //REGISTRY HIVE
|
||
45 | $REGISTRY_HIVE=array("HKEY_CLASSES_ROOT", |
||
46 | "HKEY_CURRENT_USER",
|
||
47 | "HKEY_LOCAL_MACHINE",
|
||
48 | "HKEY_USERS",
|
||
49 | "HKEY_CURRENT_CONFIG",
|
||
50 | "HKEY_DYN_DATA");
|
||
51 | |||
52 | |||
53 | $query = "SELECT ID FROM glpi_registry WHERE computer_id='".$ID."'"; |
||
54 | |||
55 | echo "<br>"; |
||
56 | if ($result = $DB->query($query)) { |
||
57 | if ($DB->numrows($result)!=0) { |
||
58 | |||
59 | echo "<br><br><div class='center'><table class='tab_cadre_fixe'>"; |
||
60 | echo "<tr>"; |
||
61 | echo "<th colspan='4'>"; |
||
62 | echo $DB->numrows($result)." "; |
||
63 | echo $LANG["registry"][4]; |
||
64 | |||
65 | echo ":</th>"; |
||
66 | |||
67 | echo "</tr>"; |
||
68 | echo "<tr>"; |
||
69 | echo "<th>".$LANG["registry"][6]."</th>"; |
||
70 | echo "<th>".$LANG["registry"][1]."</th><th>".$LANG["registry"][2]."</th>"; |
||
71 | echo "<th>".$LANG["registry"][3]."</th></tr>\n"; |
||
72 | while ($regid=$DB->fetch_row($result)) { |
||
73 | $reg = new Registry; |
||
74 | $reg->getFromDB(current($regid)); |
||
75 | echo "<tr class='tab_bg_1'>"; |
||
76 | echo "<td>".$reg->fields["registry_ocs_name"]."</td>"; |
||
77 | echo "<td>".$REGISTRY_HIVE[$reg->fields["registry_hive"]]."</td>"; |
||
78 | echo "<td>".$reg->fields["registry_path"]."</td>"; |
||
79 | echo "<td>".$reg->fields["registry_value"]."</td>"; |
||
80 | echo "</tr>"; |
||
81 | |||
82 | } |
||
83 | echo "</table>"; |
||
84 | echo "</div>\n\n"; |
||
85 | |||
86 | } |
||
87 | else echo "<div class='center'><strong>".$LANG["registry"][5]."</strong></div>"; |
||
88 | } |
||
89 | |||
90 | } |
||
91 | ?> |