Top  Branding  Banner 
blank.gif
blank.gif
triangle.gif Du er her: /  Forsiden  /  Kildekoden  /  Db-customer  /  Viewcustomerlist   Login nu   Login
blank.gif
««« Se kilde koden
blank.gif
tl.gif Cms tr.gif tl.gif Component tr.gif tl.gif Db tr.gif tl.gif Db-basket tr.gif tl.gif Db-login tr.gif tls.gif     Db-customer  trs.gif tl.gif Db-select tr.gif tl.gif Jquery tr.gif tl.gif Form-elements tr.gif tl.gif Menu-fisheye tr.gif tl.gif Template tr.gif tl.gif Tree-node tr.gif tl.gif Validator tr.gif
blank.gif
blank.gif
arrow-headline.gif Index
MenuLink  MenuLeft  
Tilbage

Skjul: Navn

ViewCustomerList.php


Vis: Sample code, tutorial

ViewCustomerList, Sample code, tutorial

Sådan benyttes komponenten ViewCustomerList klassen

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

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

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

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

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

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

Skjul: Sådan vises komponenten

ViewCustomerList, Sådan vises komponenten

Sådan vises komponenten ViewCustomerList klassen

arrow-headline.gif ViewCustomerList (3)
Firmanavn Adresse Postnr By Kontakt person Mobil telefon Email
HvepseEksperten.dk ApS Kongens Vænge 79 3400 Hillerød Finn Rasmussen 40506069 test@hvepse-eksperten.dk
vin.eksperter.dk Kongens Vænge 79 3400 Hillerød Zita Christensen 48246037 vin@eksperter.dk
foto.eksperter.dk Kongens Vænge 79 3400 Hillerød Fotograf 48246030 foto@eksperter.dk

Vis: PHP source code

ViewCustomerList, PHP source code

Den fulde PHP kildekode for ViewCustomerList klassen

<?php
/**
 * @package db-customer
 * @see HTML_DB_CUSTOMER_VIEW_PATH.'/ViewCustomerList.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.'/ViewList.php');

/**
 * Generates the html for a View Customer
 * <code>
 * Usage:
 *   $view = new ViewCustomerList($datareader, $text, $width, $class, $border, $cellpadding, $cellspacing, $summary, $caption, $layout);
 *   print $view->getHtml();
 * Or
 *   ViewCustomerList::display($datareader, $text, $width, $class, $border, $cellpadding, $cellspacing, $summary, $caption, $layout);
 *
 * Generates a complete View List interface
 * +--------------------------------
 * | Text header
 * +--------------------------------
 * | head1 | head2 | head3 | etc.
 * +--------------------------------
 * | dat_1 | dat_2 | dat_3 | etc.
 * +--------------------------------
 * </code>
 * @package db-customer
 */

class ViewCustomerList extends ViewList {
    
/**
     * 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 
     */
    
function __construct($datareader=null$text=''$width=''$class=''$border=''$cellpadding=''$cellspacing=''$summary=''$caption=''$layout='') {
        
$theText        $text   != '' $text $this->getClassName();

        
// Global table characteristics
        
$theWidth       $width  != '' $width  CUSTOMER_LIST_VIEW_WIDTH;
        
$theClass       $class  != '' $class  CUSTOMER_LIST_VIEW_CLASS;
        
$theBorder      $border != '' $border CUSTOMER_LIST_VIEW_BORDER;
        
$theCellPadding $cellpadding != '' $cellpadding CUSTOMER_LIST_VIEW_CELLPADDING;
        
$theCellSpacing $cellspacing != '' $cellspacing CUSTOMER_LIST_VIEW_CELLSPACING;
        
parent::__construct($datareader$theText$theWidth$theClass$theBorder$theCellPadding$theCellSpacing$summary$caption$layout);
    }

    
/**
     * Display html
     * <code>
     * Usage:
     *    ViewCustomerList::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 ViewCustomerList($datareader$text$width$class$border$cellpadding$cellspacing$summary$caption$layout);
        
$html->addHtml();
    }
}
?>

Vis: HTML source code

ViewCustomerList, HTML source code

Den fulde HTML kildekode for ViewCustomerList klassen

<?
<!-- DEBUGViewCustomerList -->
<!-- 
DEBUGTableHeader -->

<
table width="100%" class="customerListView baseBorder" border="0" cellpadding="2" cellspacing="0">
 <
tr>
    <
td class="baseArrowHeader" valign="middle"><!-- DEBUGLink -->
<
class="baseLinkColor" href="/source-code/db-customer/ViewCustomerList/index.php" title="Klik her for at Minimere ...  TableHeader"><!-- DEBUGImages -->
<
img src="http://finn-rasmussen.com/images/arrow-headline.gif" width="4" height="7" alt="arrow-headline.gif" />
</
a>
</
td>
  <
th class="baseColorHeader" valign="top" align="left">ViewCustomerList (3)
</
th>

 </
tr>

</
table>

<
table id="ViewCustomerListId" width="100%" class="customerListView baseBorder" border="0" cellpadding="2" cellspacing="0">
 <
tr>
  <
th class="baseColorHeader baseNoWrap" valign="top">
<!-- 
    
company_name
    100
    string
    
 
-->

<!-- 
DEBUGSortby -->
<!-- 
Firmanavn --><class="baseColorHeader" href="/source-code/db-customer/ViewCustomerList/index.php?mvcSORT_BY=asc&amp;mvcORDER_BY=company_name" title="Mvcorder_by  desc">Firmanavn</a>

</
th>

  <
th class="baseColorHeader baseNoWrap" valign="top">
<!-- 
    
address
    100
    string
    
 
-->

<!-- 
DEBUGSortby -->
<!-- 
Adresse --><class="baseColorHeader" href="/source-code/db-customer/ViewCustomerList/index.php?mvcSORT_BY=asc&amp;mvcORDER_BY=address" title="Mvcorder_by  desc">Adresse</a>

</
th>

  <
th class="baseColorHeader baseNoWrap" valign="top">
<!-- 
    
zip
    100
    string
    
 
-->

<!-- 
DEBUGSortby -->
<!-- 
Postnr --><class="baseColorHeader" href="/source-code/db-customer/ViewCustomerList/index.php?mvcSORT_BY=asc&amp;mvcORDER_BY=zip" title="Mvcorder_by  desc">Postnr</a>

</
th>

  <
th class="baseColorHeader baseNoWrap" valign="top">
<!-- 
    
city
    100
    string
    
 
-->

<!-- 
DEBUGSortby -->
<!-- 
By --><class="baseColorHeader" href="/source-code/db-customer/ViewCustomerList/index.php?mvcSORT_BY=asc&amp;mvcORDER_BY=city" title="Mvcorder_by  desc">By</a>

</
th>

  <
th class="baseColorHeader baseNoWrap" valign="top">
<!-- 
    
contact_person
    100
    string
    
 
-->

<!-- 
DEBUGSortby -->
<!-- 
Kontakt person --><class="baseColorHeader" href="/source-code/db-customer/ViewCustomerList/index.php?mvcSORT_BY=asc&amp;mvcORDER_BY=contact_person" title="Mvcorder_by  desc">Kontakt&nbsp;person</a>

</
th>

  <
th class="baseColorHeader baseNoWrap" valign="top">
<!-- 
    
mobile_phone
    100
    string
    
 
-->

<!-- 
DEBUGSortby -->
<!-- 
Mobil telefon --><class="baseColorHeader" href="/source-code/db-customer/ViewCustomerList/index.php?mvcSORT_BY=asc&amp;mvcORDER_BY=mobile_phone" title="Mvcorder_by  desc">Mobil&nbsp;telefon</a>

</
th>

  <
th class="baseColorHeader baseNoWrap" valign="top">
<!-- 
    
email
    100
    string
    
 
-->

<!-- 
DEBUGSortby -->
<!-- 
Email --><class="baseColorHeader" href="/source-code/db-customer/ViewCustomerList/index.php?mvcSORT_BY=asc&amp;mvcORDER_BY=email" title="Mvcorder_by  desc">Email</a>

</
th>

 </
tr>


 <
tr>
    <
td class="baseColorDark" valign="top">HvepseEksperten.dk ApS

</td>
    <
td class="baseColorDark" valign="top">Kongens Vænge 79

</td>
    <
td class="baseColorDark" valign="top">3400

</td>
    <
td class="baseColorDark" valign="top">Hillerød

</td>
    <
td class="baseColorDark" valign="top">Finn Rasmussen

</td>
    <
td class="baseColorDark" valign="top">40506069

</td>
    <
td class="baseColorDark" valign="top">test@hvepse-eksperten.dk

</td>
 </
tr>


 <
tr>
    <
td class="baseColorLight" valign="top">vin.eksperter.dk

</td>
    <
td class="baseColorLight" valign="top">Kongens Vænge 79

</td>
    <
td class="baseColorLight" valign="top">3400

</td>
    <
td class="baseColorLight" valign="top">Hillerød

</td>
    <
td class="baseColorLight" valign="top">Zita Christensen

</td>
    <
td class="baseColorLight" valign="top">48246037

</td>
    <
td class="baseColorLight" valign="top">vin@eksperter.dk

</td>
 </
tr>


 <
tr>
    <
td class="baseColorDark" valign="top">foto.eksperter.dk

</td>
    <
td class="baseColorDark" valign="top">Kongens Vænge 79

</td>
    <
td class="baseColorDark" valign="top">3400

</td>
    <
td class="baseColorDark" valign="top">Hillerød

</td>
    <
td class="baseColorDark" valign="top">Fotograf

</td>
    <
td class="baseColorDark" valign="top">48246030

</td>
    <
td class="baseColorDark" valign="top">foto@eksperter.dk

</td>
 </
tr>




</
table>

?>

Vis: Class methods

ViewCustomerList, Class methods

Her er 'klasse metoderne' for ViewCustomerList klassen:

  • __construct
  • display
  • newTotal
  • newCheckbox
  • newLinkCheckbox
  • newLinkCreate
  • newLinkRead
  • newLinkUpdate
  • newLinkMultiple
  • newLinkRemove
  • newLinkDelete
  • newImageLink
  • getHref
  • newPrimaryKey
  • getHeaderLink
  • newDataList
  • 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

ViewCustomerList, Object vars

Her er 'objekt variable' for ViewCustomerList 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.3.3-7+squeeze3) 1.11
blank.gif