From bf592b16fb8d67d6866fd577ad9d0a92f9b8c361 Mon Sep 17 00:00:00 2001 From: Samuel Date: Mon, 26 Aug 2024 10:40:59 +0200 Subject: [PATCH] we going places --- www/public/Moment-2/FeetBook/Person.php | 49 ++++++++++++++++++++++ www/public/Moment-2/FeetBook/cleanData.php | 24 +++++++++++ www/public/Moment-2/FeetBook/start.php | 29 +++++++++++++ www/public/Moment-2/Upg1/strip_tag.php | 16 +++++++ www/public/Moment-2/Upg2/räknare.php | 16 +++++++ www/public/Moment-2/Upg3/foreacharray.php | 19 +++++++++ www/public/Moment-2/Upg4/beräkning.php | 26 ++++++++++++ www/public/Moment-2/Upg4/math.php | 31 ++++++++++++++ www/public/Moment-2/index.php | 17 ++++++++ www/public/index.php | 1 + 10 files changed, 228 insertions(+) create mode 100644 www/public/Moment-2/FeetBook/Person.php create mode 100644 www/public/Moment-2/FeetBook/cleanData.php create mode 100644 www/public/Moment-2/FeetBook/start.php create mode 100644 www/public/Moment-2/Upg1/strip_tag.php create mode 100644 www/public/Moment-2/Upg2/räknare.php create mode 100644 www/public/Moment-2/Upg3/foreacharray.php create mode 100644 www/public/Moment-2/Upg4/beräkning.php create mode 100644 www/public/Moment-2/Upg4/math.php create mode 100644 www/public/Moment-2/index.php diff --git a/www/public/Moment-2/FeetBook/Person.php b/www/public/Moment-2/FeetBook/Person.php new file mode 100644 index 0000000..8a02069 --- /dev/null +++ b/www/public/Moment-2/FeetBook/Person.php @@ -0,0 +1,49 @@ + + + + + + Document + + + förnamn = $förnamn; + $this->efternamn = $efternamn; + $this->användarnamn = $användarnamn; + $this->lösenord = $lösenord; + } + + public function getförnamn() { + return $this->förnamn; + } + + public function getefternamn() { + return $this->efternamn; + } + + public function getanvändarnamn() { + return $this->användarnamn; + } + + public function getlösenord() { + return $this->lösenord; + } + + public function setlösenord($lösenord) { + $this->lösenord = $lösenord; + } +} +?> + + \ No newline at end of file diff --git a/www/public/Moment-2/FeetBook/cleanData.php b/www/public/Moment-2/FeetBook/cleanData.php new file mode 100644 index 0000000..8a8ccf3 --- /dev/null +++ b/www/public/Moment-2/FeetBook/cleanData.php @@ -0,0 +1,24 @@ + + + + + + Document + + + + + \ No newline at end of file diff --git a/www/public/Moment-2/FeetBook/start.php b/www/public/Moment-2/FeetBook/start.php new file mode 100644 index 0000000..65ae8a7 --- /dev/null +++ b/www/public/Moment-2/FeetBook/start.php @@ -0,0 +1,29 @@ + + + + + + FeetBook + + +

FeetBook

+
+
+ Sign up + + + + + + + + + +
+
+ + + \ No newline at end of file diff --git a/www/public/Moment-2/Upg1/strip_tag.php b/www/public/Moment-2/Upg1/strip_tag.php new file mode 100644 index 0000000..19705df --- /dev/null +++ b/www/public/Moment-2/Upg1/strip_tag.php @@ -0,0 +1,16 @@ + + + + + + Document + + + World
", "
"); + echo("I en strip_tags används , efter för att deklerera vilka taggar som tillåts. + Det som är farligt med detta är att man kan skicka över taggar som kan vara skadliga och användas i XSS-attacker"); + include("../../footer.html"); + ?> + + \ No newline at end of file diff --git a/www/public/Moment-2/Upg2/räknare.php b/www/public/Moment-2/Upg2/räknare.php new file mode 100644 index 0000000..d584fc6 --- /dev/null +++ b/www/public/Moment-2/Upg2/räknare.php @@ -0,0 +1,16 @@ + + + + + + Document + + + + + \ No newline at end of file diff --git a/www/public/Moment-2/Upg3/foreacharray.php b/www/public/Moment-2/Upg3/foreacharray.php new file mode 100644 index 0000000..bef752a --- /dev/null +++ b/www/public/Moment-2/Upg3/foreacharray.php @@ -0,0 +1,19 @@ + + + + + + Document + + + Välkommen"; + $page["main"] = "

Detta är innehållet på min sida

"; + $page["footer"] = "

Min sidfoot

"; + foreach($page as $key => $value) { + echo($key . ":" . $value . "
"); + } + include("../../footer.html"); + ?> + + \ No newline at end of file diff --git a/www/public/Moment-2/Upg4/beräkning.php b/www/public/Moment-2/Upg4/beräkning.php new file mode 100644 index 0000000..dbb81e9 --- /dev/null +++ b/www/public/Moment-2/Upg4/beräkning.php @@ -0,0 +1,26 @@ + + + + + + Document + + +"; + echo "Differansen av 4 och 1 är $sum
"; + echo "Produkten av 2 och 5 är $prod
"; + echo "Kvoten av 2 och 5 är $divi"; + + include("../../footer.html"); +?> + + \ No newline at end of file diff --git a/www/public/Moment-2/Upg4/math.php b/www/public/Moment-2/Upg4/math.php new file mode 100644 index 0000000..2c8f0c2 --- /dev/null +++ b/www/public/Moment-2/Upg4/math.php @@ -0,0 +1,31 @@ + + + + + + Document + + + + + \ No newline at end of file diff --git a/www/public/Moment-2/index.php b/www/public/Moment-2/index.php new file mode 100644 index 0000000..78fb63f --- /dev/null +++ b/www/public/Moment-2/index.php @@ -0,0 +1,17 @@ + + + + + + Document + + + Upg1 + Upg2 + Upg3 + Upg4 + + + \ No newline at end of file diff --git a/www/public/index.php b/www/public/index.php index aa8fdb2..68839f6 100644 --- a/www/public/index.php +++ b/www/public/index.php @@ -8,5 +8,6 @@ Moment-0 Moment-1 + Moment-2 \ No newline at end of file