admin.php 870 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com>
  4. * This file is licensed under the Affero General Public License version 3 or later.
  5. * See the COPYING-README file.
  6. */
  7. require_once('../lib/base.php');
  8. OC_Util::checkAdminUser();
  9. OC_Util::addStyle( "settings", "settings" );
  10. OC_Util::addScript( "settings", "admin" );
  11. OC_Util::addScript( "settings", "log" );
  12. OC_App::setActiveNavigationEntry( "admin" );
  13. $tmpl = new OC_Template( 'settings', 'admin', 'user');
  14. $forms=OC_App::getForms('admin');
  15. $entries=OC_Log_Owncloud::getEntries(3);
  16. function compareEntries($a,$b){
  17. return $b->time - $a->time;
  18. }
  19. usort($entries, 'compareEntries');
  20. $tmpl->assign('loglevel',OC_Config::getValue( "loglevel", 2 ));
  21. $tmpl->assign('entries',$entries);
  22. $tmpl->assign('forms',array());
  23. foreach($forms as $form){
  24. $tmpl->append('forms',$form);
  25. }
  26. $tmpl->printPage();