New function : shortenLink

This commit is contained in:
Divlo
2019-12-11 20:46:57 +01:00
parent 3e3f13d079
commit d07f03724b
16 changed files with 298 additions and 25 deletions

View File

@ -103,7 +103,7 @@
<p class="function-list-description">Vérifie si un nombre fait partie des nombres d'Armstrong ou non.</p>
</div>
</div>
<div class="col-sm-12 col-md-6 col-md-6 pb-4">
<div class="col-sm-12 col-md-6 pb-4">
<div class="text-center pb-5">
<h2 class="function-list-title"><a href="./function-views/heapAlgorithm.php">Heap's algorithm</a></h2>
<a href="./function-views/heapAlgorithm.php"><img class="function-list-image" src="/img/function-image/heapAlgorithm.png" alt="Heap's algorithm"></a>
@ -113,13 +113,19 @@
</div>
<div class="row">
<div class="col-sm-12 pb-4">
<div class="col-sm-12 col-md-6 pb-4">
<div class="text-center pb-5">
<h2 class="function-list-title"><a href="./function-views/convertMarkdown.php">Markdown</a></h2>
<a href="./function-views/convertMarkdown.php"><img class="function-list-image" src="/img/function-image/convertMarkdown.png" alt="Markdown"></a>
<p class="function-list-description">Convertis du Markdown en HTML.</p>
</div>
</div>
<div class="col-sm-12 col-md-6 pb-4">
<div class="text-center pb-5">
<h2 class="function-list-title"><a href="./function-views/linkShortener.php">Raccourcisseurs de liens</a></h2>
<a href="./function-views/linkShortener.php"><img class="function-list-image" src="/img/function-image/linkShortener.png" alt="Raccourcisseurs de liens"></a>
<p class="function-list-description">Une URL trop longue ? Raccourcissez-là !</p>
</div>
</div>
</div>

View File

@ -12,10 +12,10 @@
<img class="function-image" src="/img/function-image/filterStudents.png" alt="Carte étudiant">
</div>
<div class="form-group">
<label for="nameEntered">Entrez les prénoms :</label>
<label for="nameEntered">Entrer les prénoms :</label>
<input name="nameEntered" type="text" id="nameEntered" placeholder="(e.g : 'Prénom1, Prénom2, Prénom3, ...')" class="form-control">
<br>
<label for="filteredLetter">Entrez la lettre à filtré :</label>
<label for="filteredLetter">Entrer la lettre à filtré :</label>
<input name="filteredLetter" type="text" id="filteredLetter" placeholder="(e.g : 'A')" class="form-control">
<br>
<div class="form-row text-center">

View File

@ -0,0 +1,40 @@
<!-- Config -->
<?php include("../../php/config.php");?>
<!-- Header -->
<?php include("../../incl/header.php");?>
<!-- Page Content -->
<div class="container">
<h1><span class="important"><?php echo $title?></span> :</h1>
<p class="pt-3 text-center">
<?php echo $description?>
<div class="text-center">
<img class="function-image" src="/img/function-image/linkShortener.png" alt="Raccourcisseurs de liens">
</div>
<br>
<div class="text-center">
<a href="/views/short_links-list.php">La liste de vos liens raccourcit les plus récents.</a>
</div>
</p>
<form id="formLinkShortener" method="post">
<div class="form-group">
<label for="url">Entrez le lien :</label> <br>
<input name="url" type="url" id="url" placeholder="(e.g : divlo.fr)" class="form-control"> <br class="hideUserShortcut">
<label class="hideUserShortcut" for="userShortcut">Entrez le nom du raccourci :</label> <br class="hideUserShortcut">
<input name="userShortcut" type="text" id="userShortcut" placeholder="(e.g : divlo)" class="form-control hideUserShortcut"> <br>
<label for="option">Choisissez une option : </label> <br>
<select class="form-control" id="option" name="option">
<option value="randomShortcut">Raccourci aléatoire</option>
<option value="userShortcut">Donner un nom au raccourci</option>
</select>
<br>
<button type="submit" class="btn btn-dark text-center">Envoyer</button>
<br>
</div>
<p class="results text-center"></p>
</form>
<!-- Footer -->
<?php include("../../incl/footer.php");?>

View File

@ -14,16 +14,16 @@
</p>
<table class="table table-bordered mt-5">
<thead>
<tr>
<th class="text-center" scope="col">Source</th>
<th class="text-center" scope="col">Citation/Proverbe</th>
</tr>
</thead>
<tbody class="quote-list text-center">
<thead>
<tr>
<th class="text-center" scope="col">Source</th>
<th class="text-center" scope="col">Citation/Proverbe</th>
</tr>
</thead>
<tbody class="quote-list text-center">
</tbody>
</table>
</tbody>
</table>
<!-- Footer -->
<?php include("../incl/footer.php");?>

View File

@ -0,0 +1,28 @@
<!-- Config -->
<?php include("../php/config.php");?>
<!-- Header -->
<?php include("../incl/header.php");?>
<!-- Page Content -->
<div class="container">
<h1><span class="important"><?php echo $title?></span> :</h1>
<p class="pt-3 text-center">
<span class="totalLengthLinksList"></span><br>
<a href="/views/function-views/linkShortener.php">Revenir au raccourcisseur de liens.</a>
</p>
<table class="table table-bordered mt-5">
<thead>
<tr>
<th class="text-center" scope="col">Liens originaux</th>
<th class="text-center" scope="col">Liens raccourcit</th>
</tr>
</thead>
<tbody class="links-list text-center">
</tbody>
</table>
<!-- Footer -->
<?php include("../incl/footer.php");?>