+
\ No newline at end of file
diff --git a/Lab08.php b/Lab08.php
index 7982419d..ee768be5 100644
--- a/Lab08.php
+++ b/Lab08.php
@@ -18,13 +18,13 @@
-
+
-
+
Posts
@@ -43,6 +43,7 @@
?>
+
diff --git a/functions.inc.php b/functions.inc.php
index c7b6f38a..fa95548f 100644
--- a/functions.inc.php
+++ b/functions.inc.php
@@ -10,6 +10,53 @@ function generateLink($url, $label, $class) {
function outputPostRow($number) {
include("travel-data.inc.php");
+ $postId = 1;
+ $userId = 2;
+ $userName = "Leonie Kohler";
+ $date = "2/8/2017";
+ $thumb = "8710320515.jpg";
+ $title = "Ekklisia Agii Isidori Church";
+ $excerpt = "At the end of the hot climb up to the top Lycabettus Hill you are greeted with the oasis that is the Ekklisia Agii Isidori church.";
+ $reviewsNum = 15;
+ $reviewsRating = 3;
+ switch ($number){
+ case 1:
+ $postId = 1;
+ $userId = 2;
+ $userName = "Leonie Kohler";
+ $date = "2/8/2017";
+ $thumb = "8710320515.jpg";
+ $title = "Ekklisia Agii Isidori Church";
+ $excerpt = "At the end of the hot climb up to the top Lycabettus Hill you are greeted with the oasis that is the Ekklisia Agii Isidori church.";
+ $reviewsNum = 15;
+ $reviewsRating = 3;break;
+ case 2:
+ $postId = 3;
+ $userId = 5;
+ $userName = "Frantisek Wichterlova";
+ $date = "9/9/2017";
+ $thumb = "8710247776.jpg";
+ $title = "Santorini Sunset";
+ $excerpt = "Every evening as the sun sets in Fira, it seems that everyone who is not drinking or eating is rushing with their camera to the most picturesque locations in order to capture that famous Aegean sunset.";
+ $reviewsNum = 38;
+ $reviewsRating = 5;break;
+ case 3:
+ $postId = 9;
+ $userId = 13;
+ $userName = "Edward Francis";
+ $date = "10/19/2017";
+ $thumb = "8710289254.jpg";
+ $title = "Looking towards Fira";
+ $excerpt = "The steamer Mongolia, belonging to the Peninsular and Oriental Company, built of iron, of two thousand eight hundred tons burden, and five hundred horse-power, was due at eleven o'clock a.m. on Wednesday, the 9th of October, at Suez.";
+ $reviewsNum = 3;
+ $reviewsRating = 2;break;
+ }
+ $content = '
All
- $x_value){
+ $thetitle =''.$x_value.'';
+ echo $thetitle;
+ }
/* you will need to fill this place with appropriate PHP */
/* hint: use array and loop */
//the next line is an example
- // Canada
-
-
+ // Canada
?>
';
+ echo $img;
+ }
/* you will need to fill this place with appropriate PHP */
/* hint: use array and loop */
//the next lines are one of the elements
//you need to fill the elements with data provided
- //
diff --git a/functions.inc.php b/functions.inc.php
index fa95548f..38fcb8f0 100644
--- a/functions.inc.php
+++ b/functions.inc.php
@@ -10,47 +10,57 @@ function generateLink($url, $label, $class) {
function outputPostRow($number) {
include("travel-data.inc.php");
- $postId = 1;
- $userId = 2;
- $userName = "Leonie Kohler";
- $date = "2/8/2017";
- $thumb = "8710320515.jpg";
- $title = "Ekklisia Agii Isidori Church";
- $excerpt = "At the end of the hot climb up to the top Lycabettus Hill you are greeted with the oasis that is the Ekklisia Agii Isidori church.";
- $reviewsNum = 15;
- $reviewsRating = 3;
- switch ($number){
- case 1:
- $postId = 1;
- $userId = 2;
- $userName = "Leonie Kohler";
- $date = "2/8/2017";
- $thumb = "8710320515.jpg";
- $title = "Ekklisia Agii Isidori Church";
- $excerpt = "At the end of the hot climb up to the top Lycabettus Hill you are greeted with the oasis that is the Ekklisia Agii Isidori church.";
- $reviewsNum = 15;
- $reviewsRating = 3;break;
- case 2:
- $postId = 3;
- $userId = 5;
- $userName = "Frantisek Wichterlova";
- $date = "9/9/2017";
- $thumb = "8710247776.jpg";
- $title = "Santorini Sunset";
- $excerpt = "Every evening as the sun sets in Fira, it seems that everyone who is not drinking or eating is rushing with their camera to the most picturesque locations in order to capture that famous Aegean sunset.";
- $reviewsNum = 38;
- $reviewsRating = 5;break;
- case 3:
- $postId = 9;
- $userId = 13;
- $userName = "Edward Francis";
- $date = "10/19/2017";
- $thumb = "8710289254.jpg";
- $title = "Looking towards Fira";
- $excerpt = "The steamer Mongolia, belonging to the Peninsular and Oriental Company, built of iron, of two thousand eight hundred tons burden, and five hundred horse-power, was due at eleven o'clock a.m. on Wednesday, the 9th of October, at Suez.";
- $reviewsNum = 3;
- $reviewsRating = 2;break;
- }
+ $postId = ${"postID".$number};
+ $userId = ${"userId".$number};
+ $userName = ${"userName".$number};
+ $date = ${"date".$number};
+ $thumb = ${"thumb".$number};
+ $title = ${"title".$number};
+ $excerpt = ${"excerpt".$number};
+ $reviewsNum = ${"reviewsNum".$number};
+ $reviewsRating = ${"reviewRating".$number};
+
+// $postId = 1;
+// $userId = 2;
+// $userName = "Leonie Kohler";
+// $date = "2/8/2017";
+// $thumb = "8710320515.jpg";
+// $title = "Ekklisia Agii Isidori Church";
+// $excerpt = "At the end of the hot climb up to the top Lycabettus Hill you are greeted with the oasis that is the Ekklisia Agii Isidori church.";
+// $reviewsNum = 15;
+// $reviewsRating = 3;
+// switch ($number){
+// case 1:
+// $postId = 1;
+// $userId = 2;
+// $userName = "Leonie Kohler";
+// $date = "2/8/2017";
+// $thumb = "8710320515.jpg";
+// $title = "Ekklisia Agii Isidori Church";
+// $excerpt = "At the end of the hot climb up to the top Lycabettus Hill you are greeted with the oasis that is the Ekklisia Agii Isidori church.";
+// $reviewsNum = 15;
+// $reviewsRating = 3;break;
+// case 2:
+// $postId = 3;
+// $userId = 5;
+// $userName = "Frantisek Wichterlova";
+// $date = "9/9/2017";
+// $thumb = "8710247776.jpg";
+// $title = "Santorini Sunset";
+// $excerpt = "Every evening as the sun sets in Fira, it seems that everyone who is not drinking or eating is rushing with their camera to the most picturesque locations in order to capture that famous Aegean sunset.";
+// $reviewsNum = 38;
+// $reviewsRating = 5;break;
+// case 3:
+// $postId = 9;
+// $userId = 13;
+// $userName = "Edward Francis";
+// $date = "10/19/2017";
+// $thumb = "8710289254.jpg";
+// $title = "Looking towards Fira";
+// $excerpt = "The steamer Mongolia, belonging to the Peninsular and Oriental Company, built of iron, of two thousand eight hundred tons burden, and five hundred horse-power, was due at eleven o'clock a.m. on Wednesday, the 9th of October, at Suez.";
+// $reviewsNum = 3;
+// $reviewsRating = 2;break;
+// }
$content = '