$table->addColumn("IP address", "ip");
$table->addColumn("MAC address", "mac");
$table->addColumn("Hostname", "hostname");
$table->addColumn("Start", "start");
$table->addColumn("End", "end");
$table->addColumn("Online", "online");
$table->addColumn("Lease Type", "act", "listhdr");
// populate table data
$table->setData($leases);
?>

<p>

<table class="sortable" id="sortabletable" name="sortabletable" width="100%" border="0" cellpadding="0" cellspacing="0">
<?php 
echo $table->getColumnHTML();
foreach ($table->getData() as $data) {
    if ($data['act'] == "active" || $data['act'] == "static" || $_GET['all'] == 1) {
        if ($data['act'] != "active" && $data['act'] != "static") {
            $fspans = "<span class=\"gray\">";
            $fspane = "</span>";
        } else {
            $fspans = $fspane = "";
        }
        $lip = ip2long($data['ip']);
        if ($data['act'] == "static") {
            foreach ($config['dhcpd'] as $dhcpif => $dhcpifconf) {
                if (is_array($dhcpifconf['staticmap'])) {
                    foreach ($dhcpifconf['staticmap'] as $staticent) {
                        if ($data['ip'] == $staticent['ipaddr']) {
                            $data['if'] = $dhcpif;