admin.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. OC_Util::checkAdminUser();
  8. OC_App::loadApps();
  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. $htaccessworking=OC_Util::isHtAccessWorking();
  16. $entries=OC_Log_Owncloud::getEntries(3);
  17. $entriesremain = count(OC_Log_Owncloud::getEntries(4)) > 3;
  18. $tmpl->assign('loglevel', OC_Config::getValue( "loglevel", 2 ));
  19. $tmpl->assign('entries', $entries);
  20. $tmpl->assign('entriesremain', $entriesremain);
  21. $tmpl->assign('htaccessworking', $htaccessworking);
  22. $tmpl->assign('internetconnectionworking', OC_Util::isInternetConnectionEnabled() ? OC_Util::isInternetConnectionWorking() : false);
  23. $tmpl->assign('isLocaleWorking', OC_Util::isSetLocaleWorking());
  24. $tmpl->assign('isWebDavWorking', OC_Util::isWebDAVWorking());
  25. $tmpl->assign('has_fileinfo', OC_Util::fileInfoLoaded());
  26. $tmpl->assign('old_php', OC_Util::isPHPoutdated());
  27. $tmpl->assign('backgroundjobs_mode', OC_Appconfig::getValue('core', 'backgroundjobs_mode', 'ajax'));
  28. $tmpl->assign('shareAPIEnabled', OC_Appconfig::getValue('core', 'shareapi_enabled', 'yes'));
  29. // Check if connected using HTTPS
  30. if (OC_Request::serverProtocol() === 'https') {
  31. $connectedHTTPS = true;
  32. } else {
  33. $connectedHTTPS = false;
  34. }
  35. $tmpl->assign('isConnectedViaHTTPS', $connectedHTTPS);
  36. $tmpl->assign('enforceHTTPSEnabled', OC_Config::getValue( "forcessl", false));
  37. $tmpl->assign('allowLinks', OC_Appconfig::getValue('core', 'shareapi_allow_links', 'yes'));
  38. $tmpl->assign('allowPublicUpload', OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes'));
  39. $tmpl->assign('allowResharing', OC_Appconfig::getValue('core', 'shareapi_allow_resharing', 'yes'));
  40. $tmpl->assign('allowMailNotification', OC_Appconfig::getValue('core', 'shareapi_allow_mail_notification', 'yes'));
  41. $tmpl->assign('sharePolicy', OC_Appconfig::getValue('core', 'shareapi_share_policy', 'global'));
  42. $tmpl->assign('forms', array());
  43. foreach($forms as $form) {
  44. $tmpl->append('forms', $form);
  45. }
  46. $tmpl->printPage();