Browse Source

Various small changes

Miraty 3 years ago
parent
commit
c64d1a36bc
6 changed files with 40 additions and 25 deletions
  1. 1 0
      bottom.inc.php
  2. 2 0
      less/buttons.less
  3. 8 4
      less/main.less
  4. 1 1
      ns/mx.php
  5. 6 6
      reg/ds.php
  6. 22 14
      reg/glue.php

+ 1 - 0
bottom.inc.php

@@ -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>

+ 2 - 0
less/buttons.less

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

+ 8 - 4
less/main.less

@@ -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;
+  }
 }

+ 1 - 1
ns/mx.php

@@ -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">

+ 6 - 6
reg/ds.php

@@ -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']);

+ 22 - 14
reg/glue.php

@@ -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>
-
-      <?php
-
-      $suffixes = regListUserDomains($_SESSION['username']);
-
-      if ($suffixes) {
-        foreach($suffixes as $suffix) {
-          echo "<option value='" . $suffix . "'>." . $suffix . "</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
+
+        $suffixes = regListUserDomains($_SESSION['username']);
+
+        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 ?>">