if ($file == '.' || $file == '..') { continue; } else { if (!is_dir($dir . $file)) { if ($_SESSION['role'] == 'superadmin') { $file_array[$i] = $file; } else { if (preg_match('/' . $_SESSION['username'] . '/', $file)) { $file_array[$i] = $file; } } } } $i++; } $file_array = $etc->ArrayReindex($file_array); closedir($dh); #var_dump($file_array); #Filename quick sort by date desc $file_array = $etc->QuickSortForLogFile($file_array); # #Make Pagination object $records_per_page = 30; $pagination = new Zebra_Pagination(); $pagination->records(count($file_array)); $pagination->records_per_page($records_per_page); $file_array = @array_slice($file_array, ($pagination->get_page() - 1) * $records_per_page, $records_per_page); echo "<table class=\"table table-bordered table-hover table-striped\">"; echo "<tr class=\"info\">"; echo "<td>" . $lang['filename'] . "</td><td>" . $lang['fileContent'] . "</td><td>" . $lang['filetype'] . "</td><td>" . $lang['filesize'] . "</td>"; echo "</tr>";