2010-03-10 12:03:40 +00:00
|
|
|
<?php
|
|
|
|
|
2011-03-01 22:20:16 +00:00
|
|
|
require_once('../lib/base.php');
|
2011-04-16 08:12:53 +00:00
|
|
|
require( 'template.php' );
|
2011-03-01 22:20:16 +00:00
|
|
|
if( !OC_USER::isLoggedIn()){
|
2011-03-02 22:58:46 +00:00
|
|
|
header( "Location: ".OC_HELPER::linkTo( "index.php" ));
|
2011-03-01 22:20:16 +00:00
|
|
|
exit();
|
2010-08-12 15:30:20 +00:00
|
|
|
}
|
|
|
|
|
2011-03-01 22:20:16 +00:00
|
|
|
|
2011-04-17 11:47:45 +00:00
|
|
|
$tmpl = new OC_TEMPLATE( "settings", "index", "admin");
|
|
|
|
$used=OC_FILESYSTEM::filesize('/');
|
2011-04-17 14:40:44 +00:00
|
|
|
$free=OC_FILESYSTEM::free_space();
|
2011-04-17 11:47:45 +00:00
|
|
|
$total=$free+$used;
|
|
|
|
$relative=round(($used/$total)*100);
|
|
|
|
$tmpl->assign('usage',OC_HELPER::humanFileSize($used));
|
|
|
|
$tmpl->assign('total_space',OC_HELPER::humanFileSize($total));
|
|
|
|
$tmpl->assign('usage_relative',$relative);
|
2011-03-01 22:20:16 +00:00
|
|
|
$tmpl->printPage();
|
2010-03-10 12:03:40 +00:00
|
|
|
|
|
|
|
?>
|