summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-03-15 22:30:05 +0100
committerandi <andi@splitbrain.org>2005-03-15 22:30:05 +0100
commitc19fe9c0f68f58ff9c18f0e185a5bc6b591bf798 (patch)
tree39964c8cd4bbc523d76c0057daa1380dc379ae0c /inc/template.php
parent136ce04017c0b31772ce1f8474a761792b1ccecd (diff)
downloadrpg-c19fe9c0f68f58ff9c18f0e185a5bc6b591bf798.tar.gz
rpg-c19fe9c0f68f58ff9c18f0e185a5bc6b591bf798.tar.bz2
template fixes and ACL admin interface
darcs-hash:20050315213005-9977f-0939681aa5ee37e0ea8cb054ffddb8e6275aa398.gz
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/inc/template.php b/inc/template.php
index d52d5c7a0..8047a33d0 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -99,11 +99,28 @@ function tpl_content(){
case 'denied':
print parsedLocale('denied');
break;
+ case 'admin':
+ tpl_admin();
+ break;
default:
msg("Failed to handle command: ".hsc($ACT),-1);
}
}
+/**
+ * Handle the admin page contents
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+function tpl_admin(){
+ switch($_REQUEST['page']){
+ case 'acl':
+ admin_acl_html();
+ break;
+ default:
+ html_admin();
+ }
+}
/**
* Print the correct HTML meta headers
@@ -184,12 +201,14 @@ function tpl_link($url,$name,$more=''){
* recent - recent changes
* login - login/logout button - if ACL enabled
* index - The index
+ * admin - admin page - if enough rights
* top - a back to top button
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function tpl_button($type){
global $ID;
+ global $INFO;
global $conf;
switch($type){
@@ -217,6 +236,12 @@ function tpl_button($type){
}
}
break;
+ case 'admin':
+ if($INFO['perm'] == AUTH_ADMIN)
+ print html_btn(admin,$ID,'',array('do' => 'admin'));
+ break;
+ default:
+ print '[unknown button type]';
}
}