00001 <?php 00002 // --------------------------------------------------------------------------- 00003 // $Id$ 00004 // --------------------------------------------------------------------------- 00005 // OpenRat Content Management System 00006 // Copyright (C) 2002-2007 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; version 2. 00011 // 00012 // This program is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU General Public License 00018 // along with this program; if not, write to the Free Software 00019 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00020 // --------------------------------------------------------------------------- 00021 00022 00030 class StatusAction extends Action 00031 { 00034 function show() 00035 { 00036 global $conf; 00037 $metaList = array(); 00038 00039 $user = Session::getUser(); 00040 if ( is_object($user) ) 00041 { 00042 // Projekte ermitteln 00043 $projects = $user->projects; 00044 $this->setTemplateVar('projects',$projects); 00045 } 00046 00047 $project = Session::getProject(); 00048 if ( is_object($project) ) 00049 { 00050 if ( $project->projectid > 0 ) 00051 { 00052 $this->setTemplateVar('projectid',$project->projectid); 00053 $this->setTemplateVar('languages',$project->getLanguages()); 00054 $language = Session::getProjectLanguage(); 00055 if ( is_object($language) ) 00056 $this->setTemplateVar('languageid',$language->languageid); 00057 $this->setTemplateVar('models' ,$project->getModels() ); 00058 $model = Session::getProjectModel(); 00059 if ( is_object($model) ) 00060 $this->setTemplateVar('modelid',$model->modelid); 00061 00062 // TODO: Nur Projekt-Admins 00063 $this->setTemplateVar('templates',$project->getTemplates()); 00064 } 00065 else 00066 { 00067 $this->setTemplateVar('users' ,User::listAll() ); 00068 $this->setTemplateVar('groups',Group::getAll() ); 00069 } 00070 } 00071 00072 } 00073 00074 } 00075 00076 00077 ?>
1.5.8