This commit is contained in:
2024-05-24 13:46:06 +02:00
parent f394538776
commit cceab89523
14 changed files with 134 additions and 15 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="de">
<html lang="en">
<head>
<?php include_once "../../base/meta.php" ?>
@@ -11,7 +11,7 @@
<body>
<?php
include_once "../../base/errors.php";
include_once "../../base/settings.php";
include_once "../../base/headers.php";
Headers::html();
+1
View File
@@ -0,0 +1 @@
20
+36
View File
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<?php include_once "../../base/meta.php" ?>
<title>Counter</title>
</head>
<body>
<?php
// PHP
include_once "../../base/settings.php";
include_once "../../base/headers.php";
$fh = fopen("./data/counter.txt", "r+");
if (flock($fh, LOCK_EX)) {
$cnt = intval(fgets($fh));
if (!isset($_COOKIE["counter-visit"])) {
rewind($fh);
$cnt += 1;
fputs($fh, strval($cnt));
setcookie("counter-visit", "true", ["expires" => time() + 60 * 60 * 24, "samesite" => "strict", "secure" => true, "httponly" => true]);
}
}
flock($fh, LOCK_UN);
fclose($fh);
Headers::html();
?>
<h1>Visitor count: <?= $cnt ?></h1>
</body>
</html>
+1 -1
View File
@@ -1,5 +1,5 @@
<?php
include_once "../../../base/errors.php";
include_once "../../../base/settings.php";
include_once "../../../base/headers.php";
session_start();
+1 -1
View File
@@ -1 +1 @@
[{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715338381,"title":"sdf","name":"dsaf","comment":"dsg"},{"time":1715339761,"title":"Witzige Aufgabe","name":"Kilian","comment":"nun ja, also das funktioniert ja schon recht gut gell."},{"time":1716539658,"title":"Progress Bar","name":"Kilian","comment":"Jetzt auch mit einem etwas geileren Progress Bar der einem die Character-Anzahl anzeigt.\r\nWesentlich geiler, wesentlich nicer, und Bootstraped"},{"time":1716541941,"title":"New layout","name":"Kilian","comment":"New folder structure"},{"time":1716545229,"title":"More consistent padding","name":"Kilian","comment":"More unified padding across the sections of the page"},{"time":1716545296,"title":"Inject","name":"Kilian","comment":"<?php echo \"injection time!\" ?>"},{"time":1716546110,"title":"JS Inject","name":"Kilian","comment":"<script>\r\nconsole.log(\"BAD\");\r\n<\/script\/>"}]
[{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715337098,"title":"The first","name":"Kilian","comment":"The first comment on here."},{"time":1715338381,"title":"sdf","name":"dsaf","comment":"dsg"},{"time":1715339761,"title":"Witzige Aufgabe","name":"Kilian","comment":"nun ja, also das funktioniert ja schon recht gut gell."},{"time":1716539658,"title":"Progress Bar","name":"Kilian","comment":"Jetzt auch mit einem etwas geileren Progress Bar der einem die Character-Anzahl anzeigt.\r\nWesentlich geiler, wesentlich nicer, und Bootstraped"},{"time":1716541941,"title":"New layout","name":"Kilian","comment":"New folder structure"},{"time":1716545229,"title":"More consistent padding","name":"Kilian","comment":"More unified padding across the sections of the page"},{"time":1716545296,"title":"Inject","name":"Kilian","comment":"<?php echo \"injection time!\" ?>"},{"time":1716546110,"title":"JS Inject","name":"Kilian","comment":"<script>\r\nconsole.log(\"BAD\");\r\n<\/script\/>"},{"time":1716547636,"title":"Redirect","name":"Kilian","comment":"Correct redirect tag"},{"time":1716547857,"title":"Back to old","name":"Kilian","comment":"302 is apparently more common"}]
+2 -2
View File
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="de">
<html lang="en">
<head>
<?php include_once "../../base/meta.php" ?>
@@ -15,7 +15,7 @@
// HTML
include_once "../../base/icons.php";
// PHP
include_once "../../base/errors.php";
include_once "../../base/settings.php";
include_once "../../base/headers.php";
session_start();
+1 -1
View File
@@ -1,5 +1,5 @@
<?php
include_once "../../base/errors.php";
include_once "../../base/settings.php";
include_once "../../base/headers.php";
Headers::html();