admin.php 1.67 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
22
$entriesremain=(count(OC_Log_Owncloud::getEntries(4)) > 3)?true:false;

Felix Moeller's avatar
Felix Moeller committed
23
function compareEntries($a, $b) {
Robin Appelman's avatar
Robin Appelman committed
24
25
26
27
	return $b->time - $a->time;
}
usort($entries, 'compareEntries');

28
$tmpl->assign('loglevel', OC_Config::getValue( "loglevel", 2 ));
Felix Moeller's avatar
Felix Moeller committed
29
$tmpl->assign('entries', $entries);
30
$tmpl->assign('entriesremain', $entriesremain);
Felix Moeller's avatar
Felix Moeller committed
31
$tmpl->assign('htaccessworking', $htaccessworking);
32
$tmpl->assign('internetconnectionworking', OC_Util::isinternetconnectionworking());
33
$tmpl->assign('islocaleworking', OC_Util::issetlocaleworking());
34
$tmpl->assign('backgroundjobs_mode', OC_Appconfig::getValue('core', 'backgroundjobs_mode', 'ajax'));
35
36
37
38
$tmpl->assign('shareAPIEnabled', OC_Appconfig::getValue('core', 'shareapi_enabled', 'yes'));
$tmpl->assign('allowLinks', OC_Appconfig::getValue('core', 'shareapi_allow_links', 'yes'));
$tmpl->assign('allowResharing', OC_Appconfig::getValue('core', 'shareapi_allow_resharing', 'yes'));
$tmpl->assign('sharePolicy', OC_Appconfig::getValue('core', 'shareapi_share_policy', 'global'));
Felix Moeller's avatar
Felix Moeller committed
39
$tmpl->assign('forms', array());
Thomas Mueller's avatar
Thomas Mueller committed
40
foreach($forms as $form) {
Felix Moeller's avatar
Felix Moeller committed
41
	$tmpl->append('forms', $form);
42
}
43
$tmpl->printPage();