nextcloud/settings/index.php

22 lines
589 B
PHP
Raw Normal View History

2010-03-10 15:03:40 +03:00
<?php
require_once('../lib/base.php');
2011-04-16 12:12:53 +04:00
require( 'template.php' );
if( !OC_USER::isLoggedIn()){
2011-03-03 01:58:46 +03:00
header( "Location: ".OC_HELPER::linkTo( "index.php" ));
exit();
}
2011-04-17 22:00:07 +04:00
OC_APP::setActiveNavigationEntry( "settings" );
2011-04-17 15:47:45 +04:00
$tmpl = new OC_TEMPLATE( "settings", "index", "admin");
$used=OC_FILESYSTEM::filesize('/');
2011-04-17 18:40:44 +04:00
$free=OC_FILESYSTEM::free_space();
2011-04-17 15:47:45 +04: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);
$tmpl->printPage();
2010-03-10 15:03:40 +03:00
?>