diff --git a/profile/components/card_image_asc.php b/profile/components/card_image_asc.php index cdfe516d..2c96785f 100644 --- a/profile/components/card_image_asc.php +++ b/profile/components/card_image_asc.php @@ -271,7 +271,7 @@ function updateProgress(event) { if (!empty($tag)) { ?> + class="btn btn-sm btn-outline- mb-1 rounded-pill fw-bold"> + class="btn btn-sm btn-outline- mb-1 rounded-pill fw-bold"> + class="btn btn-sm btn-outline- mb-1 rounded-pill fw-bold"> + class="btn btn-sm btn-outline- mb-1 rounded-pill fw-bold"> + class="btn btn-sm btn-outline- mb-1 rounded-pill fw-bold"> + class="btn btn-sm btn-outline- mb-1 rounded-pill fw-bold"> + class="btn btn-sm btn-outline- mb-1 rounded-pill fw-bold"> + class="btn btn-sm btn-outline- mb-1 rounded-pill fw-bold">
- +
@@ -38,25 +40,6 @@
-

- ' . $url . ''; - }, $messageTextWithoutTags); - - $formattedTextWithLineBreaks = nl2br($formattedText); - echo $formattedTextWithLineBreaks; - } else { - echo "Image description is empty."; - } - ?> -

@@ -65,7 +48,7 @@
- +
diff --git a/profile/components/delete_image_desc.php b/profile/components/delete_image_desc.php index 90b2bebd..58374ff1 100644 --- a/profile/components/delete_image_desc.php +++ b/profile/components/delete_image_desc.php @@ -24,13 +24,15 @@ .icon-stroke-3 { -webkit-text-stroke: 3px; }
- +
@@ -38,25 +40,6 @@
-

- ' . $url . ''; - }, $messageTextWithoutTags); - - $formattedTextWithLineBreaks = nl2br($formattedText); - echo $formattedTextWithLineBreaks; - } else { - echo "Image description is empty."; - } - ?> -

@@ -65,7 +48,7 @@
- +
diff --git a/profile/components/delete_image_least.php b/profile/components/delete_image_least.php index 6adebb8a..f59cb7b5 100644 --- a/profile/components/delete_image_least.php +++ b/profile/components/delete_image_least.php @@ -11,7 +11,7 @@ ?>
-
+ diff --git a/profile/components/delete_image_like.php b/profile/components/delete_image_like.php index 6adebb8a..f59cb7b5 100644 --- a/profile/components/delete_image_like.php +++ b/profile/components/delete_image_like.php @@ -11,7 +11,7 @@ ?>
- + diff --git a/profile/components/delete_image_order_asc.php b/profile/components/delete_image_order_asc.php index 6114e1a8..e9789074 100644 --- a/profile/components/delete_image_order_asc.php +++ b/profile/components/delete_image_order_asc.php @@ -24,13 +24,15 @@ .icon-stroke-3 { -webkit-text-stroke: 3px; }
- +
@@ -38,25 +40,6 @@
-

- ' . $url . ''; - }, $messageTextWithoutTags); - - $formattedTextWithLineBreaks = nl2br($formattedText); - echo $formattedTextWithLineBreaks; - } else { - echo "Image description is empty."; - } - ?> -

@@ -65,7 +48,7 @@
- +
diff --git a/profile/components/delete_image_order_desc.php b/profile/components/delete_image_order_desc.php index 90b2bebd..58374ff1 100644 --- a/profile/components/delete_image_order_desc.php +++ b/profile/components/delete_image_order_desc.php @@ -24,13 +24,15 @@ .icon-stroke-3 { -webkit-text-stroke: 3px; }
- +
@@ -38,25 +40,6 @@
-

- ' . $url . ''; - }, $messageTextWithoutTags); - - $formattedTextWithLineBreaks = nl2br($formattedText); - echo $formattedTextWithLineBreaks; - } else { - echo "Image description is empty."; - } - ?> -

@@ -65,7 +48,7 @@
- +
diff --git a/profile/components/delete_image_pop.php b/profile/components/delete_image_pop.php index d7f09fb3..465ae759 100644 --- a/profile/components/delete_image_pop.php +++ b/profile/components/delete_image_pop.php @@ -11,7 +11,7 @@ ?>
- + diff --git a/profile/components/delete_image_view.php b/profile/components/delete_image_view.php index ba3e5142..6a5b0505 100644 --- a/profile/components/delete_image_view.php +++ b/profile/components/delete_image_view.php @@ -11,7 +11,7 @@ ?>
- + diff --git a/profile/components/delete_tagged_asc.php b/profile/components/delete_tagged_asc.php index dc6be6f6..05f643f2 100644 --- a/profile/components/delete_tagged_asc.php +++ b/profile/components/delete_tagged_asc.php @@ -12,13 +12,15 @@ .icon-stroke-3 { -webkit-text-stroke: 3px; }
- +
@@ -26,25 +28,6 @@
-

- ' . $url . ''; - }, $messageTextWithoutTags); - - $formattedTextWithLineBreaks = nl2br($formattedText); - echo $formattedTextWithLineBreaks; - } else { - echo "Image description is empty."; - } - ?> -

@@ -53,7 +36,7 @@
- +
diff --git a/profile/components/delete_tagged_desc.php b/profile/components/delete_tagged_desc.php index 5aec102f..2749323f 100644 --- a/profile/components/delete_tagged_desc.php +++ b/profile/components/delete_tagged_desc.php @@ -12,13 +12,15 @@ .icon-stroke-3 { -webkit-text-stroke: 3px; }
- +
@@ -26,25 +28,6 @@
-

- ' . $url . ''; - }, $messageTextWithoutTags); - - $formattedTextWithLineBreaks = nl2br($formattedText); - echo $formattedTextWithLineBreaks; - } else { - echo "Image description is empty."; - } - ?> -

@@ -53,7 +36,7 @@
- +
diff --git a/profile/components/delete_tagged_least.php b/profile/components/delete_tagged_least.php index d9d68086..41fade0e 100644 --- a/profile/components/delete_tagged_least.php +++ b/profile/components/delete_tagged_least.php @@ -12,13 +12,15 @@ .icon-stroke-3 { -webkit-text-stroke: 3px; }
- +
@@ -26,25 +28,6 @@
-

- ' . $url . ''; - }, $messageTextWithoutTags); - - $formattedTextWithLineBreaks = nl2br($formattedText); - echo $formattedTextWithLineBreaks; - } else { - echo "Image description is empty."; - } - ?> -

@@ -53,7 +36,7 @@
- +
diff --git a/profile/components/delete_tagged_like.php b/profile/components/delete_tagged_like.php index d9d68086..41fade0e 100644 --- a/profile/components/delete_tagged_like.php +++ b/profile/components/delete_tagged_like.php @@ -12,13 +12,15 @@ .icon-stroke-3 { -webkit-text-stroke: 3px; }
- +
@@ -26,25 +28,6 @@
-

- ' . $url . ''; - }, $messageTextWithoutTags); - - $formattedTextWithLineBreaks = nl2br($formattedText); - echo $formattedTextWithLineBreaks; - } else { - echo "Image description is empty."; - } - ?> -

@@ -53,7 +36,7 @@
- +
diff --git a/profile/components/delete_tagged_order_asc.php b/profile/components/delete_tagged_order_asc.php index a90e3e8d..05f643f2 100644 --- a/profile/components/delete_tagged_order_asc.php +++ b/profile/components/delete_tagged_order_asc.php @@ -10,15 +10,17 @@ .icon-stroke-1 { -webkit-text-stroke: 1px; } .icon-stroke-2 { -webkit-text-stroke: 2px; } .icon-stroke-3 { -webkit-text-stroke: 3px; } - a +
- +
@@ -26,25 +28,6 @@
-

- ' . $url . ''; - }, $messageTextWithoutTags); - - $formattedTextWithLineBreaks = nl2br($formattedText); - echo $formattedTextWithLineBreaks; - } else { - echo "Image description is empty."; - } - ?> -

@@ -53,7 +36,7 @@
- +
diff --git a/profile/components/delete_tagged_order_desc.php b/profile/components/delete_tagged_order_desc.php index 5aec102f..2749323f 100644 --- a/profile/components/delete_tagged_order_desc.php +++ b/profile/components/delete_tagged_order_desc.php @@ -12,13 +12,15 @@ .icon-stroke-3 { -webkit-text-stroke: 3px; }
- +
@@ -26,25 +28,6 @@
-

- ' . $url . ''; - }, $messageTextWithoutTags); - - $formattedTextWithLineBreaks = nl2br($formattedText); - echo $formattedTextWithLineBreaks; - } else { - echo "Image description is empty."; - } - ?> -

@@ -53,7 +36,7 @@
- +
diff --git a/profile/components/delete_tagged_pop.php b/profile/components/delete_tagged_pop.php index f91b5a02..510effba 100644 --- a/profile/components/delete_tagged_pop.php +++ b/profile/components/delete_tagged_pop.php @@ -12,13 +12,15 @@ .icon-stroke-3 { -webkit-text-stroke: 3px; }
- +
@@ -26,25 +28,6 @@
-

- ' . $url . ''; - }, $messageTextWithoutTags); - - $formattedTextWithLineBreaks = nl2br($formattedText); - echo $formattedTextWithLineBreaks; - } else { - echo "Image description is empty."; - } - ?> -

@@ -53,7 +36,7 @@
- +
diff --git a/profile/components/delete_tagged_view.php b/profile/components/delete_tagged_view.php index 659f9469..7f7203d7 100644 --- a/profile/components/delete_tagged_view.php +++ b/profile/components/delete_tagged_view.php @@ -12,13 +12,15 @@ .icon-stroke-3 { -webkit-text-stroke: 3px; }
- +
@@ -26,25 +28,6 @@
-

- ' . $url . ''; - }, $messageTextWithoutTags); - - $formattedTextWithLineBreaks = nl2br($formattedText); - echo $formattedTextWithLineBreaks; - } else { - echo "Image description is empty."; - } - ?> -

@@ -53,7 +36,7 @@
- +
diff --git a/profile/header_profile_asc.php b/profile/header_profile_asc.php index 6a13a1ca..7c5909a0 100644 --- a/profile/header_profile_asc.php +++ b/profile/header_profile_asc.php @@ -1,37 +1,55 @@ -
- all images +
+ all images prepare($queryTags); - + // Bind the parameter for the LIKE clause $pattern = "%,%"; $stmt->bindParam(':pattern', $pattern, PDO::PARAM_STR); - + // Bind the email parameter with the correct value $email = $_SESSION['email']; // Use the user's email $stmt->bindParam(':email', $email, PDO::PARAM_STR); - + // Execute the query $stmt->execute(); - - // Fetch the results - while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { - $firstTag = $row['first_tag']; - $tagCount = $row['tag_count']; - - // Display each first tag as an tag with the total count - echo " $firstTag"; - } + + // Fetch the results into an array + $tags = $stmt->fetchAll(PDO::FETCH_ASSOC); + } catch (PDOException $e) { // Handle any database connection or query errors - echo "Error: " . $e->getMessage(); + $errorMessage = "Error: " . $e->getMessage(); } ?> + + +
+ +
+ + + + + + + + + +
-
Popular images from
- - - - - - -
-
- -
-
- - + prepare("SELECT images.*, COUNT(favorites.id) AS favorite_count FROM images LEFT JOIN favorites ON images.id = favorites.image_id WHERE images.email = :email GROUP BY images.id ORDER BY favorite_count DESC LIMIT 6"); + $stmt->bindValue(':email', $email); + if ($stmt->execute()) { + // Fetch the results as an associative array + $resultsPopular = $stmt->fetchAll(PDO::FETCH_ASSOC); + } else { + // Handle the query execution error + echo "Error executing the query."; + } + ?> + + +
Popular images from
+ + + + + + +
+
+ +
+
+ + diff --git a/profile/profile_tagged_asc.php b/profile/profile_tagged_asc.php index aec7500a..0249ddbe 100644 --- a/profile/profile_tagged_asc.php +++ b/profile/profile_tagged_asc.php @@ -63,7 +63,7 @@ } ?> - + - + - + - + - + - + - + - +