Añadida la funcionalidad a la pagina para definir la cantidad de visitas

This commit is contained in:
2021-05-23 19:04:56 -03:00
parent 7601ad829e
commit 6fd88804c1
4 changed files with 23 additions and 2 deletions

20
definer.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
$visitas = htmlspecialchars($_POST['visitas']);
function backToLife() {
header('Location: ./definer.html');
}
if (!isset($visitas)) {
backToLife();
}
if ($visitas >= 0 && $visitas <= 9999) {
file_put_contents('./visits.txt', $visitas - 1);
header('Location: ./index.php');
} else {
backToLife();
}
?>

View File

@@ -1,6 +1,6 @@
* {
margin: 0;
user-select: none;
}
html, body {
height: 100%;

View File

@@ -1,5 +1,6 @@
* {
margin: 0;
user-select: none;
}
body {

View File

@@ -1 +1 @@
57
112