Aucun équipement ne correspond à cet identifiant
\n"; include "inc/inc.footer.php"; exit(); } $action = $_GET['action']; $confirm = $_GET['confirm']; $last = ($_GET['last']!=""?$_GET['last']:3); $r = pg_query("SELECT MAX(datelast) FROM link"); $lastlink = pg_fetch_array($r); $lastlink = $lastlink[0]; $r = pg_query("SELECT MAX(datelast) FROM materiel"); $datelast = pg_fetch_array($r); $datelast = $datelast[0]; if($action == "") { DisplayInfos($a); DisplayIPList(); DisplayLinkedFrom(); if($mana > 0) { if($mana == 2) echo "Ce matériel n'est plus manageable. Les informations sont suceptibles de ne pas etre à jour.
"; DisplayInterfaces(); DisplayVLANList(); } else echo "Ce matériel n'est pas manageable.
"; } else if($action == "del") { if($confirm == 1) DeleteMateriel(); else DisplayFormDelete($a); } else if($action == "mac") { DisplayInfos($a); if($mana > 0) { if($mana == 2) echo "Ce matériel n'est plus manageable. Les informations sont suceptibles de ne pas etre à jour.
"; DisplayForwardingDatabase(); } else echo "Ce matériel n'est pas manageable.
"; } // --------------------------------- // Blabla fonctions // --------------------------------- function DisplayInfos($a) { global $id, $mana, $datelast, $roles; ?>
Type : OS : ", $a[2]); ?> Statut : DOWN\n"; else { echo "UP "; if($a[3] == 2) echo "anciennement manageable"; else if($a[3] == 0) echo "non manageable"; } if(substr($a[0], 0, 3)=='SEP') $link = "phones.php?filter=${a[0]}"; else { if($mana == 0) $link = "materiel_nomana.php?filter=${a[0]}"; else $link = "materiel_mana.php?filter=${a[0]}"; } ?> Trouvé le : Mis à jour :
Hostname Interface VLAN Voice Vu la dernière fois ${a[1]} "; echo "${a[2]} $vlan $voice ".date("D d/m/Y H:i", $a[3])." \n"; } ?>
Nom Description Etat VLAN Voice Connecté à ${a[1]} ${a[2]} "; echo "".($a[3]==0?"SHUT":($errdisable?"ERR-DIS":($a[4]==1?"UP":"DOWN")))." $vlan $voice "; echo ""; $r2 = pg_query("SELECT idmateriel, hostname, dstifname FROM materiel, link WHERE idmateriel=iddstmateriel AND idinterface=${a[0]} AND link.datelast=$lastlink"); $bfirst = true; while($arr = pg_fetch_array($r2)) { echo "".($bfirst?"":" \n"; } ?>
")."".$arr[1]." / ".$arr[2]; $bfirst = false; } echo "
Nom Description Etat ${a[1]} ${a[2]} "; echo "".($a[3]==2?"SHUT":($a[4]==1?"UP":"DOWN"))." \n"; } ?>
".(time()-$datelast)." ORDER BY ifnumber, datelast DESC, vlan, mac"); $lastid = 0; $bline = false; while($a = pg_fetch_array($r)) { $class = "normal".($bline?"2":""); $bline = !$bline; if($lastid != $a[0]) { $lastid = $a[0]; $ifname = $a[1]; } else $ifname = ""; if($a[2] != 0) $vlan = $a[2]; else $vlan = ""; switch($a[6]) { case 0: $type = "FDB"; break; case 1: $type = "static"; break; case 2: $type = "sticky"; break; default: $type = ""; } echo " Interface VLAN MAC Type IP Date enr Date MàJ \n"; } ?> $ifname $vlan ${a[3]} $type "; $r2 = pg_query("SELECT ip FROM arpcache WHERE mac = '${a[3]}' AND datelast = ${a[5]}"); if($a2 = pg_fetch_array($r2)) echo $a2[0]; echo " ".date("d/m/Y H:i", $a[4])." ".date("d/m/Y H:i", $a[5])."
Equipement supprimé.
Retourner à la liste du matériel