Projet

Général

Profil

Révision f8b606aa

Voir les différences:

index2.php
1
index_travaux.php
1
index_normal.php
plugins/anet_epacks/front/plugin_anet_epacks.index.php
52 52
<ul style=\"text-align: left;margin-left: 40px;\">
53 53
 <li><a href=\"plugin_anet_epacks.automatic_routage.php\">Actualiser la liste des règles de routage pour l'import de OCSNG</a></li>
54 54
 <li><a href=\"plugin_anet_epacks.verif_epacks.php\">Vérifier la liste des epacks utilisés (détection d'incohérences)</a></li>
55
 <li><a href=\"plugin_anet_epacks.verif_dyndns.php\">Vérifier les affectations DynDNS (détection d'incohérences et doublons)</a></li>
55 56
</ul>
56 57
";
57 58

  
plugins/anet_epacks/front/plugin_anet_epacks.verif_dyndns.php
1
<?php
2
/*
3
* vérifie la liste des epacks des differents ordinateurs arrivant de OCS pour
4
* par exemple détecter des nums de epacks qui n'existent pas ...
5
*/
6

  
7
if(!defined('GLPI_ROOT')){
8
  define('GLPI_ROOT', '../../..');
9
}
10
include_once (GLPI_ROOT . "/inc/includes.php");
11

  
12
checkRight("config","w");
13
global $DB;
14

  
15
commonHeader("anet_epacks",$_SERVER['PHP_SELF'],"config","plugins");
16

  
17
//on récupère les packs activés et dont l'entitée finale est connue
18
$query = "SELECT name,os_license_id,COUNT(os_license_id) FROM glpi_computers WHERE os_license_id LIKE '%dyn%' GROUP BY os_license_id HAVING COUNT(os_license_id) > 1;";
19

  
20
$result = $DB->query($query);
21
print "<h3>Détection des incohérences d'affectation DynDNS</h3>\n";
22

  
23
print "<table style=\"text-align: left; padding-left: 40px;\">";
24
print "  <tr> <th>Nom</th><th>DynDNS affecté</th><th>Nb d'affectations</th></tr>\n";
25
while($data=$DB->fetch_array($result)) {
26
  print "  <tr> <td>" . $data[0] . "</td><td>" . $data[1] . "</td><td>" . $data[2] . "</td></tr>\n";
27
 }
28
print "</table>";
29

  
30
commonFooter();
31
?>
plugins/anet_epacks/front/plugin_anet_epacks.view_array_recap.php
87 87
//
88 88
function local_make_query($data, $entityid, $maintenance) {
89 89
  $query = "SELECT e.*, e.FK_enduser as entityid, g3.name as client, g4.name as serveur, g4.os_license_number, g4.os_license_id, ssh.*,
90
(sum(g5.nbeleves)+sum(g5.nbprofs)) as nbusers, g5.nbpc as nbpc
90
(g5.nbeleves+g5.nbprofs) as nbusers, g5.nbpc as nbpc
91 91
FROM glpi_plugin_anet_epacks AS e
92 92
LEFT JOIN glpi_plugin_anet_epacks_ssh_max AS ssh ON e.FK_serveur=ssh.FK_serveur
93 93
LEFT JOIN glpi_entities AS g3 ON e.FK_client=g3.ID
......
103 103
      $query .= "WHERE e.FK_contract='-1' AND e.FK_activation='" . $entityid . "'\n";
104 104
    }
105 105
      //GROUP BY e.FK_serveur
106
    $query .= "GROUP BY e.FK_client
106
    $query .= "GROUP BY e.FK_serveur
107 107
ORDER BY client ASC
108 108
LIMIT 500;";
109 109
  }

Formats disponibles : Unified diff

Redmine Appliance - Powered by TurnKey Linux