Verified Commit 0ab8fa00 authored by Luc Didry's avatar Luc Didry
Browse files

— Improve accessibility

parent 48a24ad2
Revision history for GeoIP Lookup
0.4 ????-??-??
0.5 ????-??-??
0.4 2022-03-29
- Improve accessibility
0.3 2022-03-29
- add `autofocus` and `required` on input field
- Add `autofocus` and `required` on input field
0.2 2022-03-29
- add JSON endpoint
- Add JSON endpoint
0.1 2022-03-29
- first version, working
- private and reserved IP addresses are filtered
- country flags are displayed next to the country name
- First version, working
- Private and reserved IP addresses are filtered
- Country flags are displayed next to the country name
......@@ -43,7 +43,7 @@
}
?>
<!DOCTYPE html>
<html lang="en">
<html lang="fr">
<head>
<title>FramIPLookup</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
......@@ -73,29 +73,31 @@
</style>
</head>
<body>
<?php if (isset($_GET['ip'])) {
if (isset($err)) {
echo "<p>$err</p>";
} else { ?>
<h1><?php echo $ipclean ?></h1>
<dl>
<dt>Continent :</dt>
<dd><?php echo $infos['continent']['names']['fr'] ?></dd>
<dt>Pays :</dt>
<dd><?php echo $infos['country']['names']['fr'].' '.$flag ?></dd>
<dt>Ville :</dt>
<dd><?php echo $infos['city']['names']['en'] ?></dd>
</dl>
<?php }
echo '<hr>';
} ?>
<form method="GET">
<label for="ip">Adresse IP à rechercher</label>
<input type="text" name="ip" id="ip" autofocus required>
<input type="checkbox" name="json" id="json">
<label for="json">Résultat sous forme de fichier JSON</label>
<br>
<input type="submit">
</form>
<main>
<?php if (isset($_GET['ip'])) {
if (isset($err)) {
echo "<p>$err</p>";
} else { ?>
<h1><?php echo $ipclean ?></h1>
<dl>
<dt>Continent :</dt>
<dd><?php echo $infos['continent']['names']['fr'] ?></dd>
<dt>Pays :</dt>
<dd><?php echo $infos['country']['names']['fr'].' '.$flag ?></dd>
<dt>Ville :</dt>
<dd><?php echo $infos['city']['names']['en'] ?></dd>
</dl>
<?php }
echo '<hr>';
} ?>
<form method="GET">
<label for="ip">Adresse IP à rechercher</label>
<input type="text" name="ip" id="ip" autofocus required>
<input type="checkbox" name="json" id="json">
<label for="json">Résultat sous forme de fichier JSON</label>
<br>
<input type="submit" value="Interroger la base de données !">
</form>
</main>
</body>
</html>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment