function select() { $credit = new credit(); if (isset($_GET['page'])) { $pages = $_GET['page']; } else { $pages = 1; } $GLOBALS['pages'] = $pages; $page = new page($pages); $GLOBALS['page'] = $page; //$rs =$credit->queryCredit(); $total = $credit->countCredit(); //$totle =mysql_num_rows($rs); $GLOBALS['page']->pageft($total, $GLOBALS['displaypg']); $item = $credit->queryCredit(); global $smarty; $smarty->assign("item", $item); $smarty->assign("obj", $credit); $smarty->assign("nextpage", $GLOBALS['page']->getPagenav()); }