\n".
"http://Spoor12.edup.tudelft.nl/SkyLined\n".
"\n".
"This program is free software; you can redistribute it and/or\n".
"modify it under the terms of the GNU General Public License\n".
"version 2, 1991 as published by the Free Software Foundation.\n".
"\n".
"This program is distributed in the hope that it will be useful,\n".
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n".
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n".
"GNU General Public License for more details.\n".
"\n".
"A copy of the GNU General Public License can be found at:\n".
" http://www.gnu.org/licenses/gpl.html\n".
"or you can write to:\n".
" Free Software Foundation, Inc.\n".
" 59 Temple Place - Suite 330\n".
" Boston, MA 02111-1307\n".
" USA.\n".
"-----------------------------------------------------------------------\n";
//--- initialise global variables ---------------------------------------------
global $link_header; $link_header = $_SERVER['PHP_SELF'];
global $path_root; $path_root = '';
global $path_open; $path_open = '';
global $hostname; $hostname = '';
$i_am_tree = false;
$i_am_list = false;
//--- read parameters ---------------------------------------------------------
$parameters = explode('&', $argv[0]);
for ($i=0; $iHost not specifiedPlease use "../IISexplorer.php?host=ip or hostname."');
} elseif (!$i_am_tree && $i_am_list) {
echo create_header().wrap_body(create_list($path_open));
} elseif ($i_am_tree && !$i_am_list) {
echo create_header().wrap_body(create_tree(false, '', $path_root, true));
} else {
echo wrap_rem($copyright);
if (!$i_am_tree && !$i_am_list) {
echo '';
} else {
echo wrap_body("
Illegal command line option
IISexplorer can't be treeandlist at the same time.");
}
}
//-----------------------------------------------------------------------------
//--- list creating function --------------------------------------------------
function create_list($path) {
global $hostname, $path_root, $path_open;
$result = '
'.
'
';
$total_size = 0;
list($success, $dirs, $files) = get_directory_contents($path);
if ($success) {
if (count($dirs)>0) {
sort($dirs);
for ($i=0; $i<DIR>';
}
}
if (count($files)>0) {
sort($files);
for ($i=0; $i'.
'
'.
'';
/*
''.
''.
'To upload a file click '.
''.
' and select a file, then click '.
''.
' to upload the file.'.
''.
'disk space used: '.readable_size($total_size).', '.
'free disk space: '.readable_size(disk_free_space('./'.$path_open)).'.'.
'