Einchecken des OnlineStands

This commit is contained in:
2016-09-07 14:36:03 +00:00
parent feed788c84
commit 53295535eb
241 changed files with 69161 additions and 0 deletions

View File

@@ -0,0 +1,135 @@
<?php
require_once ( 'viewClass_abstract.php' );
class viewClass extends viewClass_abstract
{
private $_config = array( );
private $_prefix = '';
private $_pathTpl = '';
private $_template = '';
private $_siteId = 0;
private $_editable = false;
private $_webkey = 0;
private $_website = array( );
private $_navpath = array( );
private $_data = array( );
private $_param = null;
private $_specialSite = false;
private $_formdata = array( );
private $_error = array( );
private $_lang = array( );
public function setConfig( $config )
{
$this -> _config = $config;
if ( isset ( $this -> _config[ 'portal' ][ 'website' ] ) )
{
$this -> setWebsite ( $this -> _config[ 'portal' ][ 'website' ] );
}
}
private function setWebsite( $website )
{
$return_array = array ( );
$tmp_array = array_flip ( $website[ 'navId' ] );
foreach ( $tmp_array as $key => $value )
{
foreach ( $website as $tmp_key => $tmp_value )
{
$return_array[ $key ][ $tmp_key ] = $website[ $tmp_key ][ $value ];
}
}
$this -> _website = $return_array;
}
public function setPrefix( $prefix )
{
$this -> _prefix = $prefix;
}
public function setPathTpl( $pathTpl )
{
if ( is_dir ( $pathTpl . $this -> _prefix ) )
{
$this -> _pathTpl = $pathTpl . $this -> _prefix . '/';
}
else
{
throw new Exception( 'Template Path does not exist' );
}
}
public function setTemplate( $template )
{
if ( file_exists ( $this -> _pathTpl . 'tpl_' . $template . '.php' ) )
{
$this -> _template = $this -> _pathTpl . 'tpl_' . $template . '.php';
}
else
{
throw new Exception( 'Template "' . $this -> _pathTpl . 'tpl_' . $template . '.php" does not exist' );
}
}
public function setSiteId( $siteId )
{
$this -> _siteId = $siteId;
}
public function setEditable( $editable )
{
$this -> _editable = $editable;
}
public function setErrors( $error )
{
$this -> _error = $error;
}
public function setWebkey( $webkey )
{
$this -> _webkey = $webkey;
}
public function setNavpath( $navpath )
{
$this -> _navpath = $navpath;
}
public function setData( $data , $param = null )
{
$this -> _data = $data;
$this -> _param = $param;
}
public function setSpecialSite( $specialSite )
{
$this -> _specialSite = $specialSite;
}
public function setFormdata( $formdata )
{
$this -> _formdata = $formdata;
}
public function setError( $error )
{
$this -> _error = $error;
}
public function setLang( $lang )
{
$this -> _lang = $lang;
}
public function output( )
{
ob_start( );
require $this -> _template;
return ob_get_clean( );
}
}
?>

View File

@@ -0,0 +1,34 @@
<?php
class viewClass_abstract
{
protected static $_instance = null;
/**
* Konstruktor
*/
public function __construct( )
{
$this -> _instance = $this;
}
/**
* Destruktor
*/
public function __destruct( )
{
}
public function getInstance( )
{
if ( ! isset( self::$_instance ) )
{
$class = __CLASS__;
$instance = new $class;
}
return self::$_instance;
}
}
?>