Einchecken des OnlineStands
This commit is contained in:
37
.includes/global_header.php
Normal file
37
.includes/global_header.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/* Datenbank-Verbindung herstellen */
|
||||
$db = new mysqli ( DB_HOST , DB_USER , DB_PASS , DB_NAME );
|
||||
$db -> set_charset ( 'utf8' );
|
||||
|
||||
/* Sprachdateien einbinden */
|
||||
if ( ! isset ( $_SESSION[ 'sess_loginLang' ] ) || empty ( $_SESSION[ 'sess_loginLang' ] ) )
|
||||
{
|
||||
include_once ( PATH_LANG . 'lang_' . $vC[ 'portal' ][ 'languages' ][ 0 ] . '.php' );
|
||||
if ( isset ( $vC[ 'portal' ][ 'address' ] ) && file_exists ( PATH_LANG . $vC[ 'portal' ][ 'address' ] . '/lang_' . $vC[ 'portal' ][ 'languages' ][ 0 ] . '.php' ) )
|
||||
{
|
||||
include_once ( PATH_LANG . $vC[ 'portal' ][ 'address' ] . '/lang_' . $vC[ 'portal' ][ 'languages' ][ 0 ] . '.php' );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( file_exists ( PATH_LANG . 'lang_' . $_SESSION[ 'sess_loginLang' ] . '.php' ) )
|
||||
{
|
||||
include_once ( PATH_LANG . 'lang_' . $_SESSION[ 'sess_loginLang' ] . '.php' );
|
||||
if ( isset ( $vC[ 'portal' ][ 'address' ] ) && file_exists ( PATH_LANG . $vC[ 'portal' ][ 'address' ] . '/lang_' . $_SESSION[ 'sess_loginLang' ] . '.php' ) )
|
||||
{
|
||||
include_once ( PATH_LANG . $vC[ 'portal' ][ 'address' ] . '/lang_' . $_SESSION[ 'sess_loginLang' ] . '.php' );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
include_once ( PATH_LANG . 'lang_' . $vC[ 'portal' ][ 'languages' ][ 0 ] . '.php' );
|
||||
if ( isset ( $vC[ 'portal' ][ 'address' ] ) && file_exists ( PATH_LANG . $vC[ 'portal' ][ 'address' ] . '/lang_' . $vC[ 'portal' ][ 'languages' ][ 0 ] . '.php' ) )
|
||||
{
|
||||
include_once ( PATH_LANG . $vC[ 'portal' ][ 'address' ] . '/lang_' . $vC[ 'portal' ][ 'languages' ][ 0 ] . '.php' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
57
.includes/portal_rights.php
Normal file
57
.includes/portal_rights.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
if ( ( is_numeric( $_GET[ 'siteId' ] ) ) && ( intval( $_GET[ 'siteId' ] ) > 1 ) )
|
||||
{
|
||||
if ( ! isset ( $_SESSION[ 'sess_portalRightsType' ] ) )
|
||||
{
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
if ( window.opener )
|
||||
{
|
||||
window.opener.location.reload( );
|
||||
self.close( );
|
||||
}
|
||||
else
|
||||
{
|
||||
self.location.href = 'index.php';
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?php
|
||||
die( );
|
||||
}
|
||||
else if ( $_SESSION[ 'sess_portalRightsType' ] === 'DEF' && ( ! in_array( 'portal_' . $_GET[ 'siteId' ] , $_SESSION[ 'sess_portalRights' ] ) && ! in_array( $_GET['siteId'] , $_SESSION['sess_portalRights'] ) ) )
|
||||
{
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
if ( window.opener )
|
||||
{
|
||||
window.opener.location.reload( );
|
||||
self.close( );
|
||||
}
|
||||
else
|
||||
{
|
||||
self.location.href = 'index.php';
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?php
|
||||
die( );
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
47
.includes/website_header.php
Normal file
47
.includes/website_header.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
$web_key = array_search ( $_GET[ 'siteId' ] , $vC[ 'portal' ][ 'website' ][ 'navId' ] );
|
||||
if ( $web_key === false )
|
||||
{
|
||||
$editable = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$prefix = $vC[ 'portal' ][ 'website' ][ 'prefix' ][ $web_key ];
|
||||
if ( ! isset ( $_SESSION[ 'sess_' . $prefix . 'Type' ] ) )
|
||||
{
|
||||
$editable = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $_SESSION[ 'sess_' . $prefix . 'Type' ] === 'ALL' )
|
||||
{
|
||||
$editable = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $_SESSION[ 'sess_' . $prefix ] === '' )
|
||||
{
|
||||
$editable = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$arr_rights = explode ( ';' , $_SESSION[ 'sess_' . $prefix ] );
|
||||
$pathWay = fnc_createPathHome ( $prefix , '7' );
|
||||
foreach ( $arr_rights as $navRight )
|
||||
{
|
||||
$navId = str_replace ( $prefix . '_' , '' $navRight );
|
||||
var_dump ( $navId );
|
||||
}
|
||||
echo '<pre>';
|
||||
var_dump ( $pathWay );
|
||||
var_dump ( $arr_rights );
|
||||
|
||||
echo '</pre>';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
44
.includes/website_rights.php
Normal file
44
.includes/website_rights.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
if ( $web_key === false )
|
||||
{
|
||||
$editable = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ! isset ( $_SESSION[ 'sess_' . $prefix . 'Type' ] ) )
|
||||
{
|
||||
$editable = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $_SESSION[ 'sess_' . $prefix . 'Type' ] === 'ALL' )
|
||||
{
|
||||
$editable = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $_SESSION[ 'sess_' . $prefix ] === '' )
|
||||
{
|
||||
$editable = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$arr_rights = explode ( ';' , $_SESSION[ 'sess_' . $prefix ] );
|
||||
|
||||
foreach ( $arr_rights as $navRight )
|
||||
{
|
||||
$navId = str_replace ( $prefix . '_' , '' , $navRight );
|
||||
if ( in_array ( $navId , $pathWay ) )
|
||||
{
|
||||
$editable = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user