/**
* The required files
*/
require_once(HTML_MVC_VIEW_PATH.'/ViewInfo.php');
/**
* Generates the html for a View like a business card look-a-like
* <code>
* Usage:
* $view = new ViewBusinessCard($datareader,$text,$width,$class,$border,$cellpadding,$cellspacing,$summary,$caption);
* print $view->getHtml();
* Or
* ViewBusinessCard::display($datareader,$text,$width,$class,$border,$cellpadding,$cellspacing,$summary,$caption);
*
* Generates a complete View Business Card interface
* +--------+
* | Header |
* +--------+
* | data1 |
* | data2 |
* | ... |
* +--------+
* </code>
* @package mvc
*/
class ViewBusinessCard extends ViewInfo {
/**
* Constructor
* @param DataReader $datareader The Data Reader object
* @param String $text The text header for the table
* @param String $width The Width for the table
* @param String $class The Class
* @param String $border The Border
* @param String $cellpadding The CellSpacing
* @param String $cellspacing The CellPadding
* @param String $summary The Summary
* @param String $caption The Caption
*/
function ViewBusinessCard($datareader,$text='',$width='',$class='',$border='',$cellpadding='',$cellspacing='',$summary='',$caption='') {
$theText = $text!=''?$text:'';
/**
* Display html
* <code>
* Usage:
* ViewBusinessCard::display($datareader,$text,$width,$class,$border,$cellpadding,$cellspacing,$summary,$caption);
* </code>
* @static
* @param DataReader $datareader The Data Reader object
* @param String $text The text header for the table
* @param String $width The width of the table
* @param String $class The class of the table
* @param String $border The border of the table
* @param String $cellpadding The CellSpacing
* @param String $cellspacing The CellPadding
* @param String $summary The Summary
* @param String $caption The Caption
*/
function display($datareader,$text='',$width='',$class='',$border='',$cellpadding='',$cellspacing='',$summary='',$caption='') {
$html = new ViewBusinessCard($datareader,$text,$width,$class,$border,$cellpadding,$cellspacing,$summary,$caption);
$html->addHtml();
}
}
?>
HTML source code
Den fulde HTML kildekode for ViewBusinessCard klassen