From 0946430adc3c03b9ca82fba82d80e845e21028fc Mon Sep 17 00:00:00 2001 From: Ankita Pandey Date: Mon, 12 Feb 2024 01:58:37 +0530 Subject: [PATCH 1/3] commit --- index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/index.php b/index.php index 06dde93..a8e1164 100644 --- a/index.php +++ b/index.php @@ -40,6 +40,7 @@ + +
= 1) : ?> @@ -131,9 +96,10 @@ showAlert("User not found!");'; } ?> + "> - + @@ -242,7 +208,7 @@ // fetching rows returned by query $postrows = mysqli_fetch_all($postresult); -foreach ($postrows as $postrow) { + foreach ($postrows as $postrow) { if ($postrow[1] == NULL) { echo '
@@ -258,6 +224,10 @@ ' . $postrow[3] . ' +
+ + +
' . str_replace("\n", "
", $postrow[0]) . ' @@ -274,178 +244,132 @@ ' . $fname . '
  • - shared a post in the feed on + shared a post in the feed on ' . $postrow[3] . '
  • +
    + + +
    +
    + Post Image +
    ' . str_replace("\n", "
    ", $postrow[0]) . '
    -
    - ' . $postrow[1] . ' -
    '; } } } else { - echo '

    Posts Not found

    '; + echo "

    No post yet...

    "; } ?> - - - + +
    -

    Get to know more...

    -
    -

    Basic

    -
      -
    • -
        -
      • -

        Name :

        -
      • -
      • - -
      • -
      -
    • - -
    • -
        -
      • -

        Last Name :

        -
      • -
      • - -
      • -
      -
    • - -
    • -
        -
      • -

        Username :

        -
      • -
      • - -
      • -
      -
    • - -
    • -
        -
      • -

        Email :

        -
      • -
      • - -
      • -
      -
    • +

      Welcome to 's info...

      +
      +
        +
      • Username:
      • +
      • Name:
      • +
      • Email:
    + + +
    +

    Welcome to 's photo...

    + + 0) { + $photorows = mysqli_fetch_all($photoresult); + foreach ($photorows as $photorow) { + echo '
    + Post Image +
    '; + } + } else { + echo "

    No photo yet...

    "; + } + ?> +
    +
    + + + + + + + - -
    -

    See photos from ...

    - - if (mysqli_num_rows($postresultimgs) > 0) { - while ($postrow = mysqli_fetch_assoc($postresultimgs)) { - echo '
    -
    -
      -
    • - -
    • -
    • - ' . $fname . ' -
    • -
    • - shared a post in the feed on - ' . $postrow['dop'] . ' -
    • -
    -
    -
    - ' . str_replace("\n", "
    ", $postrow['msg']) . ' -
    -
    - ' . $postrow['image'] . ' -
    -
    '; - } - } else { - echo '

    Posts Not found

    '; - } - ?> -
    - - - - - + - + // Close the statement + mysqli_stmt_close($stmt); +} - - - - +// Close the database connection +mysqli_close($connection); - +// Flush the output buffer and turn off buffering +ob_end_flush(); +?> \ No newline at end of file diff --git a/db/connection.php b/db/connection.php index 81f76d2..e16612c 100644 --- a/db/connection.php +++ b/db/connection.php @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/index.php b/index.php index a8e1164..d9becb0 100644 --- a/index.php +++ b/index.php @@ -32,7 +32,7 @@ - + diff --git a/js/script.js b/js/script.js index aaabc8f..0ed4689 100644 --- a/js/script.js +++ b/js/script.js @@ -1,10 +1,12 @@ -// Check button in mobile view + +console.log("Number of delete buttons:");// Check button in mobile view const menuBTN = document.querySelector('.menu-btn'); const menuItems = document.querySelector('.menu-items'); function toggleBtn() { menuBTN.classList.toggle("change"); menuItems.classList.toggle("active"); + console.log("Number of delete buttons:"); } menuBTN.addEventListener('click', toggleBtn); @@ -31,4 +33,29 @@ menuBTN.addEventListener('click', toggleBtn); openLightbox(this.src); }); }); + }); + + // document.addEventListener("DOMContentLoaded", function() { + // // Get all delete buttons + // var deleteButtons = document.querySelectorAll('.delete-btn'); + + // // Loop through each delete button + // deleteButtons.forEach(function(button) { + // // Add click event listener to each delete button + // button.addEventListener('click', function() { + // // Find the closest ancestor element with class ".feed-post-display-box" + // var post = this.closest('.feed-post-display-box'); + // // If found, remove the post + // if (post) { + // post.remove(); + // } + // }); + // }); + // }); + var deleteButtons = document.querySelectorAll('.delete-btn'); + deleteButtons.forEach(function(button) { + button.addEventListener('click', function() { + var post = this.closest('.feed-post-display-box'); + post.remove(); + }); }); \ No newline at end of file diff --git a/style/account.css b/style/account.css index 4e1a42e..6159d1e 100644 --- a/style/account.css +++ b/style/account.css @@ -294,4 +294,22 @@ input.postimage{ padding: 10px; border: none; } -}*/ \ No newline at end of file +}*/ +/* -------------------- */ +.delete-btn{ + width: 80px; + margin-top: 10px; + margin-bottom: 20px; + padding: 10px; + border: solid grey; + border: none; + border-radius: 7px; + background-color:rgb(176, 61, 53); + color: white; + margin-left: 935px; +} + +.delete-btn:hover{ + background-color: rgb(222, 118, 111); + color: black; +} \ No newline at end of file diff --git a/style/feed.css b/style/feed.css index ba1f552..477531e 100644 --- a/style/feed.css +++ b/style/feed.css @@ -126,4 +126,4 @@ input.postimage{ .feed-post-display-box-image{ padding-right: 0%; } -} +} \ No newline at end of file From 14a796b30965f1b9e72c31065e09a2e28e47ea2a Mon Sep 17 00:00:00 2001 From: Ankita Pandey Date: Fri, 16 Feb 2024 16:44:18 +0530 Subject: [PATCH 3/3] new commit --- about-us.php | 2 +- account.php | 2 +- db/connection.php | 2 +- index.php | 2 +- js/script.js | 22 +++------------------- 5 files changed, 7 insertions(+), 23 deletions(-) diff --git a/about-us.php b/about-us.php index 8867f5e..105de10 100644 --- a/about-us.php +++ b/about-us.php @@ -12,7 +12,7 @@ - + diff --git a/account.php b/account.php index 30434b5..61b74a0 100644 --- a/account.php +++ b/account.php @@ -30,7 +30,7 @@ - + diff --git a/db/connection.php b/db/connection.php index e16612c..81f76d2 100644 --- a/db/connection.php +++ b/db/connection.php @@ -1,6 +1,6 @@ - + diff --git a/js/script.js b/js/script.js index 0ed4689..bb13800 100644 --- a/js/script.js +++ b/js/script.js @@ -1,12 +1,13 @@ -console.log("Number of delete buttons:");// Check button in mobile view +// Check button in mobile view + const menuBTN = document.querySelector('.menu-btn'); const menuItems = document.querySelector('.menu-items'); function toggleBtn() { menuBTN.classList.toggle("change"); menuItems.classList.toggle("active"); - console.log("Number of delete buttons:"); + } menuBTN.addEventListener('click', toggleBtn); @@ -35,23 +36,6 @@ menuBTN.addEventListener('click', toggleBtn); }); }); - // document.addEventListener("DOMContentLoaded", function() { - // // Get all delete buttons - // var deleteButtons = document.querySelectorAll('.delete-btn'); - - // // Loop through each delete button - // deleteButtons.forEach(function(button) { - // // Add click event listener to each delete button - // button.addEventListener('click', function() { - // // Find the closest ancestor element with class ".feed-post-display-box" - // var post = this.closest('.feed-post-display-box'); - // // If found, remove the post - // if (post) { - // post.remove(); - // } - // }); - // }); - // }); var deleteButtons = document.querySelectorAll('.delete-btn'); deleteButtons.forEach(function(button) { button.addEventListener('click', function() {