CORE POS - IS4C
The CORE POS front end
Public Member Functions | Protected Attributes | List of all members
BasicPage Class Reference
Inheritance diagram for BasicPage:
boxMsg2 InputPage login2 login3 NoInputPage PaycardProcessPage paycardSuccess PaycardTransLookupPage pos2 posCustDisplay QuantityEntryPage SigCapturePage undo_confirm UnpaidAR

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
 

Detailed Description

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.

Examples:
HelloWorld.php.

Constructor & Destructor Documentation

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

Member Function Documentation

BasicPage::add_onload_command (   $str)

Add a javascript command to the queue

Parameters
$strA javascript command
Returns
None

All queued commands are run once the page loads Note: JQuery is present

BasicPage::body_content ( )

Add output in the <body> section

Returns
None

This function should print anything that belongs inside the HTML body tags

Examples:
HelloWorld.php.
BasicPage::change_page (   $url)

Go to a different page

Parameters
$urlthe 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 ( )

Print the standard footer

Returns
None
Examples:
HelloWorld.php.
BasicPage::head_content ( )

Add output in the <head> section

Returns
None

This function should print anything that belongs inside the HTML head tags

BasicPage::input_header (   $action = "")

Display the standard header with input box

Parameters
$actionWhat the form does
Returns
None

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

Examples:
HelloWorld.php.
BasicPage::noinput_header ( )

Display the standard header without input box

Returns
None
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

Returns
True or False

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.

Examples:
HelloWorld.php.
BasicPage::print_page ( )

Print HTML output

Returns
None

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

Returns
None
BasicPage::scanner_scale_polling (   $include_scans = true)

Read input from scale

Returns
None

Outputs the javascript used to poll for scale input and activates it on page load.

Member Data Documentation

BasicPage::$page_url
protected

Relative URL for POS root directory Pages often need this.


The documentation for this class was generated from the following file: