<?php

$dir = date('y-m-d', TIME) . '_' . TIME;
$result = $db->query('show table status');
$tabs = array();
while ($row = $db->fetch_row($result))
{
    $tabs[] = $row;
}
$d = dir(ABSPATH . 'backup');
$dirs = array();
while (false !== ($entry = $d->read()))
{
    if (is_dir(ABSPATH . 'backup/' . $entry) && $entry != '.' && $entry != '..')
    {
        $st = explode('_', $entry);
        $t = glob(ABSPATH . 'backup/' . $entry . '/*.php');
        $t === false && $t = array();
        @$dirs[$entry] = array($entry, count($t), showtime($st[1]));
    }
}
$d->close();
krsort($dirs);
arg($dir, $dirs, $tabs);

?>