Functions - warwickfoster/qurantools GitHub Wiki

File: app/formulae/list_formulae.php

Purpose

The provided code snippet is a PHP script that displays a table of formulae based on the provided search criteria. The script includes features such as pagination, data filtering, and chart generation.

Functionality

  • The script receives search parameters such as root, verse, sura, formula length, type, and sort order.
  • It queries the database to retrieve formulae matching the criteria.
  • The results are displayed in a table, with columns for formula, occurrences, charts, and other relevant information.
  • The script includes pagination to allow users to navigate through multiple pages of results.
  • It also provides a chart for each formula, showing its distribution across verses.

Key Features

  • Data filtering by root, verse, sura, formula length, type, and sort order.
  • Pagination for navigating through multiple pages of results.
  • Chart generation for displaying formula distribution.
  • Back to top button for easy navigation.

Code Structure

  • The code is organized into header, body, and footer sections.
  • The header includes necessary CSS and JavaScript files.
  • The body contains the table, pagination, and chart generation logic.
  • The footer includes the footer section of the webpage.

Additional Notes

  • The script uses the Tipped.js library for tooltips on the chart generation button.
  • The move_back_to_top_button() function is called to adjust the position of the back to top button when the page navigator is displayed.

Usage

This script can be used by Islamic scholars and researchers to search and analyze Quranic formulae. It provides a comprehensive view of formulae distribution and facilitates knowledge discovery.