Sample> Db Showrecords Array


// include TPLN

$TPLN = new TPLN;
$TPLN->setNavColor('#FFFFFF','#FFFFC0'); // change colors of navigation

// you can create this array from a CSV file or a XML file...
$res[] = array('user'=> 'root''password'=> 'admin');
$res[] = array('user'=> 'linus''password'=> 'toox');
$res[] = array('user'=> 'richard''password'=> 'gnu');
$res[] = array('user'=> 'tpln''password'=> 'best ;-)');

$TPLN->setUrl('?'); // optional take current page by default
$TPLN->showRecords($res2); // only 2 results by page

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>TPLN - DB function ShowResult Sample</title>
    <link href="../style.css" rel="stylesheet" type="text/css" />



<table cellpadding="3" cellspacing="1" width="100%">
<caption>Results {_First} to {_Last} of {_Count}</b> (Page {_PageNumber} / {_PageCount})</caption>
<tr bgcolor="{_NavColor}">

    <tr bgcolor="{_NavColor}">

    <th colspan="3" align="center">

        <!-- Add previous bloc button -->
               <a href="{_Url}"><img src="../previous.gif" alt="Go previous page" align="absbottom"></a>

        <!-- Add pager bloc -->
               <bloc::out> <a href="{_Url}">{_Page}</a> </bloc::out>
               <bloc::in> <font color="red">{_Page}</font> </bloc::in>

        <!-- Add next bloc button -->
               <a href="{_Url}"><img src="../next.gif" border=0 alt="Go next page" align="absbottom"></a>


    <bloc::norecord>No record</bloc::norecord>

{_Logo}<font size="1"> in {_Chrono} s<br>
Queries executed: {_QueryCount}</font>