Ok guys, now we know why it doesn't show the correct pages: The script doesn't hop into this query:
if ($total_pages > 1) { $page_num = "&p=$total_pages"; }
Don't ask me why! The funny thing is, $total_pages equals sometimes more than 1, but the loop gets not executed. I checked it out with a simple print "$total_pagesn"; - it does not show any values. When I set the print-command above the if-block, it prints out the correct number of pages. It seems that anything isn't ok with the if-block. But what? I don't see any wrong things in it ...
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.