Projet

Général

Profil

Paste
Statistiques
| Branche: | Révision:

ryxeo-glpi-git / plugins / anet_migration / front / plugin_anet_migration.index.php @ ce24658f

Historique | Voir | Annoter | Télécharger (1,92 ko)

1 7074cc57 Eric Seigne
<?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 ce24658f Eric Seigne
49
  $data=$DB->fetch_array($result);
50
  //print_r($data);
51
  $entityid = $data['FK_entities'];
52
53 7074cc57 Eric Seigne
  print local_make_array_header();
54
55
  $query2 = "SELECT m.*,e.code FROM glpi_plugin_anet_migration as m
56
LEFT JOIN glpi_plugin_anet_epacks as e ON e.id=FK_epack
57 ce24658f Eric Seigne
WHERE (e.FK_clientderyxeo='" . $entityid . "' OR e.FK_activation='" . $entityid . "')
58 7074cc57 Eric Seigne
GROUP BY FK_epack,etape
59
ORDER BY ladate,etape";
60 ce24658f Eric Seigne
  //print $query2;
61
62 7074cc57 Eric Seigne
  $result2 = $DB->query($query2);
63
  for($i = 0; $i < $DB->numrows($result2); $i++) {
64
    $data2=$DB->fetch_array($result2);
65
    print "<tr>
66
 <td>" . $data2['code'] . "</td>
67
 <td>" . $data2['ladate'] . "</td>
68
 <td align=\"left\">" . $data2['etape'] . "</td>
69 7c20505e Eric Seigne
 <td align=\"left\">" . $data2['message'] . "</td>
70 7074cc57 Eric Seigne
</tr>\n";
71
  }
72
  print local_make_array_footer();
73
  
74
  commonFooter();
75
  exit;
76
 }
77
78
79
?>
Redmine Appliance - Powered by TurnKey Linux