server/settings/admin.php

64 lines
3 KiB
PHP
Raw Normal View History

<?php
/**
* Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com>
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file.
*/
OC_Util::checkAdminUser();
OC_App::loadApps();
OC_Util::addStyle( "settings", "settings" );
2011-10-16 19:08:44 +00:00
OC_Util::addScript( "settings", "admin" );
2012-04-16 10:21:12 +00:00
OC_Util::addScript( "settings", "log" );
OC_App::setActiveNavigationEntry( "admin" );
$tmpl = new OC_Template( 'settings', 'admin', 'user');
$forms=OC_App::getForms('admin');
$htaccessworking=OC_Util::isHtAccessWorking();
2012-04-16 10:21:12 +00:00
$entries=OC_Log_Owncloud::getEntries(3);
2013-08-17 21:38:26 +00:00
$entriesremain = count(OC_Log_Owncloud::getEntries(4)) > 3;
2012-11-04 10:10:46 +00:00
$tmpl->assign('loglevel', OC_Config::getValue( "loglevel", 2 ));
$tmpl->assign('mail_domain', OC_Config::getValue( "mail_domain", '' ));
$tmpl->assign('mail_from_address', OC_Config::getValue( "mail_from_address", '' ));
$tmpl->assign('mail_smtpmode', OC_Config::getValue( "mail_smtpmode", '' ));
$tmpl->assign('mail_smtpsecure', OC_Config::getValue( "mail_smtpsecure", '' ));
$tmpl->assign('mail_smtphost', OC_Config::getValue( "mail_smtphost", '' ));
$tmpl->assign('mail_smtpport', OC_Config::getValue( "mail_smtpport", '' ));
$tmpl->assign('mail_smtpauthtype', OC_Config::getValue( "mail_smtpauthtype", '' ));
$tmpl->assign('mail_smtpauth', OC_Config::getValue( "mail_smtpauth", false ));
$tmpl->assign('mail_smtpname', OC_Config::getValue( "mail_smtpname", '' ));
$tmpl->assign('mail_smtppassword', OC_Config::getValue( "mail_smtppassword", '' ));
2012-11-02 18:53:02 +00:00
$tmpl->assign('entries', $entries);
$tmpl->assign('entriesremain', $entriesremain);
2012-11-02 18:53:02 +00:00
$tmpl->assign('htaccessworking', $htaccessworking);
2013-05-31 21:24:09 +00:00
$tmpl->assign('internetconnectionworking', OC_Util::isInternetConnectionEnabled() ? OC_Util::isInternetConnectionWorking() : false);
2013-11-15 13:46:00 +00:00
$tmpl->assign('isLocaleWorking', OC_Util::isSetLocaleWorking());
$tmpl->assign('isWebDavWorking', OC_Util::isWebDAVWorking());
$tmpl->assign('has_fileinfo', OC_Util::fileInfoLoaded());
2013-12-03 13:30:32 +00:00
$tmpl->assign('old_php', OC_Util::isPHPoutdated());
2012-08-09 23:36:33 +00:00
$tmpl->assign('backgroundjobs_mode', OC_Appconfig::getValue('core', 'backgroundjobs_mode', 'ajax'));
2012-08-28 00:36:34 +00:00
$tmpl->assign('shareAPIEnabled', OC_Appconfig::getValue('core', 'shareapi_enabled', 'yes'));
// Check if connected using HTTPS
2013-04-17 13:32:03 +00:00
if (OC_Request::serverProtocol() === 'https') {
$connectedHTTPS = true;
} else {
$connectedHTTPS = false;
}
$tmpl->assign('isConnectedViaHTTPS', $connectedHTTPS);
$tmpl->assign('enforceHTTPSEnabled', OC_Config::getValue( "forcessl", false));
2012-08-28 00:36:34 +00:00
$tmpl->assign('allowLinks', OC_Appconfig::getValue('core', 'shareapi_allow_links', 'yes'));
$tmpl->assign('allowPublicUpload', OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes'));
2012-08-28 00:36:34 +00:00
$tmpl->assign('allowResharing', OC_Appconfig::getValue('core', 'shareapi_allow_resharing', 'yes'));
$tmpl->assign('allowMailNotification', OC_Appconfig::getValue('core', 'shareapi_allow_mail_notification', 'yes'));
2012-08-28 00:36:34 +00:00
$tmpl->assign('sharePolicy', OC_Appconfig::getValue('core', 'shareapi_share_policy', 'global'));
2012-11-02 18:53:02 +00:00
$tmpl->assign('forms', array());
2012-09-07 13:22:01 +00:00
foreach($forms as $form) {
2012-11-02 18:53:02 +00:00
$tmpl->append('forms', $form);
}
$tmpl->printPage();