templates/admin/admin.php

Go to the documentation of this file.
00001 <?php
00002   /*
00003    This file is part of DocBookWiki.  DocBookWiki is a web application
00004    that displays and edits DocBook documents.
00005 
00006    Copyright (C) 2004, 2005, 2006, 2007
00007    Dashamir Hoxha, dashohoxha@users.sourceforge.net
00008 
00009    DocBookWiki is free software; you can redistribute it and/or modify
00010    it under the  terms of the GNU General  Public License as published
00011    by the Free  Software Foundation; either version 2  of the License,
00012    or (at your option) any later version.
00013 
00014    DocBookWiki is distributed in the  hope that it will be useful, but
00015    WITHOUT  ANY  WARRANTY;  without   even  the  implied  warranty  of
00016    MERCHANTABILITY or  FITNESS FOR A PARTICULAR PURPOSE.   See the GNU
00017    General Public License for more details.
00018 
00019    You should have  received a copy of the  GNU General Public License
00020    along  with  DocBookWiki;  if  not,  write  to  the  Free  Software
00021    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00022    USA
00023   */
00024 
00031 class admin extends WebObject
00032 {
00033   function init()
00034   {
00035     if (SU=='true')
00036       {
00037         WebApp::setSVar('tabs1::topmenu->selected_item', 'users');
00038         $this->addSVar('file', 'users/users.html'); 
00039       }
00040     else
00041       {
00042         WebApp::setSVar('tabs1::topmenu->selected_item', 'user_data');
00043         $this->addSVar('file', 'user_data/user_data.html'); 
00044       }
00045   }
00046 
00047   function onParse()
00048   {
00049     $module = WebApp::getSVar('tabs1::topmenu->selected_item');
00050     switch ($module)
00051       {
00052       case 'addbook':
00053         $module_title = T_("Import or Create a New Book");
00054         $file = 'addbook/addbook.html';
00055         break;
00056       case 'menu':
00057         $module_title = T_("Edit Menus");
00058         $file = 'edit_menu/edit_menu.html';
00059         break;
00060       case 'users':
00061         $module_title = T_("Administrate Users");
00062         $file = 'users/users.html';
00063         break;
00064       case 'books':
00065         $module_title = T_("Administrate Books");
00066         $file = 'books/books.html';
00067         break;
00068       default:
00069       case 'user_data':
00070         $module_title = T_("My Settings");
00071         $file = 'user_data/user_data.html';
00072         break;
00073       }
00074 
00075     WebApp::setSVar('module_title', $module_title);
00076     $this->setSVar('file', $file); 
00077   }
00078 }
00079 ?>

Generated on Wed Jan 9 08:27:32 2008 for DokBookWiki by  doxygen 1.5.2