Top  Branding  Banner 
blank.gif
blank.gif
triangle.gif Du er her: /  Forsiden  /  Kildekoden  /  Db-basket  /  Enginebasketinvoice   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 tls.gif     Db-basket  trs.gif tl.gif Db-login tr.gif tl.gif Db-customer tr.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

EngineBasketInvoice.php


Vis: Sample code, tutorial

EngineBasketInvoice, Sample code, tutorial

Sådan benyttes komponenten EngineBasketInvoice klassen

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

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

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

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

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

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

Skjul: Sådan vises komponenten

EngineBasketInvoice, Sådan vises komponenten

Sådan vises komponenten EngineBasketInvoice klassen

ctl.gif ctc.gif ctr.gif
ccl.gif ccc.gif
1
5cb3a39002cf9566f2ba763dbce8ef96
finn@hvepse-eksperten.dk
Finn Rasmussen
HvepseEksperten.dk ApS
Kongens Vænge 79
3400 Hillerød
Privat telefon: 48246037
Mobil telefon: 40506069
Firma telefon: 48246030
EAN: 9876543210123
HvepseEksperten.dk ApS
Finn Rasmussen
Kongens Vænge 79
3400 Hillerød
Privat telefon: 48 24 60 37
Mobil telefon: 40 50 60 69
Firma telefon: 48 24 60 30
Cvr nr.: 10142865
http://hvepseeksperten.dk/FormMail/
 

ViewPaymentInfo->getHtml() TODO

Dato TODO

arrow-headline.gif Indkøbskurv (3)
Link Tekst Beskrivelse Antal Pris Beløb
CRUD_VIEW_FORM_DETAIL Vis CRUD_VIEW_FORM_DELETE Slet denne   Standard Hvepsebo bekæmpelse Et standard hvepsebo sidder i nå-højde, og man behøver hverken at kravle op på loftet eller ned i krybekælderen 1 680,00 680,00
CRUD_VIEW_FORM_DETAIL Vis CRUD_VIEW_FORM_DELETE Slet denne   Kørsel   1 150,00 150,00
CRUD_VIEW_FORM_DETAIL Vis CRUD_VIEW_FORM_DELETE Slet denne   Rabat ved online betaling   1 ÷150,00 ÷150,00
Beløb 680,00
Moms 170,00
Ialt  DKK 850,00

Leverings betingelser

Levering efter aftale, normalt inden for 1-2 dage, men i højsæson kan der være en smule ventetid.
Ring på tlf. (+45) 40 50 60 69 og hør nærmere.

ViewWarrantyInfo->getHtml() TODO

ccr.gif
cbl.gif cbc.gif cbr.gif

Vis: PHP source code

EngineBasketInvoice, PHP source code

Den fulde PHP kildekode for EngineBasketInvoice klassen

<?php
/**
 * @package db-basket
 * @see HTML_DB_BASKET_CONTROLLER_PATH.'/EngineBasketInvoice.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_BASE_COMMON_PATH.'/Html.php');
require_once(
HTML_DB_BASKET_VIEW_PATH.'/ViewBasketInvoice.php');
require_once(
HTML_DB_BASKET_QUERY_PATH.'/QueryBasket.php');
require_once(
HTML_DB_CUSTOMER_QUERY_PATH.'/QueryCustomer.php');
require_once(
HTML_DTO_UTIL_PATH.'/DataReaderFactory.php');
require_once(
HTML_DB_DATABASE_PATH.'/Command.php');

/**
 * The Engine Basket Invioce parsing engine
 * This is the controller for a Basket Invoice
 * <code>
 * Usage:
 *   $sid = 'the current sid for this user';
 *   $engine = new EngineBasketInvoice($sid);
 *   print $engine->getHtml();
 * Or
 *   EngineBasketInvoice::display($sid);
 * </code>
 * @package db-basket
 */

class EngineBasketInvoice extends Html {
    
/**
     * @var String $sid The SID to use
     */
    
protected $sid ''
    
    
/**
     * Constructor
     * @param String $sid The SID to use
     */
    
function __construct($sid) {
        
parent::__construct();
        
$this->sid $sid;
    }

   
/**
    * Returns the DataReader object for the Customer Info
    * @return DataReader The DataReader object for the Customer Info
    */
    
function newCustomerInfo() {
        
$id  "";
        
$translate false;
        
$sql QueryCustomer::get(DATABASE_PREFIX.TABLE_NAME_CUSTOMER$id$this->sid$translate);
        return 
Command::newDataReader($sql);
   }

   
/**
    * Returns the DataReader object for the Basket Info
    * @return DataReader The DataReader object for the Basket Info
    */
    
function newBasketInfo() {
        
/**
         * Ignore any $id from the POST/GET request
         */
        
$table     DATABASE_PREFIX.TABLE_NAME_BASKET;
        
$id        IGNORE_REQUEST_ID;
        
$translate true;
        
$orderby   "";
        
$sort      "";
        
$skip      LIMIT_NAME_SKIP_NONE// Get all the order lines
        
$sql QueryBasket::get($table$id$this->sid$translate$orderby$sort$skip);
        return 
Command::newDataReader($sql);
   }

   
/**
    * Returns the DataReader object for the Company Info
    * @return DataReader The DataReader object for the Company Info
    */
    
function newCompanyInfo() {
        
$rows    DefaultRowsCompany::get();
        
$header  ''// The header meta data
        
$default ''// The default meta data array
        
$limit   ''// The limit to use for the array
        
$sort    true;
        return 
DataReaderFactory::newDataReader($rows$header$default$limit$sort);
   }

   
/**
    * Returns the html for the Engine Basket Invioce controller
    * @return String the complete html
    */
    
function getHtml() {
        
$html  $this->html;
        
// DataReader objects
        
$customerInfo $this->newCustomerInfo();
        
$basketInfo   $this->newBasketInfo();
        
$companyInfo  $this->newCompanyInfo();
        
// The view
        
$view = new ViewBasketInvoice();
        
$view->setCustomerInfo$customerInfo );
        
$view->setBasketInfo  $basketInfo   );
        
$view->setCompanyInfo $companyInfo  );
        
$html .= $view->getHtml();
        return 
$html;
   }

    
/**
     * Display html
     * <code>
     * Usage:
     *    EngineBasketInvoice::display($sid);
     * </code>
     * @static
     * @param String $sid The SID to use
     */
    
public static function display($sid) {
       
$html = new EngineBasketInvoice($sid);
       
$html->addHtml();
    }
}
?>

Vis: HTML source code

EngineBasketInvoice, HTML source code

Den fulde HTML kildekode for EngineBasketInvoice klassen

<?
<!-- DEBUGEngineBasketInvoice -->
<!-- 
DEBUGViewBasketInvoice -->

<
table id="ViewBasketInvoiceId" width="650px" class="NONE" border="0" cellpadding="0" cellspacing="0">
 <
tr>
    <
td valign="top" width="1px" title="ctl"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/ctl.gif" width="9" height="19" alt="ctl.gif" class="baseFloatLeft" border="0" />
</
td>
    <
td valign="top" width="1px" title="ctc"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/ctc.gif" width="100%" height="19" alt="ctc.gif" class="baseFloatLeft" border="0" />
</
td>
    <
td valign="top" width="1px" title="ctr"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/ctr.gif" width="9" height="19" alt="ctr.gif" class="baseFloatLeft" border="0" />
</
td>
 </
tr>

 <
tr>
    <
td class=" tableCornerView" valign="top" width="1px" title="ccl"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/ccl.gif" width="9" height="100%" alt="ccl.gif" class="baseFloatLeft" border="0" />
</
td>
    <
td class=" tableCornerView" valign="top" width="1px" title="ccc"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/ccc.gif" width="1" height="1" alt="ccc.gif" class="baseFloatLeft" border="0" />
<!-- 
DEBUGTable -->
<!-- 
DEBUGTableHeader -->
<!-- 
No text in TableHeader -->

<
table width="650px" class="tableBasketInvoiceView baseBorder" border="0" cellpadding="2" cellspacing="0">


 <
tr>
    <
td valign="top"><!-- DEBUGViewCustomerInfo -->

<
table id="ViewCustomerInfoId" width="400" class="NONE" border="0" cellpadding="2" cellspacing="0">
 <
tr>
    <
td valign="top">1<br />


5cb3a39002cf9566f2ba763dbce8ef96<br />


<!-- 
DEBUGEmailLink -->
<!-- 
finn@hvepse-eksperten.dk --><class="baseLinkColor" href="mailto:finn@hvepse-eksperten.dk" title="finn@hvepse-eksperten.dk">finn@hvepse-eksperten.dk</a>
<
br />


Finn Rasmussen<br />


HvepseEksperten.dk ApS<br />


Kongens Vænge 79<br />


3400&nbsp;Hillerød<br />


Privat telefon48246037<br />


Mobil telefon40506069<br />


Firma telefon48246030<br />


EAN9876543210123<br />



</
td>
 </
tr>

</
table>

</
td>
    <
td valign="top"><div class="baseAlignRight"><!-- DEBUGViewCompanyInfo -->

<
table id="ViewCompanyInfoId" width="400" class="NONE" border="0" cellpadding="2" cellspacing="0">
 <
tr>
    <
td valign="top">HvepseEksperten.dk ApS<br />


Finn Rasmussen<br />


Kongens Vænge 79<br />


3400&nbsp;Hillerød<br />


Privat telefon48 24 60 37<br />


Mobil telefon40 50 60 69<br />


Firma telefon48 24 60 30<br />


Cvr nr.: 10142865 <br />


<!-- 
DEBUGEmailLink -->
<!-- 
http://hvepseeksperten.dk/FormMail/ --><a class="baseLinkColor" href="http://hvepseeksperten.dk/FormMail/" title="http://hvepseeksperten.dk/FormMail/">http://hvepseeksperten.dk/FormMail/</a>
<br />



</
td>
 </
tr>

</
table>
</
div>

</
td>
 </
tr>

 <
tr>
    <
td valign="top">&nbsp;
</
td>
    <
td valign="top"><!-- DEBUGViewPaymentInfo -->
<
h1>ViewPaymentInfo->getHtml() TODO</h1>
<
p>Dato TODO</p>

</
td>
 </
tr>

 <
tr>
    <
td valign="top" colspan="2"><!-- DEBUGViewBasketInfo -->
<!-- 
DEBUGTableHeader -->

<
table width="650px" class="tableBasketView baseBorder" border="0" cellpadding="2" cellspacing="0">
 <
tr>
    <
td class="baseArrowHeader" valign="middle"><!-- DEBUGLink -->
<
class="baseLinkColor" href="/source-code/db-basket/EngineBasketInvoice/index.php" title="Klik her for at Minimere ...  TableHeader"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/arrow-headline.gif" width="4" height="7" alt="arrow-headline.gif" />
</
a>
</
td>
  <
th class="baseColorHeader" valign="top" align="left">Indkøbskurv (3)
</
th>

 </
tr>

</
table>

<
table id="ViewBasketInfoId" width="650px" class="tableBasketView baseBorder" border="0" cellpadding="2" cellspacing="0">
 <
tr>
  <
th class="baseColorHeader" valign="top"><!-- DEBUGStyle -->
<
style type="text/css">
.
widthHeader{width:47px}</style>

<
div class="widthHeader"><!-- DEBUGImageLink -->
<!-- 
DEBUGLink -->
<
class="baseColorHeader" href="/source-code/db-basket/EngineBasketInvoice/index.php?baseCOMMAND=05dc0c5f6ee78feac35b0fb4159651a0" title="CRUD_VIEW_FORM_CREATE Indsæt ny"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/new.gif" width="13" height="13" alt="CRUD_VIEW_FORM_CREATE Indsæt ny" class="baseColorHeader" />
</
a>
<!-- 
DEBUGImageLink -->
<!-- 
DEBUGLink -->
<
class="baseColorHeader" href="/source-code/db-basket/EngineBasketInvoice/index.php?baseCOMMAND=4cf67d4dbd3b698d92d1554ed53d94c8" title="CRUD_VIEW_FORM_MULTIPLE Opdater flere informationer"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/multiple.gif" width="13" height="13" alt="CRUD_VIEW_FORM_MULTIPLE Opdater flere informationer" class="baseColorHeader" />
</
a>
<!-- 
DEBUGImageLink -->
<!-- 
DEBUGLink -->
<
class="baseColorHeader" href="#" title="CRUD_VIEW_FORM_REMOVE Slet det hele" onclick="if (confirm('Slet det hele? ()')) {location.href='/source-code/db-basket/EngineBasketInvoice/index.php?baseCOMMAND=28d7757d7e61c9c340fc714d6077a767';}"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/remove.gif" width="13" height="13" alt="CRUD_VIEW_FORM_REMOVE Slet det hele" class="baseColorHeader" />
</
a>
</
div>

</
th>

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

Link

</th>

  <
th class="baseColorHeader baseNoWrap" valign="top">
<!-- 
    
Tekst
    100
    string
    demo_basket
    not_null
 
-->

Tekst

</th>

  <
th class="baseColorHeader baseNoWrap" valign="top">
<!-- 
    
Beskrivelse
    255
    string
    demo_basket
    
 
-->

Beskrivelse

</th>

  <
th class="baseColorHeader baseNoWrap baseAlignRight" valign="top" align="right">
<!-- 
    
Antal
    11
    int
    demo_basket
    not_null
 
-->

Antal

</th>

  <
th class="baseColorHeader baseNoWrap baseAlignRight" valign="top" align="right">
<!-- 
    
Pris
    12
    real
    demo_basket
    not_null
 
-->

Pris

</th>

  <
th class="baseColorHeader baseNoWrap baseAlignRight" valign="top" align="right">
<!-- 
    
Beløb
    22
    real
    
    not_null
    binary
 
-->

Beløb

</th>

 </
tr>


 <
tr>
    <
td class="baseColorDark" valign="top"><!-- DEBUGImageLink -->
<!-- 
DEBUGLink -->
<
class="baseColorDark" href="/source-code/db-basket/EngineBasketInvoice/index.php?baseCOMMAND=dbec4b60abeb38e24fa03fc93c627b3b&amp;utilID=QVo2NVpB" title="CRUD_VIEW_FORM_DETAIL Vis"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/detail.gif" width="13" height="13" alt="CRUD_VIEW_FORM_DETAIL Vis" class="baseColorDark" />
</
a>
<!-- 
DEBUGImageLink -->
<!-- 
DEBUGLink -->
<
class="baseColorDark" href="/source-code/db-basket/EngineBasketInvoice/index.php?baseCOMMAND=6b65666eed0eabec518783233ed1465b&amp;utilID=QVo2NVpB" title="CRUD_VIEW_FORM_DELETE Slet denne"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/delete.gif" width="13" height="13" alt="CRUD_VIEW_FORM_DELETE Slet denne" class="baseColorDark" />
</
a>
</
td>
    <
td class="baseColorDark" valign="top">&nbsp;

</
td>
    <
td class="baseColorDark" valign="top">Standard Hvepsebo bekæmpelse

</td>
    <
td class="baseColorDark" valign="top">Et standard hvepsebo sidder i nå-højdeog man behøver hverken at kravle op på loftet eller ned i krybekælderen

</td>
    <
td class="baseColorDark baseAlignRight" valign="top">1

</td>
    <
td class="baseColorDark baseAlignRight" valign="top">680,00

</td>
    <
td class="baseColorDark baseAlignRight" valign="top">680,00

</td>
 </
tr>


 <
tr>
    <
td class="baseColorLight" valign="top"><!-- DEBUGImageLink -->
<!-- 
DEBUGLink -->
<
class="baseColorLight" href="/source-code/db-basket/EngineBasketInvoice/index.php?baseCOMMAND=dbec4b60abeb38e24fa03fc93c627b3b&amp;utilID=QVo2NlpB" title="CRUD_VIEW_FORM_DETAIL Vis"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/detail.gif" width="13" height="13" alt="CRUD_VIEW_FORM_DETAIL Vis" class="baseColorLight" />
</
a>
<!-- 
DEBUGImageLink -->
<!-- 
DEBUGLink -->
<
class="baseColorLight" href="/source-code/db-basket/EngineBasketInvoice/index.php?baseCOMMAND=6b65666eed0eabec518783233ed1465b&amp;utilID=QVo2NlpB" title="CRUD_VIEW_FORM_DELETE Slet denne"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/delete.gif" width="13" height="13" alt="CRUD_VIEW_FORM_DELETE Slet denne" class="baseColorLight" />
</
a>
</
td>
    <
td class="baseColorLight" valign="top">&nbsp;

</
td>
    <
td class="baseColorLight" valign="top">Kørsel

</td>
    <
td class="baseColorLight" valign="top">&nbsp;

</
td>
    <
td class="baseColorLight baseAlignRight" valign="top">1

</td>
    <
td class="baseColorLight baseAlignRight" valign="top">150,00

</td>
    <
td class="baseColorLight baseAlignRight" valign="top">150,00

</td>
 </
tr>


 <
tr>
    <
td class="baseColorDark" valign="top"><!-- DEBUGImageLink -->
<!-- 
DEBUGLink -->
<
class="baseColorDark" href="/source-code/db-basket/EngineBasketInvoice/index.php?baseCOMMAND=dbec4b60abeb38e24fa03fc93c627b3b&amp;utilID=QVo2N1pB" title="CRUD_VIEW_FORM_DETAIL Vis"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/detail.gif" width="13" height="13" alt="CRUD_VIEW_FORM_DETAIL Vis" class="baseColorDark" />
</
a>
<!-- 
DEBUGImageLink -->
<!-- 
DEBUGLink -->
<
class="baseColorDark" href="/source-code/db-basket/EngineBasketInvoice/index.php?baseCOMMAND=6b65666eed0eabec518783233ed1465b&amp;utilID=QVo2N1pB" title="CRUD_VIEW_FORM_DELETE Slet denne"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/delete.gif" width="13" height="13" alt="CRUD_VIEW_FORM_DELETE Slet denne" class="baseColorDark" />
</
a>
</
td>
    <
td class="baseColorDark" valign="top">&nbsp;

</
td>
    <
td class="baseColorDark" valign="top">Rabat ved online betaling

</td>
    <
td class="baseColorDark" valign="top">&nbsp;

</
td>
    <
td class="baseColorDark baseAlignRight" valign="top">1

</td>
    <
td class="baseColorDark baseAlignRight" valign="top">&#247;150,00

</td>
    <
td class="baseColorDark baseAlignRight" valign="top">&#247;150,00

</td>
 </
tr>


 <
tr>
    <
td class="tableBorderTop baseColorDark" valign="top">Beløb
</td>
    <
td class="tableBorderTop baseColorDark baseAlignRight" valign="top" colspan="8">680,00
</td>
 </
tr>

 <
tr>
    <
td class="baseColorDark" valign="top">Moms
</td>
    <
td class="baseColorDark baseAlignRight" valign="top" colspan="8">170,00
</td>
 </
tr>

 <
tr>
    <
td class="tableBorderTop baseColorLight" valign="top">Ialt
</td>
    <
td class="tableBorderTop baseColorLight baseAlignRight" valign="top" colspan="8">&nbsp;DKK&nbsp;850,00
</td>
 </
tr>



</
table>

</
td>
 </
tr>

 <
tr>
    <
td valign="top" colspan="2"><!-- DEBUGViewDeliveryInfo -->
<
h1>Leverings betingelser</h1>
<
p>Levering efter aftalenormalt inden for 1-2 dagemen i højsæson kan der være en smule ventetid.<br />
Ring på tlf. (+4540 50 60 69 og hør nærmere.</p>

</
td>
 </
tr>

 <
tr>
    <
td valign="top" colspan="2"><!-- DEBUGViewWarrantyInfo -->
<
h1>ViewWarrantyInfo->getHtml() TODO</h1>

</
td>
 </
tr>

</
table>

</
td>
    <
td class=" tableCornerView" valign="top" width="1px" title="ccr"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/ccr.gif" width="9" height="100%" alt="ccr.gif" class="baseFloatLeft" border="0" />
</
td>
 </
tr>

 <
tr>
    <
td valign="top" width="1px" title="cbl"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/cbl.gif" width="9" height="19" alt="cbl.gif" class="baseFloatLeft" border="0" />
</
td>
    <
td valign="top" width="1px" title="cbc"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/cbc.gif" width="100%" height="19" alt="cbc.gif" class="baseFloatLeft" border="0" />
</
td>
    <
td valign="top" width="1px" title="cbr"><!-- DEBUGImages -->
<
img src="http://borebiller.info/images/cbr.gif" width="9" height="19" alt="cbr.gif" class="baseFloatLeft" border="0" />
</
td>
 </
tr>

</
table>

?>

Vis: Class methods

EngineBasketInvoice, Class methods

Her er 'klasse metoderne' for EngineBasketInvoice klassen:

  • __construct
  • newCustomerInfo
  • newBasketInfo
  • newCompanyInfo
  • getHtml
  • display
  • 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

EngineBasketInvoice, Object vars

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