<?php
$this->dbhtml = "<table width=\"50%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td class=\"titlebackgr\" nowrap><i>Customer Id</i></td>
<td class=\"titlebackgr\" nowrap><i>Last name</i></td>
<td class=\"titlebackgr\" nowrap><i>City</i></td>
<td class=\"titlebackgr\" nowrap><i>Registrationdate</i></td>
<td class=\"titlebackgr\"><i>Details</i></td>
</tr>";
if($rcount != "") {
$query = $this->sqlite->unbufferedQuery('SELECT cust_id,lastname,city,insdate
FROM tb_vrcustomer');
while ($entry = $query->fetch()) {
$this->lastname = str_replace("_"," ",$entry['lastname']);
$this->city = str_replace("_"," ",$entry['city']);
$this->dbhtml .= "<tr>
<td>{$entry['cust_id']}</td>
<td>{$this->lastname}</td>
<td>{$this->city}</td>
<td>{$entry['insdate']} </td>
<td> -> <a href=\"$_SERVER[PHP_SELF]?cust_id={$entry['cust_id']}\">show</a><br/></td>
</tr>";
}
$this->dbhtml .= "</table>";
echo $this->dbhtml;
}
else {
die("<span class=\"mess\">No customer records found.</span>");
}
?>