nic > reg, nav modification
This commit is contained in:
parent
078aaacd15
commit
381af207a0
9 changed files with 57 additions and 51 deletions
|
@ -5,7 +5,7 @@
|
|||
<input required="" minlength="4" maxlength="32" pattern="<?= USERNAME_REGEX ?>" id="username" name="username" type="text" placeholder="proudhon">
|
||||
<br>
|
||||
|
||||
<label for="password">Mot de passe</label><br>
|
||||
<label for="password">Clé de passe</label><br>
|
||||
<input required="" minlength="8" maxlength="1024" pattern="<?= PASSWORD_REGEX ?>" id="password" name="password" type="password" placeholder="************">
|
||||
<br>
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ if (isset($_POST['username']) AND isset($_POST['password'])) {
|
|||
?>
|
||||
<label for="password">
|
||||
<details>
|
||||
<summary>Mot de passe</summary>
|
||||
<summary>Clé de passe</summary>
|
||||
Minimum 10 caractères ou minimum 8 caractères s'il contient minuscule, majuscule et chiffre
|
||||
</details>
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ if (isset($_POST['dir']) AND isset($_SESSION['username'])) {
|
|||
addSite($_SESSION['username'], $_POST['dir'], $onion, "onion", "http");
|
||||
|
||||
// Add it to Nginx
|
||||
$nginxConf = file_get_contents(ROOT_PATH . "/inc/nginx/dns.template");
|
||||
$nginxConf = file_get_contents(ROOT_PATH . "/inc/nginx/onion.template");
|
||||
$nginxConf = preg_replace("#DOMAIN#", $onion, $nginxConf);
|
||||
$nginxConf = preg_replace("#DIR#", $_POST['dir'], $nginxConf);
|
||||
$nginxConf = preg_replace("#USER#", $_SESSION['username'], $nginxConf);
|
||||
|
|
|
@ -11,8 +11,11 @@ server {
|
|||
server_name DOMAIN;
|
||||
root /srv/hyper/USER/hyper/DIR;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/host.atope.art/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/host.atope.art/privkey.pem;
|
||||
ssl_certificate /etc/letsencrypt/live/host.atope.art/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/host.atope.art/privkey.pem;
|
||||
|
||||
access_log /var/log/nginx/DOMAIN-access.log;
|
||||
error_log /var/log/nginx/DOMAIN-error.log;
|
||||
|
||||
include /etc/nginx/inc/intermediate.conf.inc;
|
||||
|
||||
|
@ -21,5 +24,4 @@ server {
|
|||
location / {
|
||||
try_files $uri $uri.html $uri/ =404;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ switch (SERVICE) {
|
|||
$page['service'] = "Serveurs de noms";
|
||||
switch (PAGE) {
|
||||
case "index":
|
||||
$page['title'] = "Accueil";
|
||||
$page['title'] = $page['service'];
|
||||
break;
|
||||
case "dnssec":
|
||||
$page['title'] = "Obtenir les enregistrements DS";
|
||||
|
@ -35,7 +35,7 @@ switch (SERVICE) {
|
|||
$page['service'] = "Registre";
|
||||
switch (PAGE) {
|
||||
case "index":
|
||||
$page['title'] = "Accueil";
|
||||
$page['title'] = $page['service'];
|
||||
break;
|
||||
case "ns":
|
||||
$page['title'] = "Ajouter un enregistrement NS";
|
||||
|
@ -56,7 +56,7 @@ switch (SERVICE) {
|
|||
$page['service'] = "Authentification";
|
||||
switch (PAGE) {
|
||||
case "index":
|
||||
$page['title'] = "Accueil";
|
||||
$page['title'] = $page['service'];
|
||||
break;
|
||||
case "login":
|
||||
$page['title'] = "Se connecter";
|
||||
|
@ -95,22 +95,11 @@ switch (SERVICE) {
|
|||
$page['title'] = "Installer un certificat Let's Encrypt";
|
||||
break;
|
||||
case "index":
|
||||
$page['title'] = "Accueil";
|
||||
$page['title'] = $page['service'];
|
||||
break;
|
||||
case "sftp":
|
||||
$page['title'] = "Gérer l'accès SFTP";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case "":
|
||||
switch (PAGE) {
|
||||
case "index":
|
||||
$page['title'] = "Accueil";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
$page['service'] = "Erreur : Le service n'a pas été trouvé dans pages.inc.php";
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php require "top.inc.php"; ?>
|
||||
|
||||
<h2><a class="nicButton" href="reg">Registre atope.art</a></h2>
|
||||
<h2><a class="regButton" href="reg">Registre atope.art</a></h2>
|
||||
|
||||
Demander l'attribution d'un sous-domaine d'atope.art
|
||||
|
||||
|
|
|
@ -24,18 +24,18 @@
|
|||
}
|
||||
}
|
||||
|
||||
.nicButton {
|
||||
.regButton {
|
||||
.button();
|
||||
border-color: @nicColor;
|
||||
color: @nicColor;
|
||||
border-color: @regColor;
|
||||
color: @regColor;
|
||||
&:hover {
|
||||
background-color: @nicColor;
|
||||
background-color: @regColor;
|
||||
&::selection {
|
||||
color: @nicColor;
|
||||
color: @regColor;
|
||||
}
|
||||
}
|
||||
&::selection {
|
||||
background-color: @nicColor;
|
||||
background-color: @regColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@
|
|||
}
|
||||
|
||||
@media @light {
|
||||
.htButton:hover, .nicButton:hover, .nsButton:hover, .authButton:hover {
|
||||
.htButton:hover, .regButton:hover, .nsButton:hover, .authButton:hover {
|
||||
color: @lightColor;
|
||||
&::selection {
|
||||
background-color: @lightColor;
|
||||
|
@ -79,7 +79,7 @@
|
|||
}
|
||||
|
||||
@media @dark {
|
||||
.htButton:hover, .nicButton:hover, .nsButton:hover, .authButton:hover {
|
||||
.htButton:hover, .regButton:hover, .nsButton:hover, .authButton:hover {
|
||||
color: @darkColor;
|
||||
&::selection {
|
||||
background-color: @darkColor;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php include "../top.inc.php"; ?>
|
||||
|
||||
<h2><a class="nicButton" href="register">Enregistrer un nouveau nom de domaine</a></h2>
|
||||
<h2><a class="regButton" href="register">Enregistrer un nouveau nom de domaine</a></h2>
|
||||
Prendre possession d'un sous-domaine d'atope.art
|
||||
<h2><a class="nicButton" href="ns">Enregistrement <abbr title="Name Server">NS</abbr></a></h2>
|
||||
<h2><a class="regButton" href="ns">Enregistrement <abbr title="Name Server">NS</abbr></a></h2>
|
||||
Indiquer les serveurs de noms de son sous-domaine d'atope.art
|
||||
<h2><a class="nicButton" href="ds">Enregistrement <abbr title="Delegation Signer">DS</abbr></a></h2>
|
||||
<h2><a class="regButton" href="ds">Enregistrement <abbr title="Delegation Signer">DS</abbr></a></h2>
|
||||
Déléguer la confiance <abbr title="Domain Name System Security Extensions">DNSSEC</abbr>
|
||||
<h2><a class="nicButton" href="glue">Glue Record</a></h2>
|
||||
<h2><a class="regButton" href="glue">Glue Record</a></h2>
|
||||
Indiquer les IP de ses serveurs de noms de son sous-domaine d'atope.art dont les adresses se trouvent sur ce même sous-domaine
|
||||
|
||||
<?php include "../bottom.inc.php"; ?>
|
||||
|
|
47
top.inc.php
47
top.inc.php
|
@ -19,7 +19,7 @@ define("USERNAME_REGEX", "^[a-z]{4,32}$");
|
|||
define("PASSWORD_REGEX", "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9]{8,1024}|.{10,1024}$");
|
||||
define("SUBDOMAIN_REGEX", "^[a-z]{4,63}$");
|
||||
|
||||
define("PREFIX", "/malaxe"); // Prefix in the URL, if any
|
||||
define("PREFIX", "/eltrode"); // Prefix in the URL, if any
|
||||
define("ROOT_PATH", "/var/www/niver" . PREFIX); // Niver directory
|
||||
define("DB_PATH", ROOT_PATH . "/db/niver.db"); // Niver SQLite database
|
||||
define("KNOTC_PATH", "/usr/sbin/knotc"); // Binary file
|
||||
|
@ -47,9 +47,9 @@ if (substr($_SERVER['REQUEST_URI'], -4) == ".php") {
|
|||
|
||||
$theme = array(
|
||||
'htColor' => "#FF0000",
|
||||
'nicColor' => "#DA03E5",
|
||||
'regColor' => "#DA03E5",
|
||||
'authColor' => "#00FF00",
|
||||
'nsColor' => "#00FFFF",
|
||||
'nsColor' => "#00c4c4",
|
||||
'lightColor' => '#FFFFFF',
|
||||
'darkColor' => '#2a2a2a',
|
||||
);
|
||||
|
@ -59,17 +59,14 @@ switch (SERVICE) {
|
|||
$theme = array('mainColor' => $theme['htColor']) + $theme;
|
||||
break;
|
||||
case "reg":
|
||||
$theme = array('mainColor' => $theme['nicColor']) + $theme;
|
||||
break;
|
||||
case "auth":
|
||||
$theme = array('mainColor' => $theme['authColor']) + $theme;
|
||||
break;
|
||||
case "":
|
||||
$theme = array('mainColor' => $theme['authColor']) + $theme;
|
||||
$theme = array('mainColor' => $theme['regColor']) + $theme;
|
||||
break;
|
||||
case "ns":
|
||||
$theme = array('mainColor' => $theme['nsColor']) + $theme;
|
||||
break;
|
||||
default:
|
||||
$theme = array('mainColor' => $theme['authColor']) + $theme;
|
||||
break;
|
||||
}
|
||||
|
||||
require "inc/all.inc.php";
|
||||
|
@ -96,7 +93,12 @@ $cssFileName = Less_Cache::Get($absoluteLessFiles, $options, $theme);
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<title><?php if ($page['title'] != "Accueil") echo $page['title'] . " · "; ?><?php if (isset($page['service'])) { echo $page['service'] . " · "; } ?>Atope</title>
|
||||
<title><?php
|
||||
if (isset($page['title']) AND $page['title'] != "Accueil")
|
||||
echo $page['title'] . " · ";
|
||||
if (isset($page['service'])) {
|
||||
echo $page['service'] . " · ";
|
||||
} ?>Niver</title>
|
||||
<link type="text/css" rel="stylesheet" href="<?= PREFIX ?>/css/<?= $cssFileName ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
|
@ -104,12 +106,25 @@ $cssFileName = Less_Cache::Get($absoluteLessFiles, $options, $theme);
|
|||
<body>
|
||||
|
||||
<header>
|
||||
<?php if (!isset($page['service'])) {
|
||||
$page['service'] = "Atope";
|
||||
} ?>
|
||||
|
||||
<nav>
|
||||
<a href="<?= PREFIX ?>">Niver</a> > <a href="./"><?= $page['service'] ?></a> > <?= $page['title'] ?>
|
||||
<a href="<?= PREFIX ?>">Niver</a><?php
|
||||
$homepage = (PAGE != "index");
|
||||
if (isset($page['service'])) {
|
||||
echo ' > ';
|
||||
if ($homepage)
|
||||
echo '<a href="./">';
|
||||
echo $page['service'];
|
||||
if ($homepage)
|
||||
echo '</a>';
|
||||
}
|
||||
if ($homepage)
|
||||
echo " > " . $page['title'];
|
||||
?>
|
||||
</nav>
|
||||
|
||||
<h1><?= $page['title'] ?></h1>
|
||||
<?php if (isset($page['title'])) { ?>
|
||||
<h1><?= $page['title'] ?></h1>
|
||||
<?php } ?>
|
||||
|
||||
</header>
|
||||
|
|
Loading…
Reference in a new issue