Repos header
This commit is contained in:
parent
0da314a31d
commit
c62321f854
@ -10,12 +10,12 @@ class DB extends PDO
|
|||||||
{
|
{
|
||||||
$conn = null;
|
$conn = null;
|
||||||
try {
|
try {
|
||||||
$dataAccess = parse_ini_file($config, true);
|
$dataAccess = parse_ini_file($config, true)["ZEDAT"];
|
||||||
|
|
||||||
$conn = new PDO(
|
$conn = new PDO(
|
||||||
"mysql:host={$dataAccess["ZEDAT"]["host"]};dbname={$dataAccess["ZEDAT"]["database"]};charset={$dataAccess["ZEDAT"]["charset"]}",
|
"mysql:host={$dataAccess["host"]};dbname={$dataAccess["database"]};charset={$dataAccess["charset"]}",
|
||||||
$dataAccess["ZEDAT"]["user"],
|
$dataAccess["user"],
|
||||||
$dataAccess["ZEDAT"]["passwd"],
|
$dataAccess["passwd"],
|
||||||
[
|
[
|
||||||
PDO::ATTR_PERSISTENT => false,
|
PDO::ATTR_PERSISTENT => false,
|
||||||
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
// PHP
|
// PHP
|
||||||
include_once "../../../base/settings.php";
|
include_once "../../../base/settings.php";
|
||||||
include_once "../../../base/headers.php";
|
include_once "../../../base/headers.php";
|
||||||
|
Headers::html();
|
||||||
|
|
||||||
if (!isset($_COOKIE["validation"])) {
|
if (!isset($_COOKIE["validation"])) {
|
||||||
setcookie("validation", "false");
|
setcookie("validation", "false");
|
||||||
@ -25,8 +26,6 @@
|
|||||||
unset($colour);
|
unset($colour);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Headers::html();
|
|
||||||
?>
|
?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
// PHP
|
// PHP
|
||||||
include_once "../../../base/settings.php";
|
include_once "../../../base/settings.php";
|
||||||
include_once "../../../base/headers.php";
|
include_once "../../../base/headers.php";
|
||||||
|
Headers::html();
|
||||||
|
|
||||||
if (isset($_POST["theme"])) {
|
if (isset($_POST["theme"])) {
|
||||||
$theme = $_POST["theme"];
|
$theme = $_POST["theme"];
|
||||||
@ -21,8 +22,6 @@
|
|||||||
} else if (isset($_COOKIE["theme"])) {
|
} else if (isset($_COOKIE["theme"])) {
|
||||||
$theme = $_COOKIE["theme"];
|
$theme = $_COOKIE["theme"];
|
||||||
}
|
}
|
||||||
|
|
||||||
Headers::html();
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if (isset($theme) && $theme === "black") { ?>
|
<?php if (isset($theme) && $theme === "black") { ?>
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
// PHP
|
// PHP
|
||||||
include_once "../../base/settings.php";
|
include_once "../../base/settings.php";
|
||||||
include_once "../../base/headers.php";
|
include_once "../../base/headers.php";
|
||||||
|
Headers::html();
|
||||||
|
|
||||||
$fh = fopen("./data/counter.txt", "r+");
|
$fh = fopen("./data/counter.txt", "r+");
|
||||||
if (flock($fh, LOCK_EX)) {
|
if (flock($fh, LOCK_EX)) {
|
||||||
@ -27,8 +28,6 @@
|
|||||||
}
|
}
|
||||||
flock($fh, LOCK_UN);
|
flock($fh, LOCK_UN);
|
||||||
fclose($fh);
|
fclose($fh);
|
||||||
|
|
||||||
Headers::html();
|
|
||||||
?>
|
?>
|
||||||
<h1>Visitor count: <?= $cnt ?></h1>
|
<h1>Visitor count: <?= $cnt ?></h1>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once "../../base/settings.php";
|
include_once "../../base/settings.php";
|
||||||
include_once "../../base/headers.php";
|
include_once "../../base/headers.php";
|
||||||
|
Headers::html();
|
||||||
|
|
||||||
/* Aufgabe 1 (A)
|
/* Aufgabe 1 (A)
|
||||||
Programmieren Sie eine Funktion buildlink,
|
Programmieren Sie eine Funktion buildlink,
|
||||||
@ -121,8 +122,6 @@ Details siehe Aufgabenstellung in Blackboard. */
|
|||||||
|
|
||||||
echo getHits("counter.txt");
|
echo getHits("counter.txt");
|
||||||
addHit("counter.txt");
|
addHit("counter.txt");
|
||||||
|
|
||||||
Headers::html();
|
|
||||||
?>
|
?>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
@ -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":1716547636,"title":"Redirect","name":"Kilian","comment":"Correct redirect tag"},{"time":1716547857,"title":"Back to old","name":"Kilian","comment":"302 is apparently more common"}]
|
[{"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"},{"time":1717152497,"title":"Repositioned HTML Header call","name":"Kilian","comment":"As title says"}]
|
||||||
@ -17,6 +17,7 @@
|
|||||||
// PHP
|
// PHP
|
||||||
include_once "../../base/settings.php";
|
include_once "../../base/settings.php";
|
||||||
include_once "../../base/headers.php";
|
include_once "../../base/headers.php";
|
||||||
|
Headers::html();
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
$errors = $_SESSION["error"] ?? [];
|
$errors = $_SESSION["error"] ?? [];
|
||||||
@ -38,8 +39,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data = array_slice($json, $page * 9, 9);
|
$data = array_slice($json, $page * 9, 9);
|
||||||
|
|
||||||
Headers::html();
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="container-fluid p-0">
|
<div class="container-fluid p-0">
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
$stmt = $db->prepare($query);
|
$stmt = $db->prepare($query);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
$result = $stmt->fetchAll();
|
||||||
|
|
||||||
DB::closeConnection($db);
|
DB::closeConnection($db);
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user