blank.gif
triangle.gif http://www.hvepseeksperten.dk
Http://www.hvepseeksperten.dk

Søg efter ...
Søg

Kontakt via email
Kontakt

Klik her for at planlægge din rejse
Klik her

Branding  Banner 
blank.gif
blank.gif
triangle.gif Du er her: /  Forsiden  /  Kildekoden  /  Layout  /  Top   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 tls.gif     Layout  trs.gif tl.gif Menu tr.gif tl.gif Mvc tr.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

Top.php


Vis: Sample code, tutorial

Top, Sample code, tutorial

Sådan benyttes komponenten Top klassen

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

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

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

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

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

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

Skjul: Sådan vises komponenten

Top, Sådan vises komponenten

Sådan vises komponenten Top klassen

triangle.gif Til forsiden
Forsiden

Søg efter ...
Søg

Kontakt via email
Kontakt

Klik her for at planlægge din rejse
Klik her


Vis: PHP source code

Top, PHP source code

Den fulde PHP kildekode for Top klassen

<?php
/**
 * @package layout
 * @see HTML_LAYOUT_PAGE_PATH.'/Top.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_TABLE_COMPONENT_PATH.'/TableDataReader.php');

/**
 * Generates a Top banner with image links
 * <code>
 * +-+-----------------------------+-------------------------------+
 * |>| Copyright by Finn Rasmussen | Powered by myPHP Version 1.10 |
 * +-+-----------------------------+-------------------------------+
 * 
 * Usage:
 *   $rows = array(
 *     array(
 *         KEY_LINK=>LINK_COPYRIGHT,
 *         KEY_POWERED=>LINK_POWERED_BY,
 *         KEY_VERSION=>CURRENT_VERSION,
 *     ),
 *   );
 *   $header  = ''; // The header meta data
 *   $default = ''; // The default meta data array
 *   $limit   = ''; // The limit to use for the array
 *   $sort    = true;
 *   $datareader = DataReaderFactory::newDataReader($rows, $header, $default, $limit, $sort);
 *   $html = new Top($datareader, $text, $width, $class, $border,
 *                   $cellpadding, $cellspacing, $summary, $caption, $layout);
 *   print $html->getHtml();
 * Or
 *   Top::display($datareader, $text, $width, $class, $border,
 *                $cellpadding, $cellspacing, $summary, $caption, $layout);
 * </code>
 * @package layout
 */

class Top extends TableDataReader {
    
/**
     * 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 of the table, default 100%
     * @param String $class   The css class to use
     * @param String $border  The table border
     * @param String $cellpadding The Cell Padding
     * @param String $cellspacing The Cell Spacing
     * @param String $summary The Summary
     * @param String $caption The Caption 
     * @param String $layout  The layout to use 
     */
    
function __construct($datareader=null$text=''$width=''$class=''$border=''$cellpadding=''$cellspacing=''$summary=''$caption=''$layout='') {
        
$theText        $text   != '' $text   ''
        
$theWidth       $width  != '' $width  TOP_VIEW_WIDTH
        
$theClass       $class  != '' $class  TOP_VIEW_CLASS
        
$theBorder      $border != '' $border TOP_VIEW_BORDER
        
$theCellPadding $cellpadding != '' $cellpadding TOP_VIEW_CELLPADDING
        
$theCellSpacing $cellspacing != '' $cellspacing TOP_VIEW_CELLSPACING;
        
$theLayout      $layout != '' $layout TOP_VIEW_LAYOUT;
        
parent::__construct($datareader$theText$theWidth$theClass$theBorder$theCellPadding$theCellSpacing$summary$caption$theLayout);
    }

    
/**
     * Get the CSS class Name for this component
     * @return String The CSS class name
     */
    
function getCssClass() {
        return 
CSS_TOP;
    }

    
/**
     * Toogle the request parameters which will minimize or maximize this component
     * @return array The array of key=>value pair
     */
    
function getMinimize() {
        return 
$this->getToogle(REQUEST_LAYOUT_SHOWLAYOUT_SHOWLAYOUT_SHOW_TOP);
    }

    
/**
     * Builds the html for a Top Banner, and return it 
     * @return String The html
     */
    
function getHtml() {
        
$html  $this->html;
        if (
LAYOUT_SHOW LAYOUT_SHOW_TOP) {
            if (
CACHE_LAYOUT && $this->getCacheFileName(CACHE_LAYOUT_PATH) != '' && file_exists($this->getCacheFileName(CACHE_LAYOUT_PATH))) {
                
$html .= $this->content($this->getCacheFileName(CACHE_LAYOUT_PATH));
            } else {
                
$html .= $this->getColumns();
                if (
CACHE_LAYOUT) {
                    
$this->save($htmlCACHE_LAYOUT_PATH);
                }
            }
        } else {
            
$html .= $this->getMaximize();
        }
        return 
$html;
    }

    
/**
     * Display html
     * <code>
     * Usage:
     *    Top::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, default 100%
     * @param String $class   The css class to use
     * @param String $border  The table border
     * @param String $cellpadding The Cell Padding
     * @param String $cellspacing The Cell Spacing
     * @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 Top($datareader$text$width$class$border$cellpadding$cellspacing$summary$caption$layout);
        
$html->addHtml();
    }
}
?>

Vis: HTML source code

Top, HTML source code

Den fulde HTML kildekode for Top klassen

<?
<!-- DEBUGTop -->

<
table id="TopId" width="100%" class="tableBorderLeft tableBorderRight basePrinter" border="0" cellpadding="1" cellspacing="0">
 <
tr>
    <
td class="layoutTop baseOnepc" valign="top"><!-- DEBUGLink -->
<
class="layoutTop" href="?layoutLAYOUT_SHOW=645" title="Klik her for at Minimere ...  Top"><!-- DEBUGImages -->
<
img src="http://humlebier.info/images/triangle.gif" width="10" height="10" alt="triangle.gif" class="layoutTop" />
</
a>
</
td>

    <
td class="layoutTop" valign="top"><!-- DEBUGLink -->
<!-- 
Forsiden --><class="layoutTop" href="/" title="Forsiden"><!-- DEBUGImage -->
<
img src="http://humlebier.info/images/logo.gif" alt="Til forsiden" class="layoutTop" />
<
br />Forsiden</a><br />

</
td>

    <
td class="layoutTop" valign="top"><!-- DEBUGLink -->
<!-- 
Søg --><class="layoutTop" href="/search/" title="Søg"><!-- DEBUGImage -->
<
img src="http://humlebier.info/images/aniBee.gif" alt="Søg efter ..." class="layoutTop" />
<
br />Søg</a><br />

</
td>

    <
td class="layoutTop" valign="top"><!-- DEBUGLink -->
<!-- 
Kontakt --><class="layoutTop" href="http://www.hvepseeksperten.dk/FormMail/" title="Kontakt"><!-- DEBUGImage -->
<
img src="http://humlebier.info/images/mail.gif" alt="Kontakt via email&#013;" class="layoutTop" />
<
br />Kontakt</a><br />

</
td>

    <
td class="layoutTop" valign="top"><!-- DEBUGLink -->
<!-- 
Klik her --><class="layoutTop" href="/rejseplanen/" title="Klik her"><!-- DEBUGImage -->
<
img src="http://humlebier.info/images/rejseplanen.gif" alt="Klik her for at planlægge din rejse" class="layoutTop" />
<
br />Klik&nbsp;her</a><br />

</
td>

 </
tr>

</
table>

?>

Vis: Class methods

Top, Class methods

Her er 'klasse metoderne' for Top klassen:

  • __construct
  • getCssClass
  • getMinimize
  • getHtml
  • display
  • newData
  • 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
  • newTriangle
  • getStartHtml
  • getEndHtml
  • showsource
  • getClassName
  • getMsg
  • addHtml
  • __toString
  • getCacheFileName
  • save
  • content

Vis: Object vars

Top, Object vars

Her er 'objekt variable' for Top klassen:

  • html =>
  • sql =>

<? 
require_once(HTML_UTIL_PATH."/Ul.php");
require_once(
HTML_BASE_UTIL_PATH."/Li.php");
require_once(
HTML_UTIL_PATH."/Header.php");
require_once(
HTML_UTIL_PATH."/Paragraph.php");


/**
* This file is the local content file
* It may be auto generated from the database or
* manually edited
*
* @see <somedir>/content.php
* @copyright http://Finn-Rasmussen.com
* @author http://Finn-Rasmussen.com
* @license myPHP License conditions
* @email http://hvepseeksperten.dk/FormMail?baseEMNE=FreeLicence
* @version 1.11
* @since 23-november-2009
*/
Header::display(Demo of the myPHP TagLib (copyright © Finn-Rasmussen.com);
Paragraph::display("Not allowed to show=PathClassInfo->getFile($name), Not found $name=d41d8cd98f00b204e9800998ecf8427e");
Ul::start();
   
Li::display("Demo of the myPHP TagLib");
   
Li::display("Do you want a free licence for the myPHP TagLib?");
   
Li::display("Phone (+45) 48 24 60 30 or send us an email");
Ul::end();
?>
Kontakt via email
 Kontakt
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.3.3-7+squeeze9) 1.11
blank.gif