Browse Source

Public files in public/

Miraty 3 years ago
parent
commit
6a408fcbf9

+ 3 - 4
.gitignore

@@ -1,4 +1,3 @@
-css/
-niver.log
-db/niver.db
-cmds
+/public/css/
+/niver.log
+/db/niver.db

BIN
db/niver.db


+ 34 - 0
db/source.sql

@@ -0,0 +1,34 @@
+BEGIN TRANSACTION;
+CREATE TABLE IF NOT EXISTS "registry" (
+	"id"	INTEGER NOT NULL UNIQUE,
+	"domain"	TEXT,
+	"username"	TEXT,
+	"last_renewal"	INTEGER,
+	PRIMARY KEY("id" AUTOINCREMENT)
+);
+CREATE TABLE IF NOT EXISTS "zones" (
+	"id"	INTEGER NOT NULL UNIQUE,
+	"zone"	TEXT NOT NULL,
+	"username"	TEXT NOT NULL,
+	PRIMARY KEY("id" AUTOINCREMENT)
+);
+CREATE TABLE IF NOT EXISTS "users" (
+	"id"	INTEGER NOT NULL UNIQUE,
+	"username"	TEXT NOT NULL,
+	"password"	TEXT NOT NULL,
+	"sftp_enabled"	INTEGER NOT NULL,
+	"registration_date"	INTEGER NOT NULL,
+	PRIMARY KEY("id" AUTOINCREMENT)
+);
+CREATE TABLE IF NOT EXISTS "sites" (
+	"id"	INTEGER NOT NULL UNIQUE,
+	"username"	TEXT NOT NULL,
+	"site_dir"	TEXT NOT NULL,
+	"domain"	TEXT NOT NULL,
+	"domain_type"	TEXT NOT NULL,
+	"protocol"	TEXT NOT NULL,
+	"creation_date"	INTEGER NOT NULL,
+	"le_enabled"	INTEGER,
+	PRIMARY KEY("id" AUTOINCREMENT)
+);
+COMMIT;

+ 0 - 128
db/structure.sql

@@ -1,128 +0,0 @@
-PRAGMA foreign_keys=OFF;
-BEGIN TRANSACTION;
-CREATE TABLE IF NOT EXISTS "registry" (
-        "id"    INTEGER NOT NULL UNIQUE,
-        "domain"        TEXT,
-        "username"      TEXT,
-        "last_renewal"  INTEGER,
-        PRIMARY KEY("id" AUTOINCREMENT)
-);
-INSERT INTO registry VALUES(23,'atope.art.','niver','2021-02-16 22:33:52');
-INSERT INTO registry VALUES(24,'asso.atope.art.','niver','2021-02-16 22:33:52');
-INSERT INTO registry VALUES(25,'org.atope.art.','niver','2021-02-16 22:33:52');
-INSERT INTO registry VALUES(26,'perso.atope.art.','niver','2021-02-16 22:33:52');
-INSERT INTO registry VALUES(27,'blog.atope.art.','niver','2021-02-16 22:33:52');
-INSERT INTO registry VALUES(28,'me.atope.art.','niver','2021-02-16 22:33:52');
-INSERT INTO registry VALUES(29,'edu.atope.art.','niver','2021-02-16 22:33:53');
-INSERT INTO registry VALUES(30,'info.atope.art.','niver','2021-02-16 22:33:53');
-INSERT INTO registry VALUES(31,'wiki.atope.art.','niver','2021-02-16 22:33:53');
-INSERT INTO registry VALUES(32,'sci.atope.art.','niver','2021-02-16 22:33:53');
-INSERT INTO registry VALUES(33,'pol.atope.art.','niver','2021-02-16 22:33:53');
-INSERT INTO registry VALUES(34,'libre.atope.art.','niver','2021-02-16 22:33:53');
-INSERT INTO registry VALUES(35,'fem.atope.art.','niver','2021-02-16 22:33:53');
-INSERT INTO registry VALUES(36,'eco.atope.art.','niver','2021-02-16 22:33:53');
-INSERT INTO registry VALUES(37,'veg.atope.art.','niver','2021-02-16 22:33:53');
-INSERT INTO registry VALUES(38,'bio.atope.art.','niver','2021-02-16 22:33:53');
-INSERT INTO registry VALUES(39,'anar.atope.art.','niver','2021-02-16 22:33:53');
-INSERT INTO registry VALUES(40,'ancom.atope.art.','niver','2021-02-16 22:33:53');
-INSERT INTO registry VALUES(41,'acab.atope.art.','niver','2021-02-16 22:33:53');
-INSERT INTO registry VALUES(42,'handi.atope.art.','niver','2021-02-16 22:33:53');
-INSERT INTO registry VALUES(43,'queer.atope.art.','niver','2021-02-16 22:33:53');
-INSERT INTO registry VALUES(44,'gay.atope.art.','niver','2021-02-16 22:33:54');
-INSERT INTO registry VALUES(45,'enby.atope.art.','niver','2021-02-16 22:33:54');
-INSERT INTO registry VALUES(46,'trans.atope.art.','niver','2021-02-16 22:33:54');
-INSERT INTO registry VALUES(47,'net.atope.art.','niver','2021-02-16 22:33:54');
-INSERT INTO registry VALUES(48,'tech.atope.art.','niver','2021-02-16 22:33:54');
-INSERT INTO registry VALUES(49,'io.atope.art.','niver','2021-02-16 22:33:54');
-INSERT INTO registry VALUES(50,'sec.atope.art.','niver','2021-02-16 22:33:54');
-INSERT INTO registry VALUES(51,'cyber.atope.art.','niver','2021-02-16 22:33:54');
-INSERT INTO registry VALUES(52,'dev.atope.art.','niver','2021-02-16 22:33:54');
-INSERT INTO registry VALUES(53,'geek.atope.art.','niver','2021-02-16 22:33:54');
-INSERT INTO registry VALUES(54,'fs.atope.art.','niver','2021-02-16 22:33:54');
-INSERT INTO registry VALUES(55,'ht.atope.art.','niver','2021-02-16 22:33:54');
-INSERT INTO registry VALUES(56,'hyper.atope.art.','niver','2021-02-16 22:33:54');
-INSERT INTO registry VALUES(57,'git.atope.art.','niver','2021-02-16 22:33:54');
-INSERT INTO registry VALUES(58,'forge.atope.art.','niver','2021-02-16 22:33:54');
-INSERT INTO registry VALUES(59,'code.atope.art.','niver','2021-02-16 22:33:55');
-INSERT INTO registry VALUES(60,'lab.atope.art.','niver','2021-02-16 22:33:55');
-INSERT INTO registry VALUES(61,'labs.atope.art.','niver','2021-02-16 22:33:55');
-INSERT INTO registry VALUES(62,'gemini.atope.art.','niver','2021-02-16 22:33:55');
-INSERT INTO registry VALUES(63,'gmi.atope.art.','niver','2021-02-16 22:33:55');
-INSERT INTO registry VALUES(64,'gemlog.atope.art.','niver','2021-02-16 22:33:55');
-INSERT INTO registry VALUES(65,'mail.atope.art.','niver','2021-02-16 22:33:55');
-INSERT INTO registry VALUES(66,'ynh.atope.art.','niver','2021-02-16 22:33:55');
-INSERT INTO registry VALUES(67,'yuno.atope.art.','niver','2021-02-16 22:33:55');
-INSERT INTO registry VALUES(68,'sys.atope.art.','niver','2021-02-16 22:33:55');
-INSERT INTO registry VALUES(69,'fed.atope.art.','niver','2021-02-16 22:33:55');
-INSERT INTO registry VALUES(70,'fedi.atope.art.','niver','2021-02-16 22:33:55');
-INSERT INTO registry VALUES(71,'soc.atope.art.','niver','2021-02-16 22:33:55');
-INSERT INTO registry VALUES(72,'masto.atope.art.','niver','2021-02-16 22:33:55');
-INSERT INTO registry VALUES(73,'plero.atope.art.','niver','2021-02-16 22:33:55');
-INSERT INTO registry VALUES(74,'pix.atope.art.','niver','2021-02-16 22:33:55');
-INSERT INTO registry VALUES(75,'mobi.atope.art.','niver','2021-02-16 22:33:56');
-INSERT INTO registry VALUES(76,'art.atope.art.','niver','2021-02-16 22:33:56');
-INSERT INTO registry VALUES(77,'music.atope.art.','niver','2021-02-16 22:33:56');
-INSERT INTO registry VALUES(78,'video.atope.art.','niver','2021-02-16 22:33:56');
-INSERT INTO registry VALUES(79,'draw.atope.art.','niver','2021-02-16 22:33:56');
-INSERT INTO registry VALUES(80,'audio.atope.art.','niver','2021-02-16 22:33:56');
-INSERT INTO registry VALUES(81,'ink.atope.art.','niver','2021-02-16 22:33:56');
-INSERT INTO registry VALUES(82,'na.atope.art.','niver','2021-02-16 22:33:56');
-INSERT INTO registry VALUES(83,'psy.atope.art.','niver','2021-02-16 22:33:56');
-INSERT INTO registry VALUES(84,'neuro.atope.art.','niver','2021-02-16 22:33:56');
-INSERT INTO registry VALUES(85,'auti.atope.art.','niver','2021-02-16 22:33:56');
-INSERT INTO registry VALUES(86,'plur.atope.art.','niver','2021-02-16 22:33:56');
-INSERT INTO registry VALUES(87,'blue.atope.art.','niver','2021-02-16 22:33:56');
-INSERT INTO registry VALUES(88,'red.atope.art.','niver','2021-02-16 22:33:56');
-INSERT INTO registry VALUES(89,'pink.atope.art.','niver','2021-02-16 22:33:56');
-INSERT INTO registry VALUES(90,'green.atope.art.','niver','2021-02-16 22:33:57');
-INSERT INTO registry VALUES(91,'black.atope.art.','niver','2021-02-16 22:33:57');
-INSERT INTO registry VALUES(92,'city.atope.art.','niver','2021-02-16 22:33:57');
-INSERT INTO registry VALUES(93,'town.atope.art.','niver','2021-02-16 22:33:57');
-INSERT INTO registry VALUES(94,'cafe.atope.art.','niver','2021-02-16 22:33:57');
-INSERT INTO registry VALUES(95,'home.atope.art.','niver','2021-02-16 22:33:57');
-INSERT INTO registry VALUES(96,'forum.atope.art.','niver','2021-02-16 22:33:57');
-INSERT INTO registry VALUES(97,'dream.atope.art.','niver','2021-02-16 22:33:57');
-INSERT INTO registry VALUES(98,'space.atope.art.','niver','2021-02-16 22:33:57');
-INSERT INTO registry VALUES(99,'forest.atope.art.','niver','2021-02-16 22:33:57');
-INSERT INTO registry VALUES(100,'rain.atope.art.','niver','2021-02-16 22:33:57');
-INSERT INTO registry VALUES(101,'snow.atope.art.','niver','2021-02-16 22:33:57');
-INSERT INTO registry VALUES(102,'sun.atope.art.','niver','2021-02-16 22:33:57');
-INSERT INTO registry VALUES(103,'earth.atope.art.','niver','2021-02-16 22:33:57');
-INSERT INTO registry VALUES(104,'world.atope.art.','niver','2021-02-16 22:33:58');
-INSERT INTO registry VALUES(105,'soft.atope.art.','niver','2021-02-16 22:33:58');
-INSERT INTO registry VALUES(106,'cute.atope.art.','niver','2021-02-16 22:33:58');
-INSERT INTO registry VALUES(107,'cutie.atope.art.','niver','2021-02-16 22:33:58');
-INSERT INTO registry VALUES(108,'fun.atope.art.','niver','2021-02-16 22:33:58');
-INSERT INTO registry VALUES(109,'play.atope.art.','niver','2021-02-16 22:33:58');
-INSERT INTO registry VALUES(110,'game.atope.art.','niver','2021-02-16 22:33:58');
-CREATE TABLE IF NOT EXISTS "zones" (
-        "id"    INTEGER NOT NULL UNIQUE,
-        "zone"  TEXT NOT NULL,
-        "username"      TEXT NOT NULL,
-        PRIMARY KEY("id" AUTOINCREMENT)
-);
-CREATE TABLE IF NOT EXISTS "users" (
-        "id"    INTEGER NOT NULL UNIQUE,
-        "username"      TEXT NOT NULL,
-        "password"      TEXT NOT NULL,
-        "sftp_enabled"  INTEGER NOT NULL,
-        "registration_date"     INTEGER NOT NULL,
-        PRIMARY KEY("id" AUTOINCREMENT)
-);
-CREATE TABLE IF NOT EXISTS "sites" (
-        "id"    INTEGER NOT NULL UNIQUE,
-        "username"      TEXT NOT NULL,
-        "site_dir"      TEXT NOT NULL,
-        "domain"        TEXT NOT NULL,
-        "domain_type"   TEXT NOT NULL,
-        "protocol"      TEXT NOT NULL,
-        "creation_date" INTEGER NOT NULL,
-        PRIMARY KEY("id" AUTOINCREMENT)
-);
-DELETE FROM sqlite_sequence;
-INSERT INTO sqlite_sequence VALUES(NULL,NULL);
-INSERT INTO sqlite_sequence VALUES('registry',111);
-INSERT INTO sqlite_sequence VALUES('zones',13);
-INSERT INTO sqlite_sequence VALUES('users',46);
-INSERT INTO sqlite_sequence VALUES('sites',0);
-COMMIT;

+ 0 - 2
inc/all.inc.php → inc/all.php

@@ -1,6 +1,4 @@
 <?php
-if (strpos($_SERVER['PHP_SELF'], "inc.php") !== false)
-	exit("This file is meant to be included.");
 
 function addNiverLog($message, $outputLines, $returnCode = false) {
 	$logs = "\n" . date("Y-m-d H:i:s") . " " . $message . "\n";

+ 0 - 2
inc/auth.inc.php → inc/auth.php

@@ -1,6 +1,4 @@
 <?php
-if (strpos($_SERVER['PHP_SELF'], "inc.php") !== false)
-	exit("This file is meant to be included.");
 
 function hashPassword($password) {
 	return password_hash($password, ALGO_PASSWORD, OPTIONS_PASSWORD);

+ 0 - 4
bottom.inc.php → inc/bottom.php

@@ -1,7 +1,3 @@
-<?php
-if (strpos($_SERVER['PHP_SELF'], "inc.php") !== false)
-	exit("This file is meant to be included.");
-?>
 		</main>
 		<footer>
 			<small>

+ 0 - 2
inc/const.inc.php → inc/const.php

@@ -1,6 +1,4 @@
 <?php
-if (strpos($_SERVER['PHP_SELF'], "inc.php") !== false)
-	exit("This file is meant to be included.");
 
 // --- Constants definitions ---
 

+ 0 - 0
inc/form/form.ns.inc.php → inc/form/form.ns.php


+ 0 - 2
inc/format.inc.php → inc/format.php

@@ -1,6 +1,4 @@
 <?php
-if (strpos($_SERVER['PHP_SELF'], "inc.php") !== false)
-	exit("This file is meant to be included.");
 
 function checkIpFormat($ip) {
 	if (!filter_var($ip, FILTER_VALIDATE_IP))

+ 0 - 2
inc/ht.inc.php → inc/ht.php

@@ -1,6 +1,4 @@
 <?php
-if (strpos($_SERVER['PHP_SELF'], "inc.php") !== false)
-	exit("This file is meant to be included.");
 
 function listFsDirs($username) {
 	exec(LS_PATH . " --format=single-column -d " . HT_PATH . "/" . $username . "/ht/*/", $absoluteDirs);

+ 0 - 2
inc/ns.inc.php → inc/ns.php

@@ -1,6 +1,4 @@
 <?php
-if (strpos($_SERVER['PHP_SELF'], "inc.php") !== false)
-	exit("This file is meant to be included.");
 
 function nsCommonRequirements() {
 	if (isset($_POST['action'])

+ 0 - 2
inc/pages.inc.php → inc/pages.php

@@ -1,6 +1,4 @@
 <?php
-if (strpos($_SERVER['PHP_SELF'], "inc.php") !== false)
-	exit("This file is meant to be included.");
 
 switch (SERVICE) {
 

+ 0 - 2
inc/reg.inc.php → inc/reg.php

@@ -1,6 +1,4 @@
 <?php
-if (strpos($_SERVER['PHP_SELF'], "inc.php") !== false)
-	exit("This file is meant to be included.");
 
 function regGetUpperDomain($domain) {
 	// Remove anything before the first dot and the first dot itself

+ 16 - 25
top.inc.php → inc/top.php

@@ -1,18 +1,16 @@
 <?php
-if (strpos($_SERVER['PHP_SELF'], "inc.php") !== false)
-	exit("This file is meant to be included.");
 
-require "inc/const.inc.php";
+require "const.php";
 // Functions usefull everywhere
-require "inc/all.inc.php";
-require "inc/format.inc.php";
+require "all.php";
+require "format.php";
 // Service-specific functions
-require "inc/ht.inc.php";
-require "inc/ns.inc.php";
-require "inc/reg.inc.php";
-require "inc/auth.inc.php";
+require "ht.php";
+//require "ns.php";
+require "reg.php";
+require "auth.php";
 // Page titles definition
-require "inc/pages.inc.php";
+require "pages.php";
 
 // Session initialisation (with cookies)
 if (
@@ -38,15 +36,9 @@ if (
 	]);
 }
 
-// Remove .php from URL (if any)
-if (substr($_SERVER['REQUEST_URI'], -4) == ".php") {
-	header("Location: " . PREFIX . "/" . SERVICE . "/" . PAGE, true, 301); // 301 Moved Permanently
-	exit;
-}
-
 // Less > CSS compilation
 
-require_once 'lessphp/lib/Less/Autoloader.php';
+require_once ROOT_PATH . "/lessphp/lib/Less/Autoloader.php";
 Less_Autoloader::register();
 
 // List files in less/
@@ -59,9 +51,9 @@ foreach ($relativeLessFiles as $relativeLessFile => $nothing) {
 	$absoluteLessFiles[ROOT_PATH . "/less/" . $relativeLessFile] = "";
 }
 
-// Generate one minified CSS file into css/ from sources in less/
+// Generate one minified CSS file into public/css/ from sources in less/
 $options = array(
-	'cache_dir' => ROOT_PATH . '/css/',
+	'cache_dir' => ROOT_PATH . '/public/css/',
 	'compress' => true
 );
 $cssFileName = Less_Cache::Get($absoluteLessFiles, $options, THEME);
@@ -73,10 +65,10 @@ $cssFileName = Less_Cache::Get($absoluteLessFiles, $options, THEME);
 		<meta charset="UTF-8">
 		<title><?php
 		if (isset($page['title']) AND $page['title'] != "Accueil")
-			echo $page['title'] . " · ";
-		if (isset($page['service'])) {
-			echo $page['service'] . " · ";
-		} ?>Niver</title>
+			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>
@@ -86,9 +78,8 @@ $cssFileName = Less_Cache::Get($absoluteLessFiles, $options, THEME);
 
 			<nav>
 				<a href="<?= PREFIX ?>/">Niver</a><?php
-				if (isset($page['service'])) {
+				if (isset($page['service']))
 					echo ' > <a href="./">' . $page['service'] . '</a>';
-				}
 				if (PAGE != "index")
 					echo ' > <a href="' . PAGE . '">' . $page['title'] . "</a>";
 				?>

+ 2 - 2
auth/index.php → public/auth/index.php

@@ -1,4 +1,4 @@
-<?php require "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <?php if (isset($_SESSION['username'])) { ?>
 
@@ -14,4 +14,4 @@
 	<a class="authButton" href="login">Se connecter</a>
 <?php } ?>
 
-<?php require "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
auth/login.php → public/auth/login.php

@@ -1,4 +1,4 @@
-<?php require "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <form method="post">
 	<label for="username">Identifiant</label><br>
@@ -51,4 +51,4 @@ if (isset($_POST['username']) AND isset($_POST['password'])) {
 
 ?>
 
-<?php require "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
auth/logout.php → public/auth/logout.php

@@ -1,4 +1,4 @@
-<?php require "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <?php
 session_destroy();
@@ -7,4 +7,4 @@ header('Location: ' . PREFIX . '/auth/');
 exit;
 ?>
 
-<?php require "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
auth/password.php → public/auth/password.php

@@ -1,4 +1,4 @@
-<?php require "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <p>
 	Vous pouvez ici changer le mot de passe permettant d'accéder à votre compte Niver.
@@ -45,4 +45,4 @@ if (isset($_SESSION['username']) AND isset($_POST['newPassword']) AND isset($_PO
 
 ?>
 
-<?php require "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
auth/register.php → public/auth/register.php

@@ -1,4 +1,4 @@
-<?php require "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <?php
 
@@ -70,4 +70,4 @@ if (isset($_POST['username']) AND isset($_POST['password'])) {
 
 Déjà un compte ? <a class="authButton" href="login">Se connecter</a>
 
-<?php require "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
ht/http-onion.php → public/ht/http-onion.php

@@ -1,4 +1,4 @@
-<?php require "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 <p>
 	Ajouter un accès en .onion sur un dossier
 </p>
@@ -96,4 +96,4 @@ if (isset($_POST['dir']) AND isset($_SESSION['username'])) {
 
 ?>
 
-<?php require "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
ht/https-domain.php → public/ht/https-domain.php

@@ -1,4 +1,4 @@
-<?php require "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <p>
 	Ajouter un domaine sur un dossier de site<br>
@@ -81,4 +81,4 @@ if (isset($_POST['domain']) AND isset($_POST['dir']) AND isset($_SESSION['userna
 
 ?>
 
-<?php require "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
ht/index.php → public/ht/index.php

@@ -1,4 +1,4 @@
-<?php require "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <dl>
 	<dt><a class="htButton" href="sftp">Gérer l'accès SFTP</a></dt>
@@ -19,4 +19,4 @@
 	</dd>
 </dl>
 
-<?php require "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
ht/le.php → public/ht/le.php

@@ -1,4 +1,4 @@
-<?php require "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 <p>
 	Installer un certificat Let's Encrypt
 </p>
@@ -52,4 +52,4 @@ if (isset($_POST['domain']) AND isset($_SESSION['username'])) {
 
 ?>
 
-<?php require "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
ht/sftp.php → public/ht/sftp.php

@@ -1,4 +1,4 @@
-<?php require "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <?php
 if ($_SESSION['sftp_enabled'] == false) { ?>
@@ -166,4 +166,4 @@ if ($_SESSION['sftp_enabled'] == false) { ?>
 }
 ?>
 
-<?php require "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
index.php → public/index.php

@@ -1,4 +1,4 @@
-<?php require "top.inc.php"; ?>
+<?php require "../inc/top.php"; ?>
 
 <dl>
 	<dt><a class="regButton" href="reg/">Registre <code><?= REGISTRY ?></code></a></dt>
@@ -19,4 +19,4 @@
 	</dd>
 </dl>
 
-<?php require "bottom.inc.php"; ?>
+<?php require "../inc/bottom.php"; ?>

+ 3 - 3
ns/caa.php → public/ns/caa.php

@@ -1,8 +1,8 @@
-<?php include "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <form method="post">
 
-	<?php require "../inc/form/form.ns.inc.php"; ?>
+	<?php require "../../inc/form/form.ns.php""; ?>
 
 	<br>
 	<label for="flag">Flag</label>
@@ -49,4 +49,4 @@ if (nsCommonRequirements()
 
 ?>
 
-<?php include "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
ns/dnssec.php → public/ns/dnssec.php

@@ -1,4 +1,4 @@
-<?php require "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 Afin d'activer DNSSEC, vous devez indiquer un enregistrement DS à la zone parente.
 
@@ -72,4 +72,4 @@ if (isset($_POST['zone']) AND isset($_SESSION['username'])) {
 
 <?php } ?>
 
-<?php require "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
ns/index.php → public/ns/index.php

@@ -1,4 +1,4 @@
-<?php require "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <dl>
 	<dt><a class="nsButton" href="zone">Gérer ses zones</a></dt>
@@ -58,4 +58,4 @@
 	</dd>-->
 </dl>
 
-<?php require "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 3 - 3
ns/ip.php → public/ns/ip.php

@@ -1,4 +1,4 @@
-<?php require "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <p>
 	Ici vous pouvez ajouter ou enlever des adresses IP dans une zone déjà enregistrée sur le serveur de noms de Niver
@@ -9,7 +9,7 @@
 </p>
 
 <form method="post">
-	<?php require "../inc/form/form.ns.inc.php"; ?>
+	<?php require "../../inc/form/form.ns.php""; ?>
 	<label for="ip">Adresse IP</label><br>
 	<input required="" pattern="^[a-f0-9:.]+$" id="ip" name="ip" minlength="7" maxlength="39" size="40" type="text" placeholder="<?= IPV6_EXAMPLE ?> ou <?= IPV4_EXAMPLE ?>"><br>
 	<input value="Valider" type="submit">
@@ -40,4 +40,4 @@ if (nsCommonRequirements()
 
 ?>
 
-<?php require "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 3 - 3
ns/loc.php → public/ns/loc.php

@@ -1,8 +1,8 @@
-<?php include "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <form method="post">
 
-	<?php require "../inc/form/form.ns.inc.php"; ?>
+	<?php require "../../inc/form/form.ns.php""; ?>
 
 	<br>
 	<label for="flag">Flag</label>
@@ -49,4 +49,4 @@ if (nsCommonRequirements()
 
 ?>
 
-<?php include "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 3 - 3
ns/mx.php → public/ns/mx.php

@@ -1,8 +1,8 @@
-<?php include "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <form method="post">
 
-	<?php require "../inc/form/form.ns.inc.php"; ?>
+	<?php require "../../inc/form/form.ns.php""; ?>
 
 	<br>
 
@@ -42,4 +42,4 @@ if (nsCommonRequirements()
 
 ?>
 
-<?php include "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 3 - 3
ns/ns.php → public/ns/ns.php

@@ -1,7 +1,7 @@
-<?php include "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <form method="post">
-	<?php require "../inc/form/form.ns.inc.php"; ?>
+	<?php require "../../inc/form/form.ns.php""; ?>
 	<br>
 	<label for="ns">Serveur de nom</label>
 	<br>
@@ -27,4 +27,4 @@ if (nsCommonRequirements()
 
 ?>
 
-<?php include "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 3 - 3
ns/srv.php → public/ns/srv.php

@@ -1,8 +1,8 @@
-<?php include "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <form method="post">
 
-	<?php require "../inc/form/form.ns.inc.php"; ?>
+	<?php require "../../inc/form/form.ns.php""; ?>
 
 	<br>
 
@@ -62,4 +62,4 @@ if (nsCommonRequirements()
 
 ?>
 
-<?php include "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 3 - 3
ns/sshfp.php → public/ns/sshfp.php

@@ -1,8 +1,8 @@
-<?php include "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <form method="post">
 
-	<?php require "../inc/form/form.ns.inc.php"; ?>
+	<?php require "../../inc/form/form.ns.php""; ?>
 
 	<br>
 
@@ -59,4 +59,4 @@ if (nsCommonRequirements()
 
 ?>
 
-<?php include "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 3 - 3
ns/tlsa.php → public/ns/tlsa.php

@@ -1,8 +1,8 @@
-<?php include "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <form method="post">
 
-	<?php require "../inc/form/form.ns.inc.php"; ?>
+	<?php require "../../inc/form/form.ns.php""; ?>
 
 	<br>
 	<label for="use">Utilisation</label>
@@ -75,4 +75,4 @@ if (nsCommonRequirements()
 
 ?>
 
-<?php include "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 3 - 3
ns/txt.php → public/ns/txt.php

@@ -1,7 +1,7 @@
-<?php include "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <form method="post">
-	<?php require "../inc/form/form.ns.inc.php"; ?>
+	<?php require "../../inc/form/form.ns.php""; ?>
 	<br>
 	<label for="txt">Texte</label>
 	<br>
@@ -28,4 +28,4 @@ if (nsCommonRequirements()
 
 ?>
 
-<?php include "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
ns/zone.php → public/ns/zone.php

@@ -1,4 +1,4 @@
-<?php require "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <form method="post">
 	<h2>Ajouter une zone</h2>
@@ -88,4 +88,4 @@ if (isset($_POST['zone']) AND isset($_SESSION['username'])) {
 
 ?>
 
-<?php require "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
reg/ds.php → public/reg/ds.php

@@ -1,4 +1,4 @@
-<?php include "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <form method="post">
 	<label for="action">Action</label>
@@ -104,4 +104,4 @@ if (isset($_POST['zone']) AND isset($_POST['keytag']) AND isset($_POST['algo'])
 
 ?>
 
-<?php include "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
reg/glue.php → public/reg/glue.php

@@ -1,4 +1,4 @@
-<?php require "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <form method="post">
 	<label for="action">Action</label>
@@ -76,4 +76,4 @@ if (isset($_POST['action']) AND isset($_POST['subdomain']) AND isset($_POST['suf
 
 ?>
 
-<?php require "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
reg/index.php → public/reg/index.php

@@ -1,4 +1,4 @@
-<?php include "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <dl>
 	<dt><a class="regButton" href="register">Enregistrer un nouveau domaine</a></dt>
@@ -19,4 +19,4 @@
 	</dd>
 </dl>
 
-<?php include "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
reg/ns.php → public/reg/ns.php

@@ -1,4 +1,4 @@
-<?php include "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 <form method="post">
 	<label for="action">Action</label>
@@ -63,4 +63,4 @@ if (isset($_POST['domain']) AND isset($_POST['action']) AND isset($_POST['ns'])
 
 ?>
 
-<?php include "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>

+ 2 - 2
reg/register.php → public/reg/register.php

@@ -1,4 +1,4 @@
-<?php include "../top.inc.php"; ?>
+<?php require "../../inc/top.php"; ?>
 
 Enregistrer la possession d'un domaine sur son compte.<br>
 Ce domaine doit être composé uniquement d'au moins 4 lettres latines non accentuées.
@@ -64,4 +64,4 @@ if (isset($_POST['subdomain']) AND isset($_POST['suffix']) AND isset($_SESSION['
 
 ?>
 
-<?php include "../bottom.inc.php"; ?>
+<?php require "../../inc/bottom.php"; ?>