function select() { $contact = new contact(); if (isset($_GET['page'])) { $pages = $_GET['page']; } else { $pages = 1; } $GLOBALS['pages'] = $pages; $page = new page($pages); $GLOBALS['page'] = $page; $total = $contact->countContact(); $GLOBALS['page']->pageft($total, $GLOBALS['displaypg']); $item = $contact->queryAdminContact(); global $smarty; $smarty->assign("item", $item); $smarty->assign("nextpage", $GLOBALS['page']->getPagenav()); }