Ajax Loupe Verse Viewer - warwickfoster/qurantools GitHub Wiki
Purpose
The provided PHP script generates a list of references to root or lemma occurrences in the Quran.
Functionality
- Allows users to search for root or lemma references.
- Displays a table of results, including the Arabic text, transliteration, and number of occurrences.
- Provides navigation options to examine the root, go back, and search for another root or lemma.
- Uses the Tipped.js library for tooltips.
Key Features
- Search Functionality Users can enter a root or lemma to search for references.
- Results Table The table displays relevant information, including Arabic text, transliteration, and occurrence count.
- Navigation Buttons The script provides buttons to navigate between pages and options.
- Tooltip Support Tipped.js provides tooltips for additional information.
Code Breakdown
- Start of PHP Script The script includes necessary libraries and defines the necessary variables.
- Database Query A query is executed to retrieve references based on the provided root or lemma.
- Table Generation The results are iterated over to generate a table row for each reference.
- Navigation Buttons Buttons are created to navigate to other pages.
- Footer and Script The script includes the footer and JavaScript code for tooltip initialization.
Usage
To use the script, simply include it in an HTML file and provide the necessary input fields for searching roots or lemmas.
Example
<form action="exhaustive_root_references.php" method="get">
<label for="root">Root:</label>
<input type="text" name="ROOT" id="root">
<button type="submit">Search</button>
</form>
Note
- The script assumes the availability of a database containing Quranic data.
- The
plural()
function is not defined in the code, so it is assumed to be available elsewhere.