Projet

Général

Profil

Paste
Statistiques
| Branche: | Révision:

ryxeo-glpi-git / htdocs / front / helpdesk.abuledu_details.php @ d485029b

Historique | Voir | Annoter | Télécharger (7,27 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
$query = "SELECT glpi_docs.FK_entities, glpi_docs.recursive,
50
  glpi_docs.name AS name,
51
  glpi_docs.filename AS filename,
52
  glpi_docs.mime AS mimetype,
53
  glpi_docs.ID AS ID,
54
  glpi_docs.comments AS comments
55
FROM glpi_docs
56
  LEFT JOIN glpi_entities ON (glpi_docs.FK_entities = glpi_entities.ID)
57
  LEFT JOIN glpi_dropdown_rubdocs ON (glpi_docs.rubrique = glpi_dropdown_rubdocs.ID)
58
WHERE
59
  glpi_docs.mime LIKE '%image%' AND
60
  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";
61

    
62
$result = $DB->query($query) or die($DB->error());
63
//print $query;
64

    
65
if($DB->numrows($result) == 0) {
66
  print "<p>Aucune information disponible ...</p>";
67
 }
68
 else {
69
   for($i = 0; $i < $DB->numrows($result); $i++) {
70
     $data=$DB->fetch_array($result);
71
     print "<img title='" . addslashes($data['ame']) . "' alt='" . addslashes($data['ame']) . "' src='document.abuledu_view.php?file=" . $data['filename'] . "'>\n";
72
     print "<p>" . $data['comments'] . "</p>\n";
73
   }
74
 }
75

    
76

    
77
print " <h2>Votre parc informatique</h2>
78

79
";
80

    
81
//print_r($_SESSION);
82
//L'inventaire du parc ... en résumé l'essentiel
83
$query = "SELECT
84
  glpi_computers.name AS name,
85
  glpi_dropdown_manufacturer.name AS manufacturer,
86
  glpi_computers.serial AS serialnumber,
87
  glpi_type_computers.name AS typepc,
88
  glpi_dropdown_model.name AS serialtype,
89
  glpi_device_processor.designation AS processor,
90
  SUM(DEVICE_2.specificity) / COUNT( DEVICE_2.ID) AS processorfreq,
91
  SUM(DEVICE_3.specificity) / COUNT( DEVICE_3.ID) * COUNT( DISTINCT DEVICE_3.ID) AS memory,
92
  glpi_computers.date_mod AS dateinventaire
93
FROM glpi_computers
94
  LEFT JOIN glpi_entities ON (glpi_computers.FK_entities = glpi_entities.ID)
95
  LEFT JOIN glpi_dropdown_state ON (glpi_computers.state = glpi_dropdown_state.ID)
96
  LEFT JOIN glpi_dropdown_manufacturer ON (glpi_computers.FK_glpi_enterprise = glpi_dropdown_manufacturer.ID)
97
  LEFT JOIN glpi_type_computers ON (glpi_computers.type = glpi_type_computers.ID)
98
  LEFT JOIN glpi_dropdown_model ON (glpi_computers.model = glpi_dropdown_model.ID)
99
  LEFT JOIN glpi_computer_device AS DEVICE_2 ON (glpi_computers.ID = DEVICE_2.FK_computers AND DEVICE_2.device_type='2')
100
  LEFT JOIN glpi_device_processor ON (DEVICE_2.FK_device = glpi_device_processor.ID)
101
  LEFT JOIN glpi_dropdown_locations ON (glpi_computers.location = glpi_dropdown_locations.ID)
102
  LEFT JOIN glpi_computer_device AS DEVICE_3 ON (glpi_computers.ID = DEVICE_3.FK_computers AND DEVICE_3.device_type='3')
103
  LEFT JOIN glpi_device_ram ON (DEVICE_3.FK_device = glpi_device_ram.ID)
104
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";
105

    
106
$result = $DB->query($query) or die($DB->error());
107
//print $query;
108

    
109
print "<table class='tab_cadre' width='100%' cellpadding='2'>\n";
110
  print "<tr class='tab_bg_4'>
111
  <td>Nom</td>
112
  <td>Fabriquant</td>
113
  <td>Modèle</td>
114
  <td>Numéro de série</td>
115
  <td>Type</td>
116
  <td>CPU</td>
117
  <td>Fréquence CPU</td>
118
  <td>RAM</td>
119
  <td>Date d'inventaire</td>
120
</tr>\n";
121

    
122
for($i = 0; $i < $DB->numrows($result); $i++) {
123
  $data=$DB->fetch_array($result);
124
  print "<tr class='tab_bg_" . ($i%2?"2":"5") . "'>
125
  <td>" . $data['name'] . "</td>
126
  <td>" . $data['manufacturer'] . "</td>
127
  <td>" . $data['serialtype'] . "</td>
128
  <td>" . $data['serialnumber'] . "</td>
129
  <td>" . $data['typepc'] . "</td>
130
  <td>" . $data['processor'] . "</td>
131
  <td>" . $data['processorfreq'] . "</td>
132
  <td>" . $data['memory'] . "</td>
133
  <td>" . $data['dateinventaire'] . "</td>
134
</tr>\n";
135
}
136

    
137
print "</table>";
138

    
139
print "<h2>Votre cahier de recette</h2>";
140

    
141
$query = "SELECT glpi_docs.FK_entities, glpi_docs.recursive,
142
  glpi_docs.name AS name,
143
  glpi_docs.filename AS filename,
144
  glpi_docs.mime AS mimetype,
145
  glpi_docs.ID AS ID,
146
  glpi_docs.comments AS comments
147
FROM glpi_docs
148
  LEFT JOIN glpi_entities ON (glpi_docs.FK_entities = glpi_entities.ID)
149
  LEFT JOIN glpi_dropdown_rubdocs ON (glpi_docs.rubrique = glpi_dropdown_rubdocs.ID)
150
WHERE
151
  glpi_docs.filename LIKE '%recette%' AND
152
  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";
153

    
154
$result = $DB->query($query) or die($DB->error());
155
//print $query;
156

    
157
if($DB->numrows($result) == 0) {
158
  print "<p>Aucune information disponible ...</p>";
159
 }
160
 else {
161
   for($i = 0; $i < $DB->numrows($result); $i++) {
162
     $data=$DB->fetch_array($result);
163
     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";
164
   }
165
 }
166

    
167
print "<h2>Votre contrat de maintenance</h2>";
168

    
169
$query = "SELECT glpi_docs.FK_entities, glpi_docs.recursive,
170
  glpi_docs.name AS name,
171
  glpi_docs.filename AS filename,
172
  glpi_docs.mime AS mimetype,
173
  glpi_docs.ID AS ID,
174
  glpi_docs.comments AS comments
175
FROM glpi_docs
176
  LEFT JOIN glpi_entities ON (glpi_docs.FK_entities = glpi_entities.ID)
177
  LEFT JOIN glpi_dropdown_rubdocs ON (glpi_docs.rubrique = glpi_dropdown_rubdocs.ID)
178
WHERE
179
  glpi_docs.filename LIKE '%contrat%' AND
180
  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";
181

    
182
$result = $DB->query($query) or die($DB->error());
183
//print $query;
184

    
185
if($DB->numrows($result) == 0) {
186
  print "<p>Aucune information disponible ...</p>";
187
 }
188
 else {
189
   for($i = 0; $i < $DB->numrows($result); $i++) {
190
     $data=$DB->fetch_array($result);
191
     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";
192
   }
193
 }
194

    
195
helpFooter();
196

    
197
?>
Redmine Appliance - Powered by TurnKey Linux