MAXdev
pnHTML

Class: pnHTML

Source Location: /pnHTML.php

Class Overview


HTML creation and display functions


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 123]
HTML creation and display functions

This class is designed to make generating HTML output in MDPro very simple and also allow for much greater control of output by the site administrator.

Example

 // Information array
$colors = array(array('id' => 1,
'name' => 'Red',
'encoding' => 'ff0000'),
array('id' => 2,
'name' => 'Blue',
'encoding' => '00ff00'),
array('id' => 3,
'name' => 'Green',
'encoding' => '0000ff'));

// Create the HTML object and start it
$myhtml = new pnHTML();
$myhtml->Start();

// Add table showing encoding information
$myhtml->TableStart('Colors and Their Encodings', array('Color', 'Encoding'));
foreach ($colors as $color) {
$info = array($color['name'], $color['encoding']);
$myhtml->TableAddRow($info);
}
$myhtml->TableEnd();

// Add form to select a color
$myhtml->Text('<P><P>');
$myhtml->FormStart('colorchosen.php');
$myhtml->Text('Select a color: ');
$myhtml->FormList('chosen', $colorinfo);
$myhtml->FormSubmit('That's the color I want');
$myhtml->FormEnd();


// End the HTML object and print it
$myhtml->End();
$myhtml->PrintPage();


[ Top ]


Class Methods


constructor pnHTML [line 191]


method BoldText [line 616]


method ConfirmAction [line 531]


method EndPage [line 383]


method FormCheckbox [line 1141]


method FormEnd [line 930]


method FormFile [line 1168]


method FormHidden [line 1029]


method FormSelectMultiple [line 1072]


method FormStart [line 903]


method FormSubmit [line 951]


method FormText [line 977]


method FormTextArea [line 1006]


method GetInputMode [line 252]


method GetOutput [line 315]


method GetOutputMode [line 210]


method Linebreak [line 633]


method Pager [line 419]


method PrintPage [line 327]


method Redirect [line 490]


method SetInputMode [line 267]


method SetOutputMode [line 225]


method StartPage [line 354]


method TableAddRow [line 834]


method TableColEnd [line 780]


method TableColStart [line 763]


method TableEnd [line 814]


method TableRowEnd [line 797]


method TableRowStart [line 742]


method TableStart [line 696]


method Text [line 569]


method Title [line 590]


method UploadMode [line 294]


method URL [line 656]