summaryrefslogtreecommitdiffstats
path: root/settings/admin.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-08-23 01:40:13 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-08-23 01:41:18 +0200
commit391e064e67eaab5fb63ed568946af97b6a243fdd (patch)
tree9bf83f73b437e85f4f81d5cc86bd85b7df097946 /settings/admin.php
parentf2229e0427774045328388d67e1b969525ca610f (diff)
downloadnextcloud-server-391e064e67eaab5fb63ed568946af97b6a243fdd.tar.gz
nextcloud-server-391e064e67eaab5fb63ed568946af97b6a243fdd.zip
allow apps to register form for the settings and admin pages
Diffstat (limited to 'settings/admin.php')
-rw-r--r--settings/admin.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/settings/admin.php b/settings/admin.php
new file mode 100644
index 00000000000..15559a150e5
--- /dev/null
+++ b/settings/admin.php
@@ -0,0 +1,27 @@
+<?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.
+ */
+
+require_once('../lib/base.php');
+if( !OC_User::isLoggedIn()){
+ header( "Location: ".OC_Helper::linkTo( "", "index.php" ));
+ exit();
+}
+if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )){
+ header( "Location: ".OC_Helper::linkTo( '', "index.php" ));
+ exit();
+}
+
+OC_Util::addStyle( "settings", "settings" );
+OC_App::setActiveNavigationEntry( "admin" );
+
+$tmpl = new OC_Template( 'settings', 'admin', 'user');
+$forms=OC_App::getForms('admin');
+$tmpl->assign('forms',array());
+foreach($forms as $form){
+ $tmpl->append('forms',$form);
+}
+$tmpl->printPage(); \ No newline at end of file