CORE POS - IS4C
The CORE POS front end
|
Public Member Functions | |
__construct () | |
head_content () | |
body_content () | |
preprocess () | |
print_page () | |
add_onload_command ($str) | |
hide_input ($bool) | |
input_header ($action="") | |
noinput_header () | |
scale_box () | |
scanner_scale_polling ($include_scans=true) | |
footer () | |
change_page ($url) | |
default_parsewrapper_js ($input="reginput", $form="formlocal") | |
noscan_parsewrapper_js () | |
Protected Attributes | |
$onload_commands | |
$page_url | |
$body_class ='mainBGimage' | |
$mask_input = False | |
This is the base class for all display scripts
Display scripts are not required to use this base class but it does provide a lot of common functionality for building HTML pages with standard headers, footers, and styling.
BasicPage::__construct | ( | ) |
Constructor
The constructor automatically runs the preprocess and print_page methods (if applicable). Creating a new instance will output the entire page contents
BasicPage::add_onload_command | ( | $str) |
Add a javascript command to the queue
$str | A javascript command |
All queued commands are run once the page loads Note: JQuery is present
BasicPage::body_content | ( | ) |
Add output in the <body> section
This function should print anything that belongs inside the HTML body tags
BasicPage::change_page | ( | $url) |
Go to a different page
$url | the new page URL |
Use this function instead of manual redirects to allow debug output.
BasicPage::default_parsewrapper_js | ( | $input = "reginput" , |
|
$form = "formlocal" |
|||
) |
Callback for javascript scanner-scale polling This one sends scan input to a form field on the page and other inputs through the normal parser
BasicPage::footer | ( | ) |
BasicPage::head_content | ( | ) |
Add output in the <head> section
This function should print anything that belongs inside the HTML head tags
BasicPage::input_header | ( | $action = "" ) |
Display the standard header with input box
$action | What the form does |
The default action is for a page to POST back to itself. Any specified action will be included in the form tag exactly as is. You can pass "action=..." or "onsubmit=..." (or both) but $action should have one or the other attributes
BasicPage::noinput_header | ( | ) |
Display the standard header without input box
BasicPage::noscan_parsewrapper_js | ( | ) |
Callback for javascript scanner-scale polling This one ignores scan input and runs anything else through the parser
BasicPage::preprocess | ( | ) |
Decide whether to display output
This is the first function called. It is typically used to check $_GET or $_POST variables. If the function returns True, the rest of the page will be printed. If the function returns False, there is no output. Usually this function returns False after setting a redirect header to change to another page.
BasicPage::print_page | ( | ) |
Print HTML output
Print the page. This version includes the scale weight display as well as the head and body content from those methods. Javascript commands that have been requested via add_onload_command are all run on page load.
BasicPage::scale_box | ( | ) |
Output the standard scale display box
BasicPage::scanner_scale_polling | ( | $include_scans = true ) |
Read input from scale
Outputs the javascript used to poll for scale input and activates it on page load.
|
protected |
Relative URL for POS root directory Pages often need this.