selectAdd(); $users->selectAdd("username,datetime_created,datetime_modified"); $users->orderBy("username"); $rows = $users->count(); if($start > $rows) $start = $rows - $limit; $users->limit($start, $limit); $users->find(false); while($users->fetch()) { $mailbox = $users->getLink('e164_username','asterisk.Users','username'); $smarty->append('users', clone($users)); $smarty->append('mailbox', clone($mailbox)); } $smarty->assign('rows', $rows); if($start > 0) { $prev = $start - $limit; if($prev < 0) $prev = 0; $smarty->assign("prev", "http://translingo.org/index.php?from=$prev"); } if($start + $limit < $rows) { $next = $start + $limit; $smarty->assign("next", "http://translingo.org/index.php?from=$next"); } $smarty->display('index.tpl'); ?>