diff --git a/common/pages.php b/common/pages.php index ece0217..0cf320c 100644 --- a/common/pages.php +++ b/common/pages.php @@ -26,12 +26,15 @@ define('TITLES', [ 'print' => 'Afficher les données', 'ip' => 'Enregistrements A et AAAA', 'ns' => 'Enregistrement NS', - 'txt' => 'Enregistrement TXT', + 'txt' => 'Enregistrement TXT', 'caa' => 'Enregistrement CAA', - 'srv' => 'Enregistrement SRV', + 'srv' => 'Enregistrement SRV', 'mx' => 'Enregistrement MX', 'sshfp' => 'Enregistrement SSHFP', 'tlsa' => 'Enregistrement TLSA', + 'cname' => 'Enregistrement CNAME', + 'dname' => 'Enregistrement DNAME', + 'loc' => 'Enregistrement LOC', ], 'ht' => [ 'index' => 'Hypertexte', @@ -75,6 +78,9 @@ define('DESCRIPTIONS', [ 'mx' => 'Indiquer l\'adresse du serveur recevant les courriels', 'sshfp' => 'Indiquer les empreintes des clés SSH', 'tlsa' => 'Mettre en place DANE en indiquant l\'empreinte d\'un certificat TLS', + 'cname' => 'Définir un domaine comme étant l\'alias d\'un autre', + 'dname' => 'Définir les sous-domaines d\'un domaine comme étant les alias des sous-domaines d\'un autre domaine', + 'loc' => 'Indiquer des coordonnées géographiques', ], 'ht' => [ 'index' => 'Mettre en ligne son site statique sur un espace SFTP, et le faire répondre en HTTP par DNS ou Tor', diff --git a/public/css/form.css b/public/css/form.css index 889170f..b1e14d8 100644 --- a/public/css/form.css +++ b/public/css/form.css @@ -18,6 +18,10 @@ input[type=text] { font-family: monospace; } +input[type=number] { + width: 8ch; +} + input#subdomain, input#ttl-value { text-align: right; } diff --git a/public/ns/cname.php b/public/ns/cname.php new file mode 100644 index 0000000..b4e22ea --- /dev/null +++ b/public/ns/cname.php @@ -0,0 +1,28 @@ + + +
+ +
+ +
+ +
+ +
+ + + +
+ +
+ +
+ +
+ +
+ + + +
+ + + +
+ Latitude +
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ Longitude +
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ + +
+ m +
+ +
+ m +
+ +
+ m +
+ +
+ m +
+ +
+ += 0 AND $_POST['lat-deg'] <= 90)) + userError("Wrong value for lat-deg."); +if (!($_POST['lat-min'] >= 0 AND $_POST['lat-min'] <= 59)) + userError("Wrong value for lat-min."); +if (!($_POST['lat-sec'] >= 0 AND $_POST['lat-sec'] <= 59.999)) + userError("Wrong value for lat-sec."); + +if ($_POST['lat-dir'] !== "N" AND $_POST['lat-dir'] !== "S") + userError("Wrong value for lat-dir."); + +if (!($_POST['lon-deg'] >= 0 AND $_POST['lon-deg'] <= 180)) + userError("Wrong value for lon-deg."); +if (!($_POST['lon-min'] >= 0 AND $_POST['lon-min'] <= 59)) + userError("Wrong value for lon-min."); +if (!($_POST['lon-sec'] >= 0 AND $_POST['lon-sec'] <= 59.999)) + userError("Wrong value for lon-sec."); + +if ($_POST['lon-dir'] !== "E" AND $_POST['lon-dir'] !== "W") + userError("Wrong value for lon-dir."); + +if (!($_POST['alt'] >= -100000 AND $_POST['alt'] <= 42849672.95)) + userError("Wrong value for alt."); + +if (!($_POST['size'] >= 0 AND $_POST['size'] <= 90000000)) + userError("Wrong value for size."); + +if (!($_POST['hp'] >= 0 AND $_POST['hp'] <= 90000000)) + userError("Wrong value for hp."); + +if (!($_POST['vp'] >= 0 AND $_POST['vp'] <= 90000000)) + userError("Wrong value for vp."); + +knotcZoneExec($_POST['zone'], array( + $values['domain'], + $values['ttl'], + "LOC", + $_POST['lat-deg'], + $_POST['lat-min'], + $_POST['lat-sec'], + $_POST['lat-dir'], + $_POST['lon-deg'], + $_POST['lon-min'], + $_POST['lon-sec'], + $_POST['lon-dir'], + $_POST['alt'] . 'm', + $_POST['size'] . 'm', + $_POST['hp'] . 'm', + $_POST['vp'] . 'm', +)); + +success("Enregistrement ajouté");