querysm($page); //var_dump($imgs); $up = (int)$page - 1; if($up <= 0){ $up = 1; } $down = (int)$page +1; ?>