Initial commit

This commit is contained in:
IllusionMan1212
2018-09-30 06:17:31 +02:00
commit 96ce7c0dce
75 changed files with 10420 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
<?php
require_once( 'config.php' );
$globs = is_array($_GET['glob']) ? $_GET['glob'] : array($_GET['glob']);
$files = array();
foreach( $globs as $glob ) {
$pattern = WM_Config::$fileRoot . str_replace( '..', '', $glob );
$currentFiles = glob( $pattern );
if( $currentFiles !== false ) {
$files = array_merge( $files, $currentFiles );
}
}
$fileRootLength = strlen( WM_Config::$fileRoot );
foreach( $files as $i => $f ) {
$files[$i] = substr( $f, $fileRootLength );
}
echo json_encode( $files );
?>