Chart Tags - warwickfoster/qurantools GitHub Wiki

File: app/auth/logout.php

Purpose

This PHP script handles the user logout process for the Qur'an Tools website.

Key Features

  • Destroys the user's session.
  • Logs the user out by clearing cookies and server variables.
  • Displays a confirmation message and provides options to return to the login page.

Functionality

  1. Require necessary files

    • config.php: Contains website configuration settings.
    • functions.php: Contains utility functions.
  2. Start the session

    • Starts the user's session.
  3. Handle logout

    • Calls the log_user_out() function to perform logout actions.
    • Destroys the session using session_destroy().
  4. Display confirmation message

    • Displays a message indicating that the user has successfully logged out.
  5. Provide navigation options

    • Offers a button to return to the login page.

Additional Notes

  • The library/standard_header.php and library/menu.php files are included for layout purposes.
  • The library/footer.php file includes the website footer.
  • The $config['main_app_url'] variable is used to get the URL of the main application.

Purpose

The purpose of this script is to provide a smooth and user-friendly logout experience for Qur'an Tools users.