admin.php 3.04 KB
Newer Older
1
2
3
4
5
6
7
<?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.
 */

8
OC_Util::checkAdminUser();
9
OC_App::loadApps();
10
11

OC_Util::addStyle( "settings", "settings" );
Robin Appelman's avatar
Robin Appelman committed
12
OC_Util::addScript( "settings", "admin" );
Robin Appelman's avatar
Robin Appelman committed
13
OC_Util::addScript( "settings", "log" );
14
15
16
17
OC_App::setActiveNavigationEntry( "admin" );

$tmpl = new OC_Template( 'settings', 'admin', 'user');
$forms=OC_App::getForms('admin');
18
$htaccessworking=OC_Util::isHtAccessWorking();
Robin Appelman's avatar
Robin Appelman committed
19
20

$entries=OC_Log_Owncloud::getEntries(3);
21
$entriesremain = count(OC_Log_Owncloud::getEntries(4)) > 3;
22

23
$tmpl->assign('loglevel', OC_Config::getValue( "loglevel", 2 ));
24
25
26
27
28
29
30
31
32
33
$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", '' ));
Felix Moeller's avatar
Felix Moeller committed
34
$tmpl->assign('entries', $entries);
35
$tmpl->assign('entriesremain', $entriesremain);
Felix Moeller's avatar
Felix Moeller committed
36
$tmpl->assign('htaccessworking', $htaccessworking);
Thomas Mueller's avatar
Thomas Mueller committed
37
$tmpl->assign('internetconnectionworking', OC_Util::isInternetConnectionEnabled() ? OC_Util::isInternetConnectionWorking() : false);
Bart Visscher's avatar
Bart Visscher committed
38
$tmpl->assign('isLocaleWorking', OC_Util::isSetLocaleWorking());
39
$tmpl->assign('isWebDavWorking', OC_Util::isWebDAVWorking());
40
$tmpl->assign('has_fileinfo', OC_Util::fileInfoLoaded());
41
$tmpl->assign('old_php', OC_Util::isPHPoutdated());
42
$tmpl->assign('backgroundjobs_mode', OC_Appconfig::getValue('core', 'backgroundjobs_mode', 'ajax'));
43
$tmpl->assign('shareAPIEnabled', OC_Appconfig::getValue('core', 'shareapi_enabled', 'yes'));
44
45

// Check if connected using HTTPS
kondou's avatar
kondou committed
46
if (OC_Request::serverProtocol() === 'https') {
47
	$connectedHTTPS = true;
48
49
} else {
	$connectedHTTPS = false;
50
}
51
$tmpl->assign('isConnectedViaHTTPS', $connectedHTTPS);
52
$tmpl->assign('enforceHTTPSEnabled', OC_Config::getValue( "forcessl", false));
53

54
$tmpl->assign('allowLinks', OC_Appconfig::getValue('core', 'shareapi_allow_links', 'yes'));
55
$tmpl->assign('allowPublicUpload', OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes'));
56
$tmpl->assign('allowResharing', OC_Appconfig::getValue('core', 'shareapi_allow_resharing', 'yes'));
57
$tmpl->assign('allowMailNotification', OC_Appconfig::getValue('core', 'shareapi_allow_mail_notification', 'yes'));
58
$tmpl->assign('sharePolicy', OC_Appconfig::getValue('core', 'shareapi_share_policy', 'global'));
Felix Moeller's avatar
Felix Moeller committed
59
$tmpl->assign('forms', array());
Thomas Mueller's avatar
Thomas Mueller committed
60
foreach($forms as $form) {
Felix Moeller's avatar
Felix Moeller committed
61
	$tmpl->append('forms', $form);
62
}
63
$tmpl->printPage();