Ajax Lemma Edit Save - warwickfoster/qurantools GitHub Wiki
app/examine_root.php
File:Purpose
The provided code snippet is a PHP script that generates a detailed page for examining the occurrences of a root word in the Quran.
Functionality
- Retrieves root information The script retrieves the root word from the GET request parameter.
- Queries the database It queries the database to retrieve information about the root, including its glosses, verses, and occurrences.
- Generates HTML output The script generates an HTML table with the following sections:
- Root Details Provides information about the root word, including its occurrences, glosses, and verses.
- Glosses Lists the different glosses associated with the root and the number of times each gloss appears.
- Verses Lists the verses where the root word appears.
- Includes navigation links The script includes links to explore further, such as examining all occurrences of the root or examining another root.
Key Features
- Database query The script uses database queries to retrieve the necessary data.
- HTML generation The script generates HTML tables and links to display the information.
- Tooltip integration The script uses the Tipped JavaScript library to provide tooltips for the verses and glosses.
Usage
To use the script, you need to provide the root word as a GET request parameter. For example:
examine_root.php?ROOT=ظل
Note
- The script assumes the existence of database tables named
QURAN-DATA
,QTL-ROOT
, andGLOSS
. - The
db_query()
,db_rowcount()
,db_return_row()
, anddb_escape()
functions are assumed to be available for database operations.