read())) { // skip hidden files if($entry[0] == ".") continue; if(is_dir("{$dir}{$entry}")) { $retval[] = [ 'name' => "{$dir}{$entry}/", 'type' => filetype("{$dir}{$entry}"), //'size' => 0, //'lastmod' => filemtime("{$dir}{$entry}") ]; } elseif(is_readable("{$dir}{$entry}")) { $retval[] = [ 'name' => "{$dir}{$entry}", 'type' => mime_content_type("{$dir}{$entry}"), //'size' => filesize("{$dir}{$entry}"), //'lastmod' => filemtime("{$dir}{$entry}") ]; } } $d->close(); return $retval; } $inc = 0; if (!isset($scanfiles) && getcwd() != $_SERVER['DOCUMENT_ROOT']) { $scanfiles = array("./"); } if (isset($scanfiles)){ foreach ($scanfiles as $scan) { $filearr = getFileList($scan); foreach ($filearr as $file) { if (!preg_match("/{$indexfile}/", $file['name']) && preg_match("/.php/", $file['name'])) { $filedate = file_get_contents('./'.$file['name']); $filedate = explode('
', $filedate)[1]; $filedate = explode('
', $filedate)[0]; if ($filedate == '') { $filedate = 0; } $includearr[$inc] = array($file['name'], $filedate); $inc = $inc + 1; } } } usort ($includearr, function($a, $b) { return $b[1] <=> $a[1]; }); } require "".$root."includes/start.php"; echo ''; echo '