ryxeo-glpi-git / plugins / anet_migration / front / plugin_anet_migration.index.php @ 7074cc57
Historique | Voir | Annoter | Télécharger (1,71 ko)
1 |
<?php
|
---|---|
2 |
|
3 |
if(!defined('GLPI_ROOT')){ |
4 |
define('GLPI_ROOT', '../../..'); |
5 |
} |
6 |
include_once (GLPI_ROOT . "/inc/includes.php"); |
7 |
|
8 |
commonHeader("anet_migration",$_SERVER['PHP_SELF'],"config","plugins"); |
9 |
|
10 |
$glpiid = $_SESSION['glpiID']; |
11 |
|
12 |
print "<h1>Liste des migrations de serveurs</h1>"; |
13 |
|
14 |
function local_make_array_header() { |
15 |
return "<table style=\"width:100%; padding: 0 10px 0 10px;\"> |
16 |
<tr class='tab_bg_2'>
|
17 |
<th>Nom / epack</th>
|
18 |
<th>Date</th>
|
19 |
<th>Étape</th>
|
20 |
<th>Message</th>
|
21 |
</tr>\n";
|
22 |
|
23 |
} |
24 |
|
25 |
function local_make_array_footer() { |
26 |
$s .= "</table>"; |
27 |
return $s; |
28 |
} |
29 |
|
30 |
|
31 |
commonHeader("AbulEdu.NET -- Tableau récapitulatif -- Accueil RyXéo",$_SERVER['PHP_SELF'],"config","plugins"); |
32 |
|
33 |
$glpiid = $_SESSION['glpiID']; |
34 |
|
35 |
global $DB; |
36 |
|
37 |
$query = "SELECT glpi_profiles.name AS name,glpi_users_profiles.FK_entities as FK_entities FROM glpi_profiles,glpi_users_profiles,glpi_users WHERE glpi_users_profiles.FK_users='" . $glpiid . "' AND glpi_users_profiles.FK_profiles=glpi_profiles.ID GROUP BY FK_entities"; |
38 |
|
39 |
//print $query;
|
40 |
//exit;
|
41 |
|
42 |
$tab_deja_affiche = array(); |
43 |
$num_debut_ligne_maint = 0; |
44 |
$num_debut_ligne_horsmaint = 0; |
45 |
|
46 |
$result = $DB->query($query); |
47 |
if($result) { |
48 |
|
49 |
print local_make_array_header();
|
50 |
|
51 |
$query2 = "SELECT m.*,e.code FROM glpi_plugin_anet_migration as m |
52 |
LEFT JOIN glpi_plugin_anet_epacks as e ON e.id=FK_epack
|
53 |
GROUP BY FK_epack,etape
|
54 |
ORDER BY ladate,etape";
|
55 |
$result2 = $DB->query($query2); |
56 |
for($i = 0; $i < $DB->numrows($result2); $i++) { |
57 |
$data2=$DB->fetch_array($result2); |
58 |
print "<tr> |
59 |
<td>" . $data2['code'] . "</td> |
60 |
<td>" . $data2['ladate'] . "</td> |
61 |
<td align=\"left\">" . $data2['etape'] . "</td> |
62 |
<td>" . $data2['message'] . "</td> |
63 |
</tr>\n";
|
64 |
} |
65 |
print local_make_array_footer();
|
66 |
|
67 |
commonFooter(); |
68 |
exit;
|
69 |
} |
70 |
|
71 |
|
72 |
?>
|