rescan named scan
This commit is contained in:
78
index.php
78
index.php
@ -9,36 +9,36 @@
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.3/dist/semantic.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<style>
|
||||
body {
|
||||
background-image: url(bg.jpg);
|
||||
background-size: cover;
|
||||
}
|
||||
body {
|
||||
background-image: url(bg.jpg);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
body > .grid {
|
||||
height: 100%;
|
||||
}
|
||||
body>.grid {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.logo {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
.logo {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="ui middle aligned center aligned grid inverted">
|
||||
<div class="ui middle aligned center aligned inverted grid">
|
||||
<div class="column" style="max-width: 450px;">
|
||||
<h2 class="ui inverted teal fluid image header logo">
|
||||
lan<?php include 'logo.svg'; ?>can
|
||||
</h2>
|
||||
|
||||
<?php if(isset($errorMessage)) { ?>
|
||||
<div class="ui negative message">
|
||||
<i class="close icon"></i>
|
||||
<div class="header">Erreur</div>
|
||||
<p><?=$errorMessage?></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (isset($errorMessage)) { ?>
|
||||
<div class="ui negative message">
|
||||
<i class="close icon"></i>
|
||||
<div class="header">Erreur</div>
|
||||
<p><?= $errorMessage ?></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<form id="scanForm" class="ui large form initial inverted" action="scan.php" method="get">
|
||||
<div class="ui left aligned stacked segment inverted">
|
||||
@ -46,17 +46,17 @@ body > .grid {
|
||||
<div class="inverted field">
|
||||
<select id="lanSelect" name="lan" class="search clearable selection dropdown">
|
||||
<option value=""><?= $_SERVER['REMOTE_ADDR']; ?>/24</option>
|
||||
<?php
|
||||
if (file_exists($SCANSDIR)) {
|
||||
foreach (scandir($SCANSDIR) as $filename) {
|
||||
if (substr($filename, -4) === '.xml') {
|
||||
$name = substr($filename, 0, -4);
|
||||
$name = str_replace("!", "/", $name);
|
||||
echo " <option value='$name'>$name</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (file_exists($SCANSDIR)) {
|
||||
foreach (scandir($SCANSDIR) as $filename) {
|
||||
if (substr($filename, -4) === '.xml') {
|
||||
$name = substr($filename, 0, -4);
|
||||
$name = str_replace("!", "/", $name);
|
||||
echo " <option value='$name'>$name</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="ui error message"></div>
|
||||
@ -72,7 +72,10 @@ if (file_exists($SCANSDIR)) {
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.2/semantic.min.js"></script>
|
||||
<script>
|
||||
$('#lanSelect').dropdown({allowAdditions: true, clearable: true})
|
||||
$('#lanSelect').dropdown({
|
||||
allowAdditions: true,
|
||||
clearable: true
|
||||
})
|
||||
|
||||
$('#scanForm').form({
|
||||
fields: {
|
||||
@ -91,13 +94,13 @@ if (file_exists($SCANSDIR)) {
|
||||
if (this.checkValidity()) {
|
||||
scanForm.classList.add("loading")
|
||||
$.toast({
|
||||
title : 'Scan en cours...',
|
||||
message : 'Merci de patienter',
|
||||
class : 'info',
|
||||
showIcon : 'satellite dish',
|
||||
displayTime: 0,
|
||||
closeIcon : true,
|
||||
position : 'bottom right',
|
||||
title: 'Scan en cours...',
|
||||
message: 'Merci de patienter',
|
||||
class: 'info',
|
||||
showIcon: 'satellite dish',
|
||||
displayTime: 0,
|
||||
closeIcon: true,
|
||||
position: 'bottom right',
|
||||
})
|
||||
return true
|
||||
} else {
|
||||
@ -105,7 +108,6 @@ if (file_exists($SCANSDIR)) {
|
||||
this.reportValidity()
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user