Top  Branding  Banner 
blank.gif
blank.gif
triangle.gif Du er her: /  Forsiden  /  Kildekoden  /  Mvc  /  Viewbusinesscard   Login nu   Login
blank.gif
««« Se kilde koden
blank.gif
tl.gif Base tr.gif tl.gif Basic tr.gif tl.gif Dto tr.gif tl.gif Form tr.gif tl.gif Language tr.gif tl.gif Layout tr.gif tl.gif Menu tr.gif tls.gif     Mvc  trs.gif tl.gif Netbank.eksperter.dk tr.gif tl.gif Tab tr.gif tl.gif Table tr.gif tl.gif Util tr.gif
blank.gif
blank.gif
arrow-headline.gif Index
MenuLink  MenuLeft  
Tilbage

Skjul: Navn

ViewBusinessCard.php


Vis: Sample code, tutorial

ViewBusinessCard, Sample code, tutorial

Sådan benyttes komponenten ViewBusinessCard klassen

Først skal du inkludere den fil der beskriver komponenten, som en klasse fil

  • <?
    require_once(HTML_PACKAGE_PATH.'/ViewBusinessCard.php');
    ?>

Dernæst kan du enten benytte komponenten som et taglib (statiske metoder):

  • <?
    ViewBusinessCard
    ::display($param1$param2$param3, ...);
    ?>

eller du kan lave en instance af komponenten og benytte metoderne direkte:

  • <?
    $object 
    = new ViewBusinessCard($param1$param2$param3, ...);
    print 
    $object->getHtml();
    ?>

Skjul: Sådan vises komponenten

ViewBusinessCard, Sådan vises komponenten

Sådan vises komponenten ViewBusinessCard klassen

Privat telefon: 48246030
Finn Rasmussen
HvepseEksperten.dk ApS
Kongens Vænge 79
3400 Hillerød
Denmark

Vis: PHP source code

ViewBusinessCard, PHP source code

Den fulde PHP kildekode for ViewBusinessCard klassen

<?php
/**
 * @package mvc
 * @see HTML_MVC_VIEW_PATH.'/ViewBusinessCard.php'
 * @copyright (c) http://Finn-Rasmussen.com
 * @license http://Finn-Rasmussen.com/license/ myPHP License conditions
 * @author http://Finn-Rasmussen.com
 * @version 1.11
 * @since 27-nov-2009
 */

/**
 * 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, $layout);
 *   print $view->getHtml();
 * Or
 *   ViewBusinessCard::display($datareader, $text, $width, $class, $border, $cellpadding, $cellspacing, $summary, $caption, $layout);
 *
 * Generates a complete View Business Card interface
 * +--------+
 * | Header |
 * +--------+
 * | data1  | 
 * | data2  |
 * | ...    |
 * +--------+
 * </code>
 * @package mvc
 */

class ViewBusinessCard extends ViewInfo {
    
/**
     * Constructor
     * @param DataReader / array $datareader The Data Reader object OR an array
     * @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 
     * @param String $layout  The layout to use 
     * @param String $layout  The layout to use 
     */
    
function __construct($datareader=null$text=''$width=''$class=''$border=''$cellpadding=''$cellspacing=''$summary=''$caption=''$layout='') {
        
$theText        $text != ''?$text:'';

        
// Global table characteristics
        
$theWidth       $width  != '' $width  BUSINESS_CARD_VIEW_WIDTH;
        
$theClass       $class  != '' $class  BUSINESS_CARD_VIEW_CLASS;
        
$theBorder      $border != '' $border BUSINESS_CARD_VIEW_BORDER;
        
$theCellPadding $cellpadding != '' $cellpadding BUSINESS_CARD_VIEW_CELLPADDING;
        
$theCellSpacing $cellspacing != '' $cellspacing BUSINESS_CARD_VIEW_CELLSPACING;
        
parent::__construct($datareader$theText$theWidth$theClass$theBorder$theCellPadding$theCellSpacing$summary$caption$layout);
    }

    
/**
     * Display html
     * <code>
     * Usage:
     *    ViewBusinessCard::display($datareader, $text, $width, $class, $border, $cellpadding, $cellspacing, $summary, $caption, $layout); 
     * </code>
     * @static
     * @param DataReader / array $datareader The Data Reader object OR an array
     * @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 
     * @param String $layout  The layout to use 
     */
    
public static function display($datareader=null$text=''$width=''$class=''$border=''$cellpadding=''$cellspacing=''$summary=''$caption=''$layout='') {
        
$html = new ViewBusinessCard($datareader$text$width$class$border$cellpadding$cellspacing$summary$caption$layout);
        
$html->addHtml();
    }
}
?>

Vis: HTML source code

ViewBusinessCard, HTML source code

Den fulde HTML kildekode for ViewBusinessCard klassen

<?
<!-- DEBUGViewBusinessCard -->

<
table id="ViewBusinessCardId" width="400" class="tableBusinessCardView baseBorder" border="0" cellpadding="2" cellspacing="0">
 <
tr>
    <
td valign="top">Privat telefon48246030<br />


Finn Rasmussen<br />


HvepseEksperten.dk ApS<br />


Kongens Vænge 79<br />


3400&nbsp;Hillerød<br />


Denmark<br />



</
td>
 </
tr>

</
table>

?>

Vis: Class methods

ViewBusinessCard, Class methods

Her er 'klasse metoderne' for ViewBusinessCard klassen:

  • __construct
  • display
  • newHeader
  • newColumnInfo
  • newRow
  • newContent
  • getHtml
  • setStriphttp
  • setStriptags
  • setEncode
  • setMultipleEditColumns
  • setTable
  • newHiddens
  • newButtons
  • newData
  • getCssClass
  • newColumn
  • isActive
  • isActiveTab
  • isActiveIndex
  • newColumns
  • adjustColumns
  • newCorner
  • getColumns
  • newTextRow
  • getTableHeader
  • getStart
  • getEnd
  • start
  • end
  • setObject
  • set
  • get
  • getAttribute
  • getTag
  • add
  • getSizeof
  • getElement
  • getElements
  • getToogle
  • getMaximize
  • getMinimize
  • newTriangle
  • getStartHtml
  • getEndHtml
  • showsource
  • getClassName
  • getMsg
  • addHtml
  • __toString
  • getCacheFileName
  • save
  • content

Vis: Object vars

ViewBusinessCard, Object vars

Her er 'objekt variable' for ViewBusinessCard klassen:

  • html =>
  • sql =>

MenuRight 
triangle.gif

Dansk

Deutch

English (UK)

France

Italy

Norsk

Svensk

English (USA)


 
blank.gif
MenuBottom 
triangle.gif Copyright @ 1999-2010 www.Finn-Rasmussen.com Powered by myPHP Version (5.2.6-1+lenny8) 1.11
blank.gif