diff --git a/index.php b/index.php index 93a258f..d55bc1c 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,8 @@ 'Previous', 1 => 'Home', 2 => 'About myself', 3 => 'What I\'ve done so far', @@ -11,71 +14,22 @@ } else { $section = $_POST ['section']; + if ( $section == 0 ) { + if ( isset ( $_SESSION [ 'section' ] ) ) { + $section = $_SESSION [ 'section' ]; + } + else { + $section = 1; + } + } + $_SESSION [ 'section' ] = $section; $section_title = $sections [ $section ]; $sections_content = [ - 1 => - '
-
-
-
-
-
-

Bryan Joshua Pedini

- An eighteen years old guy from Italy, with just some great ideas -
-
-
-
-
- ', - 2 => - '
-
-
-
-
-
-

About Me

- This is what I do. -
-
-
-
-
', + 1 => file_get_contents ( 'tmpl/home.phtml' ), + 2 => file_get_contents ( 'tmpl/description.phtml' ), + 3 => file_get_contents ( 'tmpl/projects.phtml' ), + 4 => file_get_contents ( 'tmpl/ideas.phtml' ), + 5 => file_get_contents ( 'tmpl/contact-form.phtml' ), ]; $arr_res = [ 'status' => 200, @@ -101,6 +55,14 @@ +
+
diff --git a/tmpl/contact-form.phtml b/tmpl/contact-form.phtml new file mode 100644 index 0000000..e69de29 diff --git a/tmpl/description.phtml b/tmpl/description.phtml new file mode 100644 index 0000000..082d47d --- /dev/null +++ b/tmpl/description.phtml @@ -0,0 +1,13 @@ +
+
+
+
+
+
+

About Me

+ This is what I do. +
+
+
+
+
\ No newline at end of file diff --git a/tmpl/home.phtml b/tmpl/home.phtml new file mode 100644 index 0000000..a5d6634 --- /dev/null +++ b/tmpl/home.phtml @@ -0,0 +1,48 @@ +
+
+
+
+
+
+

Bryan Joshua Pedini

+ An eighteen years old guy from Italy, with just some great ideas +
+
+
+
+
+ \ No newline at end of file diff --git a/tmpl/ideas.phtml b/tmpl/ideas.phtml new file mode 100644 index 0000000..e69de29 diff --git a/tmpl/projects.phtml b/tmpl/projects.phtml new file mode 100644 index 0000000..e69de29