Various small changes

This commit is contained in:
Miraty 2021-08-05 02:54:12 +02:00
parent ae7bf5ef4e
commit c64d1a36bc
6 changed files with 37 additions and 22 deletions

View file

@ -9,6 +9,7 @@ if (strpos($_SERVER['PHP_SELF'], "inc.php") !== false)
echo "Connecté·e en tant que " . $_SESSION['username'] . "<br><a class='authButton' href='" . PREFIX . "/auth/logout'>Se déconnecter</a>";
} else { ?>
Vous n'êtes pas connecté·e à un compte Niver
<br><a class="authButton" href="<?= PREFIX ?>/auth/login?redir=<?= SERVICE ?>/<?= PAGE ?>">Se connecter</a>
<?php } ?>
</small>
</footer>

View file

@ -1,4 +1,6 @@
.button {
font-size: 35px;
font-weight: 600;
border-width: 4px;
border-style: solid;
text-decoration: none;

View file

@ -40,10 +40,6 @@ nav {
margin-right: 20px;
}
a {
color: @authColor;
}
header {
text-align: center;
margin-top: 20px;
@ -73,6 +69,10 @@ h2 {
background-color: @darkColor;
color: @lightColor;
}
a {
color: @darkColor;
}
}
@media @dark {
@ -85,4 +85,8 @@ h2 {
background-color: @lightColor;
color: @darkColor;
}
a {
color: @lightColor;
}
}

View file

@ -14,7 +14,7 @@
<label for="host">Hôte</label>
<br>
<input id="host" placeholder="mail.exemple." name="host" type="text">
<input id="host" placeholder="mail.<?= DOMAIN_EXAMPLE ?>." name="host" type="text">
<br>
<input value="Valider" type="submit">

View file

@ -64,11 +64,11 @@
if (isset($_POST['zone']) AND isset($_POST['keytag']) AND isset($_POST['algo']) AND isset($_POST['key']) AND isset($_SESSION['username'])) {
if (!($_POST['algo'] == "8")
AND !($_POST['algo'] == "13")
AND !($_POST['algo'] == "14")
AND !($_POST['algo'] == "15")
AND !($_POST['algo'] == "16")
if (!($_POST['algo'] === "8")
AND !($_POST['algo'] === "13")
AND !($_POST['algo'] === "14")
AND !($_POST['algo'] === "15")
AND !($_POST['algo'] === "16")
)
exit("Incorrect value for algo");
@ -76,7 +76,7 @@ if (isset($_POST['zone']) AND isset($_POST['keytag']) AND isset($_POST['algo'])
if ((!preg_match("/^[0-9]{1,6}$/", $_POST['keytag'])) OR !($_POST['keytag'] >= 1) OR !($_POST['keytag'] <= 65535))
exit("Incorrect value for keytag");
if (!$_POST['dt'] == "2" AND !$_POST['dt'] == "4")
if (!$_POST['dt'] === "2" AND !$_POST['dt'] === "4")
exit("Incorrect value for dt");
checkAbsoluteDomainFormat($_POST['zone']);

View file

@ -8,22 +8,30 @@
</select>
<fieldset>
<legend>Domaine</legend>
<input required="" id="subdomain" placeholder="ns1" name="subdomain" type="text">
<select required="" name="suffix" id="suffix">
<option value="" disabled="" selected="">---</option>
<div class="elForm">
<label for="subdomain">Sous-domaine</label>
<br>
<input required="" id="subdomain" placeholder="ns1" name="subdomain" type="text">
</div>
<div class="elForm">
<label for="suffix">Domaine</label>
<br>
<select required="" name="suffix" id="suffix">
<option value="" disabled="" selected="">---</option>
<?php
<?php
$suffixes = regListUserDomains($_SESSION['username']);
$suffixes = regListUserDomains($_SESSION['username']);
if ($suffixes) {
foreach($suffixes as $suffix) {
echo "<option value='" . $suffix . "'>." . $suffix . "</option>";
if ($suffixes) {
foreach($suffixes as $suffix) {
echo "<option value='" . $suffix . "'>." . $suffix . "</option>";
}
}
}
?>
</select>
?>
</select>
</div>
</fieldset>
<label for="ip">IP</label><br>
<input required="" pattern="^[a-f0-9:.]+$" id="ip" name="ip" minlength="7" maxlength="39" size="40" type="text" placeholder="<?= IPV4_EXAMPLE ?> ou <?= IPV6_EXAMPLE ?>">