sliede Posted June 22, 2009 Report Share Posted June 22, 2009 <? function draw_pages($count, $perpage, $offset = 5){ $pages = ceil($count/$perpage); if($pages<2){ return ''; } $r = '<ul class="pages">'; $page = (empty($_GET['p']) || $_GET['p']<2) ? 1 : $_GET['p']; $first = $page >= $offset+1 ? $page-$offset : 1; $last = $page <= $pages-$offset ? $page+$offset : $pages; if($page>1){ $r.= sprintf('<li><a href="?p=1">«</a></li><li><a href="?p=%d"><</a></li>', $page-1); } for($i=$first;$i<=$last;$i++){ $r.= sprintf('<li%s><a href="?p=%d">%d</a></li>', $page==$i ? ' class="active"' : '', $i, $i); } if($page<$pages){ $r.= sprintf('<li><a href="?p=%d">></a></li><li><a href="?p=%d">»</a></li>', $page+1, $pages); } $r.= '</ul>'; return $r; } ?> lūk lpp dalīšanu skripts.. bet kā viņu uzstādīt ? kur viņs jāliek ? vinkārši esmu iesācējs.. man viņu vaidzētu pielāgot šim skriptam http://paste.php.lv/726036e7946dd89ba663ba...ea5ce1?lang=php Quote Link to comment Share on other sites More sharing options...
marcis Posted June 22, 2009 Report Share Posted June 22, 2009 Vajadzēja izlasīt, nevis copy & paste, tad, iespējams, būtu pamanījis arī šo rakstu. Quote Link to comment Share on other sites More sharing options...
sliede Posted June 23, 2009 Author Report Share Posted June 23, 2009 es tur redzu tikai funkcijas,ievade,izvade un nelielu aprakstu.. bet kur tas viss jaaliek lai stradaatu man poljube nesanaak un nezinu vai sanaaks.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.