if (!$totalthreads) $totalthreads = 1; if (!$totalposts) $totalposts = 1;
$totalthreads = max($totalthreads,1); $totalposts = max($totalposts,1);