This sounds suspiciously like homework, so no code will be forthcoming...but it also sounds like you can describe the problem well enough to analyse it like a programmer, so writing your own should be easy.
Have a think about your inputs and outputs. (It might help the maths to treat your pages as "0|1|2", "3|4|5" etc., then simply add 1 before printing.)
- Q: Which page numbers do I want to print? A: The block of 3 that contains $current_page. That's something to do with "$start = 3 * int($current_page / 3))" isn't it? (In fact, we could replace "3" with "$pager_size" - then it'd work with any number...).
- Q: When do I stop printing page numbers? A: When ($offset > $pager_size) or ($pagenum > $num_pages). (Or '>=' or '==', depending on how you write your loop.) Easy.
- Q: Do I want a 'Next' link? A: Only if int($current_page/$pager_size) is smaller than int($num_pages/$pager_size).
- Q: Do I want a 'Previous' link? A: Only if int($current_page/$pager_size) > 0
...etc. Get these questions clear in your head, and you'll be pumping out code in no time.
Cheers, Ben.