read())) { if (!preg_match($neocmspath, $path)) $entries[] = $entry; } $dir->close(); foreach ($entries as $entry) { $fullname = $path . $entry; $pathname = str_replace('../..', '', $path); $exFolders = preg_replace('/,\s*/', '/|', $_SESSION['neoCMSExFolders']); $exFolders = str_replace('-', '\-', $exFolders); $exFolders = str_replace('.', '\.', $exFolders); $exFolders = '/' . str_replace('/', '\/', $exFolders) . '\//'; if ($entry != '.' && $entry != '..' && is_dir($fullname) && is_readable($fullname) && (!preg_match($exFolders, $fullname) || $_SESSION['neoCMSExFolders'] == '')) findfiles($fullname, $pattern); elseif ($entry != '.' && $entry != '..' && is_file($fullname) && preg_match($pattern, $entry)) { if (!in_array($pathname, $matches)) { if (preg_match('/\.html|\.htm|\.php|\.cfm|\.phtml|\.shtml|\.asp/', $fullname)) { $content = file_get_contents($fullname); if (checkContent($content)) $matches[] = $fullname; } else $matches[] = $fullname; } } } } function checkContent($content) { global $type; if (stristr($content, '[^<]+', $content) || (preg_match('/ 0) { foreach ($matches as $match) { $fname = str_replace('../../', '', $match); $flink = siteURL() . $fname; if (preg_match('/\.bmp|\.gif|\.jpeg|\.jpg|\.png/i', $fname)) { if (!strstr($imghtml, 'neoCMSImgUL')) $imghtml = '
' . $fname . '