Formulaic Commonalities Between Suras - warwickfoster/qurantools GitHub Wiki
File: app/dictionary/penrice.php
Purpose
The provided code snippet is a PHP script that displays a PDF dictionary page for the Penrice lexicon. It allows users to navigate through the pages using the arrow keys, escape key, and a page navigation function.
Key Features
- PDF Display The script uses the
PDFViewDIV to display the PDF content. - Page Navigation
- Arrow keys (left and right) to navigate between pages.
GotoPage()function to manually set the page number.
- Escape Key Handling The escape key closes the Lightview pop-up window.
- Lightview Mode The script checks for a
LIGHTVIEWGET parameter to determine if the page is being displayed in Lightview mode. - Page Validation The
GotoPage()function ensures that the page number is within the valid range (1-176). - Menu and Footer The script includes the menu and footer based on the
LIGHTVIEWflag.
Usage
- The script requires authentication and is accessible through a URL with a
PAGEparameter specifying the desired page number. - It displays the Penrice lexicon PDF page based on the provided page number.
- The user can navigate through the pages using the arrow keys and the
GotoPage()function.
Additional Notes
- The script requires the
config.php,functions.php, andauth.phpfiles to be included. - The
library/standard_header.phpfile is included for the HTML header. - The PDF is loaded from the
/dictionary/Penricefolder with the prefixPenrice_Page.
Conclusion
The PHP script provides a user-friendly interface for navigating the Penrice lexicon PDF dictionary. It handles navigation, Lightview mode, and provides a convenient way to view the PDF content.