This repository has been archived on 2025-04-04. You can view files and clone it, but cannot push or open issues or pull requests.
2016-04-18 01:43:35 +02:00

47 lines
2.4 KiB
PHP

<?php
class default_page extends \SYSTEM\PAGE\Page {
private static function js(){
return \SYSTEM\HTML\html::script(\LIB\lib_jquery::js()->WEBPATH()).
\SYSTEM\HTML\html::script(\LIB\lib_bootstrap::js()->WEBPATH()).
\SYSTEM\HTML\html::script(\LIB\lib_jqbootstrapvalidation::js()->WEBPATH()).
\SYSTEM\HTML\html::script(\LIB\lib_system::js()->WEBPATH()).
\SYSTEM\HTML\html::script(\LIB\lib_tinymce::js()->WEBPATH(false)).
\SYSTEM\HTML\html::script((new PPAGE('default_page/js/default_page.js'))->WEBPATH());
}
private static function css(){
return \SYSTEM\HTML\html::link(\LIB\lib_bootstrap::css()->WEBPATH(false)).
\SYSTEM\HTML\html::link((new PPAGE('default_page/css/default_page.css'))->WEBPATH());
}
public function getloggedinform(){
return \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/login/loggedinform.tpl'))->SERVERPATH(), array());}
public function exchange_registerform(){
return \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/login/register_form.tpl'))->SERVERPATH(), array());}
public function getloginform(){
return \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/login/loginform.tpl'))->SERVERPATH(), array());}
public function exchange_loginform(){
return \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/login/loggedinformtop.tpl'))->SERVERPATH(), array());}
public function html($_escaped_fragment_ = null){
$vars = array();
if (\SYSTEM\SECURITY\Security::isLoggedIn()){
$vars['menu_account_display_class'] = 'style="display: block"';
$vars['registerform'] = $this->getloggedinform();
$vars['loginform'] = $this->exchange_loginform();
}
else {
$vars['menu_account_display_class'] = 'style="display: none"';
$vars['registerform'] = $this->exchange_registerform();
$vars['loginform'] = $this->getloginform() ;
}
$vars['js'] = '';
if(!$_escaped_fragment_){
$vars['js'] = self::js();}
$vars['css'] = self::css();
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('basic'));
return SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/default_page.tpl'))->SERVERPATH(), $vars);
}
}