Wizards Toolkit Documentation

Html.php

This contains Wizards Toolkit functions for creating HTML excluding form fields.

All rights reserved.

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Tags
author
Programming Labs
license
All rights reserved
version
2.0

Table of Contents

wzPhoneLink()  : html
Create the HTML for a phone link.
wzHelp()  : html
Help buttons can be created and placed in multiple places on a page.
wzHtmTableTop()  : HTML
HTM Table start.
wzSearchReplace()  : mixed
wzHtmSpace()  : HTML
Create multiple HTM spaces.
wzHref()  : HTML
Generate <a > linking tag based on whether accessing from a computer, tablet or phone
wzBroadcastAlerts()  : html
This data-driven method of notifying users.
wzMergePage()  : mixed
Merge Wizards Toolkit Page

Functions

Create the HTML for a phone link.

wzPhoneLink( string  $fncPhone [, string  $fncPhoneExt = '' ] [, string  $fncShowNumber = 'Y' ] ) : html

If $gloMobileApp = 'Y' this creates JavaScript:postMessage('dialPhone- and the phone number, which is a WTK mobile app function that natively triggers phone feature on smart phones. If $gloMobileApp != 'Y' and user has chosen to "Use Skype for calls" this will use "callto:", otherwise it will use "tel:".

Parameters
$fncPhone : string
$fncPhoneExt : string = ''

optionally show phone extension

$fncShowNumber : string = 'Y'
Tags
global

string $gloMobileApp should be set to 'Y' if page is called via mobile app

global

string $gloUseSkype this contains user's preference on whether to use Skype for outbound calls

Return values
html

for href link to phone number

wzHelp()

Help buttons can be created and placed in multiple places on a page.

wzHelp( [ string  $fncHelpIndex = '' ] [, string  $fncHelpTitle = '' ] ) : html

This creates Help button on a page. It checks to see if help exists and if it doesn't it inserts data so in back-office Help can be added for this page. If help does not currently exist or is "blank help" then it will not show unless User has rights to Add/Edit Help. Users that do have Help permissions can add/edit the help information from the Help popup.

The Help is shown in a MaterializeCSS modal window and can include text and/or video display.

Parameters
$fncHelpIndex : string = ''

defaults to blank and will use PHP page if nothing passed

$fncHelpTitle : string = ''

defaults to blank in which case will use $gloPageTitle if it exists

Tags
global

string $gloPageTitle

Return values
html

of button which calls wtkShowHelp JS function

wzHtmTableTop()

HTM Table start.

wzHtmTableTop( [ string  $fncWidth = '100%' ] [, string  $fncCellSpacing = '0' ] [, string  $fncCellPadding = '0' ] [, string  $fncBorder = '0' ] [, string  $fncAttrib = '' ]) : HTML

With newer HTML table definitions this is no longer as useful.

Parameters
$fncWidth : string = '100%'

Defaults to '100%'

$fncCellSpacing : string = '0'

Defaults to '0'

$fncCellPadding : string = '0'

Defaults to '0'

$fncBorder : string = '0'

Defaults to '0'

$fncAttrib : string = ''

Defaults to blank

Tags
global

string $gloIndentCnt

Return values
HTML

for beginning of a table like

wzSearchReplace()

wzSearchReplace( mixed  $fncSearch , mixed  $fncReplace) : mixed
Parameters
$fncSearch : mixed
$fncReplace : mixed
Return values
mixed

wzHtmSpace()

Create multiple HTM spaces.

wzHtmSpace( string  $fncCnt) : HTML

Pass in number of spaces you want and this will generate that many  

Parameters
$fncCnt : string
Return values
HTML

  based on count passed

wzHref()

Generate <a > linking tag based on whether accessing from a computer, tablet or phone

wzHref( string  $fncURL , string  $fncTitle [, string  $fncClass = '' ] ) : HTML

If $gloMobileApp != 'Y' from website use normal href syntax. If $gloMobileApp = 'Y' then uses JavaScript:ajaxGo syntax for WTK Single Page navigation.

Parameters
$fncURL : string

what to link to

$fncTitle : string

what to display

$fncClass : string = ''

optional class style to add

Return values
HTML

tag based on parameter and access device

wzBroadcastAlerts()

This data-driven method of notifying users.

wzBroadcastAlerts( [ string  $fncMode = 'display' ] ) : html

Broadcast messages to users and allow them to clear. This uses wzBroadcast and wzBroadcast_wzUsers tables. If there are eligible broadcast messages they will be returned in a div class="row". Once a user has cleared it will not be displayed again for that user.

Parameters
$fncMode : string = 'display'

defaults to 'display'; other option is 'count' to retrieve count of broadcasts to show in tag or alert

Tags
global

$gloPrinting boolean if count and printing then skip getting count from data

Return values
html

with listing of broadcast alerts

wzMergePage()

Merge Wizards Toolkit Page

wzMergePage( string  $fncFiller , string  $fncPageTitle [, string  $fncTemplateHTML = '' ] [, string  $fncSkipExit = false ]) : mixed
Parameters
$fncFiller : string
$fncPageTitle : string
$fncTemplateHTML : string = ''

defaults to blank in which case will use /wz/html/main.htm for HTML template

$fncSkipExit : string = false

defaults to false

Tags
global

string $gloCoLogo

global

string $gloFormMsg

global

string $gloJsInit

global

string $gloFooterNav

global

string $gloFormChangeArray

global

string $pgSearchReplaceCntr

global

string $gloShowPrint

global

string $gloPrinting

global

string $gloShowExport

global

string $gloShowExportXML

global

string $gloIconPrint

global

string $gloIsFileUploadForm

Return values
mixed

Search results