openrat-cms

OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs | README

commit a53a3a2494261dea2de8e1bb7aa533c22a9fefee
parent 86d64591fa1b3d551b3fcaf04850940547363892
Author: Jan Dankert <develop@jandankert.de>
Date:   Sat, 14 Nov 2020 22:35:27 +0100

Removing old StartAction.

Diffstat:
Dmodules/cms/action/StartAction.class.php | 1247-------------------------------------------------------------------------------
Dmodules/cms/ui/themes/default/html/views/start/applications.php | 33---------------------------------
Dmodules/cms/ui/themes/default/html/views/start/applications.tpl.src.xml | 23-----------------------
Dmodules/cms/ui/themes/default/html/views/start/projectmenu.php | 110-------------------------------------------------------------------------------
Dmodules/cms/ui/themes/default/html/views/start/projectmenu.tpl.src.xml | 45---------------------------------------------
Dmodules/cms/ui/themes/default/html/views/start/userprojecttimeline.php | 59-----------------------------------------------------------
Dmodules/cms/ui/themes/default/html/views/start/userprojecttimeline.tpl.src.xml | 43-------------------------------------------
7 files changed, 0 insertions(+), 1560 deletions(-)

diff --git a/modules/cms/action/StartAction.class.php b/modules/cms/action/StartAction.class.php @@ -1,1246 +0,0 @@ -<?php - -namespace cms\action; - -use cms\base\Configuration; -use cms\base\Startup; -use cms\model\User; -use cms\model\Project; -use cms\model\Value; -use cms\model\Element; -use cms\model\Page; -use cms\model\BaseObject; -use cms\model\Language; -use cms\model\Model; - - -use database\Database; -use util\Http; -use logger\Logger; -use \security\Password; -use util\Session; -use util\Html; -use util\Mail; - -// OpenRat Content Management System -// Copyright (C) 2002-2007 Jan Dankert, jandankert@jandankert.de -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; version 2. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - -/** - * Action-Klasse fuer die Start-Action - * @author $Author$ - * @version $Revision$ - * @package openrat.actions - * @deprecated - */ - -class StartAction extends BaseAction -{ - public $security = Action::SECURITY_USER; - - var $mustChangePassword = false; - - function setDb( $dbid ) - { - $conf = Configuration::rawConfig(); - - if ( !isset($conf['database'][$dbid] )) - throw new \LogicException( 'unknown DB-Id: '.$dbid ); - - $db = \cms\base\DB::get(); - if ( is_object($db) ) - { - $db->rollback(); - } - - $db = new Database( $conf['database'][$dbid] ); - $db->id = $dbid; - $db->start(); - Session::setDatabase( $db ); - } - - - - function checkForDb() - { - $conf = Configuration::rawConfig(); - $dbid = $this->getRequestVar('dbid'); - - if ( $dbid != '' ) - $this->setDb( $dbid ); - } - - - - function setDefaultDb() - { - if ( $this->hasRequestVar(RequestParams::PARAM_DATABASE_ID) ) - { - $dbid = $this->getRequestVar(RequestParams::PARAM_DATABASE_ID); - } - else - { - $conf = Configuration::rawConfig(); - - if ( !isset($conf['database']['default']) ) - throw new \LogicException('default-database not set'); - - $dbid = $conf['database']['default']; - } - - $this->setDb( $dbid ); - } - - - - function checkLogin( $name,$pw,$pw1,$pw2 ) - { - Logger::debug( "login user $name" ); - - $conf = Configuration::rawConfig(); - global $SESS; - - unset( $SESS['user'] ); - - - $db = \cms\base\DB::get(); - - if ( !$db->available ) - { - $this->addNotice('database', 0, $db->conf['description'], 'DATABASE_CONNECTION_ERROR', Action::NOTICE_ERROR, array(), array('Database Error: ' . $db->error)); - $this->callSubAction('showlogin'); - return false; - } - - $ip = getenv("REMOTE_ADDR"); - - $user = new User(); - $user->name = $name; - - $ok = $user->checkPassword( $pw ); - - $this->mustChangePassword = $user->mustChangePassword; - - if ( $this->mustChangePassword ) - { - // Der Benutzer hat zwar ein richtiges Kennwort eingegeben, aber dieses ist abgelaufen. - // Wir versuchen hier, das neue zu setzen (sofern eingegeben). - if ( empty($pw1) ) - { - } - elseif ( $pw1 != $pw2 ) - { - $this->addValidationError('password1','PASSWORDS_DO_NOT_MATCH'); - $this->addValidationError('password2',''); - } - elseif ( strlen($pw2) < $conf['security']['password']['min_length'] ) - { - $this->addValidationError('password1','PASSWORD_MINLENGTH',array('minlength'=>$conf['security']['password']['min_length'])); - $this->addValidationError('password2',''); - } - else - { - // Kennw�rter identisch und lang genug. - $user->setPassword( $pw1,true ); - - // Das neue Kennwort ist gesetzt, die Anmeldung ist also doch noch gelungen. - $ok = true; - $this->mustChangePassword = false; - $user->mustChangePassword = false; - } - } - - // Falls Login erfolgreich - if ( $ok ) - { - // Login war erfolgreich! - $user->load(); - $user->setCurrent(); - Logger::info( 'login successful' ); - - return true; - } - else - { - Logger::info( "login for user $name failed" ); - - return false; - } - } - - - - /** - * Anzeigen der Loginmaske. - * - * Es wird nur die Loginmaske angezeigt. - * Hier nie "304 not modified" setzen, da sonst keine - * Login-Fehlermeldung erscheinen kann - */ - function loginView() - { - $conf = Configuration::rawConfig(); - $sso = $conf['security']['sso']; - $ssl = $conf['security']['ssl']; - - $ssl_trust = false; - $ssl_user_var = ''; - extract( $ssl, EXTR_PREFIX_ALL, 'ssl' ); - - if ( $sso['enable'] ) - { - $authid = $this->getRequestVar( $sso['auth_param_name']); - - if ( empty( $authid) ) - throw new \util\exception\SecurityException( 'no authorization data (no auth-id)'); - - if ( $sso['auth_param_serialized'] ) - $authid = unserialize( $authid ); - - $purl = parse_url($sso['url']); - // Verbindung zu URL herstellen. - $errno=0; $errstr=''; - $fp = fsockopen ($purl['host'],80, $errno, $errstr, 30); - if ( !$fp ) - { - echo "Connection failed: $errstr ($errno)"; - } - else - { - $http_get = $purl['path']; - if ( !empty($purl['query']) ) - $http_get .= '?'.$purl['query']; - - $header = array(); - - $header[] = "GET $http_get HTTP/1.0"; - $header[] ="Host: ".$purl['host']; - $header[] = "User-Agent: Mozilla/5.0 (OpenRat CMS Single Sign-on Check)"; - $header[] = "Connection: Close"; - - if ( $sso['cookie'] ) - { - $cookie = 'Cookie: '; - if ( is_array($authid)) - foreach( $authid as $cookiename=>$cookievalue) - $cookie .= $cookiename.'='.$cookievalue."; "; - else - $cookie .= $sso['cookie_name'].'='.$authid; - - $header[] = $cookie; - } - -// Html::debug($header); - fputs ($fp, implode("\r\n",$header)."\r\n\r\n"); - - $inhalt=array(); - while (!feof($fp)) { - $inhalt[] = fgets($fp,128); - } - fclose($fp); - - $html = implode('',$inhalt); -// Html::debug($html); - if ( !preg_match($sso['expect_regexp'],$html) ) - throw new \util\exception\SecurityException('auth failed'); - $treffer=0; - if ( !preg_match($sso['username_regexp'],$html,$treffer) ) - throw new \util\exception\SecurityException('auth failed'); - if ( !isset($treffer[1]) ) - throw new \util\exception\SecurityException('authorization failed'); - - $username = $treffer[1]; - -// Html::debug( $treffer ); - $this->setDefaultDb(); - - $user = User::loadWithName( $username ); - - if ( ! $user->isValid( )) - throw new \util\exception\SecurityException('authorization failed: user not found: '.$username); - - $user->setCurrent(); - - $this->callSubAction('show'); - } - } - - elseif ( $ssl_trust ) - { - if ( empty($ssl_user_var) ) - throw new \LogicException( 'please set environment variable name in ssl-configuration.' ); - - $username = getenv( $ssl_user_var ); - - if ( empty($username) ) - throw new \util\exception\SecurityException( 'no username in client certificate ('.$ssl_user_var.') (or there is no client certificate...?)' ); - - $this->setDefaultDb(); - - $user = User::loadWithName( $username ); - - if ( !$user->isValid() ) - throw new \LogicException( 'unknown username: '.$username ); - - $user->setCurrent(); - - $this->callSubAction('show'); - } - - foreach( $conf['database'] as $dbname=>$dbconf ) - { - if ( is_array($dbconf) && $dbconf['enabled'] ) - $dbids[$dbname] = array('key' =>$dbname, - 'value'=>Text::maxLength($dbconf['description']), - 'title'=>$dbconf['description'].' ('.$dbconf['host'].')' ); - } - - $openid_provider = array(); - foreach( explode(',',$conf['security']['openid']['provider']) as $provider ) - $openid_provider[$provider] = Configuration::config('security','openid','provider.'.$provider.'.name'); - $this->setTemplateVar('openid_providers',$openid_provider); - $this->setTemplateVar('openid_user_identity', Configuration::config('security','openid','user_identity')); - //$this->setTemplateVar('openid_provider','identity'); - - - if ( empty($dbids) ) - $this->addNotice('', 0, '', 'no_database_configuration', Action::NOTICE_WARN); - - if ( !isset($this->templateVars['login_name']) && isset($_COOKIE['or_username']) ) - $this->setTemplateVar('login_name',$_COOKIE['or_username']); - - if ( !isset($this->templateVars['login_name']) ) - $this->setTemplateVar('login_name',@$conf['security']['default']['username']); - - if ( $this->templateVars['login_name']== @$conf['security']['default']['username']) - $this->setTemplateVar('login_password',@$conf['security']['default']['password']); - - $this->setTemplateVar( 'dbids',$dbids ); - - $db = Session::getDatabase(); - if ( is_object($db) ) - $this->setTemplateVar('actdbid',$db->id); - elseif( isset($this->templateVars['actid']) ) - ; - else - $this->setTemplateVar('actdbid',$conf['database']['default']); - - - // Den Benutzernamen aus dem Client-Zertifikat lesen und in die Loginmaske eintragen. - $ssl_user_var = $conf['security']['ssl']['user_var']; - if ( !empty($ssl_user_var) ) - { - $username = getenv( $ssl_user_var ); - - if ( empty($username) ) - { - echo \cms\base\Language::lang('ERROR_LOGIN_BROKEN_SSL_CERT'); - Logger::warn( 'no username in SSL client certificate (var='.$ssl_user_var.').' ); - exit; - } - - // Benutzername ist in Eingabemaske unveränderlich - $this->setTemplateVar('force_username',$username); - } - - $this->setTemplateVar('objectid' ,$this->getRequestVar('objectid' ,RequestParams::FILTER_NUMBER) ); - $this->setTemplateVar('projectid' ,$this->getRequestVar('projectid' ,RequestParams::FILTER_NUMBER) ); - $this->setTemplateVar('modelid' ,$this->getRequestVar('modelid' ,RequestParams::FILTER_NUMBER) ); - $this->setTemplateVar('languageid',$this->getRequestVar('languageid',RequestParams::FILTER_NUMBER) ); - - $this->setTemplateVar('register' ,$conf['login' ]['register' ]); - $this->setTemplateVar('send_password',$conf['login' ]['send_password']); - } - - - - /** - * Setzt die neue Projekt-Id und lädt die Workbench neu. - * - */ - public function projectmenuPost() - { - - $this->evaluateRequestVars( array('projectid'=>$this->getRequestId()) ); - } - - - /** - * Erzeugt ein Projekt-Auswahlmenue. - */ - public function projectmenuView() - { - $user = Session::getUser(); - - if ( $user->mustChangePassword ) - { - $this->addNotice('user', 0, $user->name, 'PASSWORD_TIMEOUT', 'warn'); - $this->callSubAction( 'changepassword' ); // Zwang, das Kennwort zu �ndern. - } - - - // Diese Seite gilt pro Sitzung. - //$this->lastModified( $user->loginDate ); - - // Projekte ermitteln - $projects = $user->getReadableProjects(); - - $list = array(); - - foreach( $projects as $id=>$name ) - { - $p = array(); - $p['url' ] = Html::url('start','project',$id); - $p['name'] = $name; - $p['id' ] = $id; - - $tmpProject = new Project( $id ); - $p['defaultmodelid' ] = $tmpProject->getDefaultModelId(); - $p['defaultlanguageid'] = $tmpProject->getDefaultLanguageId(); - $p['models' ] = $tmpProject->getModels(); - $p['languages' ] = $tmpProject->getLanguages(); - - $list[] = $p; - } - - $this->setTemplateVar('projects',$list); - - if ( empty($list) ) - { - // Kein Projekt vorhanden. Eine Hinweismeldung ausgeben. - if ( $this->userIsAdmin() ) - // Administratoren bekommen bescheid, dass sie ein Projekt anlegen sollen - $this->addNotice('', 0, '', 'ADMIN_NO_PROJECTS_AVAILABLE', Action::NOTICE_WARN); - else - // Normale Benutzer erhalten eine Meldung, dass kein Projekt zur Verf�gung steht - $this->addNotice('', 0, '', 'NO_PROJECTS_AVAILABLE', Action::NOTICE_WARN); - } - - //$this->metaValues(); - } - - - - /** - * Erzeugt eine Anwendungsliste. - */ - public function applicationsView() - { - $conf = Configuration::rawConfig(); - - // Diese Seite gilt pro Sitzung. - $user = Session::getUser(); - $userGroups = $user->getGroups(); - $this->lastModified( $user->loginDate ); - - // Applikationen ermitteln - $list = array(); - foreach( $conf['applications'] as $id=>$app ) - { - if ( !is_array($app) ) - continue; - - if ( isset($app['group']) ) - if ( !in_array($app['group'],$userGroups) ) - continue; // Keine Berechtigung, da Benutzer nicht in Gruppe vorhanden. - - $p = array(); - $p['url'] = $app['url']; - $p['description'] = @$app['description']; - if ( isset($app['param']) ) - { - $p['url'] .= strpos($p['url'],'?')!==false?'&':'?'; - $p['url'] .= $app['param'].'='.session_id(); - } - $p['name'] = $app['name']; - - $list[] = $p; - } - - - $this->setTemplateVar('applications',$list); - } - - - - /** - * Open-Id Login, �berpr�fen der Anmeldung.<br> - * Spezifikation: http://openid.net/specs/openid-authentication-1_1.html<br> - * Kapitel "4.4. check_authentication"<br> - * <br> - * Im 2. Schritt (Mode "id_res") erfolgte ein Redirect vom Open-Id Provider an OpenRat zur�ck.<br> - * Wir befinden uns nun im darauf folgenden Request des Browsers.<br> - * <br> - * Es muss noch beim OpenId-Provider die Best�tigung eingeholt werden, danach ist der - * Benutzer angemeldet.<br> - */ - function openid() - { - $conf = Configuration::rawConfig(); - $openId = Session::get('openid'); - - if ( !$openId->checkAuthentication() ) - { - $this->addNotice('user', 0, $openId->user, 'LOGIN_OPENID_FAILED', Action::NOTICE_ERROR, array('name' => $openId->user), array($openId->error)); - $this->addValidationError('openid_url',''); - $this->callSubAction('showlogin'); - return; - } - - //Html::debug($openId); - - // Anmeldung wurde mit "is_valid:true" best�tigt. - // Der Benutzer ist jetzt eingeloggt. - $username = $openId->getUserFromIdentiy(); - - if ( empty($username) ) - { - // Es konnte kein Benutzername ermittelt werden. - $this->addNotice('user', 0, $username, 'LOGIN_OPENID_FAILED', 'error', array('name' => $username)); - $this->addValidationError('openid_url',''); - $this->callSubAction('showlogin'); - return; - } - - $user = User::loadWithName( $username ); - - if ( $user->userid <=0) - { - // Benutzer ist (noch) nicht vorhanden. - if ( $conf['security']['openid']['add']) // Anlegen? - { - $user->name = $username; - $user->add(); - - $user->mail = $openId->info['email']; - $user->fullname = $openId->info['fullname']; - $user->save(); // Um E-Mail zu speichern (wird bei add() nicht gemacht) - } - else - { - // Benutzer ist nicht in Benutzertabelle vorhanden (und angelegt werden soll er auch nicht). - $this->addNotice('user', 0, $username, 'LOGIN_OPENID_FAILED', 'error', array('name' => $username)); - $this->addValidationError('openid_url',''); - $this->callSubAction('showlogin'); - return; - } - } - else - { - // Benutzer ist bereits vorhanden. - if ( @$conf['security']['openid']['update_user']) - { - $user->fullname = $openId->info['fullname']; - $user->mail = $openId->info['email']; - $user->save(); - } - } - - $user->setCurrent(); // Benutzer ist jetzt in der Sitzung. - } - - - /** - * Login. - */ - function loginPost() - { - $conf = Configuration::rawConfig(); - - $this->checkForDb(); - Session::setUser(''); - - if ( $conf['login']['nologin'] ) - throw new \util\exception\SecurityException('login disabled'); - - $openid_user = $this->getRequestVar('openid_url' ); - $loginName = $this->getRequestVar('login_name' ,RequestParams::FILTER_ALPHANUM); - $loginPassword = $this->getRequestVar('login_password',RequestParams::FILTER_ALPHANUM); - $newPassword1 = $this->getRequestVar('password1' ,RequestParams::FILTER_ALPHANUM); - $newPassword2 = $this->getRequestVar('password2' ,RequestParams::FILTER_ALPHANUM); - - // Cookie setzen - $this->setCookie('or_username',$loginName ); - - // Login mit Open-Id. - if ( $this->hasRequestVar('openid_provider') && ($this->getRequestVar('openid_provider') != 'identity' || !empty($openid_user)) ) - { - $openId = new OpenId($this->getRequestVar('openid_provider'),$openid_user); - - if ( ! $openId->login() ) - { - $this->addNotice('user', 0, $openid_user, 'LOGIN_OPENID_FAILED', 'error', array('name' => $openid_user), array($openId->error)); - $this->addValidationError('openid_url',''); - $this->callSubAction('showlogin'); - return; - } - - Session::set('openid',$openId); - $openId->redirect(); - } - - - // Ermitteln, ob der Baum angezeigt werden soll - // Ist die Breite zu klein, dann wird der Baum nicht angezeigt - Session::set('showtree',intval($this->getRequestVar('screenwidth')) > $conf['interface']['min_width'] ); - - $loginOk = $this->checkLogin( $loginName, - $loginPassword, - $newPassword1, - $newPassword2 ); - - usleep(hexdec(Password::randomHexString(1))); // delay: 0-255 ms - - if ( !$loginOk ) - { - - if ( $this->mustChangePassword ) - { - // Anmeldung gescheitert, Benutzer muss Kennwort �ndern. - $this->addNotice('user', 0, $loginName, 'LOGIN_FAILED_MUSTCHANGEPASSWORD', 'error'); - $this->addValidationError('password1',''); - $this->addValidationError('password2',''); - } - else - { - // Anmeldung gescheitert. - $this->addNotice('user', 0, $loginName, 'LOGIN_FAILED', 'error', array('name' => $loginName)); - $this->addValidationError('login_name' ,''); - $this->addValidationError('login_password',''); - } - - Logger::debug("Login failed for user '$loginName'"); - - $this->callSubAction('login'); - return; - } - else - { - Logger::debug("Login successful for user '$loginName'"); - - // Anmeldung erfolgreich. - if ( Configuration::config('security','renew_session_login') ) - $this->recreateSession(); - - $user = Session::getUser(); - $this->addNotice('user', 0, $user->name, 'LOGIN_OK', Action::NOTICE_OK, array('name' => $user->fullname)); - } - - // Benutzer ist angemeldet - } - - - /** - * Benutzer meldet sich ab. - */ - function logoutPost() - { - $conf = Configuration::rawConfig(); - - $user = Session::getUser(); - if ( is_object($user) ) - $this->setTemplateVar('login_username',$user->name); - - if ( Configuration::subset('security')->is('renew_session_logout',false) ) - $this->recreateSession(); - - session_unset(); - - if ( @$conf['theme']['compiler']['compile_at_logout'] ) - { - foreach( $conf['action'] as $actionName => $actionConfig ) - { - foreach( $actionConfig as $subActionName=>$subaction ) - { - if ( is_array($subaction) && - !isset($subaction['goto' ]) && - !isset($subaction['direct']) && - !isset($subaction['action']) && - !isset($subaction['alias' ]) && - $subActionName != 'menu' ) - { - $engine = new template_engine\TemplateEngine(); - $engine->compile( strtolower(str_replace('Action','',$actionName)).'/'.$subActionName); - } - } - } - } - - // Umleiten auf eine definierte URL.s - $redirect_url = @$conf['security']['logout']['redirect_url']; - - if ( !empty($redirect_url) ) - { - header('Location: '.$redirect_url); - exit; - } - } - - - - /** - * Benutzer meldet sich ab. - */ - function logoutView() - { - } - - - /** - * Ausw�hlen der Administration. - */ - function administrationPost() - { - } - - - - /** - * Auswaehlen des Benutzer-Profiles. - */ - function profilePost() - { - } - - - - /** - * Auswaehlen der Startseite. - */ - function startPost() - { - } - - - - function project() - { - $user = Session::getUser(); - if ( ! is_object($user) ) - { - $this->callSubAction('show'); - return; - } - - $this->evaluateRequestVars( array('projectid'=>$this->getRequestId()) ); - - Session::setUser( $user ); - } - - - function object() - { - $user = Session::getUser(); - if ( ! is_object($user) ) - { - $this->callSubAction('show'); - return; - } - - $this->evaluateRequestVars( array('objectid'=>$this->getRequestId()) ); - - Session::setUser( $user ); - } - - - function languagePost() - { - $user = Session::getUser(); - if ( ! is_object($user) ) - { - throw new \LogicException('No user in session'); - return; - } - - $this->evaluateRequestVars( array(RequestParams::PARAM_LANGUAGE_ID=>$this->getRequestId()) ); - } - - - function modelPost() - { - $user = Session::getUser(); - if ( ! is_object($user) ) - { - $this->callSubAction('show'); - return; - } - - $this->evaluateRequestVars( array(RequestParams::PARAM_MODEL_ID=>$this->getRequestId()) ); - } - - - /** - * Auswerten der Request-Variablen. - */ - private function evaluateRequestVars( $add = array() ) - { - } - - - function switchuser() - { - $user = Session::getUser(); - - if ( ! $user->isAdmin ) - throw new \util\exception\SecurityException(""); - - $this->recreateSession(); - - $newUser = new User( $this->getRequestId() ); - $newUser->load(); - - $newUser->setCurrent(); - } - - - function showView() - { - $conf = Configuration::rawConfig(); - global $PHP_AUTH_USER; - global $PHP_AUTH_PW; - - $user = Session::getUser(); - // Gast-Login - if ( ! is_object($user) ) - { - if ( $conf['security']['guest']['enable'] ) - { - $this->setDefaultDb(); - $username = $conf['security']['guest']['user']; - $user = User::loadWithName($username); - if ( $user->userid > 0 ) - $user->setCurrent(); - else - { - Logger::warn('Guest login failed, user not found: '.$username); - $this->addNotice('user', 0, $username, 'LOGIN_FAILED', Action::NOTICE_WARN, array('name' => $username)); - $user = null; - } - } - } - - if ( ! is_object($user) ) - { - switch( $conf['security']['login']['type'] ) - { - - // Authorization ueber HTTP - // - case 'http': - $ok = false; - - if ( isset($_SERVER['PHP_AUTH_USER']) ) - { - $this->setDefaultDb(); - $ok = $this->checkLogin( $_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW'] ); - } - - if ( ! $ok ) - { - header( 'WWW-Authenticate: Basic realm="'.Startup::TITLE.' - '.\cms\base\Language::lang('HTTP_REALM').'"' ); - header( 'HTTP/1.0 401 Unauthorized' ); - echo 'Authorization Required!'; - exit; - } - break; - - case 'form': - // Benutzer ist nicht angemeldet - $this->callSubAction( 'showlogin' ); // Anzeigen der Login-Maske - return; - break; - - default: - throw new \LogicException('Unknown auth-type: '.$conf['security']['login']['type'].'. Please check the configuration setting /security/login/type' ); - } - } - - if ( $user->mustChangePassword ) - { - $this->addNotice('user', 0, $user->name, 'PASSWORD_TIMEOUT', 'warn'); - $this->callSubAction( 'changepassword' ); // Zwang, das Kennwort zu �ndern. - } - - // Seite �ndert sich nur 1x pro Session - $this->lastModified( $user->loginDate ); - - $this->metaValues(); - } - - - - /** - * Maske anzeigen, um Benutzer zu registrieren. - */ - function register() - { - - } - - - /** - * Registriercode erzeugen und per E-Mail dem Benutzer mitteilen. - * Maske anzeigen, damit Benuter Registriercode anzeigen kann. - */ - public function registercode() - { - $email_address = $this->getRequestVar('mail','mail'); - - if ( ! Mail::checkAddress($email_address) ) - { - $this->addValidationError('mail'); - $this->setTemplateVar('mail',$email_address); - $this->callSubAction('register'); - return; - } - - - srand ((double)microtime()*1000003); - $registerCode = rand(); - - Session::set('registerCode',$registerCode ); - - // E-Mail and die eingegebene Adresse verschicken - $mail = new Mail($email_address, - 'register_commit_code'); - $mail->setVar('code',$registerCode); // Registrierungscode als Text-Variable - - if ( $mail->send() ) - { - $this->addNotice('', 0, '', 'mail_sent', Action::NOTICE_OK); - } - else - { - $this->addNotice('', 0, '', 'mail_not_sent', Action::NOTICE_ERROR, array(), $mail->error); - $this->callSubAction('register'); - return; - } - } - - - - public function registeruserdata() - { - $conf = Configuration::rawConfig(); - - Session::set('registerMail',$this->getRequestVar('mail') ); - // TODO: Attribut "Password" abfragen - foreach( $conf['database'] as $dbname=>$dbconf ) - { - if ( is_array($dbconf) && $dbconf['enabled'] ) - $dbids[$dbname] = $dbconf['description']; - } - - $this->setTemplateVar( 'dbids',$dbids ); - - $db = Session::getDatabase(); - if ( is_object($db) ) - $this->setTemplateVar('actdbid',$db->id); - else - $this->setTemplateVar('actdbid',$conf['database']['default']); - } - - - /** - * Benutzerregistierung. - * Benutzer hat Best�tigungscode erhalten und eingegeben. - */ - public function registercommit() - { - $conf = Configuration::rawConfig(); - $this->checkForDb(); - - $origRegisterCode = Session::get('registerCode'); - $inputRegisterCode = $this->getRequestVar('code'); - - if ( $origRegisterCode != $inputRegisterCode ) - { - // Best�tigungscode stimmt nicht. - $this->addValidationError('code','code_not_match'); - $this->callSubAction('registeruserdata'); - return; - } - - // Best�tigungscode stimmt �berein. - // Neuen Benutzer anlegen. - - if ( !$this->hasRequestVar('username') ) - { - $this->addValidationError('username'); - $this->callSubAction('registeruserdata'); - return; - } - - $user = User::loadWithName( $this->getRequestVar('username') ); - if ( $user->isValid() ) - { - $this->addValidationError('username','USER_ALREADY_IN_DATABASE'); - $this->callSubAction('registeruserdata'); - return; - } - - if ( strlen($this->getRequestVar('password')) < $conf['security']['password']['min_length'] ) - { - $this->addValidationError('password','password_minlength',array('minlength'=>$conf['security']['password']['min_length'])); - $this->callSubAction('registeruserdata'); - return; - } - - $newUser = new User(); - $newUser->name = $this->getRequestVar('username'); - $newUser->add(); - - $newUser->mail = Session::get('registerMail'); - $newUser->save(); - - $newUser->setPassword( $this->getRequestVar('password'),true ); - - $this->addNotice('user', 0, $newUser->name, 'user_added', 'ok'); - } - - - - /** - * Vergessenes Kennwort zusenden lassen. - */ - public function password() - { - $conf = Configuration::rawConfig(); - - // TODO: Attribut "Password" abfragen - foreach( $conf['database'] as $dbname=>$dbconf ) - { - if ( is_array($dbconf) && $dbconf['enabled'] ) - $dbids[$dbname] = $dbconf['description']; - } - - $this->setTemplateVar( 'dbids',$dbids ); - - - $db = Session::getDatabase(); - - if ( is_object($db) ) - $this->setTemplateVar('actdbid',$db->id); - else - $this->setTemplateVar('actdbid',$conf['database']['default']); - - } - - - /* - function changepassword() - { - } - */ - - - /* - function setnewpassword() - { - $oldPw = $this->getRequestVar('password_old' ); - $newPw1 = $this->getRequestVar('password_new_1'); - $newPw2 = $this->getRequestVar('password_new_2'); - - if ( $newPw1 == $newPw2 ) - { - // Aktuellen Benutzer aus der Sitzung ermitteln - $user = $this->getUserFromSession(); - - // Altes Kennwort pr�fen. - $ok = $user->checkPassword( $oldPw ); - - if ( $ok ) // Altes Kennwort ist ok. - { - $user->setPassword( $newPw1 ); // Setze neues Kennwort - $user->mustChangePassword = false; - Session::setUser($user); - $this->addNotice('user',$user->name,'password_set','ok'); - } - else - { - // Altes Kennwort falsch. - $this->addNotice('user',$user->name,'password_error','error'); - } - } - else - { - // Beide neuen Kennw�rter stimmen nicht �berein - $this->addNotice('user',$user->name,'passwords_not_match','error'); - } - } - */ - - - /** - * Einen Kennwort-Anforderungscode an den Benutzer senden. - */ - public function passwordcode() - { - if ( !$this->hasRequestVar('username') ) - { - $this->addValidationError('username'); - $this->callSubAction('password'); - return; - } - - $this->checkForDb(); - - $user = User::loadWithName( $this->getRequestVar("username") ); - - Password::delay(); - - // Html::debug($user); - if ( $user->isValid() ) - { - srand ((double)microtime()*1000003); - $code = rand(); - $this->setSessionVar("password_commit_code",$code); - - $eMail = new Mail( $user->mail,'password_commit_code' ); - $eMail->setVar('name',$user->getName()); - $eMail->setVar('code',$code); - if ( $eMail->send() ) - $this->addNotice('user', 0, $user->getName(), 'mail_sent', Action::NOTICE_OK); - else - $this->addNotice('user', 0, $user->getName(), 'mail_not_sent', Action::NOTICE_ERROR, array(), $eMail->error); - - } - else - { - //$this->addNotice('','user','username_not_found'); - // Trotzdem vort�uschen, eine E-Mail zu senden, damit die G�ltigkeit - // eines Benutzernamens nicht von au�en gepr�ft werden kann. - // - $this->addNotice('user', 0, $this->getRequestVar("username"), 'mail_sent'); - } - - $this->setSessionVar("password_commit_name",$user->name); - } - - - - /** - * Anzeige Formular zum Eingeben des Kennwort-Codes. - * - */ - public function passwordinputcode() - { - - } - - - /** - * Neues Kennwort erzeugen und dem Benutzer zusenden. - */ - public function passwordcommit() - { - $username = $this->getSessionVar("password_commit_name"); - - if ( $this->getRequestVar("code")=='' || - $this->getSessionVar("password_commit_code") != $this->getRequestVar("code") ) - { - $this->addValidationError('code','PASSWORDCODE_NOT_MATCH'); - $this->callSubAction('passwordinputcode'); - return; - } - - $user = User::loadWithName( $username ); - - if ( !$user->isValid() ) - { - // Benutzer konnte nicht geladen werden. - $this->addNotice('user', 0, $username, 'error', Action::NOTICE_ERROR); - return; - } - - $newPw = User::createPassword(); // Neues Kennwort erzeugen. - - $eMail = new Mail( $user->mail,'password_new' ); - $eMail->setVar('name' ,$user->getName()); - $eMail->setVar('password',$newPw ); - - if ( $eMail->send() ) - { - $user->setPassword( $newPw, false ); // Kennwort muss beim n�. Login ge�ndert werden. - $this->addNotice('user', 0, $username, 'mail_sent', Action::NOTICE_OK); - } - else - { - // Sollte eigentlich nicht vorkommen, da der Benutzer ja auch schon den - // Code per E-Mail erhalten hat. - $this->addNotice('user', 0, $username, 'error', Action::NOTICE_ERROR, array(), $eMail->error); - } - } - - - /** - * Erzeugt eine neue Sitzung. - */ - private function recreateSession() - { - - // PHP < 4.3.2 kennt die Funktion session_regenerate_id() nicht. - if ( version_compare(phpversion(),"4.3.2","<") ) - { - $randlen = 32; - $randval = "0123456789abcdefghijklmnopqrstuvwxyz"; - $newid = ""; - for ($i = 1; $i <= $randlen; $i++) - { - $newid .= substr($randval, rand(0,(strlen($randval) - 1)), 1); - } - session_id( $newid ); - } - elseif( version_compare(phpversion(),"4.3.2","==") ) - { - session_regenerate_id(); - - // Bug in PHP 4.3.2: Session-Cookie wird nicht neu gesetzt. - if ( ini_get("session.use_cookies") ) - $this->setCookie( session_name(),session_id() ); - } - elseif ( version_compare(phpversion(),"5.1.0",">") ) - { - session_regenerate_id(true); - } - else - { - // 5.1.0 > PHP >= 4.3.3 - } - } - - - - - - - /** - * Ermittelt die letzten Änderungen, die durch den aktuellen Benutzer im aktuellen Projekt gemacht worden sind. - */ - public function userprojecttimelineView() - { - //$project = Session::getProject(); - //$result = $project->getMyLastChanges(); - $result = array(); - - $this->setTemplateVar('timeline', $result); - } - - -} - - -?>- \ No newline at end of file diff --git a/modules/cms/ui/themes/default/html/views/start/applications.php b/modules/cms/ui/themes/default/html/views/start/applications.php @@ -1,32 +0,0 @@ -<?php /* THIS FILE IS GENERATED from applications.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> - <div class="<?php echo O::escapeHtml('or-table-wrapper') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-table-filter') ?>"><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('search') ?>" name="<?php echo O::escapeHtml('filter') ?>" placeholder="<?php echo O::escapeHtml(''.@O::lang('SEARCH_FILTER').'') ?>" class="<?php echo O::escapeHtml('or-input or-table-filter-input') ?>" /><?php echo O::escapeHtml('') ?> - </div> - <div class="<?php echo O::escapeHtml('or-table-area') ?>"><?php echo O::escapeHtml('') ?> - <table width="<?php echo O::escapeHtml('100%') ?>" class="<?php echo O::escapeHtml('or-table') ?>"><?php echo O::escapeHtml('') ?> - <tr class="<?php echo O::escapeHtml('or-data') ?>"><?php echo O::escapeHtml('') ?> - <td colspan="<?php echo O::escapeHtml('2') ?>"><?php echo O::escapeHtml('') ?> - <a target="<?php echo O::escapeHtml('_self') ?>" data-action="<?php echo O::escapeHtml('index') ?>" data-method="<?php echo O::escapeHtml('projectmenu') ?>" data-id="<?php echo O::escapeHtml('') ?>" data-extra="<?php echo O::escapeHtml('[]') ?>" href="<?php echo O::escapeHtml('#/index') ?>" class="<?php echo O::escapeHtml('or-link') ?>"><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml('OpenRat') ?> - </span> - </a> - </td> - </tr> - <?php foreach((array)$applications as $list_key=>$list_value) { extract($list_value); ?> - <tr class="<?php echo O::escapeHtml('or-data') ?>"><?php echo O::escapeHtml('') ?> - <td><?php echo O::escapeHtml('') ?> - <a target="<?php echo O::escapeHtml('_self') ?>" data-url="<?php echo O::escapeHtml(''.@$url.'') ?>" data-action="<?php echo O::escapeHtml('') ?>" data-method="<?php echo O::escapeHtml('') ?>" data-id="<?php echo O::escapeHtml('') ?>" data-extra="<?php echo O::escapeHtml('[]') ?>" href="<?php echo O::escapeHtml('') ?>" class="<?php echo O::escapeHtml('or-link') ?>"><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@$name.'') ?> - </span> - </a> - </td> - <td><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@$description.'') ?> - </span> - </td> - </tr> - <?php } ?> - </table> - </div> - </div>- \ No newline at end of file diff --git a/modules/cms/ui/themes/default/html/views/start/applications.tpl.src.xml b/modules/cms/ui/themes/default/html/views/start/applications.tpl.src.xml @@ -1,23 +0,0 @@ -<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../../../../../../../template_engine/components/template.xsd"> - <table> - <row class="data"> - <column colspan="2"> - <link action="index" subaction="projectmenu"> - <text value="OpenRat"/> - </link> - </column> - </row> - <list list="${applications}" extract="true"> - <row class="data"> - <column> - <link url="${url}"> - <text value="${name}"/> - </link> - </column> - <column> - <text value="${description}"/> - </column> - </row> - </list> - </table> -</output> diff --git a/modules/cms/ui/themes/default/html/views/start/projectmenu.php b/modules/cms/ui/themes/default/html/views/start/projectmenu.php @@ -1,109 +0,0 @@ -<?php /* THIS FILE IS GENERATED from projectmenu.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> - <div class="<?php echo O::escapeHtml('or-table-wrapper') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-table-filter') ?>"><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('search') ?>" name="<?php echo O::escapeHtml('filter') ?>" placeholder="<?php echo O::escapeHtml(''.@O::lang('SEARCH_FILTER').'') ?>" class="<?php echo O::escapeHtml('or-input or-table-filter-input') ?>" /><?php echo O::escapeHtml('') ?> - </div> - <div class="<?php echo O::escapeHtml('or-table-area') ?>"><?php echo O::escapeHtml('') ?> - <table width="<?php echo O::escapeHtml('100%') ?>" class="<?php echo O::escapeHtml('or-table') ?>"><?php echo O::escapeHtml('') ?> - <tr><?php echo O::escapeHtml('') ?> - <td colspan="<?php echo O::escapeHtml('2') ?>" class="<?php echo O::escapeHtml('or-logo') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-logo') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-logo-icon') ?>"><?php echo O::escapeHtml('') ?> - <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--method-projectmenu') ?>"><?php echo O::escapeHtml('') ?> - </i> - </div> - <div class="<?php echo O::escapeHtml('or-logo-description') ?>"><?php echo O::escapeHtml('') ?> - <h2 class="<?php echo O::escapeHtml('or-logo-headline') ?>"><?php echo O::escapeHtml(''.@O::lang('logo_projectmenu').'') ?> - </h2> - <p class="<?php echo O::escapeHtml('or-logo-text') ?>"><?php echo O::escapeHtml(''.@O::lang('logo_projectmenu_text').'') ?> - </p> - </div> - </div> - </td> - </tr> - <tr class="<?php echo O::escapeHtml('or-headline') ?>"><?php echo O::escapeHtml('') ?> - <td><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@O::lang('project').'') ?> - </span> - </td> - </tr> - <?php foreach((array)$projects as $list_key=>$list_value) { extract($list_value); ?> - <tr class="<?php echo O::escapeHtml('or-data') ?>"><?php echo O::escapeHtml('') ?> - <td class="<?php echo O::escapeHtml('or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> - <a title="<?php echo O::escapeHtml(''.@O::lang('TREE_CHOOSE_PROJECT').'') ?>" target="<?php echo O::escapeHtml('_self') ?>" data-type="<?php echo O::escapeHtml('post') ?>" data-action="<?php echo O::escapeHtml('') ?>" data-method="<?php echo O::escapeHtml('') ?>" data-id="<?php echo O::escapeHtml(''.@$id.'') ?>" data-extra="<?php echo O::escapeHtml('[]') ?>" data-data="<?php echo O::escapeHtml('{"action":"start","subaction":"projectmenu","id":"'.@$id.'","token":"'.@$_token.'","none":"0"}') ?>" class="<?php echo O::escapeHtml('or-link') ?>"><?php echo O::escapeHtml('') ?> - <?php { $project= project; ?> - <?php } ?> - <img src="<?php echo O::escapeHtml('./modules/cms/ui/themes/default/images/icon_project.png') ?>" /><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@$name.'') ?> - </span> - </a> - <div class="<?php echo O::escapeHtml('or-onrowvisible') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-arrow-down') ?>"><?php echo O::escapeHtml('') ?> - </div> - <div class="<?php echo O::escapeHtml('or-dropdown') ?>"><?php echo O::escapeHtml('') ?> - <form name="<?php echo O::escapeHtml('') ?>" target="<?php echo O::escapeHtml('_self') ?>" data-target="<?php echo O::escapeHtml('view') ?>" action="<?php echo O::escapeHtml('./') ?>" data-method="<?php echo O::escapeHtml('project') ?>" data-action="<?php echo O::escapeHtml('index') ?>" data-id="<?php echo O::escapeHtml(''.@$id.'') ?>" method="<?php echo O::escapeHtml('POST') ?>" enctype="<?php echo O::escapeHtml('application/x-www-form-urlencoded') ?>" data-async="<?php echo O::escapeHtml('') ?>" data-autosave="<?php echo O::escapeHtml('') ?>" class="<?php echo O::escapeHtml('or-form or-index') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-form-headline') ?>"><?php echo O::escapeHtml('') ?> - </div> - <div class="<?php echo O::escapeHtml('or-form-content') ?>"><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('token') ?>" value="<?php echo O::escapeHtml(''.@$_token.'') ?>" /><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('action') ?>" value="<?php echo O::escapeHtml('index') ?>" /><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('subaction') ?>" value="<?php echo O::escapeHtml('project') ?>" /><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('hidden') ?>" name="<?php echo O::escapeHtml('id') ?>" value="<?php echo O::escapeHtml(''.@$id.'') ?>" /><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-table-wrapper') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-table-filter') ?>"><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('search') ?>" name="<?php echo O::escapeHtml('filter') ?>" placeholder="<?php echo O::escapeHtml(''.@O::lang('SEARCH_FILTER').'') ?>" class="<?php echo O::escapeHtml('or-input or-table-filter-input') ?>" /><?php echo O::escapeHtml('') ?> - </div> - <div class="<?php echo O::escapeHtml('or-table-area') ?>"><?php echo O::escapeHtml('') ?> - <table width="<?php echo O::escapeHtml('100%') ?>" class="<?php echo O::escapeHtml('or-table') ?>"><?php echo O::escapeHtml('') ?> - <tr><?php echo O::escapeHtml('') ?> - <td><?php echo O::escapeHtml('') ?> - <?php foreach( $models as $_key=>$_value) { ?> - <label><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('radio') ?>" name="<?php echo O::escapeHtml('modelid') ?>" value="<?php echo O::escapeHtml(''.@$_key.'') ?>" <?php if($_key==${defaultmodelid}){ ?>checked="<?php echo O::escapeHtml('checked') ?>"<?php } ?> /><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@$_value.'') ?> - </span> - </label> - <br /><?php echo O::escapeHtml('') ?> - <?php } ?> - </td> - <td><?php echo O::escapeHtml('') ?> - <?php foreach( $languages as $_key=>$_value) { ?> - <label><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('radio') ?>" name="<?php echo O::escapeHtml('languageid') ?>" value="<?php echo O::escapeHtml(''.@$_key.'') ?>" <?php if($_key==${defaultlanguageid}){ ?>checked="<?php echo O::escapeHtml('checked') ?>"<?php } ?> /><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@$_value.'') ?> - </span> - </label> - <br /><?php echo O::escapeHtml('') ?> - <?php } ?> - </td> - <td><?php echo O::escapeHtml('') ?> - - </td> - </tr> - </table> - </div> - </div> - </div> - <div class="<?php echo O::escapeHtml('or-form-actionbar') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-btn or-btn--secondary or-act-form-cancel') ?>"><?php echo O::escapeHtml('') ?> - <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--form-cancel') ?>"><?php echo O::escapeHtml('') ?> - </i> - <span class="<?php echo O::escapeHtml('or-form-btn-label') ?>"><?php echo O::escapeHtml(''.@O::lang('CANCEL').'') ?> - </span> - </div> - <div class="<?php echo O::escapeHtml('or-btn or-btn--primary or-act-form-save') ?>"><?php echo O::escapeHtml('') ?> - <i class="<?php echo O::escapeHtml('or-image-icon or-image-icon--form-ok') ?>"><?php echo O::escapeHtml('') ?> - </i> - <span class="<?php echo O::escapeHtml('or-form-btn-label') ?>"><?php echo O::escapeHtml(''.@O::lang('button_ok').'') ?> - </span> - </div> - </div> - </form> - </div> - </div> - </td> - </tr> - <?php } ?> - </table> - </div> - </div>- \ No newline at end of file diff --git a/modules/cms/ui/themes/default/html/views/start/projectmenu.tpl.src.xml b/modules/cms/ui/themes/default/html/views/start/projectmenu.tpl.src.xml @@ -1,45 +0,0 @@ -<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../../../../../../../template_engine/components/template.xsd"> - <table> - <row> - <column class="logo" colspan="2"> - <logo name="projectmenu"/> - </column> - </row> - <row class="headline"> - <column> - <text value="${message:project}"/> - </column> - </row> - <list list="${projects}" extract="true"> - <row class="data"> - <column class="act-clickable"> - <link type="post" id="${id}" title="${message:TREE_CHOOSE_PROJECT}"> - <set var="project" value="project"/> - <image type="project"/> - <text value="${name}" maxlength="30"/> - </link> - <part class="onrowvisible"> - <part class="arrow-down"/> - <part class="dropdown"> - <form action="index" subaction="project" id="${id}"> - <table widths="150px,150px"> - <row> - <column> - <radiobox list="models" name="modelid" default="${defaultmodelid}"/> - </column> - <column> - <radiobox list="languages" name="languageid" default="${defaultlanguageid}"/> - </column> - <column> - <button type="ok" text="${message:start}"/> - </column> - </row> - </table> - </form> - </part> - </part> - </column> - </row> - </list> - </table> -</output> diff --git a/modules/cms/ui/themes/default/html/views/start/userprojecttimeline.php b/modules/cms/ui/themes/default/html/views/start/userprojecttimeline.php @@ -1,58 +0,0 @@ -<?php /* THIS FILE IS GENERATED from userprojecttimeline.tpl.src.xml - DO NOT CHANGE */ defined('APP_STARTED') || die('Forbidden'); use \template_engine\Output as O; ?> - <div class="<?php echo O::escapeHtml('or-table-wrapper') ?>"><?php echo O::escapeHtml('') ?> - <div class="<?php echo O::escapeHtml('or-table-filter') ?>"><?php echo O::escapeHtml('') ?> - <input type="<?php echo O::escapeHtml('search') ?>" name="<?php echo O::escapeHtml('filter') ?>" placeholder="<?php echo O::escapeHtml(''.@O::lang('SEARCH_FILTER').'') ?>" class="<?php echo O::escapeHtml('or-input or-table-filter-input') ?>" /><?php echo O::escapeHtml('') ?> - </div> - <div class="<?php echo O::escapeHtml('or-table-area') ?>"><?php echo O::escapeHtml('') ?> - <table width="<?php echo O::escapeHtml('100%') ?>" class="<?php echo O::escapeHtml('or-table') ?>"><?php echo O::escapeHtml('') ?> - <tr class="<?php echo O::escapeHtml('or-headline') ?>"><?php echo O::escapeHtml('') ?> - <td><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@O::lang('name').'') ?> - </span> - </td> - <td><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@O::lang('filename').'') ?> - </span> - </td> - <td><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@O::lang('lastchange').'') ?> - </span> - </td> - </tr> - <?php foreach((array)$timeline as $list_key=>$list_value) { extract($list_value); ?> - <?php $if4=($typeid=='1'); if($if4) { ?> - <?php { $type= folder; ?> - <?php } ?> - <?php } ?> - <?php $if4=($typeid=='2'); if($if4) { ?> - <?php { $type= file; ?> - <?php } ?> - <?php } ?> - <?php $if4=($typeid=='4'); if($if4) { ?> - <?php { $type= link; ?> - <?php } ?> - <?php } ?> - <?php $if4=($typeid=='3'); if($if4) { ?> - <?php { $type= page; ?> - <?php } ?> - <?php } ?> - <tr class="<?php echo O::escapeHtml('or-data') ?>"><?php echo O::escapeHtml('') ?> - <td class="<?php echo O::escapeHtml('or-act-clickable') ?>"><?php echo O::escapeHtml('') ?> - <a target="<?php echo O::escapeHtml('_self') ?>" date-name="<?php echo O::escapeHtml(''.@$name.'') ?>" name="<?php echo O::escapeHtml(''.@$name.'') ?>" data-type="<?php echo O::escapeHtml('open') ?>" data-action="<?php echo O::escapeHtml(''.@$type.'') ?>" data-method="<?php echo O::escapeHtml('') ?>" data-id="<?php echo O::escapeHtml(''.@$objectid.'') ?>" data-extra="<?php echo O::escapeHtml('[]') ?>" href="<?php echo O::escapeHtml('#/'.@$type.'/'.@$objectid.'') ?>" class="<?php echo O::escapeHtml('or-link') ?>"><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@$name.'') ?> - </span> - </a> - </td> - <td><?php echo O::escapeHtml('') ?> - <span><?php echo O::escapeHtml(''.@$filename.'') ?> - </span> - </td> - <td><?php echo O::escapeHtml('') ?> - <?php include_once( 'modules/template_engine/components/html/component_date/component-date.php'); { component_date($lastchange_date); ?> - <?php } ?> - </td> - </tr> - <?php } ?> - </table> - </div> - </div>- \ No newline at end of file diff --git a/modules/cms/ui/themes/default/html/views/start/userprojecttimeline.tpl.src.xml b/modules/cms/ui/themes/default/html/views/start/userprojecttimeline.tpl.src.xml @@ -1,43 +0,0 @@ -<output xmlns="http://www.openrat.de/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openrat.de/template ../../../../../../../template_engine/components/template.xsd"> - <table> - <row class="headline"> - <column> - <text value="${message:name}"/> - </column> - <column> - <text value="${message:filename}"/> - </column> - <column> - <text value="${message:lastchange}"/> - </column> - </row> - <list list="${timeline}" extract="true"> - <!-- Den Typ des Objektes ermitteln --> - <if value="${typeid}" equals="1"> - <set var="type" value="folder"/> - </if> - <if value="${typeid}" equals="2"> - <set var="type" value="file"/> - </if> - <if value="${typeid}" equals="4"> - <set var="type" value="link"/> - </if> - <if value="${typeid}" equals="3"> - <set var="type" value="page"/> - </if> - <row class="data"> - <column class="act-clickable"> - <link type="open" name="${name}" id="${objectid}" action="${type}"> - <text value="${name}" maxlength="30"/> - </link> - </column> - <column> - <text value="${filename}" maxlength="30"/> - </column> - <column> - <date date="${lastchange_date}"/> - </column> - </row> - </list> - </table> -</output>