. * */ // Do not prepare the file system (for demonstration purpose) // We HAVE TO set this var before including base.php $RUNTIME_NOSETUPFS = true; // Init owncloud require_once('../lib/base.php'); // We need the file system although we said do not load it! Do it by hand now OC_UTIL::setupFS(); // We load OC_TEMPLATE, too. This one is not loaded by base oc_require( 'template.php' ); // The user should have admin rights. This is an admin page! if( !OC_USER::isLoggedIn() || !OC_USER::ingroup( $_SESSION['username'], 'admin' )){ // Bad boy! Go to the very first page of owncloud header( "Location: ".OC_HELPER::linkTo( "index.php" )); exit(); } // Do some crazy Stuff over here $myvar = 2; $myarray = array( "foo" => array( 0, 1, 2 ), "bar" => "baz" ); // Preparing for output! $tmpl = new OC_TEMPLATE( "skeleton", "admin", "admin" ); // Programname, template, mode // Assign the vars $tmpl->assign( "var", $myvar ); $tmpl->assign( "array", $myarray ); // Print page $tmpl->printPage(); ?>