TitleAction.class.php

gehe zur Dokumentation dieser Datei
00001 <?php
00002 // ---------------------------------------------------------------------------
00003 // $Id$
00004 // ---------------------------------------------------------------------------
00005 // OpenRat Content Management System
00006 // Copyright (C) 2002 Jan Dankert, jandankert@jandankert.de
00007 //
00008 // This program is free software; you can redistribute it and/or
00009 // modify it under the terms of the GNU General Public License
00010 // as published by the Free Software Foundation; either version 2
00011 // of the License, or (at your option) any later version.
00012 //
00013 // This program is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 // GNU General Public License for more details.
00017 //
00018 // You should have received a copy of the GNU General Public License
00019 // along with this program; if not, write to the Free Software
00020 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00021 // ---------------------------------------------------------------------------
00022 
00023 
00030 class TitleAction extends Action
00031 {
00036      var $defaultSubAction = 'show';
00037 
00038 
00042      function show()
00043      {
00044           // Seite ändert sich nur 1x pro Session
00045           $user = Session::getUser();
00046 //        $this->lastModified( $user->loginDate );
00047           
00048           $user = Session::getUser();
00049 //        if   ( is_object($user) && isset($user->loginDate) )
00050 //             $this->lastModified( $user->loginDate );
00051 
00052           $this->setTemplateVar('css_body_class','title');
00053 
00054           $db = Session::getDatabase();
00055 //        $this->setTemplateVar('dbid'  ,$db->id              ); 
00056           $this->setTemplateVar('dbname',$db->conf['comment'] );
00057 //        $this->setTemplateVar('dbdescription',$db->conf['comment'] );
00058 
00059           $user = Session::getUser();        
00060           $this->setTemplateVar('username'    ,$user->name    );
00061           $this->setTemplateVar('userfullname',$user->fullname);
00062 
00063           $project = Session::getProject();
00064           if   ( is_object($project) )       
00065                $this->setTemplateVar('projectname',$project->name);
00066           
00067           $language = Session::getProjectLanguage();
00068           if   ( is_object($language) )      
00069                $this->setTemplateVar('languagename',$language->name);
00070           
00071           $model = Session::getProjectModel();
00072           if   ( is_object($model) )         
00073                $this->setTemplateVar('modelname',$model->name);
00074           
00075           // Urls zum Benutzerprofil und zum Abmelden
00076           $this->setTemplateVar('profile_url',Html::url( 'profile'         ));
00077           $this->setTemplateVar('logout_url' ,Html::url( 'index','logout'  ));
00078           
00079           if   ( Session::get('showtree') )
00080           {
00081                $this->setTemplateVar('showtree_url' ,Html::url('index','hidetree') );
00082                $this->setTemplateVar('showtree_text',lang('GLOBAL_HIDETREE')       );
00083           }
00084           else
00085           {
00086                $this->setTemplateVar('showtree_url' ,Html::url('index','showtree') );
00087                $this->setTemplateVar('showtree_text',lang('GLOBAL_SHOWTREE')       );
00088           }
00089           
00090           $this->forward( 'title' );
00091      }
00092 }
00093 
00094 ?>

Erzeugt am Thu May 14 00:55:48 2009 für OpenRat von  doxygen 1.5.8