# Koenig (25.05.2017 / 11:55)Делаю так
Nurdaulet, ну так и напиши (.*_preview.jpg)
$array = glob($_SERVER['DOCUMENT_ROOT'] . '/files/images/*_preview.jpg');
$total = count($array);
/* код */
echo '<div class="phdr">Всего ' . $total . '</div>';
if ($total > $kmess) {
echo '<div class="topmenu">' . $tools->displayPagination('upload_img.php?', $start, $total, $kmess) . '</div>' .
'<p><form action="index.php" method="get"><input type="text" name="page" size="2"/>' .
'<input type="submit" value="' . _t('To Page') . ' >>"/></form></p>';
}Когда переходишь 2 3 страницы показывают первую страницу