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,244 @@
<?php
session_start( );
define ( 'PATH_ROOT' , '../../../' );
include_once ( PATH_ROOT . '.config/config_global.php' );
require_once ( PATH_CLS . 'rendering/viewClass.php' );
/* Funktionen und Aktionen einbinden */
include_once ( PATH_FNC . 'fnc_portal.php' );
/* Variablen aufbereiten */
$editable = false;
$_GET[ 'navId' ] = ( isset ( $_GET[ 'navId' ] ) && ! empty ( $_GET[ 'navId' ] ) )
? $_GET[ 'navId' ]
: '1';
$web_key = array_search ( $_GET[ 'siteId' ] , $vC[ 'portal' ][ 'website' ][ 'navId' ] );
$prefix = ( $web_key !== false )
? $vC[ 'portal' ][ 'website' ][ 'prefix' ][ $web_key ]
: '';
$pathWay = ( $prefix !== '' )
? fnc_createPathHome ( $prefix , $_GET[ 'navId' ] )
: array ( );
/* Portal Zugriffsrechte prüfen */
include_once ( PATH_INC . 'portal_rights.php' );
/* Website Bearbeitungsrechte prüfen */
include_once ( PATH_INC . 'website_rights.php' );
/* Template - Definitionen einbinden */
include_once ( PATH_WEBSITE_TPL . $prefix . '/tpl_definitions.php' );
/* Daten für Template aufbereiten */
$navComplete = fnc_getNavigationArray ( $prefix );
$arr_navs = fnc_getSingleNavigationArrays ( $prefix , $navComplete , $def , $pathWay );
$specialSite = fnc_getNavType ( $prefix , $_GET[ 'navId' ] );
$navpointData = $db -> query
(
'SELECT
*
FROM
' . $prefix . '_' . TBL_NAVI . '
WHERE
' . $prefix . '_navId = "' . $_GET[ 'navId' ] . '";'
);
$navpoint = $navpointData -> fetch_assoc ( );
if ( ! is_null ( $navpoint[ $prefix . '_keyvisual' ] ) )
{
/* Keyvisual */
$keyvisualData = $db -> query
(
'SELECT
*
FROM
' . $prefix . '_' . TBL_IMAGE . '
WHERE
id = "' . $navpoint[ $prefix . '_keyvisual' ] . '";'
);
$keyvisual = $keyvisualData -> fetch_assoc ( );
$data[ 'keyvisual' ][ ] = array ( 'id' => $keyvisual[ 'id' ] , 'path' => PATH_MED . $prefix . '/' . $_GET[ 'navId' ] . '/' , 'src' => $keyvisual[ 'imgName' ] . '.' . $keyvisual[ 'imgExtension' ] , 'title' => $keyvisual[ 'imgTitle' ] );
$data[ 'galery' ][ ] = array ( 'id' => $keyvisual[ 'id' ] , 'path' => PATH_MED . $prefix . '/' . $_GET[ 'navId' ] . '/' , 'src' => $keyvisual[ 'imgName' ] . '_orig.' . $keyvisual[ 'imgExtension' ] , 'title' => $keyvisual[ 'imgTitle' ] );
/* Slider - Daten */
if ( $keyvisual[ 'sliderContent' ] !== '' )
{
$sliders = explode ( ';' , $keyvisual[ 'sliderContent' ] );
foreach ( $sliders as $imageId )
{
$imageData = $db -> query
(
'SELECT
*
FROM
' . $prefix . '_' . TBL_IMAGE . '
WHERE
id = "' . $imageId . '";'
);
$image = $imageData -> fetch_assoc ( );
$data[ 'keyvisual' ][ ] = array ( 'id' => $image[ 'id' ] , 'path' => PATH_MED . $prefix . '/' . $_GET[ 'navId' ] . '/' , 'src' => $image[ 'imgName' ] . '.' . $image[ 'imgExtension' ] , 'title' => $image[ 'imgTitle' ] );
$data[ 'galery' ][ ] = array ( 'id' => $image[ 'id' ] , 'path' => PATH_MED . $prefix . '/' . $_GET[ 'navId' ] . '/' , 'src' => $image[ 'imgName' ] . '_orig.' . $image[ 'imgExtension' ] , 'title' => $image[ 'imgTitle' ] );
}
}
}
else
{
$data[ 'keyvisual' ][ ] = array ( 'id' => null , 'path' => PATH_MED . $prefix . '/' , 'navId' => '' , 'src' => 'keyvisual_0.jpg' , 'title' => null );
}
if ( $specialSite !== false )
{
if ( $specialSite === 'uebersicht' )
{
$contents = $db -> query
(
'SELECT
*
FROM
' . $prefix . '_' . TBL_NAVI . '
WHERE
' . $prefix . '_navStart = "' . $_GET[ 'navId' ] . '"
ORDER BY
' . $prefix . '_navSort ASC;'
);
while ( $content = $contents -> fetch_assoc ( ) )
{
$tmp_content[ 'headline' ] = $content[ $prefix . '_navName' ];
$tmp_content[ 'link' ] = $content[ $prefix . '_navTarget' ];
$tmp_special = fnc_getNavType ( $prefix , $content[ $prefix . '_navId' ] );
if ( $tmp_special !== false )
{
$sub_contents = $db -> query
(
'SELECT
*
FROM
' . $prefix . '_' . $tmp_special . '
WHERE
siteId = "' . $content[ $prefix . '_navId' ] . '";'
);
if ( $sub_contents === false )
{
continue;
}
$sub_content = $sub_contents -> fetch_assoc ( );
$sub_content[ 'type' ] = $tmp_special;
}
$data[ 'content' ][ 'uebersicht' ][ ] = $sub_content;
}
}
elseif ( $specialSite === 'spielbericht' )
{
$contents = $db -> query
(
'SELECT
*
FROM
' . $prefix . '_' . $specialSite . '
WHERE
siteId = "' . $_GET[ 'navId' ] . '";'
);
$content = $contents -> fetch_assoc ( );
$dateTime = DateTime::createFromFormat ( 'Y-m-d' , $content[ 'datum' ] );
$data[ 'content' ][ 'spielbericht' ] = $content;
}
elseif ( $specialSite === 'turnier' )
{
$contents = $db -> query
(
'SELECT
*
FROM
' . $prefix . '_' . $specialSite . '
WHERE
siteId = "' . $_GET[ 'navId' ] . '";'
);
$content = $contents -> fetch_assoc ( );
$dateTime = DateTime::createFromFormat ( 'Y-m-d' , $content[ 'datum' ] );
$data[ 'content' ][ 'turnier' ] = $content;
}
elseif ( $specialSite === 'widget' )
{
$contents = $db -> query
(
'SELECT
*
FROM
' . $prefix . '_' . $specialSite . '
WHERE
siteId = "' . $_GET[ 'navId' ] . '";'
);
if ( $contents -> num_rows !== 0 )
{
$content = $contents -> fetch_assoc ( );
$data[ 'content' ][ 'widget' ] = array ( 'id' => $content[ 'id' ] , 'tpl' => $content[ 'widget' ] , 'schluessel' => $vC[ 'portal' ][ 'website' ][ $content[ 'widget' ] ][ $web_key ] , 'wettbewerb' => $content[ 'wettbewerb' ] );
}
}
}
else
{
$contents = $db -> query
(
'SELECT
*
FROM
' . $prefix . '_content
WHERE
siteId = "' . $_GET[ 'navId' ] . '";'
);
if ( $contents -> num_rows !== 0 )
{
$content = $contents -> fetch_assoc ( );
if ( $content[ 'siteContents' ] !== '' )
{
$data[ 'content' ][ 'pageContents' ] = fnc_getSiteContents( $content[ 'siteContents' ] , $prefix );
foreach ( $data[ 'content' ][ 'pageContents' ] as $tmp_content )
{
if ( isset( $tmp_content[ 'type' ] ) && $tmp_content[ 'type' ] === 'textimage' )
{
$data[ 'galery' ][ ] = array ( 'id' => $tmp_content[ 'content_image_id' ] , 'path' => PATH_MED . $prefix . '/' . $_GET[ 'navId' ] . '/' , 'src' => $tmp_content[ 'imgName' ] . '_orig.' . $tmp_content[ 'imgExtension' ] , 'title' => $tmp_content[ 'imgTitle' ] );
}
}
}
}
}
foreach ( $arr_navs as $key => $value )
{
if ( $value !== null )
{
$data[ $def[ 'navPostion' ][ $key ] ] = $value;
}
}
/* Template rendern */
$render = new viewClass ( );
$render -> setConfig ( $vC );
$render -> setPrefix ( $prefix );
$render -> setPathTpl ( PATH_WEBSITE_TPL );
$render -> setLang ( $lang[ 'website' ] );
$render -> setTemplate ( 'main' );
if ( $specialSite !== false )
{
$render -> setSpecialSite ( true );
}
$render -> setSiteId ( $_GET[ 'navId' ] );
$render -> setEditable ( $editable );
$render -> setWebkey ( $_GET[ 'siteId' ] );
$render -> setData ( $data );
$render -> setNavpath ( $pathWay );
$html = $render -> output ( );
$html = str_replace ( array ( 'PHP_ROOT_PATH/' , 'PHP_SITE_PATH/' ) , array ( PATH_ROOT , PATH_SITE ) , $html );
// $html = str_replace ( array ( "\r" , "\n" , "\t" ) , array ( '' , '' , '' ) , $html );
echo $html;
?>

View File

@@ -0,0 +1,79 @@
<?php
session_start( );
define ( 'PATH_ROOT' , '../../../' );
include_once ( PATH_ROOT . '.config/config_global.php' );
require_once ( PATH_CLS . 'rendering/viewClass.php' );
/* Funktionen und Aktionen einbinden */
include_once ( PATH_FNC . 'fnc_portal.php' );
/* Variablen aufbereiten */
$_GET[ 'siteId' ] = '100';
$_GET[ 'year' ] = ( isset ( $_GET[ 'year' ] ) && ! empty ( $_GET[ 'year' ] ) )
? $_GET[ 'year' ]
: date ( 'Y' );
$_GET[ 'month' ] = ( isset ( $_GET[ 'month' ] ) && ! empty ( $_GET[ 'month' ] ) )
? $_GET[ 'month' ]
: date ( 'n' );
$_GET[ 'orderBy' ] = ( isset ( $_GET[ 'orderBy' ] ) && ! empty ( $_GET[ 'orderBy' ] ) )
? $_GET[ 'orderBy' ]
: 'logTS';
$_GET[ 'orderDir' ] = ( isset ( $_GET[ 'orderDir' ] ) && ! empty ( $_GET[ 'orderDir' ] ) )
? $_GET[ 'orderDir' ]
: 'DESC';
$sort = array( );
/* Portal Zugriffsrechte prüfen */
include_once ( PATH_INC . 'portal_rights.php' );
/* Daten für Template aufbereiten */
$content = $db -> query ( 'SELECT * FROM ' . TBL_LOG . ' WHERE YEAR ( logTS ) = "' . $_GET[ 'year' ] . '" AND MONTH ( logTS ) = "' . $_GET[ 'month' ] . '" ORDER BY ' . $_GET[ 'orderBy' ] . ' ' . $_GET[ 'orderDir' ] . ';' );
while ( $tmp_content = $content -> fetch_assoc ( ) )
{
$tmp_content[ 'logEntry' ] = fnc_readLog ( $lang[ 'log' ][ $tmp_content[ 'logEntry' ] ] , $tmp_content[ 'logParams' ] );
$tmp_content[ 'logUser' ] = fnc_getUsernameById ( $tmp_content[ 'logUser' ] );
$tmp_content[ 'logTS' ] = fnc_getTimeByTS ( $tmp_content[ 'logTS' ] );
$sort[ ] = $tmp_content[ $_GET[ 'orderBy' ] ];
$data[ 'sub_content' ][ 'main' ][ ] = $tmp_content;
}
if ( $_GET[ 'orderBy' ] === 'logUser' )
{
$order = ( $_GET[ 'orderDir' ] === 'DESC' )
? SORT_DESC
: SORT_ASC;
array_multisort( $sort , $order , $data[ 'sub_content' ][ 'main' ] );
}
$year = $db -> query ( 'SELECT YEAR ( logTS ) AS firstYear FROM ' . TBL_LOG . ' ORDER BY logTS ASC LIMIT 1; ' );
$tmp_year = $year -> fetch_assoc ( );
$tmp_year = $tmp_year[ 'firstYear' ];
for ( $tmp_year ; $tmp_year <= date ( 'Y' ) ; $tmp_year++ )
{
$data[ 'sub_content' ][ 'header' ][ 'year' ][ $tmp_year ] = $tmp_year;
}
for ( $month = 1; $month <= 12 ; $month++ )
{
$data[ 'sub_content' ][ 'header' ][ 'month' ][ $month ] = $lang[ 'month' ][ $month ];
}
/* Template rendern */
$render = new viewClass ( );
$render -> setPrefix ( $vC[ 'portal' ][ 'layout' ] );
$render -> setPathTpl ( PATH_PORTAL_TPL );
$render -> setConfig ( $vC );
$render -> setTemplate ( 'logfiles' );
$render -> setEditable ( false );
$render -> setData ( $data );
$render -> setLang ( $lang[ 'logfiles' ] );
$render -> setFormdata ( array_merge ( $_GET , $_POST ) );
$html = $render -> output ( );
$html = str_replace ( array ( 'PHP_ROOT_PATH/' , 'PHP_SITE_PATH/' ) , array ( PATH_ROOT , PATH_SITE ) , $html );
$html = str_replace ( array ( "\r" , "\n" , "\t" ) , array ( '' , '' , '' ) , $html );
echo $html;
?>

View File

@@ -0,0 +1,177 @@
<?php
session_start( );
define ( 'PATH_ROOT' , '../../../' );
include_once ( PATH_ROOT . '.config/config_global.php' );
require_once ( PATH_CLS . 'rendering/viewClass.php' );
/* Funktionen und Aktionen einbinden */
include_once ( PATH_FNC . 'fnc_portal.php' );
// include_once ( PATH_FNC . 'fnc_usermanagement.php' );
include_once ( PATH_ACT . 'usermanagement_actions.php' );
/* Variablen aufbereiten */
$_GET[ 'siteId' ] = '3';
$_GET[ 'todoId' ] = ( isset ( $_GET[ 'todoId' ] ) && ! empty ( $_GET[ 'todoId' ] ) )
? $_GET[ 'todoId' ]
: '1';
$_GET[ 'filter' ] = ( isset ( $_GET[ 'filter' ] ) && ! empty ( $_GET[ 'filter' ] ) )
? $_GET[ 'filter' ]
: '';
$_GET[ 'orderBy' ] = ( isset ( $_GET[ 'orderBy' ] ) && ! empty ( $_GET[ 'orderBy' ] ) )
? $_GET[ 'orderBy' ]
: 'userName';
$_GET[ 'orderDir' ] = ( isset ( $_GET[ 'orderDir' ] ) && ! empty ( $_GET[ 'orderDir' ] ) )
? $_GET[ 'orderDir' ]
: 'ASC';
$sqlOrder = ( $_GET[ 'orderBy' ] === 'userName' )
? 'userLastname ' . $_GET[ 'orderDir' ] . ' , userFirstname ' . $_GET[ 'orderDir' ]
: $_GET[ 'orderBy' ] . ' ' . $_GET[ 'orderDir' ];
$dataParameter = array
(
'1' => array ( 'dataEditing' => 'userId' )
);
$arr_todoIds = array
(
'1' => 'overview' , /* Übersicht */
'2' => 'create' , /* Benutzer anlegen */
'3' => 'activate' , /* Benutzer aktivieren */
'4' => 'deactivate' , /* Benutzer deaktivieren */
'5' => 'edit' , /* Benutzer bearbeiten */
'6' => 'delete' , /* Benutzer löschen */
'7' => 'pwreset' /* Passwort zurücksetzen */
);
$form_data = null;
$lang[ 'usermanagement' ][ 'error' ] = $lang[ 'error' ];
/* Portal Zugriffsrechte prüfen */
include_once ( PATH_INC . 'portal_rights.php' );
/* Daten für Template aufbereiten */
if ( $_GET[ 'todoId' ] === '1' )
{
$content = $db -> query ( 'SELECT * FROM ' . TBL_USER . ' WHERE userDelete = "N" AND userId != "1" AND ( userFirstname LIKE "%' . $_GET[ 'filter' ] . '%" OR userLastname LIKE "%' . $_GET[ 'filter' ] . '%" ) ORDER BY ' . $sqlOrder . ';' );
$data[ 'sub_content' ][ 'header' ][ 'filter' ] = $_GET[ 'filter' ];
}
else
{
if ( in_array ( $_GET[ 'todoId' ] , array ( '2' , '5' ) ) )
{
$portalNav = fnc_getNavigationArray ( 'portal' , true , array ( 'main' ) , $lang[ 'navi' ] );
foreach ( $portalNav as $navStart => $navArray )
{
foreach ( $navArray as $key => $value )
{
$websiteKey = array_search ( $value[ 'portal_navId' ] , $vC[ 'portal' ][ 'website' ][ 'navId' ] );
if ( $websiteKey !== false )
{
$portalNav[ $navStart ][ $key ][ 'portal_navName' ] = $vC[ 'portal' ][ 'website' ][ 'names' ][ $websiteKey ];
}
else
{
$portalNav[ $navStart ][ $key ][ 'portal_navName' ] = $lang[ 'navi' ][ 'site_' . $value[ 'portal_navId' ] ];
}
if ( $value[ 'portal_navId' ] === '1' )
{
unset ( $portalNav[ $navStart ][ $key ] );
}
}
}
$data[ 'main' ][ $arr_todoIds[ $_GET[ 'todoId' ] ] ][ 'portal_nav' ] = ( $_SESSION[ 'sess_portalRightsType' ] === 'ALL' )
? $portalNav
: fnc_getPortalNavigationArray ( 'portal' , $portalNav , $_SESSION[ 'sess_portalRights' ] );
if ( ! empty ( $vC[ 'portal' ][ 'website' ][ 'navId' ] ) )
{
foreach ( $vC[ 'portal' ][ 'website' ][ 'navId' ] as $key => $navId )
{
$prefix = $vC[ 'portal' ][ 'website' ][ 'prefix' ][ $key ];
$websiteNav = fnc_getNavigationArray ( $prefix , false );
$data[ 'main' ][ $arr_todoIds[ $_GET[ 'todoId' ] ] ][ 'website_nav' ][ $prefix ] = array ( 'data' => $websiteNav , 'key' => $navId );
}
}
if ( isset ( $_POST ) && ! empty ( $_POST ) )
{
$form_data = $_POST;
}
}
if ( ! in_array ( $_GET[ 'todoId' ] , array ( '2' ) ) )
{
$content = $db -> query ( 'SELECT * FROM ' . TBL_USER . ' WHERE userId = "' . $_GET[ 'userId' ] . '";' );
}
}
if ( isset ( $_POST ) && count ( $_POST ) > 0 )
{
$data[ 'main' ][ $arr_todoIds[ $_GET[ 'todoId' ] ] ][ ] = $_POST;
}
elseif ( isset ( $content ) && $content -> num_rows !== 0 )
{
while ( $tmp_content = $content -> fetch_assoc ( ) )
{
$tmp_content[ 'userCreateUser' ] = fnc_getUsernameById ( $tmp_content[ 'userCreateUser' ] );
$tmp_content[ 'userCreateTS' ] = fnc_getTimeByTS ( $tmp_content[ 'userCreateTS' ] );
$tmp_content[ 'userActiveUser' ] = fnc_getUsernameById ( $tmp_content[ 'userActiveUser' ] );
$tmp_content[ 'userActiveTS' ] = fnc_getTimeByTS ( $tmp_content[ 'userActiveTS' ] );
$tmp_content[ 'user_portalRightsType' ] = $tmp_content[ 'userPortalRightsType' ];
$tmp_content[ 'user_portalRights' ] = explode ( ';' , $tmp_content[ 'userPortalRights' ] );
foreach ( $vC[ 'portal' ][ 'website' ][ 'prefix' ] as $website )
{
$tmp_right = $db -> query ( 'SELECT * FROM ' . TBL_RIGHTS . ' WHERE userId = "' . $tmp_content[ 'userId' ] . '" AND rightsPrefix = "' . $website . '" LIMIT 1;' );
if ( $tmp_right -> num_rows === 0 )
{
$tmp_content[ 'user_' . $website . 'RightsType' ] = 'DEF';
$tmp_content[ 'user_' . $website . 'Rights' ] = '';
}
else
{
$right = $tmp_right -> fetch_assoc ( );
$tmp_content[ 'user_' . $website . 'RightsType' ] = $right[ 'rightsType' ];
$tmp_content[ 'user_' . $website . 'Rights' ] = explode ( ';' , $right[ 'rights' ] );
}
}
$data[ 'main' ][ $arr_todoIds[ $_GET[ 'todoId' ] ] ][ ] = $tmp_content;
$form_data = $tmp_content;
}
}
else
{
$data[ 'main' ][ $arr_todoIds[ $_GET[ 'todoId' ] ] ][ 0 ] = array ( );
}
/* Template rendern */
$render = new viewClass ( );
$render -> setPrefix ( $vC[ 'portal' ][ 'layout' ] );
$render -> setPathTpl ( PATH_PORTAL_TPL );
$render -> setConfig ( $vC );
$render -> setTemplate ( 'usermanagement' );
$render -> setSiteId ( $_GET[ 'siteId' ] );
$render -> setEditable ( false );
$render -> setLang ( $lang[ 'usermanagement' ] );
$render -> setData ( $data );
$render -> setFormdata( $form_data );
if ( isset ( $arrError ) && ! empty ( $arrError ) )
{
$render -> setErrors ( $arrError );
}
$html = $render -> output ( );
$html = str_replace ( array ( 'PHP_ROOT_PATH/' , 'PHP_SITE_PATH/' ) , array ( PATH_ROOT , PATH_SITE ) , $html );
$html = str_replace ( array ( "\r" , "\n" , "\t" ) , array ( '' , '' , '' ) , $html );
echo $html;
?>