Skip to content

Documentation

Atharva Shah edited this page Sep 5, 2022 · 37 revisions

Walkthrough

follow.php -

  • This file performs only backend functions and does not include any markup.
  • From the profile page, users can follow/unfollow other users. Adds a new row to the social table with the follower and followed username.

functions.php -

  • This file performs only backend functions and does not include any markup.
  1. Checks if a user is logged in and is valid. If yes, redirects to the login page. Important to start the session to perform the check_login function. Use session_start(); in pages that you wish to use this function.
  2. Generates a random 5 to 20-digit number that is to be used to generate dynamic userIDs
  3. Sends an Email requesting verification of the account to the recipient.
  4. Sends an Email with Reset Password Link.
  5. Returns whether a user account is verified or not.
  6. Sets a user account is verified or not.
  7. Checks whether a user is active or not.
  8. Sets a user account status as active and inactive.
  9. Used to pass the datetime and return a printable and user-friendly datetime format D:M:Y H:M:AM/PM.
  10. Get total mutual media count between two users.

header.php -

  • This file is responsible for showing the navbar at the top of every page once the user is logged in. It shows the user profile pic, the site logo, and the navigation items along with the respective dropdowns.
  • Sets the Header Navbar for all the pages.

logout.php -

  • This file performs only backend functions and does not include any markup.
  • Logs out the user. Redirects to the login page and clears the session.

search_users_ajax.php -

  • This file performs only backend functions and does not include any markup.
  • Display data from the database Asynchronously on the search_users page.

delete_user_confirm.php -

  • This file performs only backend functions and does not include any markup.
  • Checks if a user has Logged IN and if so, Deletes the user data from the database.

reset_pass.php -

  • This file performs only backend functions and does not include any markup.
  • Upon Clicking the Link, user arrives to reset pass page and is asked to enter a new password. This page asks the User to Enter the New password.
    1. send_reset_link.php (Sends the Reset Link)
    1. reset_pass.php (Upon Clicking the Link, user arrives here and is asked to enter a new password
    1. submit_new.php (Logic to update the database with the new password)

send_reset_link.php -

  • This file performs only backend functions and does not include any markup.
  • Displays Single Input Field asking user to enter an Email to receive the Password Link On.
  • On Form Submission It checks if the Email Entered is Registered with WYDRN Service and pushes an email if yes.
    1. send_reset_link.php (Sends the Reset Link)
    1. reset_pass.php (Upon Clicking the Link, user arrives here and is asked to enter a new password)
    1. submit_new.php (Logic to update the database with the new password)

verify.php -

  • This file performs only backend functions and does not include any markup.
  • Sends an email to the user with a link to view the form to reset their password.

WYDRN.php -

  • This file performs only backend functions and does not include any markup.
  • Standardizes user input in proper format and inserts into the database. If all fields are empty, inserts nothing and displays appropriate message on the profile card
    • If at least one of the fields is not empty, inserts into the database.
    • Displays the latest data from the database on the profile page.
    • This is the main dependency of profile.php

clear.php -

  • This file performs only backend functions and does not include any markup.
  • Clears the users' profile page by inserting a blank row in the Database.

download_csv.php -

  • This file performs only backend functions and does not include any markup.
  • Programmatically dumps the Database for the user into a CSV and prompts a download window so that CSV can be downloaded on local machine of the user.

upload_csv.php -

  • This file performs only backend functions and does not include any markup.

login.php -

Screenshot (69)

  • It is the Login page for the app and checks for the information provided by the user.
  • The page uses POST request method to send the data from the user input to the server.
  • It sends data to the users table in the database and checks for user_name and password in the database.
  • The password encryption function used is B_CRYPT() and encodes it.
  • The login button checks for the information and if correct redirects the user to the profile.php page.
  • This page makes use of cookies for auto login for the user using the remember me option.
  • The forgot password link redirects the user to send_reset_link.php page.
  • The signup button redirects user to signup.php to create a new account.

signup.php -

signup

  • This page helps the user to create/ register as a new account.
  • The page uses POST request method to send the data from the user input to the server.
  • The data is submitted to the users table in the database.
  • After creating the new account, the user is redirected to the login.php page to log in into his account.

welcome.php -

Screenshot (75)

  • This page is used to make an entry to the diary of the user. It allows the user to add the current music he is listening to, the current book he is reading, the current tv show/ movie he is watched, or the current video game he played.
  • It is mandatory to add at least 1 media to post it to the feed.
  • The page uses POST request method to send the data from the user input to the server.
  • The data is sent to the 'data' table
    1. Music is sent to 'album' and 'artist' column in the table.
    2. TV-Show is sent to 'tv' column and platform is sent to 'streaming' columns respectively.
    3. Movies are sent to 'movie' column and date of release is submitted to 'year' column.
    4. Books information is saved in 'book' column and 'author' column.
  • The submit button redirects user to profile.php page and saves the information and posts it to the feed.

feed.php -

Screenshot (74)

  • It is the social feed page where the user will see all the activities posted by members they follow.
  • The data is requested from the database and uses the _GET function.
  • The data is retrieved from the 'data' table.
  • The user can click the username of any of his following user and he will be redirected to that user’s page.

followers.php -

followers

  • This page shows the followers of the selected user.
  • The page uses GET request method to determine which user’s data is being fetched from the DB
  • It retrieves the data from the 'social' table in the database.

following.php -

Screenshot (72)

  • This page shows the list of people that a particular user is following.
  • The page uses GET request method to determine which user’s data is being fetched from the DB
  • The page fetches the data from the 'social' table in the database.

media_book.php -

Screenshot (83)

  • This page shows non-duplicate books logged by the user in a grid/gallery form. On hovering on an item the date of logging is displayed.
  • A GET Request method is used on this page.
  • The page makes use of the Google Books API.
  • The data is fetched from the 'data' table.
  • The user can sort the data on the basis of various parameters such as Added date(Newest to oldest or oldest to newest) Release date(Newest to oldest or oldest to Newest) and also alphabetically(A-Z or Z-A).

media_movie.php -

Screenshot (84)

  • This page shows non-duplicate movies logged by the user in a grid/gallery form. On hovering on an item the date of logging is displayed.
  • A GET Request method is used on this page.
  • The page makes use of the TMDB(Television and Movie Database) API.
  • The data is fetched from the 'data' table.
  • The user can sort the data on the basis of various parameters such as Added date(Newest to oldest or oldest to newest) Release date(Newest to oldest or oldest to Newest) and also alphabetically(A-Z or Z-A).

media_music.php -

Screenshot (85)

  • This page shows non-duplicate music logged by the user in a grid/gallery form. On hovering on an item, the date of logging is displayed.
  • A GET Request method is used on this page.
  • The page makes use of the Last.FM API.
  • The data is fetched from the 'data' table.
  • The user can sort the data on the basis of various parameters such as Added date(Newest to oldest or oldest to newest) Release date(Newest to oldest or oldest to Newest) and also alphabetically(A-Z or Z-A).

media_tv.php -

Screenshot (86)

  • This page shows non-duplicate tv shows logged by the user in a grid/gallery form. On hovering on an item, the date of logging is displayed.
  • A GET Request method is used on this page.
  • The page makes use of the TMDB(Television and Movie Database) API.
  • The data is fetched from the 'data' table.
  • The user can sort the data on the basis of various parameters such as Added date (Newest to oldest or oldest to newest) Release date(Newest to oldest or oldest to Newest) and also alphabetically(A-Z or Z-A).

media_videogame.php -

Screenshot (87)

  • This page shows non-duplicate videogames logged by the user in a grid/gallery form. On hovering on an item, the date of logging is displayed.
  • A GET Request method is used on this page.
  • The page makes use of the RAWG API.
  • The data is fetched from the 'data' table.

Browse/Books -

book

  • This page is used to find information for any book searched by the user.
  • The page makes use of the _GET function.
  • The page makes use of the Google Books API.

Browse/Movies -

movie

  • This page is used to find information for any Movie searched by the user.
  • The page makes use of the _GET function.
  • The page makes use of the TMDB(Television and Movie Database) API.

Browse/TV -

tv

  • This page is used to find information for any tv-show searched by the user.
  • The page makes use of the _GET function.
  • The page makes use of the TMDB(Television and Movie Database) API.

Browse/Albums -

album

  • This page is used to find information for any album/music searched by the user.
  • The page makes use of the _GET function.
  • The page makes use of the Last.FM API.

Browse/Videogames -

game

  • This page is used to find information for any videogame searched by the user.
  • The page makes use of the _GET function.
  • The page makes us of the RAWG API.

mutual_view.php -

mutual-view

  • Music, books, movies, video games & TV Shows that are in common with other users can be seen on this page by the user.
  • User can arrive on this page by clicking the "mutual media" button on the profile of other users.
  • This page uses _GET method.
  • The data is fetched from the 'data' table

profile.php -

Screenshot (71)

  • This page shows the profile of the user, and it checks if the user is logged in. It also shows the profile of the other user if the username is specified in the url.
  • $SESSION is used to check whether the user is logged in.
  • The page uses _GET method to grab the username from the database.
  • This page also shows the total followers, following and media count of the user, by fetching the data from the 'data' table.
  • Profile page of the other user displays the anchor tag with the text "Follow" incase the user does not follow the other user.
  • Also, profile page of the other user displays the anchor tag with the text "unfollow" incase the user already follows the other user.

search_users.php -

Screenshot (78)

  • From this page user can search other users to follow and connect with.
  • The page uses POST request method to send the data from the user input to the server.
  • The results are fetched from the 'users' table and displayed.
  • The page has function to sort the users on various parameters like the greatest number of followers, most active user.

submit_new.php -

pass-forgor

  • The page displays single input field which requires user email address to receive the Password reset link on.
  • On form submission it checks if the Email entered is registered with WYDRN Service and pushes an email if the Email is registered.
  • The page uses POST request method to send the data from the user input to the server.
  • To verify if the Email is registered with WYDRN service, data is fetched from ‘users' table.

delete_user.php -

delete-account

  • Page asks user for the confirmation to delete the user's account.
  • Also does the page warn user that once the account is deleted, it cannot be undone.

diary.php -

Screenshot (80)

  • The diary page show users a log of entries on WYDRN.
  • Order in which the entries are shown is of most recent to last recent grouped by date.
  • The data is shown in a tabular manner.
  • This page also provides a convenience to the user by allowing them to filter the entries on the basis of their desired dates.
  • The page uses POST request method to send the data from the user input to the server.
  • After selecting a date and clicking on the "Filter by date" button user can easily access the entries of the selected date.
  • The data displayed is fetched from the table 'data' in the database.
  • Each page has a limit of displaying 10 entries only.
  • Pagination is also added at the bottom of the page using grid container, in order to show the pagination row and manual input box next to each other.

diary_date.php -

diary-date

  • This page shows the filtered results after the user applies date filter in the diary.
  • Data displayed in fetched from the 'data' table in the database.
  • The page uses POST request method to send the data from the user input (datepicker) to the server.

edit_profile.php -

Screenshot (81)

  • User from this page can change/update profile picture and background banner.
  • The page uses POST request method to send the data from the user input to the server.
  • Accepted File formats are ".png, .jpg, .jpeg, image/png, image/jpg, image/jpeg, .gif".
  • Maximum size is 1MB for profile picture and the background banner.
  • User can click on "Update profile " button to update the selected file as a profile photo or background banner.
  • "move_uploaded_file" function is used to move the profile picture into database, also "unlink()" function is used to delete the previous file from the database automatically.

import_export.php -

Screenshot (90)

  • This page allows user to import/export data in csv and export as csv as well as a pdf.
  • There are 3 separate buttons:
    1. To import a csv
    2. To export a csv
    3. To export a pdf.

Exports/pdf.php -

  • This file performs only backend functions and does not include any markup.
  • Utility Export tool allowing the user to export the data to pdf in tabular format along with datetime and recorded activity from the database. The user must be logged in to do so.

Exports/csv_export.php -

Screenshot (91)

  • This page shows tabular data of the users from the database.
  • This Page makes use of the _GET function.

Exports/csv_import.php -

Screenshot (92)

  • Allow user to import data from exported csv. Data is processed and stored in the database. The user must be logged in to do so.

stats.php -

Screenshot (93)

  • Show stats of a user such as bifurcation of activities, number of activities, weekly and yearly logged items etc.

admin.php -

  • All the administrative functions such as member count, member deletion and member data/authorization will be displayed here. Screenshot (94)
  • This Section of the page shows the website's total stats. Screenshot (95)
  • This section of the page shows all the users registered on the website and allows the admin to view and also delete the user. Screenshot (96)
  • This page is displayed whenever an Unauthorized user tries to access the admin page.

about.php -

404 Error.php -

Screenshot (97)

  • This page is displayed whenever there is any error or bug while displaying or accessing any page or content on the website.

RecommendationML/index.php -