Aucune interface ne correspond à cet identifiant

\n"; include "inc/inc.footer.php"; exit(); } if($_POST['num'] != "") { $r = pg_query("SELECT MAX(idaction) FROM action"); if($am = pg_fetch_array($r)) $newid = $am[0]+1; else $newid = 1; $num = pg_escape_string($_POST['num']); $opt = iconv("UTF-8", "ASCII//TRANSLIT", $_POST['opt']); if($num == -1) { pg_query("INSERT INTO action VALUES($newid, $id, 0, '$opt')"); pg_query("INSERT INTO action VALUES($newid+1, $id, 1, '$opt')"); } elseif($num == 73) { pg_query("INSERT INTO action VALUES($newid, $id, 7, 3)"); } elseif($num == 7964) { pg_query("INSERT INTO action VALUES($newid, $id, 7, 964)"); } else { pg_query("INSERT INTO action VALUES($newid, $id, $num, '$opt')"); } // Logging actions $r = pg_query("SELECT MAX(idlog) FROM action_log"); if($am = pg_fetch_array($r)) $newid = $am[0]+1; else $newid = 1; if($num == -1) { pg_query("INSERT INTO action_log VALUES($newid, '$auth_user', ".time().", $id, 0, ${a[7]})"); pg_query("INSERT INTO action_log VALUES($newid+1, '$auth_user', ".time().", $id, 1, ${a[7]})"); } elseif($num == 73) { $oldopt = $a[10]; pg_query("INSERT INTO action_log VALUES($newid, '$auth_user', ".time().", $id, 7, '$oldopt', 3)"); } elseif($num == 7964) { $oldopt = $a[10]; pg_query("INSERT INTO action_log VALUES($newid, '$auth_user', ".time().", $id, 7, '$oldopt', 964)"); } else { switch($num) { case 0: case 1: $oldopt = $a[7]; break; case 2: $oldopt = $a[4]; break; case 3: $oldopt = $a[19]; break; default: $oldopt = ''; break; } pg_query("INSERT INTO action_log VALUES($newid, '$auth_user', ".time().", $id, $num, '$oldopt', '$opt')"); } } function DisplayActions() { global $id; $r = pg_query("SELECT numaction, option FROM action WHERE idinterface = $id ORDER BY idaction"); if($a = pg_fetch_array($r)) { ?>

Prochaines actions

Description
Nombre de MACs autorisées
Sticky
'Other', 6=>'Ethernet CSMA/CD', 9=>'Token ring', 15=>'FDDI', 18=>'DSL', 19=>'DSL', 20=>'ISDN', 21=>'ISDN', 22=>'Série', 23=>'PPP', 24=>'Loopback', 28=>'SLIP', 32=>'Frame relay', 53=>'Virtual', 71=>'802.11', 117=>'Ethernet Gigabit', 135=>'VLAN'); $rroom = pg_query("SELECT idroom, name FROM room WHERE idinterface = '$id'"); if($aroom = pg_fetch_array($rroom)) { ?>

Chambre "; ?>

/".$a[3]; ?>

Les modifications effectuées ici prendront effet dans un délai maximum de 10 minutes.

Cette interface est en isolement. Il y a surement une raison à cela…";} //empêche toutes les actions sauf sur les chambres correctement inscrites $forbidden = 1; if (! $not_a_room) { $r2 = pg_query("SELECT idroom, datedeco, certif, iduser FROM user_pac WHERE idroom = ".$aroom[0]); if($a2 = pg_fetch_array($r2)) { if(strtotime(date("Y-m", strtotime($a2['datedeco']." +1 month"))) < time()) { echo "

L'adhésion n'a pas été payée.

"; } else if((date("n") < 9 || date("n") > 10) && $a2['certif'] != 't') { echo "

Certificat non rendu

"; } else { $forbidden = 0; } } else { echo "

Chambre vide

"; } } if($a[17] == 't' && $a[21] != 0 && ($not_a_room || (! $forbidden))) { echo "

Interface en violation

"; echo "
Adresse MAC ayant causé la violation : ".$a[22]."
"; if (! $not_a_room) { $r3 = pg_query("SELECT iduser FROM user_pac WHERE idroom = ".$aroom[0]); $a3 = pg_fetch_array($r3); echo ""; } } elseif ($not_a_room || (! $forbidden)) { switch($a[7]==0?"SHUT":($a[8]==1?"UP":"DOWN")) { case "SHUT": echo "

Interface désactivée

"; echo "Cette interface est désactivée pour une raison. Ne la rallumez pas si le problème n'est pas réglé."; break; case "DOWN": echo "

Interface éteinte

"; echo "Aucun ordinateur ne semble connecté sur cette interface en ce moment."; break; case "UP": echo "

Interface active

"; echo "Un ordinateur est connecté sur cette interface en ce moment."; break; } } ?>
\n"; if($voice != "") echo "\n"; ?>
ifNumber
ifAddress
ifType
  
Description
Etat
VitesseM
VLAN
Native VLAN${a[12]}
Voice VLAN$voice
SpanningTree Portfast

Port Security

  
Activé
Etat
Nb de MAC max
Nb de MAC actuel
Nb de violations
Dernière MAC  (00:00:00:00:00:00 peut être normal)
Sticky activé
0 and datelast = (SELECT MAX(datelast) FROM fdb)"); if($a = pg_fetch_array($r)) { ?>

Stickies

    ".$a[0].($a[1]==1?" (static)":"")."\n"; $a = pg_fetch_array($r); } ?>
détails techniques

Matéreil connecté sur cette interface