-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlocal.php
executable file
·29 lines (29 loc) · 1.23 KB
/
local.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
ob_start();
$files=array();
$files=array_merge($files, glob('../../tmw/*.tmx'));
$files=array_merge($files, glob('../../tmx/*.tmx'));
$files=array_merge($files, glob('../../maps/*.tmx'));
$files=array_merge($files, glob('../tmw/*.tmx'));
$files=array_merge($files, glob('../tmx/*.tmx'));
$files=array_merge($files, glob('../maps/*.tmx'));
$files=array_merge($files, glob('../*.tmx'));
$files=array_merge($files, glob('../maps/Simple-Tiled-Implementation/tests/*.tmx'));
$files=array_merge($files, glob('tmw/*.tmx'));
$files=array_merge($files, glob('tmx/*.tmx'));
$files=array_merge($files, glob('maps/*.tmx'));
//$files=array_merge($files, glob('*/*.tmx'));
$files=array_merge($files, glob('*.tmx'));
$files=array_values(array_unique($files));
//echo '<input type="hidden" name="choice" value="list"/>'."\r\n";
//echo '<select name="list" id="map">'."\r\n";
//echo '<option value=""></option>'."\r\n";
foreach($files as $file) {
echo '<option value="'.$file.'"';
if(array_key_exists('list',$_REQUEST)&&$_REQUEST['list']==$file) echo ' selected="selected"';
echo '>'.$file.'</option>'."\r\n";
}
$data=ob_get_flush();
file_put_contents('LOCAL_var.php', '<?php'."\n".'$files='.var_export($files, true)."\n".'?>');
file_put_contents('LOCAL.htm',$data);
?>