Formulaic Density And Usage Statistics Per Sura - warwickfoster/qurantools GitHub Wiki

File: app/formulae/edit_formula_full_gloss.php

Purpose

The provided PHP script is a web page that allows administrators to edit the full gloss of a formula in a database.

Features

  • Displays details of the formula, including its transliterated and Arabic forms, length, type, and number of occurrences.
  • Allows administrators to enter or edit the full gloss of the formula.
  • Provides a message indicating whether the changes have been saved successfully.
  • Includes a link to generate a SQL list of all formulaic glosses.

Code Breakdown

1. Header

  • Includes necessary configuration files, functions, and authentication.
  • Redirects non-administrators to a 404 page.

2. Main Content

  • Displays a title and the formula archetype number.
  • Shows a confirmation message if changes have been saved.
  • Loads the details of the formula from the database.
  • Presents the formula details in a table.
  • Provides a form to edit the full gloss.
  • Includes a link to generate the SQL list.

3. Footer

  • Includes the standard website footer.

Usage

  1. An administrator accesses the script by navigating to the specified URL.
  2. The script displays the formula details and allows them to edit the full gloss.
  3. Upon saving, a confirmation message is displayed.

Benefits

  • Allows for accurate and consistent formula glossing.
  • Facilitates collaboration and knowledge sharing among administrators.
  • Enables the tracking and analysis of formula usage.

Additional Notes

  • The FORMULA-LIST table should contain the necessary formula data, including the full gloss field.
  • The edit_formula_full_gloss.php script handles the form submission and updates the database.
  • The export_full_gloss_list.php script generates the SQL list of formula glosses.