set_filenames(array( 'body' => 'topimages.html') ); $user->setting[hidetopimages]=0; /** * showTopImages(totalimagesperpage,cols,start=0) * the start is from where to show records, * this param is for future use:add page nav link to view any page of top rated images * eg: showTopImages(30,5,0) show the first page,showTopImages(30,5,30),show the next page,... */ $showimages=30; $page=$input[s]=intval($input[s]); $totals=GetImageNums(); $cur_page=$input[s]/$showimages; $info=array( 'total' =>$totals, 'page' =>$showimages, 'cur_page' =>$cur_page, 'baseUrl' =>$baseUrl."?" ); $pageLinks=buildPageLinks($info); $template->assign_var('pageLinks',$pageLinks); if($page<0) $page=0; if($page>0) $template->assign_block_vars('pre_link',array('s'=>($page-$showimages))); if($page+$showimages<$totals) $template->assign_block_vars('next_link',array('s'=>($page+$showimages))); showTopImages($showimages,3,$page); $template->pparse('body'); include "footer.php"; ?>