47 lines
1.6 KiB
PHP
47 lines
1.6 KiB
PHP
<?php
|
|
require_once "load-networks.php";
|
|
|
|
if (isset($_SERVER["QUERY_STRING"]) && preg_match(
|
|
"/^$namePtn$/", $_SERVER["QUERY_STRING"], $matches
|
|
)) {
|
|
$tag = $matches[0];
|
|
if (isset($networks[$tag])) {
|
|
include("show-network.php");
|
|
} else {
|
|
header("Location: edit.php?$tag");
|
|
}
|
|
exit();
|
|
}
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>IPAM</title>
|
|
<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script>
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.4/dist/semantic.min.css">
|
|
<script src="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.4/dist/semantic.min.js"></script>
|
|
<link rel="stylesheet" href="style.css">
|
|
</head>
|
|
<body>
|
|
<nav class="ui inverted teal menu">
|
|
<a class="header item">IP<em>AM</em></a>
|
|
</nav>
|
|
<main class="ui container">
|
|
<h1>Réseaux</h1>
|
|
<ul class="ui link list">
|
|
<?php foreach ($networks as $tag => $options) : ?>
|
|
<li class="item">
|
|
<a class="header" href="?<?=$tag?>"><?=$tag?></a>
|
|
<div class="description"><?=long2ip($options["network-addr"])?>/<?=$options["cidr_mask"]?></div>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
<li class="item">
|
|
<a class='header' href="edit.php">Nouveau réseau...</a>
|
|
</li>
|
|
</ul>
|
|
</main>
|
|
</body>
|
|
</html>
|