ryxeo-glpi-git / htdocs / front / helpdesk.abuledu_details.php @ 69e9d959
Historique | Voir | Annoter | Télécharger (7,37 ko)
1 |
<?php
|
---|---|
2 |
/*
|
3 |
Special AbulEdu ...
|
4 |
*/
|
5 |
|
6 |
// ----------------------------------------------------------------------
|
7 |
// Original Author of file:
|
8 |
// Purpose of file:
|
9 |
// ----------------------------------------------------------------------
|
10 |
|
11 |
|
12 |
|
13 |
$NEEDED_ITEMS=array("user","document","knowbase"); |
14 |
|
15 |
define('GLPI_ROOT', '..'); |
16 |
include (GLPI_ROOT . "/inc/includes.php"); |
17 |
|
18 |
// Redirect management
|
19 |
if (isset($_GET["redirect"])){ |
20 |
manageRedirect($_GET["redirect"]); |
21 |
} |
22 |
|
23 |
//*******************
|
24 |
// Affichage Module FAQ
|
25 |
//******************
|
26 |
|
27 |
|
28 |
|
29 |
if (isset($_SESSION["glpiID"])){ |
30 |
helpHeader($LANG["Menu"][20],$_SERVER['PHP_SELF'],$_SESSION["glpiname"]); |
31 |
} else {
|
32 |
$_SESSION["glpilanguage"]=$CFG_GLPI['default_language']; |
33 |
// Anonymous FAQ
|
34 |
simpleHeader($LANG["Menu"][20],array($LANG["Menu"][20]=>$_SERVER['PHP_SELF'])); |
35 |
} |
36 |
|
37 |
print " |
38 |
<h1>" . ereg_replace("\(arborescence\)","",$_SESSION['glpiactive_entity_shortname']) . "</h1> |
39 |
|
40 |
<p>Vous êtes maintenant connecté(e) sur notre plate-forme de gestion abuledu.net. Vous pouvez, en cliquant dans le menu de gauche, suivre les interventions en cours sur votre serveur ou nous demander d'intervenir pour un nouveau problème.</p>
|
41 |
|
42 |
<p>Si vous voulez changer votre mot de passe, cliquez sur le lien \"Préférences\" du menu \"Connexion\" et mettez votre nouveau mot de passe dans le champ \"password\".</p>
|
43 |
|
44 |
<h2>Votre serveur / Votre installation</h2>
|
45 |
|
46 |
";
|
47 |
|
48 |
//Les images / photos prises de cette installation ...
|
49 |
//le bug c'est qu'on a aussi les images jointes aux tickets !!!
|
50 |
$query = "SELECT glpi_docs.FK_entities, glpi_docs.recursive, |
51 |
glpi_docs.name AS name,
|
52 |
glpi_docs.filename AS filename,
|
53 |
glpi_docs.mime AS mimetype,
|
54 |
glpi_docs.ID AS ID,
|
55 |
glpi_docs.comments AS comments
|
56 |
FROM glpi_docs
|
57 |
LEFT JOIN glpi_entities ON (glpi_docs.FK_entities = glpi_entities.ID)
|
58 |
LEFT JOIN glpi_dropdown_rubdocs ON (glpi_docs.rubrique = glpi_dropdown_rubdocs.ID)
|
59 |
WHERE
|
60 |
glpi_docs.mime LIKE '%image%' AND
|
61 |
glpi_docs.name NOT LIKE '%Ticket%' AND
|
62 |
glpi_docs.deleted='0' AND ( glpi_docs.FK_entities IN (" . $_SESSION['glpiactive_entity'] . ") OR ( glpi_docs.recursive='1' AND glpi_docs.FK_entities IN (" . $_SESSION['glpiactive_entity'] . ")) ) ORDER BY glpi_docs.name"; |
63 |
|
64 |
$result = $DB->query($query) or die($DB->error()); |
65 |
//print $query;
|
66 |
|
67 |
if($DB->numrows($result) == 0) { |
68 |
print "<p>Aucune information disponible ...</p>"; |
69 |
} |
70 |
else {
|
71 |
for($i = 0; $i < $DB->numrows($result); $i++) { |
72 |
$data=$DB->fetch_array($result); |
73 |
print "<img title='" . addslashes($data['ame']) . "' alt='" . addslashes($data['ame']) . "' src='document.abuledu_view.php?file=" . $data['filename'] . "'>\n"; |
74 |
print "<p>" . $data['comments'] . "</p>\n"; |
75 |
} |
76 |
} |
77 |
|
78 |
|
79 |
print " <h2>Votre parc informatique</h2> |
80 |
|
81 |
";
|
82 |
|
83 |
//print_r($_SESSION);
|
84 |
//L'inventaire du parc ... en résumé l'essentiel
|
85 |
$query = "SELECT |
86 |
glpi_computers.name AS name,
|
87 |
glpi_dropdown_manufacturer.name AS manufacturer,
|
88 |
glpi_computers.serial AS serialnumber,
|
89 |
glpi_type_computers.name AS typepc,
|
90 |
glpi_dropdown_model.name AS serialtype,
|
91 |
glpi_device_processor.designation AS processor,
|
92 |
SUM(DEVICE_2.specificity) / COUNT( DEVICE_2.ID) AS processorfreq,
|
93 |
SUM(DEVICE_3.specificity) / COUNT( DEVICE_3.ID) * COUNT( DISTINCT DEVICE_3.ID) AS memory,
|
94 |
glpi_computers.date_mod AS dateinventaire
|
95 |
FROM glpi_computers
|
96 |
LEFT JOIN glpi_entities ON (glpi_computers.FK_entities = glpi_entities.ID)
|
97 |
LEFT JOIN glpi_dropdown_state ON (glpi_computers.state = glpi_dropdown_state.ID)
|
98 |
LEFT JOIN glpi_dropdown_manufacturer ON (glpi_computers.FK_glpi_enterprise = glpi_dropdown_manufacturer.ID)
|
99 |
LEFT JOIN glpi_type_computers ON (glpi_computers.type = glpi_type_computers.ID)
|
100 |
LEFT JOIN glpi_dropdown_model ON (glpi_computers.model = glpi_dropdown_model.ID)
|
101 |
LEFT JOIN glpi_computer_device AS DEVICE_2 ON (glpi_computers.ID = DEVICE_2.FK_computers AND DEVICE_2.device_type='2')
|
102 |
LEFT JOIN glpi_device_processor ON (DEVICE_2.FK_device = glpi_device_processor.ID)
|
103 |
LEFT JOIN glpi_dropdown_locations ON (glpi_computers.location = glpi_dropdown_locations.ID)
|
104 |
LEFT JOIN glpi_computer_device AS DEVICE_3 ON (glpi_computers.ID = DEVICE_3.FK_computers AND DEVICE_3.device_type='3')
|
105 |
LEFT JOIN glpi_device_ram ON (DEVICE_3.FK_device = glpi_device_ram.ID)
|
106 |
WHERE glpi_computers.FK_entities='" . $_SESSION['glpiactive_entity'] . "' AND glpi_computers.deleted='0' AND glpi_computers.is_template='0' GROUP BY glpi_computers.ID ORDER BY name ASC"; |
107 |
|
108 |
$result = $DB->query($query) or die($DB->error()); |
109 |
//print $query;
|
110 |
|
111 |
print "<table class='tab_cadre' width='100%' cellpadding='2'>\n"; |
112 |
print "<tr class='tab_bg_4'> |
113 |
<td>Nom</td>
|
114 |
<td>Fabriquant</td>
|
115 |
<td>Modèle</td>
|
116 |
<td>Numéro de série</td>
|
117 |
<td>Type</td>
|
118 |
<td>CPU</td>
|
119 |
<td>Fréquence CPU</td>
|
120 |
<td>RAM</td>
|
121 |
<td>Date d'inventaire</td>
|
122 |
</tr>\n";
|
123 |
|
124 |
for($i = 0; $i < $DB->numrows($result); $i++) { |
125 |
$data=$DB->fetch_array($result); |
126 |
print "<tr class='tab_bg_" . ($i%2?"2":"5") . "'> |
127 |
<td>" . $data['name'] . "</td> |
128 |
<td>" . $data['manufacturer'] . "</td> |
129 |
<td>" . $data['serialtype'] . "</td> |
130 |
<td>" . $data['serialnumber'] . "</td> |
131 |
<td>" . $data['typepc'] . "</td> |
132 |
<td>" . $data['processor'] . "</td> |
133 |
<td>" . $data['processorfreq'] . "</td> |
134 |
<td>" . $data['memory'] . "</td> |
135 |
<td>" . $data['dateinventaire'] . "</td> |
136 |
</tr>\n";
|
137 |
} |
138 |
|
139 |
print "</table>"; |
140 |
|
141 |
print "<h2>Votre cahier de recette</h2>"; |
142 |
|
143 |
$query = "SELECT glpi_docs.FK_entities, glpi_docs.recursive, |
144 |
glpi_docs.name AS name,
|
145 |
glpi_docs.filename AS filename,
|
146 |
glpi_docs.mime AS mimetype,
|
147 |
glpi_docs.ID AS ID,
|
148 |
glpi_docs.comments AS comments
|
149 |
FROM glpi_docs
|
150 |
LEFT JOIN glpi_entities ON (glpi_docs.FK_entities = glpi_entities.ID)
|
151 |
LEFT JOIN glpi_dropdown_rubdocs ON (glpi_docs.rubrique = glpi_dropdown_rubdocs.ID)
|
152 |
WHERE
|
153 |
glpi_docs.filename LIKE '%recette%' AND
|
154 |
glpi_docs.deleted='0' AND ( glpi_docs.FK_entities IN (" . $_SESSION['glpiactive_entity'] . ") OR ( glpi_docs.recursive='1' AND glpi_docs.FK_entities IN (" . $_SESSION['glpiactive_entity'] . ")) ) ORDER BY glpi_docs.name"; |
155 |
|
156 |
$result = $DB->query($query) or die($DB->error()); |
157 |
//print $query;
|
158 |
|
159 |
if($DB->numrows($result) == 0) { |
160 |
print "<p>Aucune information disponible ...</p>"; |
161 |
} |
162 |
else {
|
163 |
for($i = 0; $i < $DB->numrows($result); $i++) { |
164 |
$data=$DB->fetch_array($result); |
165 |
print "<p>Vous pouvez télécharger votre cahier de recette: <a href='document.abuledu_view.php?file=" . $data['filename'] . "'>" . $data['filename'] . "</a></p>\n"; |
166 |
} |
167 |
} |
168 |
|
169 |
print "<h2>Votre contrat de maintenance</h2>"; |
170 |
|
171 |
$query = "SELECT glpi_docs.FK_entities, glpi_docs.recursive, |
172 |
glpi_docs.name AS name,
|
173 |
glpi_docs.filename AS filename,
|
174 |
glpi_docs.mime AS mimetype,
|
175 |
glpi_docs.ID AS ID,
|
176 |
glpi_docs.comments AS comments
|
177 |
FROM glpi_docs
|
178 |
LEFT JOIN glpi_entities ON (glpi_docs.FK_entities = glpi_entities.ID)
|
179 |
LEFT JOIN glpi_dropdown_rubdocs ON (glpi_docs.rubrique = glpi_dropdown_rubdocs.ID)
|
180 |
WHERE
|
181 |
glpi_docs.filename LIKE '%contrat%' AND
|
182 |
glpi_docs.deleted='0' AND ( glpi_docs.FK_entities IN (" . $_SESSION['glpiactive_entity'] . ") OR ( glpi_docs.recursive='1' AND glpi_docs.FK_entities IN (" . $_SESSION['glpiactive_entity'] . ")) ) ORDER BY glpi_docs.name"; |
183 |
|
184 |
$result = $DB->query($query) or die($DB->error()); |
185 |
//print $query;
|
186 |
|
187 |
if($DB->numrows($result) == 0) { |
188 |
print "<p>Aucune information disponible ...</p>"; |
189 |
} |
190 |
else {
|
191 |
for($i = 0; $i < $DB->numrows($result); $i++) { |
192 |
$data=$DB->fetch_array($result); |
193 |
print "<p>Vous pouvez télécharger votre contrat de maintenance: <a href='document.abuledu_view.php?file=" . $data['filename'] . "'>" . $data['filename'] . "</a></p>\n"; |
194 |
} |
195 |
} |
196 |
|
197 |
helpFooter(); |
198 |
|
199 |
?>
|