From 2bee4a261774b45ab6fb6b84f85210518ffe085f Mon Sep 17 00:00:00 2001 From: nolanwhy Date: Sun, 5 Feb 2023 10:18:45 +0100 Subject: [PATCH 1/2] add footer --- catalog.php | 6 +++++- error.php | 4 ++++ games.php | 6 +++++- home.php | 4 ++++ index.php | 2 +- item.php | 43 +++++++++++++++++++++++++++++++++++++++++++ login.php | 4 ++++ register.php | 4 ++++ user.php | 4 ++++ 9 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 item.php diff --git a/catalog.php b/catalog.php index a5c703b..b26f995 100644 --- a/catalog.php +++ b/catalog.php @@ -122,4 +122,8 @@ $getitstarted->header(); - \ No newline at end of file + +footer(); +?> diff --git a/error.php b/error.php index 8ebc418..ab9988a 100644 --- a/error.php +++ b/error.php @@ -68,3 +68,7 @@ $getitstarted->header(); +footer(); +?> diff --git a/games.php b/games.php index 890daa8..220b898 100644 --- a/games.php +++ b/games.php @@ -130,4 +130,8 @@ $getitstarted->header(); - \ No newline at end of file + +footer(); +?> diff --git a/home.php b/home.php index 1ad2357..8f9e319 100644 --- a/home.php +++ b/home.php @@ -107,3 +107,7 @@ $getitstarted->header(); +footer(); +?> diff --git a/index.php b/index.php index f3f4621..d2bc577 100644 --- a/index.php +++ b/index.php @@ -41,4 +41,4 @@ src="https://www.youtube.com/embed/"> - \ No newline at end of file + diff --git a/item.php b/item.php new file mode 100644 index 0000000..7bb0075 --- /dev/null +++ b/item.php @@ -0,0 +1,43 @@ +prepare("SELECT * FROM catalog WHERE id = :id"); +$q->bindParam(':id',$id,PDO::PARAM_INT); +$q->execute(); +$item = $q->fetch(); +if(!$item) { + die("go fuck yourself (can't find item)"); // todo: redirect to 404 +} +?> + + + +header(); +?> + +<?php echo htmlspecialchars($item["name"]); ?> | <?php echo $sitename; ?> + +

yes i am still not hired to make html

+

this item is called

+

with id

+

and he costs $

+

thats all i have to say

+ + +footer(); +?> diff --git a/login.php b/login.php index 264ab56..8e46bd2 100644 --- a/login.php +++ b/login.php @@ -72,3 +72,7 @@ $thefunfact = json_decode($result); +footer(); +?> diff --git a/register.php b/register.php index f89bc83..1cf2317 100644 --- a/register.php +++ b/register.php @@ -94,3 +94,7 @@ $thefunfact = json_decode($result); +footer(); +?> diff --git a/user.php b/user.php index b9dc83f..d261ce9 100644 --- a/user.php +++ b/user.php @@ -57,3 +57,7 @@ $getitstarted->header(); +footer(); +?> From 0d7582627b28bebdaa1c30c9cc9fcfa4fd3a27da Mon Sep 17 00:00:00 2001 From: nolanwhy Date: Sun, 5 Feb 2023 10:19:36 +0100 Subject: [PATCH 2/2] Update classes.php --- core/classes.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/classes.php b/core/classes.php index 0541482..7e8d863 100644 --- a/core/classes.php +++ b/core/classes.php @@ -85,6 +85,9 @@ class PartyStarter { '; } + function footer() { + echo "
hi this is footer"; + } } ?>