use xslt!

This commit is contained in:
2023-04-09 01:06:01 +02:00
parent c7b85862e6
commit 3a162f4568
10 changed files with 238 additions and 227 deletions

View File

@ -1,12 +1,36 @@
<?php
$site = filter_input(INPUT_GET, "site", FILTER_SANITIZE_STRING);
$site = escapeshellcmd($site);
if ($site and file_exists("confs/$site.yaml") and file_exists("scans/$site.xml")) {
$conf = yaml_parse_file("confs/$site.yaml");
$scan = simplexml_load_file("scans/$site.xml");
require("results.php");
} else {
require("ls.php");
}
?>
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>lanScan</title>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.3/dist/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.2/dist/semantic.min.css">
<script src="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.2/dist/semantic.min.js"></script>
<style>
#logo {
margin: 0 -.4rem 0 0;
}
.main.container {
margin-top: 5em;
}
</style>
</head>
<body>
<header class="ui fixed centered blue inverted menu">
<div class="header item">lan<img id="logo" src="logo.svg" alt="S"/>can</div>
</header>
<div class="ui main text container">
<div class="ui link selection list">
<?php foreach (scandir("./site") as $file) {
if (strrpos($file, ".xml")) {
$site = str_replace(".xml", "", $file);
if (file_exists("scans/$site.xml")) {
echo " <a href='site/$site.xml' class='item'>$site</a>\n";
}
}
} ?>
</div>
</div>
</body>
</html>