Code-Formatierungen und Anpassungen an neue Editoren

This commit is contained in:
2016-09-27 12:33:02 +00:00
parent 85494a976d
commit 60115d95a1
8 changed files with 839 additions and 1017 deletions

View File

@@ -74,6 +74,7 @@ define('PATH_CNF', PATH_ROOT . '.config/');
define('PATH_FNC', PATH_ROOT . '.functions/'); define('PATH_FNC', PATH_ROOT . '.functions/');
define('PATH_INC', PATH_ROOT . '.includes/'); define('PATH_INC', PATH_ROOT . '.includes/');
define('PATH_LANG', PATH_ROOT . '.lang/'); define('PATH_LANG', PATH_ROOT . '.lang/');
define('WEBSERVICE_MED', PATH_ROOT . 'media/');
/** /**

View File

@@ -17,17 +17,8 @@ function fnc_getNavigationArray($prefix, $onlyActive = true, $navPositions = arr
? ' WHERE ' . $str_filter ? ' WHERE ' . $str_filter
: ''; : '';
$navi = $db->query $navi = $db->query('SELECT * FROM ' . $prefix . '_' . TBL_NAVI . $str_filter . ' ORDER BY ' . $prefix . '_navStart ASC , ' . $prefix . '_navSort ASC;');
(
'SELECT
*
FROM
' . $prefix . '_' . TBL_NAVI .
$str_filter . '
ORDER BY
' . $prefix . '_navStart ASC ,
' . $prefix . '_navSort ASC;'
);
while ($dat_navi = $navi->fetch_assoc()) while ($dat_navi = $navi->fetch_assoc())
{ {
if (!empty($namesFromConfig)) if (!empty($namesFromConfig))
@@ -43,6 +34,7 @@ function fnc_getNavigationArray($prefix, $onlyActive = true, $navPositions = arr
function fnc_getSingleNavigationArrays($prefix, $navArray, $params, $pathWay) function fnc_getSingleNavigationArrays($prefix, $navArray, $params, $pathWay)
{ {
$i = 0; $i = 0;
$return = array();
foreach ($params['navLevel'] as $key => $depth) foreach ($params['navLevel'] as $key => $depth)
{ {
@@ -129,15 +121,7 @@ function fnc_createPathHome($prefix, $navActive)
{ {
global $db; global $db;
$navi = $db->query $navi = $db->query('SELECT * FROM ' . $prefix . '_' . TBL_NAVI . ' WHERE ' . $prefix . '_navId = "' . $navActive . '";');
(
'SELECT
*
FROM
' . $prefix . '_' . TBL_NAVI . '
WHERE
' . $prefix . '_navId = "' . $navActive . '";'
);
$arr_navi = $navi->fetch_assoc(); $arr_navi = $navi->fetch_assoc();
if ($arr_navi[$prefix . '_navStart'] !== '0' && !is_null($arr_navi)) if ($arr_navi[$prefix . '_navStart'] !== '0' && !is_null($arr_navi))
{ {
@@ -156,15 +140,7 @@ function fnc_getNavType($prefix, $navActive)
{ {
global $db; global $db;
$navi = $db->query $navi = $db->query('SELECT * FROM ' . $prefix . '_' . TBL_NAVI . ' WHERE ' . $prefix . '_navId = "' . $navActive . '";');
(
'SELECT
*
FROM
' . $prefix . '_' . TBL_NAVI . '
WHERE
' . $prefix . '_navId = "' . $navActive . '";'
);
$navPoint = $navi->fetch_assoc(); $navPoint = $navi->fetch_assoc();
if ($navPoint[$prefix . '_specialSite'] === 'Y') if ($navPoint[$prefix . '_specialSite'] === 'Y')
@@ -182,15 +158,7 @@ function fnc_getUsernameById($userId)
global $db; global $db;
$return = ''; $return = '';
$user = $db->query $user = $db->query('SELECT * FROM ' . TBL_USER . ' WHERE userId = "' . $userId . '";');
(
'SELECT
*
FROM
' . TBL_USER . '
WHERE
userId = "' . $userId . '";'
);
if ($user->num_rows > 0) if ($user->num_rows > 0)
{ {
$dat_user = $user->fetch_assoc(); $dat_user = $user->fetch_assoc();
@@ -231,16 +199,7 @@ function fnc_generateUniqueUsername($lastName, $firstName)
global $db; global $db;
$username = mb_strtolower(substr($firstName, 0, 1), 'UTF-8') . mb_strtolower($lastName, 'UTF-8'); $username = mb_strtolower(substr($firstName, 0, 1), 'UTF-8') . mb_strtolower($lastName, 'UTF-8');
$count = $db->query $count = $db->query('SELECT * FROM ' . TBL_USER . ' WHERE userUsername = "' . $username . '" OR userUsername LIKE "' . $username . '_%";');
(
'SELECT
*
FROM
' . TBL_USER . '
WHERE
userUsername = "' . $username . '" OR
userUsername LIKE "' . $username . '_%";'
);
if ($count->num_rows !== 0) if ($count->num_rows !== 0)
{ {
@@ -253,15 +212,7 @@ function fnc_generateUniqueUsername($lastName, $firstName)
function fnc_writeLog($entry, $params, $userId) function fnc_writeLog($entry, $params, $userId)
{ {
global $db; global $db;
$db->query('INSERT INTO ' . TBL_LOG . '(logEntry, logParams, logUser) VALUES ("' . $entry . '", "' . implode('::', $params) . '", "' . $userId . '");');
$db->query
(
'INSERT INTO
' . TBL_LOG . '
( logEntry , logParams , logUser )
VALUES
( "' . $entry . '" , "' . implode('::', $params) . '" , "' . $userId . '" );'
);
} }
function fnc_readLog($entry, $params) function fnc_readLog($entry, $params)
@@ -283,28 +234,10 @@ function fnc_sendEmailToUser($mailId, $userId, $sessionUserId)
global $vC; global $vC;
global $lang; global $lang;
$result = $db->query $result = $db->query('SELECT * FROM ' . TBL_USER . ' WHERE userId = "' . $userId . '" LIMIT 1;');
(
'SELECT
*
FROM
' . TBL_USER . '
WHERE
userId = "' . $userId . '"
LIMIT 1;'
);
$recipient = $result->fetch_assoc(); $recipient = $result->fetch_assoc();
$result = $db->query $result = $db->query('SELECT * FROM ' . TBL_USER . ' WHERE userId = "' . $sessionUserId . '" LIMIT 1;');
(
'SELECT
*
FROM
' . TBL_USER . '
WHERE
userId = "' . $sessionUserId . '"
LIMIT 1;'
);
$sender = $result->fetch_assoc(); $sender = $result->fetch_assoc();
$mailSubj = $lang['mail']['subj'][$mailId]; $mailSubj = $lang['mail']['subj'][$mailId];
@@ -368,28 +301,11 @@ function fnc_checkUniqueEmailAddress($emailAddress, $userId = '')
if ($userId !== '') if ($userId !== '')
{ {
$count = $db->query $count = $db->query('SELECT * FROM ' . TBL_USER . ' WHERE userId != "' . $userId . '" AND userEmail = "' . $emailAddress . '";');
(
'SELECT
*
FROM
' . TBL_USER . '
WHERE
userId != "' . $userId . '" AND
userEmail = "' . $emailAddress . '";'
);
} }
else else
{ {
$count = $db->query $count = $db->query('SELECT * FROM ' . TBL_USER . ' WHERE userEmail = "' . $emailAddress . '";');
(
'SELECT
*
FROM
' . TBL_USER . '
WHERE
userEmail = "' . $emailAddress . '";'
);
} }
if ($count->num_rows === 0) if ($count->num_rows === 0)
{ {
@@ -423,32 +339,11 @@ function fnc_getSiteContents($contentParts, $prefix)
if ($table === 'textimage') if ($table === 'textimage')
{ {
$tmp_content = $db->query $tmp_content = $db->query('SELECT * , ' . $prefix . '_' . TBL_TEXTIMAGE . '.id AS text_image_id FROM ' . $prefix . '_' . TBL_TEXTIMAGE . ', ' . $prefix . '_' . TBL_TEXT . ', ' . $prefix . '_' . TBL_IMAGE . ' WHERE ' . $prefix . '_' . TBL_TEXTIMAGE . '.content_text_id = ' . $prefix . '_' . TBL_TEXT . '.id AND ' . $prefix . '_' . TBL_TEXTIMAGE . '.content_image_id = ' . $prefix . '_' . TBL_IMAGE . '.id AND ' . $prefix . '_' . TBL_TEXTIMAGE . '.id = ' . $id . ' LIMIT 1;');
(
'SELECT
* , ' . $prefix . '_' . TBL_TEXTIMAGE . '.id AS text_image_id
FROM
' . $prefix . '_' . TBL_TEXTIMAGE . ',
' . $prefix . '_' . TBL_TEXT . ',
' . $prefix . '_' . TBL_IMAGE . '
WHERE
' . $prefix . '_' . TBL_TEXTIMAGE . '.content_text_id = ' . $prefix . '_' . TBL_TEXT . '.id AND
' . $prefix . '_' . TBL_TEXTIMAGE . '.content_image_id = ' . $prefix . '_' . TBL_IMAGE . '.id and
' . $prefix . '_' . TBL_TEXTIMAGE . '.id = ' . $id . '
LIMIT 1;'
);
} }
else else
{ {
$tmp_content = $db->query $tmp_content = $db->query('SELECT * FROM ' . $prefix . '_content_' . $table . ' WHERE id = ' . $id . ';');
(
'SELECT
*
FROM
' . $prefix . '_content_' . $table . '
WHERE
id = ' . $id . ';'
);
} }
if ($tmp_content->num_rows === 0) if ($tmp_content->num_rows === 0)

View File

@@ -122,6 +122,21 @@
cursor: pointer; cursor: pointer;
} }
.min {
display: inline-block;
float: right;
width: 24px;
text-align: center;
}
.rightBox {
float: right;
}
.rightBox h1 {
margin-top: 11px;
}
.submitButton:not(:first-of-type) { .submitButton:not(:first-of-type) {
float: left; float: left;
} }
@@ -290,30 +305,36 @@ li.navclose ul {
background-color: #ffffff; background-color: #ffffff;
} }
#imgHolder { #editor_form .ui-icon {
background-image: url('../../css/images/ui-icons_e3000b_256x240.png');
}
#imagePlaceholder {
padding: 0; padding: 0;
position: relative; position: relative;
left: 22px; left: 22px;
margin-bottom: 48px; margin-bottom: 55px;
} }
#imgImage { #editImage {
position: absolute; position: absolute;
z-index: 10; z-index: 10;
} }
#imgBlende { #imageCover {
position: absolute; position: absolute;
z-index: 100; z-index: 20;
} }
#imgPreview { #imagePreview {
position: absolute;
left: 0; left: 0;
top: 0; top: 0;
cursor: move; cursor: move;
z-index: 30;
} }
#blendeTop, #blendeLeft, #blendeRight, #blendeBottom { #coverTop, #coverRight, #coverBottom, #coverLeft {
position: absolute; position: absolute;
background-color: rgba(255, 255, 255, .7); background-color: rgba(255, 255, 255, .7);
} }
@@ -435,6 +456,13 @@ input.subline {
color: #ffffff; color: #ffffff;
font-weight: bold; font-weight: bold;
padding: 0 11px; padding: 0 11px;
}
#element_title > .min {
cursor: pointer;
}
#boxtitle {
cursor: move; cursor: move;
} }
@@ -481,7 +509,7 @@ input.subline {
background-color: #ffffff; background-color: #ffffff;
} }
#content .sort_handle, #rist_editor .sort_handle { #content .sort_handle, #editor_form .sort_handle {
background-color: #ffffff; background-color: #ffffff;
position: absolute; position: absolute;
right: 0; right: 0;
@@ -492,7 +520,7 @@ input.subline {
cursor: move; cursor: move;
} }
#content .del_handle, #rist_editor .del_handle { #content .del_handle, #editor_form .del_handle {
background-color: #ffffff; background-color: #ffffff;
position: absolute; position: absolute;
right: 24px; right: 24px;
@@ -503,7 +531,11 @@ input.subline {
cursor: pointer; cursor: pointer;
} }
#newSort_box li { #newSort_box {
float: left;
}
#newSort_box li, .navSort li {
position: relative; position: relative;
list-style-type: none; list-style-type: none;
} }
@@ -519,6 +551,7 @@ input.subline {
#imgThumbs img { #imgThumbs img {
display: block; display: block;
float: none; float: none;
position: relative;
} }
#wait { #wait {

View File

@@ -2,8 +2,8 @@
session_start(); session_start();
define('PATH_ROOT', '../../../'); $pathRoot = dirname(dirname(dirname(__DIR__))) . '/';
include_once(PATH_ROOT . '.config/config_global.php'); include_once($pathRoot . '.config/config_global.php');
require_once(PATH_CLS . 'rendering/viewClass.php'); require_once(PATH_CLS . 'rendering/viewClass.php');
/* Funktionen und Aktionen einbinden */ /* Funktionen und Aktionen einbinden */

View File

@@ -2,9 +2,8 @@
session_start(); session_start();
define('PATH_ROOT', '../../../'); $pathRoot = dirname(dirname(dirname(__DIR__))) . '/';
include_once($pathRoot . '.config/config_global.php');
include_once(PATH_ROOT . '.config/config_global.php');
require_once(PATH_CLS . 'rendering/viewClass.php'); require_once(PATH_CLS . 'rendering/viewClass.php');
/* Funktionen und Aktionen einbinden */ /* Funktionen und Aktionen einbinden */

View File

@@ -4,22 +4,7 @@ header('Access-Control-Allow-Origin: *');
// unset( $_POST[ 'uploadFile' ] ); // unset( $_POST[ 'uploadFile' ] );
// die ( ); // die ( );
if (!isset ($_POST['request'])) if (!isset($_POST['request']) || !isset($_POST['userId']) || !isset($_POST['dataSet']) || !isset($_POST['prefix']))
{
die('Wrong parameters');
}
if (!isset ($_POST['userId']))
{
die('Wrong parameters');
}
if (($_POST['request'] === 'getData' || $_POST['request'] === 'updateData' || $_POST['request'] === 'insertData' || $_POST['request'] === 'deleteData') && !isset ($_POST['dataSet']))
{
die('Wrong parameters');
}
if (($_POST['request'] === 'getData' || $_POST['request'] === 'updateData' || $_POST['request'] === 'insertData' || $_POST['request'] === 'deleteData') && !isset ($_POST['prefix']))
{ {
die('Wrong parameters'); die('Wrong parameters');
} }
@@ -63,7 +48,6 @@ if ($_POST['request'] === 'getData')
while ($fetch_data = $result->fetch_assoc()) while ($fetch_data = $result->fetch_assoc())
{ {
$fetch_data[$_POST['prefix'] . '_navEditable'] = 'false'; $fetch_data[$_POST['prefix'] . '_navEditable'] = 'false';
$fetch_data[$_POST['prefix'] . '_navName'] = $fetch_data[$_POST['prefix'] . '_navName'];
if ($rights['rightsType'] === 'ALL' || ($rights['rightsType'] === 'DEF' && (in_array($_POST['prefix'] . '_' . $fetch_data[$_POST['prefix'] . '_navId'], $arr_rights) || in_array($_POST['prefix'] . '_' . $fetch_data[$_POST['prefix'] . '_navStart'], $arr_rights)))) if ($rights['rightsType'] === 'ALL' || ($rights['rightsType'] === 'DEF' && (in_array($_POST['prefix'] . '_' . $fetch_data[$_POST['prefix'] . '_navId'], $arr_rights) || in_array($_POST['prefix'] . '_' . $fetch_data[$_POST['prefix'] . '_navStart'], $arr_rights))))
{ {
@@ -99,7 +83,6 @@ if ($_POST['request'] === 'getData')
echo json_encode($data, JSON_UNESCAPED_UNICODE); echo json_encode($data, JSON_UNESCAPED_UNICODE);
} }
else if ($_POST['request'] === 'updateData') else if ($_POST['request'] === 'updateData')
{ {
$error = false; $error = false;
@@ -151,6 +134,7 @@ else if ($_POST['request'] === 'updateData')
{ {
$columns = $db->query('SHOW COLUMNS FROM ' . $_POST['prefix'] . '_' . $table . ';'); $columns = $db->query('SHOW COLUMNS FROM ' . $_POST['prefix'] . '_' . $table . ';');
$fieldNames = array(); $fieldNames = array();
while ($column = $columns->fetch_assoc()) while ($column = $columns->fetch_assoc())
{ {
$fieldNames[] = $column['Field']; $fieldNames[] = $column['Field'];
@@ -164,13 +148,12 @@ else if ($_POST['request'] === 'updateData')
} }
} }
/* Behandlung Keyvisual und Content-Image */ /* Behandlung Keyvisual und Content-Image */
if ($table === 'content_image') if ($table === 'content_image')
{ {
if (!is_dir(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'])) if (!is_dir(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId']))
{ {
mkdir(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'], 0755); mkdir(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'], 0755);
} }
if (isset ($_POST['uploadFile']) && !empty ($_POST['uploadFile'])) if (isset ($_POST['uploadFile']) && !empty ($_POST['uploadFile']))
@@ -180,7 +163,7 @@ else if ($_POST['request'] === 'updateData')
if (!isset ($_POST['formAction']) || (isset ($_POST['formAction']) && $_POST['formAction'] !== 'appendImage')) if (!isset ($_POST['formAction']) || (isset ($_POST['formAction']) && $_POST['formAction'] !== 'appendImage'))
{ {
$file_path = PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $old_data['imgName']; $file_path = WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $old_data['imgName'];
/* Alte Bilddaten löschen */ /* Alte Bilddaten löschen */
unlink($file_path . '.' . $old_data['imgExtension']); unlink($file_path . '.' . $old_data['imgExtension']);
@@ -205,8 +188,8 @@ else if ($_POST['request'] === 'updateData')
$file_name_temp = substr($file_name, 0, strrpos($file_name, '.')) . '_temp' . substr($file_name, strrpos($file_name, '.')); $file_name_temp = substr($file_name, 0, strrpos($file_name, '.')) . '_temp' . substr($file_name, strrpos($file_name, '.'));
$file_name_orig = substr($file_name, 0, strrpos($file_name, '.')) . '_orig' . substr($file_name, strrpos($file_name, '.')); $file_name_orig = substr($file_name, 0, strrpos($file_name, '.')) . '_orig' . substr($file_name, strrpos($file_name, '.'));
file_put_contents(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name_temp, $decodedData); file_put_contents(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name_temp, $decodedData);
fnc_checkOrigResize(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/', $file_name_orig, $file_name_temp, $extension, ${$_POST['prefix']}['dimOrig']); fnc_checkOrigResize(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/', $file_name_orig, $file_name_temp, $extension, ${$_POST['prefix']}['dimOrig']);
if (isset ($_POST['formAction']) && $_POST['formAction'] === 'appendImage') if (isset ($_POST['formAction']) && $_POST['formAction'] === 'appendImage')
{ {
@@ -223,13 +206,7 @@ else if ($_POST['request'] === 'updateData')
} }
} }
$new = $db->query $new = $db->query('INSERT INTO ' . $_POST['prefix'] . '_' . $table . ' SET ' . implode(' , ', $data));
(
'INSERT INTO
' . $_POST['prefix'] . '_' . $table . '
SET
' . implode(' , ', $data)
);
$new_id = $db->insert_id; $new_id = $db->insert_id;
unset ($data); unset ($data);
@@ -264,7 +241,7 @@ else if ($_POST['request'] === 'updateData')
$extension = $img_data['imgExtension']; $extension = $img_data['imgExtension'];
$old_name = $img_data['imgName'] . '.' . $extension; $old_name = $img_data['imgName'] . '.' . $extension;
$old_name_orig = substr($old_name, 0, strrpos($old_name, '.')) . '_orig' . substr($old_name, strrpos($old_name, '.')); $old_name_orig = substr($old_name, 0, strrpos($old_name, '.')) . '_orig' . substr($old_name, strrpos($old_name, '.'));
$old_name_thmb = substr($old_name, 0, strrpos($old_name, '.')) . '_thumb' . substr($old_name, strrpos($old_name, '.')); $old_name_thumb = substr($old_name, 0, strrpos($old_name, '.')) . '_thumb' . substr($old_name, strrpos($old_name, '.'));
$img_name = $_POST['imgName']; $img_name = $_POST['imgName'];
$img_name = explode('_', $img_name); $img_name = explode('_', $img_name);
@@ -281,17 +258,17 @@ else if ($_POST['request'] === 'updateData')
{ {
$file_name = fnc_buildUniqueFileName($_POST['prefix'], $_POST['navId'], $img_name, $extension); $file_name = fnc_buildUniqueFileName($_POST['prefix'], $_POST['navId'], $img_name, $extension);
$file_name_orig = substr($file_name, 0, strrpos($file_name, '.')) . '_orig' . substr($file_name, strrpos($file_name, '.')); $file_name_orig = substr($file_name, 0, strrpos($file_name, '.')) . '_orig' . substr($file_name, strrpos($file_name, '.'));
$file_name_thmb = substr($file_name, 0, strrpos($file_name, '.')) . '_thumb' . substr($file_name, strrpos($file_name, '.')); $file_name_thumb = substr($file_name, 0, strrpos($file_name, '.')) . '_thumb' . substr($file_name, strrpos($file_name, '.'));
rename(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $old_name_thmb, PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name_thmb); rename(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $old_name_thumb, WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name_thumb);
rename(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $old_name_orig, PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name_orig); rename(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $old_name_orig, WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name_orig);
rename(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $old_name, PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name); rename(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $old_name, WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name);
} }
else else
{ {
$file_name = $old_name; $file_name = $old_name;
$file_name_orig = $old_name_orig; $file_name_orig = $old_name_orig;
$file_name_thmb = $old_name_thmb; $file_name_thumb = $old_name_thumb;
} }
} }
} }
@@ -305,7 +282,7 @@ else if ($_POST['request'] === 'updateData')
{ {
${$_POST['prefix']}['dim' . strtoupper(substr($dataSet, 0, 1)) . substr($dataSet, 1, strrpos($dataSet, '_') - 1)]['height'] = ${$_POST['prefix']}['dim' . strtoupper(substr($dataSet, 0, 1)) . substr($dataSet, 1, strrpos($dataSet, '_') - 1)]['width'] * $_POST['previewHeight'] / $_POST['previewWidth']; ${$_POST['prefix']}['dim' . strtoupper(substr($dataSet, 0, 1)) . substr($dataSet, 1, strrpos($dataSet, '_') - 1)]['height'] = ${$_POST['prefix']}['dim' . strtoupper(substr($dataSet, 0, 1)) . substr($dataSet, 1, strrpos($dataSet, '_') - 1)]['width'] * $_POST['previewHeight'] / $_POST['previewWidth'];
} }
$img_created = fnc_buildImage(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/', $file_name_orig, $extension, ${$_POST['prefix']}['dim' . strtoupper(substr($dataSet, 0, 1)) . substr($dataSet, 1, strrpos($dataSet, '_') - 1)], $_POST); $img_created = fnc_buildImage(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/', $file_name_orig, $extension, ${$_POST['prefix']}['dim' . strtoupper(substr($dataSet, 0, 1)) . substr($dataSet, 1, strrpos($dataSet, '_') - 1)], $_POST);
/* Thumbnail aus generiertem Bild erzeugen */ /* Thumbnail aus generiertem Bild erzeugen */
if (!is_null(${$_POST['prefix']}[substr($dataSet, 0, strrpos($dataSet, '_')) . 'Thumb'])) if (!is_null(${$_POST['prefix']}[substr($dataSet, 0, strrpos($dataSet, '_')) . 'Thumb']))
@@ -314,7 +291,7 @@ else if ($_POST['request'] === 'updateData')
{ {
${$_POST['prefix']}[substr($dataSet, 0, strrpos($dataSet, '_')) . 'Thumb']['height'] = ${$_POST['prefix']}[substr($dataSet, 0, strrpos($dataSet, '_')) . 'Thumb']['width'] * $_POST['previewHeight'] / $_POST['previewWidth']; ${$_POST['prefix']}[substr($dataSet, 0, strrpos($dataSet, '_')) . 'Thumb']['height'] = ${$_POST['prefix']}[substr($dataSet, 0, strrpos($dataSet, '_')) . 'Thumb']['width'] * $_POST['previewHeight'] / $_POST['previewWidth'];
} }
$thumb = fnc_buildThumbnail(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/', $file_name, $extension, ${$_POST['prefix']}[substr($dataSet, 0, strrpos($dataSet, '_')) . 'Thumb']); $thumb = fnc_buildThumbnail(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/', $file_name, $extension, ${$_POST['prefix']}[substr($dataSet, 0, strrpos($dataSet, '_')) . 'Thumb']);
} }
/* Werte für Datenbank aktualisieren */ /* Werte für Datenbank aktualisieren */
@@ -371,7 +348,6 @@ else if ($_POST['request'] === 'updateData')
} }
else if ($_POST['request'] === 'insertData') else if ($_POST['request'] === 'insertData')
{ {
$error = false; $error = false;
if ($table === 'navi') if ($table === 'navi')
{ {
@@ -496,7 +472,7 @@ else if ($_POST['request'] === 'insertData')
else else
{ {
$columns = $db->query('SHOW COLUMNS FROM ' . $_POST['prefix'] . '_' . $table . ';'); $columns = $db->query('SHOW COLUMNS FROM ' . $_POST['prefix'] . '_' . $table . ';');
$fieldNames = array();
while ($column = $columns->fetch_assoc()) while ($column = $columns->fetch_assoc())
{ {
$fieldNames[] = $column['Field']; $fieldNames[] = $column['Field'];
@@ -512,9 +488,9 @@ else if ($_POST['request'] === 'insertData')
if ($table === 'content_image') if ($table === 'content_image')
{ {
if (!is_dir(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'])) if (!is_dir(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId']))
{ {
mkdir(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'], 0755); mkdir(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'], 0755);
} }
/* Bilddaten auslesen */ /* Bilddaten auslesen */
@@ -532,15 +508,15 @@ else if ($_POST['request'] === 'insertData')
/* Originales Bild speichern */ /* Originales Bild speichern */
$file_name_orig = substr($file_name, 0, strrpos($file_name, '.')) . '_orig' . substr($file_name, strrpos($file_name, '.')); $file_name_orig = substr($file_name, 0, strrpos($file_name, '.')) . '_orig' . substr($file_name, strrpos($file_name, '.'));
file_put_contents(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name_orig, $decodedData); file_put_contents(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name_orig, $decodedData);
/* Bilddaten aus Editor generieren */ /* Bilddaten aus Editor generieren */
$img_created = fnc_buildImage(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/', $file_name_orig, $extension, ${$_POST['prefix']}['dim' . strtoupper(substr($_POST['dataSet'], 0, 1)) . substr($_POST['dataSet'], 1)], $_POST); $img_created = fnc_buildImage(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/', $file_name_orig, $extension, ${$_POST['prefix']}['dim' . strtoupper(substr($_POST['dataSet'], 0, 1)) . substr($_POST['dataSet'], 1)], $_POST);
/* Thumbnail aus generiertem Bild erzeugen */ /* Thumbnail aus generiertem Bild erzeugen */
if (!is_null(${$_POST['prefix']}[$_POST['dataSet'] . 'Thumb'])) if (!is_null(${$_POST['prefix']}[$_POST['dataSet'] . 'Thumb']))
{ {
$thumb = fnc_buildThumbnail(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/', $file_name, $extension, ${$_POST['prefix']}[$_POST['dataSet'] . 'Thumb']); $thumb = fnc_buildThumbnail(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/', $file_name, $extension, ${$_POST['prefix']}[$_POST['dataSet'] . 'Thumb']);
} }
/* Werte für Datenbank aktualisieren */ /* Werte für Datenbank aktualisieren */
@@ -556,9 +532,9 @@ else if ($_POST['request'] === 'insertData')
else if ($table === 'content_textimage') else if ($table === 'content_textimage')
{ {
if (!is_dir(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'])) if (!is_dir(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId']))
{ {
mkdir(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'], 0755); mkdir(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'], 0755);
} }
/* Bildnamen und Erweiterung generieren */ /* Bildnamen und Erweiterung generieren */
@@ -567,13 +543,13 @@ else if ($_POST['request'] === 'insertData')
/* Originales Bild speichern */ /* Originales Bild speichern */
$file_name_orig = substr($file_name, 0, strrpos($file_name, '.')) . '_orig' . substr($file_name, strrpos($file_name, '.')); $file_name_orig = substr($file_name, 0, strrpos($file_name, '.')) . '_orig' . substr($file_name, strrpos($file_name, '.'));
copy(PATH_MED . $_POST['prefix'] . '/sample_image.jpg', PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name_orig); copy(WEBSERVICE_MED . $_POST['prefix'] . '/sample_image.jpg', WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name_orig);
copy(PATH_MED . $_POST['prefix'] . '/sample_image.jpg', PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name); copy(WEBSERVICE_MED . $_POST['prefix'] . '/sample_image.jpg', WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name);
/* Thumbnail aus generiertem Bild erzeugen */ /* Thumbnail aus generiertem Bild erzeugen */
if (!is_null(${$_POST['prefix']}['imageThumb'])) if (!is_null(${$_POST['prefix']}['imageThumb']))
{ {
$thumb = fnc_buildThumbnail(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/', $file_name, $extension, ${$_POST['prefix']}['imageThumb']); $thumb = fnc_buildThumbnail(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/', $file_name, $extension, ${$_POST['prefix']}['imageThumb']);
} }
if (!$thumb) if (!$thumb)
@@ -585,22 +561,10 @@ else if ($_POST['request'] === 'insertData')
$img_name = $db->real_escape_string(str_replace('.' . $extension, '', $file_name)); $img_name = $db->real_escape_string(str_replace('.' . $extension, '', $file_name));
$img_title = $db->real_escape_string('Sample Image'); $img_title = $db->real_escape_string('Sample Image');
$image = $db->query $image = $db->query('INSERT INTO ' . $_POST['prefix'] . '_' . TBL_IMAGE . ' (imgName, imgExtension, imgOrigname, imgTitle, previewWidth, previewHeight) VALUES ("' . $img_name . '", "' . $img_extension . '", "' . $img_name . '.' . $img_extension . '", "' . $img_title . '", "' . ${$_POST['prefix']}['dimImage']['width'] . '", "' . ${$_POST['prefix']}['dimImage']['width'] * 4 / 3 . '");');
(
'INSERT INTO
' . $_POST['prefix'] . '_' . TBL_IMAGE . '
( imgName , imgExtension , imgOrigname , imgTitle , previewWidth , previewHeight )
VALUES
( "' . $img_name . '" , "' . $img_extension . '" , "' . $img_name . '.' . $img_extension . '" , "' . $img_title . '" , "' . ${$_POST['prefix']}['dimImage']['width'] . '" , "' . ${$_POST['prefix']}['dimImage']['width'] * 4 / 3 . '" );'
);
$image_id = $db->insert_id; $image_id = $db->insert_id;
$text = $db->query $text = $db->query('INSERT INTO ' . $_POST['prefix'] . '_' . TBL_TEXT . ' VALUES (NULL, "' . $_POST['content'] . '" );');
(
'INSERT INTO
' . $_POST['prefix'] . '_' . TBL_TEXT . '
VALUES ( NULL , "' . $_POST['content'] . '" );'
);
$text_id = $db->insert_id; $text_id = $db->insert_id;
$data['content_text_id'] = $text_id; $data['content_text_id'] = $text_id;
@@ -625,16 +589,7 @@ else if ($_POST['request'] === 'insertData')
if ($_POST['dataSet'] === 'keyvisual') if ($_POST['dataSet'] === 'keyvisual')
{ {
$insert = $db->insert_id; $insert = $db->insert_id;
$update = $db->query $update = $db->query('UPDATE ' . $_POST['prefix'] . '_' . TBL_NAVI . ' SET ' . $_POST['prefix'] . '_keyvisual = "' . $insert . '" WHERE ' . $_POST['prefix'] . '_navId = "' . $_POST['navId'] . '" LIMIT 1;');
(
'UPDATE
' . $_POST['prefix'] . '_' . TBL_NAVI . '
SET
' . $_POST['prefix'] . '_keyvisual = "' . $insert . '"
WHERE
' . $_POST['prefix'] . '_navId = "' . $_POST['navId'] . '"
LIMIT 1;'
);
if ($update) if ($update)
{ {
@@ -648,7 +603,7 @@ else if ($_POST['request'] === 'insertData')
elseif ($table === 'content_text' || $table === 'content_subline' || $table === 'content_textimage') elseif ($table === 'content_text' || $table === 'content_subline' || $table === 'content_textimage')
{ {
$insert = $db->insert_id; $insert = $db->insert_id;
$siteContents = json_decode($_POST['order']); $siteContents = $_POST['order'];
foreach ($siteContents as $key => $value) foreach ($siteContents as $key => $value)
{ {
@@ -656,20 +611,11 @@ else if ($_POST['request'] === 'insertData')
$siteContents[$key] = str_replace('content_', '', $value); $siteContents[$key] = str_replace('content_', '', $value);
if (!is_numeric(end($content))) if (!is_numeric(end($content)))
{ {
$siteContents[$key] .= '_' . $insert; $siteContents[$key] .= $insert;
} }
} }
$update = $db->query $update = $db->query('UPDATE ' . $_POST['prefix'] . '_' . TBL_CONTENT . ' SET siteContents = "' . implode(';', $siteContents) . '" WHERE siteId = "' . $_POST['navId'] . '" LIMIT 1;');
(
'UPDATE
' . $_POST['prefix'] . '_' . TBL_CONTENT . '
SET
siteContents = "' . implode(';', $siteContents) . '"
WHERE
siteId = "' . $_POST['navId'] . '"
LIMIT 1;'
);
if ($update) if ($update)
{ {
@@ -684,32 +630,16 @@ else if ($_POST['request'] === 'insertData')
} }
elseif (isset ($_POST['formAction']) && $_POST['formAction'] === 'appendContent') elseif (isset ($_POST['formAction']) && $_POST['formAction'] === 'appendContent')
{ {
/**
* TODO: Eventuell unnötig
*/
$newId = $table . '_' . $db->insert_id; $newId = $table . '_' . $db->insert_id;
$mainSet = explode('_', $_POST['mainContent']); $mainSet = explode('_', $_POST['mainContent']);
$oldContent = $db->query $oldContent = $db->query('SELECT * FROM ' . $_POST['prefix'] . '_' . $mainSet[0] . ' WHERE id = "' . $mainSet[1] . '";');
(
'SELECT
*
FROM
' . $_POST['prefix'] . '_' . $mainSet[0] . '
WHERE
id = "' . $mainSet[1] . '";'
);
$content = $oldContent->fetch_assoc(); $content = $oldContent->fetch_assoc();
$siteContent = ($content['siteContents'] === '') $siteContent = ($content['siteContents'] === '') ? $newId : $content['siteContents'] . ';' . $newId;
? $newId $update = $db->query('UPDATE ' . $_POST['prefix'] . '_' . $mainSet[0] . ' SET siteContents = "' . $siteContent . '" WHERE id = "' . $mainSet[1] . '" LIMIT 1;');
: $content['siteContents'] . ';' . $newId;
$update = $db->query
(
'UPDATE
' . $_POST['prefix'] . '_' . $mainSet[0] . '
SET
siteContents = "' . $siteContent . '"
WHERE
id = "' . $mainSet[1] . '"
LIMIT 1;'
);
if ($update) if ($update)
{ {
json_encode($update); json_encode($update);
@@ -751,15 +681,7 @@ else if ($_POST['request'] === 'deleteData')
if ($result && strpos($table, 'content_') !== false) if ($result && strpos($table, 'content_') !== false)
{ {
$content_part = str_replace('content_', '', $_POST['dataSet']); $content_part = str_replace('content_', '', $_POST['dataSet']);
$content_data = $db->query $content_data = $db->query('SELECT * FROM ' . $_POST['prefix'] . '_' . TBL_CONTENT . ' WHERE siteId = "' . $_POST['navId'] . '";');
(
'SELECT
*
FROM
' . $_POST['prefix'] . '_' . TBL_CONTENT . '
WHERE
siteId = "' . $_POST['navId'] . '";'
);
$content = $content_data->fetch_assoc(); $content = $content_data->fetch_assoc();
$siteContents = explode(';', $content['siteContents']); $siteContents = explode(';', $content['siteContents']);
@@ -768,16 +690,7 @@ else if ($_POST['request'] === 'deleteData')
if (!empty($content_key)) if (!empty($content_key))
{ {
unset ($siteContents[$content_key[0]]); unset ($siteContents[$content_key[0]]);
$db->query $db->query('UPDATE ' . $_POST['prefix'] . '_' . TBL_CONTENT . ' SET siteContents = "' . implode(';', $siteContents) . '" WHERE id = "' . $content['id'] . '" LIMIT 1;') || $error = true;
(
'UPDATE
' . $_POST['prefix'] . '_' . TBL_CONTENT . '
SET
siteContents = "' . implode(';', $siteContents) . '"
WHERE
id = "' . $content['id'] . '"
LIMIT 1;'
) || $error = true;
} }
} }

View File

@@ -1,213 +1,211 @@
body body {
{
font-family: verdana; font-family: verdana;
padding: 0px; padding: 0px;
height: 100%; height: 100%;
} }
input , select , textarea
{ input, select, textarea {
font-family: verdana; font-family: verdana;
font-size: .625rem; font-size: .625rem;
line-height: 1rem; line-height: 1rem;
} }
b , strong
{ b, strong {
font-weight: bold; font-weight: bold;
} }
i
{ i {
font-style: italic; font-style: italic;
} }
a
{ a {
color: #E3000B; color: #E3000B;
} }
h1
{ h1 {
font-size: 1.5rem; font-size: 1.5rem;
font-weight: bold; font-weight: bold;
} }
h2
{ h2 {
font-size: 1.25rem; font-size: 1.25rem;
font-weight: bold; font-weight: bold;
border-bottom: 1px dotted #000000; border-bottom: 1px dotted #000000;
} }
.uebersicht h2
{ .uebersicht h2 {
border: 0px none; border: 0px none;
} }
.uebersicht .datum .uebersicht .datum {
{
border: 0px none; border: 0px none;
} }
p
{ p {
text-align: justify; text-align: justify;
} }
.grid_1col .grid_1col {
{
width: 24px; width: 24px;
} }
.grid_2col
{ .grid_2col {
width: 48px; width: 48px;
} }
.grid_3col
{ .grid_3col {
width: 72px; width: 72px;
} }
.grid_4col
{ .grid_4col {
width: 96px; width: 96px;
} }
.grid_5col
{ .grid_5col {
width: 120px; width: 120px;
} }
.grid_6col
{ .grid_6col {
width: 144px; width: 144px;
} }
.grid_7col
{ .grid_7col {
width: 168px; width: 168px;
} }
.grid_8col
{ .grid_8col {
width: 192px; width: 192px;
} }
.grid_9col
{ .grid_9col {
width: 216px; width: 216px;
} }
.grid_10col
{ .grid_10col {
width: 240px; width: 240px;
} }
.grid_11col
{ .grid_11col {
width: 264px; width: 264px;
} }
.grid_12col
{ .grid_12col {
width: 288px; width: 288px;
} }
.grid_13col
{ .grid_13col {
width: 312px; width: 312px;
} }
.grid_14col
{ .grid_14col {
width: 336px; width: 336px;
} }
.grid_15col
{ .grid_15col {
width: 360px; width: 360px;
} }
.grid_16col
{ .grid_16col {
width: 384px; width: 384px;
} }
.grid_17col
{ .grid_17col {
width: 408px; width: 408px;
} }
.grid_18col
{ .grid_18col {
width: 432px; width: 432px;
} }
.grid_19col
{ .grid_19col {
width: 456px; width: 456px;
} }
.grid_20col
{ .grid_20col {
width: 480px; width: 480px;
} }
.grid_21col
{ .grid_21col {
width: 504px; width: 504px;
} }
.grid_22col
{ .grid_22col {
width: 528px; width: 528px;
} }
.grid_23col
{ .grid_23col {
width: 552px; width: 552px;
} }
.grid_24col
{ .grid_24col {
width: 576px; width: 576px;
} }
.grid_25col
{ .grid_25col {
width: 600px; width: 600px;
} }
.grid_26col
{ .grid_26col {
width: 624px; width: 624px;
} }
.grid_27col
{ .grid_27col {
width: 648px; width: 648px;
} }
.grid_28col
{ .grid_28col {
width: 672px; width: 672px;
} }
.grid_29col
{ .grid_29col {
width: 696px; width: 696px;
} }
.grid_30col
{ .grid_30col {
width: 720px; width: 720px;
} }
.grid_31col
{ .grid_31col {
width: 744px; width: 744px;
} }
.grid_32col
{ .grid_32col {
width: 768px; width: 768px;
} }
.grid_33col
{ .grid_33col {
width: 792px; width: 792px;
} }
.grid_34col
{ .grid_34col {
width: 816px; width: 816px;
} }
.grid_35col
{ .grid_35col {
width: 840px; width: 840px;
} }
.grid_36col
{ .grid_36col {
width: 864px; width: 864px;
} }
.grid_37col
{ .grid_37col {
width: 888px; width: 888px;
} }
.grid_38col
{ .grid_38col {
width: 912px; width: 912px;
} }
.grid_39col
{ .grid_39col {
width: 936px; width: 936px;
} }
.grid_40col
{ .grid_40col {
width: 960px; width: 960px;
clear: both; clear: both;
} }
.grid_1col, .grid_1col,
.grid_2col, .grid_2col,
.grid_3col, .grid_3col,
@@ -246,145 +244,142 @@ p
.grid_36col, .grid_36col,
.grid_37col, .grid_37col,
.grid_38col, .grid_38col,
.grid_39col .grid_39col {
{
float: left; float: left;
display: inline-block; display: inline-block;
min-height: 1px; min-height: 1px;
text-align: justify; text-align: justify;
} }
.spacer
{ .spacer {
height: 12px; height: 12px;
} }
.full_width
{ .full_width {
float: none; float: none;
width: 100%; width: 100%;
} }
.fix
{ .fix {
clear: both; clear: both;
float: none; float: none;
} }
.left
{ .left {
text-align: left; text-align: left;
} }
#content .floatleft
{ #content .floatleft {
float: left; float: left;
} }
.right
{ .right {
text-align: right; text-align: right;
} }
#content .floatright
{ #content .floatright {
float: right; float: right;
margin-left: 24px; margin-left: 24px;
} }
.content
{ .content {
text-align: justify; text-align: justify;
} }
.wrapper
{ .wrapper {
margin: 0px auto; margin: 0px auto;
position: relative; position: relative;
} }
.background
{ .background {
background-image: linear-gradient(#E3000B 0%, #000000 100%); background-image: linear-gradient(#E3000B 0%, #000000 100%);
} }
.datum
{ .datum {
font-size: 1.25rem; font-size: 1.25rem;
font-weight: bold; font-weight: bold;
border-bottom: 1px dotted #000000; border-bottom: 1px dotted #000000;
} }
.box
{ .box {
border: 1px solid #cccccc; border: 1px solid #cccccc;
padding: 0px 23px; padding: 0px 23px;
box-shadow: 2px 2px 2px #cccccc; box-shadow: 2px 2px 2px #cccccc;
} }
.box > .box-header
{ .box > .box-header {
background-color: #cccccc; background-color: #cccccc;
padding: 12px 23px; padding: 12px 23px;
margin-left: -24px; margin-left: -24px;
font-weight: bold; font-weight: bold;
} }
.sliderLeft, .sliderRight
{ .sliderLeft, .sliderRight {
height: 24px; height: 24px;
position: absolute; position: absolute;
z-index: 3; z-index: 3;
background-color: inherit; background-color: inherit;
cursor: pointer; cursor: pointer;
} }
.sliderLeft
{ .sliderLeft {
left: 0px; left: 0px;
} }
.sliderLeft_inner , .sliderRight_inner
{ .sliderLeft_inner, .sliderRight_inner {
color: #999999; color: #999999;
} }
.sliderRight_inner
{ .sliderRight_inner {
float: right; float: right;
} }
.sliderLeft_inner:hover, .sliderRight_inner:hover
{ .sliderLeft_inner:hover, .sliderRight_inner:hover {
color: #ffffff; color: #ffffff;
} }
.sliderLeft_inner:before
{ .sliderLeft_inner:before {
content: '<'; content: '<';
} }
.sliderRight
{ .sliderRight {
right: 0px; right: 0px;
text-align: right; text-align: right;
} }
.sliderRight_inner:before
{ .sliderRight_inner:before {
content: '>'; content: '>';
} }
.uebersicht > div
{ .uebersicht > div {
padding-bottom: 24px; padding-bottom: 24px;
border-bottom: 1px solid #aaaaaa; border-bottom: 1px solid #aaaaaa;
margin-bottom: 24px; margin-bottom: 24px;
} }
.uebersicht .link
{ .uebersicht .link {
color: #000000; color: #000000;
display: block; display: block;
} }
.uebersicht .link:hover
{ .uebersicht .link:hover {
text-decoration: underline; text-decoration: underline;
color: #e3000b; color: #e3000b;
} }
.custom-tooltip .custom-tooltip {
{
background-color: #ffffff; background-color: #ffffff;
color: #000000; color: #000000;
border: 1px solid #cccccc; border: 1px solid #cccccc;
} }
#navi_main_outer
{ #navi_main_outer {
position: fixed; position: fixed;
z-index: 50; z-index: 50;
border-bottom : 2px solid #E3000B;
background-color: #ffffff; background-color: #ffffff;
} }
#navi_main > ul > li
{ #navi_main > ul > li {
display: inline-block; display: inline-block;
position: relative; position: relative;
padding: 0px 12px; padding: 0px 12px;
@@ -393,16 +388,16 @@ p
z-index: 5; z-index: 5;
min-width: 100px; min-width: 100px;
} }
#navi_main > ul > li:last-of-type
{ #navi_main > ul > li:last-of-type {
border-right: 1px solid #999999; border-right: 1px solid #999999;
} }
#navi_main > ul > li:hover
{ #navi_main > ul > li:hover {
border-bottom: 1px solid #ffffff; border-bottom: 1px solid #ffffff;
} }
#navi_main > ul > li > ul
{ #navi_main > ul > li > ul {
position: absolute; position: absolute;
display: none; display: none;
border: 1px solid #999999; border: 1px solid #999999;
@@ -413,12 +408,12 @@ p
border-top: 0px none; border-top: 0px none;
z-index: -1; z-index: -1;
} }
#navi_main > ul > li:hover ul
{ #navi_main > ul > li:hover ul {
display: block; display: block;
} }
#navi_main a
{ #navi_main a {
padding: 6px 0px; padding: 6px 0px;
width: 100%; width: 100%;
color: #000000; color: #000000;
@@ -428,28 +423,28 @@ p
display: inline-block; display: inline-block;
white-space: nowrap; white-space: nowrap;
} }
#navi_main a.active
{ #navi_main a.active {
font-weight: bold; font-weight: bold;
} }
#navi_main li li > a
{ #navi_main li li > a {
padding: 6px 12px; padding: 6px 12px;
} }
#navi_main li li li > a
{ #navi_main li li li > a {
padding: 6px 24px; padding: 6px 24px;
} }
#navi_main a:before
{ #navi_main a:before {
content: ">"; content: ">";
color: #e3000b; color: #e3000b;
display: inline-block; display: inline-block;
margin-right: 6px; margin-right: 6px;
font-weight: bold; font-weight: bold;
} }
#navi_main a.active:before , #navi_main a:hover:before
{ #navi_main a.active:before, #navi_main a:hover:before {
content: ">"; content: ">";
color: #e3000b; color: #e3000b;
-webkit-transform: rotate(90deg); -webkit-transform: rotate(90deg);
@@ -457,101 +452,101 @@ p
-ms-transform: rotate(90deg); -ms-transform: rotate(90deg);
transform: rotate(90deg); transform: rotate(90deg);
} }
#logo
{ #logo {
position: absolute; position: absolute;
text-align: right; text-align: right;
z-index: 5; z-index: 5;
right: 0px; right: 0px;
} }
#page
{ #page {
position: relative; position: relative;
z-index: 1; z-index: 1;
padding-top: 76px; padding-top: 76px;
padding-bottom: 96px; padding-bottom: 96px;
} }
#headline_wrapper
{ #headline_wrapper {
height: 288px; height: 288px;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
} }
.keyvisual
{ .keyvisual {
height: 288px; height: 288px;
} }
.keyvisual img
{ .keyvisual img {
width: 864px; width: 864px;
height: 288px; height: 288px;
} }
#headline_site
{ #headline_site {
position: absolute; position: absolute;
} }
#navi_sub_outer
{ #navi_sub_outer {
background-color: #000000; background-color: #000000;
color: #ffffff; color: #ffffff;
height: 48px; height: 48px;
} }
#navi_last_outer
{ #navi_last_outer {
height: 50px; height: 50px;
border-bottom: 2px solid #E3000B; border-bottom: 2px solid #E3000B;
background-color: #ffffff; background-color: #ffffff;
} }
#navi_sub
{ #navi_sub {
background-color: #000000; background-color: #000000;
} }
#navi_sub , #navi_last
{ #navi_sub, #navi_last {
overflow: hidden; overflow: hidden;
position: relative; position: relative;
min-height: 24px; min-height: 24px;
} }
#navi_sub ul , #navi_last ul
{ #navi_sub ul, #navi_last ul {
height: 24px; height: 24px;
line-height: 24px; line-height: 24px;
overflow: hidden; overflow: hidden;
z-index: 1; z-index: 1;
} }
#navi_sub ul li , #navi_last ul li
{ #navi_sub ul li, #navi_last ul li {
float: left; float: left;
padding-right: 24px; padding-right: 24px;
} }
#navi_sub ul li:last-of-type , #navi_sub_ul li:last-of-type
{ #navi_sub ul li:last-of-type, #navi_sub_ul li:last-of-type {
padding-right: 0px; padding-right: 0px;
} }
#navi_sub a , #navi_last a
{ #navi_sub a, #navi_last a {
color: #ffffff; color: #ffffff;
text-decoration: none; text-decoration: none;
font-size: .75rem; font-size: .75rem;
} }
#navi_last a
{ #navi_last a {
color: #E3000B; color: #E3000B;
} }
#navi_sub a:before , #navi_last a:before
{ #navi_sub a:before, #navi_last a:before {
content: ">"; content: ">";
color: #ffffff; color: #ffffff;
display: inline-block; display: inline-block;
margin-right: 6px; margin-right: 6px;
font-weight: bold; font-weight: bold;
} }
#navi_last a:before
{ #navi_last a:before {
color: #E3000B; color: #E3000B;
} }
#navi_sub a.active:before , #navi_sub a:hover:before , #navi_last a.active:before , #navi_last a:hover:before
{ #navi_sub a.active:before, #navi_sub a:hover:before, #navi_last a.active:before, #navi_last a:hover:before {
color: #E3000B; color: #E3000B;
-webkit-transform: rotate(90deg); -webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg); -moz-transform: rotate(90deg);
@@ -559,12 +554,12 @@ p
transform: rotate(90deg); transform: rotate(90deg);
font-weight: bold; font-weight: bold;
} }
#content
{ #content {
padding-top: 24px; padding-top: 24px;
} }
#footer
{ #footer {
position: fixed; position: fixed;
z-index: 50; z-index: 50;
bottom: 0px; bottom: 0px;
@@ -572,8 +567,8 @@ p
height: 48px; height: 48px;
background-color: #999999; background-color: #999999;
} }
#galeryslider
{ #galeryslider {
position: fixed; position: fixed;
z-index: 999; z-index: 999;
width: 100%; width: 100%;
@@ -582,42 +577,42 @@ p
background-color: rgba(0, 0, 0, .9); background-color: rgba(0, 0, 0, .9);
display: none; display: none;
} }
#galeryslider .slider
{ #galeryslider .slider {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: static; position: static;
} }
#galeryslider img
{ #galeryslider img {
object-fit: contain; object-fit: contain;
max-width: 100%; max-width: 100%;
max-height: 100%; max-height: 100%;
width: 100%; width: 100%;
} }
#galeryslider .nivo-prevNav
{ #galeryslider .nivo-prevNav {
left: 12px; left: 12px;
} }
#galeryslider .nivo-nextNav
{ #galeryslider .nivo-nextNav {
right: 12px; right: 12px;
} }
#galeryslider .nivo-caption
{ #galeryslider .nivo-caption {
opacity: .9; opacity: .9;
background-color: transparent; background-color: transparent;
} }
#galeryslider .nivo-slice
{ #galeryslider .nivo-slice {
display: none; display: none;
} }
#galeryslider .nivoSlider
{ #galeryslider .nivoSlider {
position: static; position: static;
} }
.close
{ .close {
position: absolute; position: absolute;
top: 0px; top: 0px;
left: 0px; left: 0px;
@@ -625,8 +620,8 @@ p
font-size: 2rem; font-size: 2rem;
font-weight: bold; font-weight: bold;
} }
.close span
{ .close span {
float: right; float: right;
cursor: pointer; cursor: pointer;
margin-right: 24px; margin-right: 24px;

View File

@@ -9,50 +9,44 @@ $( function( ) {
}); });
}); });
$( document ).ready( function( ) $(document).ready(function () {
{
/* Subnavigation: Fix für überbreite Navigation */ /* Subnavigation: Fix für überbreite Navigation */
var outerWidth = $('#navi_sub').innerWidth(); var outerWidth = $('#navi_sub').innerWidth();
var width = 0; var width = 0;
var mainElem = $('ul', '#navi_sub'); var mainElem = $('ul', '#navi_sub');
$( 'li' , mainElem ).each( function( key , elem ) $('li', mainElem).each(function (key, elem) {
{
width += $(elem).innerWidth() + 1; width += $(elem).innerWidth() + 1;
}); });
if ( width > outerWidth ) if (width > outerWidth) {
{
mainElem.innerWidth(width); mainElem.innerWidth(width);
$('<div class="sliderLeft grid_3col"><div class="sliderLeft_inner grid_1col"/></div>').insertBefore(mainElem); $('<div class="sliderLeft grid_3col"><div class="sliderLeft_inner grid_1col"/></div>').insertBefore(mainElem);
$('<div class="sliderRight grid_3col"><div class="sliderRight_inner grid_1col"/></div>').insertBefore(mainElem); $('<div class="sliderRight grid_3col"><div class="sliderRight_inner grid_1col"/></div>').insertBefore(mainElem);
mainElem.css( { 'margin-left' : $( '.sliderLeft' , '#navi_sub' ).innerWidth( ) , 'margin-right' : $( '.sliderRight' , '#navi_sub' ).innerWidth( ) } ); mainElem.css({
'margin-left': $('.sliderLeft', '#navi_sub').innerWidth(),
'margin-right': $('.sliderRight', '#navi_sub').innerWidth()
});
} }
$( 'body' ).on( 'mouseenter' , '.sliderRight_inner' , function( ) $('body').on('mouseenter', '.sliderRight_inner', function () {
{
start = true; start = true;
fnc_startAnimation($('#navi_sub'), mainElem, 'left'); fnc_startAnimation($('#navi_sub'), mainElem, 'left');
}); });
$( 'body' ).on( 'mouseleave' , '.sliderRight' , function( ) $('body').on('mouseleave', '.sliderRight', function () {
{
start = false; start = false;
}); });
$( 'body' ).on( 'mouseenter' , '.sliderLeft_inner' , function( ) $('body').on('mouseenter', '.sliderLeft_inner', function () {
{
start = true; start = true;
fnc_startAnimation($('#navi_sub'), mainElem, 'right'); fnc_startAnimation($('#navi_sub'), mainElem, 'right');
}); });
$( 'body' ).on( 'mouseleave' , '.sliderLeft' , function( ) $('body').on('mouseleave', '.sliderLeft', function () {
{
start = false; start = false;
}); });
if( typeof(editorData) === 'undefined' && $( '#galeryslider' ).length !== 0 ) if (typeof(editor) === 'undefined' && $('#galeryslider').length !== 0) {
{
$('.keyvisual').css({cursor: 'pointer'}); $('.keyvisual').css({cursor: 'pointer'});
$( '.keyvisual' ).on( 'click' , 'img' , function () $('.keyvisual').on('click', 'img', function () {
{
$('#galeryslider').show(); $('#galeryslider').show();
}); });
} }
@@ -62,24 +56,26 @@ $( document ).ready( function( )
var sub_outer = $('#navi_sub_outer').clone(); var sub_outer = $('#navi_sub_outer').clone();
var last_outer = $('#navi_last_outer').clone(); var last_outer = $('#navi_last_outer').clone();
sub_outer.css({'position': 'fixed', 'top': parseInt($('#navi_main_outer').css('height')), 'z-index': 3, 'display': 'none'}); sub_outer.css({'position': 'fixed', 'top': parseInt($('#navi_main_outer').css('height')), 'z-index': 3, 'display': 'none'});
last_outer.css( { 'position' : 'fixed' , 'top' : parseInt( $( '#navi_main_outer' ).css( 'height' ) ) + parseInt( $( '#navi_sub_outer' ).css( 'height' ) ) , 'z-index' : 3 , 'display' : 'none' } ); last_outer.css({
'position': 'fixed',
'top': parseInt($('#navi_main_outer').css('height')) + parseInt($('#navi_sub_outer').css('height')),
'z-index': 3,
'display': 'none'
});
sub_outer.appendTo('body'); sub_outer.appendTo('body');
last_outer.appendTo('body'); last_outer.appendTo('body');
$( window ).on( 'scroll' , function( ) $(window).on('scroll', function () {
{
var offsetBody = $(window).scrollTop() + parseInt($('#navi_main_outer').css('height')); var offsetBody = $(window).scrollTop() + parseInt($('#navi_main_outer').css('height'));
var offsetNavi = ( $('#navi_sub_outer').position() ) var offsetNavi = ( $('#navi_sub_outer').position() )
? $('#navi_sub_outer').position().top ? $('#navi_sub_outer').position().top
: 0; : 0;
if ( display === false && offsetBody >= offsetNavi ) if (display === false && offsetBody >= offsetNavi) {
{
display = true; display = true;
sub_outer.show(); sub_outer.show();
last_outer.show(); last_outer.show();
} }
else if ( display === true && offsetBody <= offsetNavi ) else if (display === true && offsetBody <= offsetNavi) {
{
display = false; display = false;
sub_outer.hide(); sub_outer.hide();
last_outer.hide(); last_outer.hide();
@@ -87,40 +83,30 @@ $( document ).ready( function( )
}); });
}); });
function fnc_startAnimation ( outerElem , innerElem , direction ) function fnc_startAnimation(outerElem, innerElem, direction) {
{ if (start === true) {
if ( start === true )
{
outerElemWidth = outerElem.innerWidth(); outerElemWidth = outerElem.innerWidth();
innerElemWidth = innerElem.innerWidth() + parseFloat(innerElem.css('margin-left')) + parseFloat(innerElem.css('margin-right')); innerElemWidth = innerElem.innerWidth() + parseFloat(innerElem.css('margin-left')) + parseFloat(innerElem.css('margin-right'));
if ( direction === 'left' ) if (direction === 'left') {
{ if (outerElemWidth < innerElemWidth) {
if ( outerElemWidth < innerElemWidth )
{
innerElem.css({'margin-left': parseFloat(innerElem.css('margin-left')) - slideWidth}); innerElem.css({'margin-left': parseFloat(innerElem.css('margin-left')) - slideWidth});
setTimeout( function( ) setTimeout(function () {
{
fnc_startAnimation(outerElem, innerElem, direction); fnc_startAnimation(outerElem, innerElem, direction);
}, animationTime); }, animationTime);
} }
else else {
{
start = false; start = false;
} }
} }
if ( direction === 'right' ) if (direction === 'right') {
{
maxWidth = innerElem.innerWidth() + $('.sliderLeft', outerElem).innerWidth() + $('.sliderRight', outerElem).innerWidth(); maxWidth = innerElem.innerWidth() + $('.sliderLeft', outerElem).innerWidth() + $('.sliderRight', outerElem).innerWidth();
if ( maxWidth > innerElemWidth ) if (maxWidth > innerElemWidth) {
{
innerElem.css({'margin-left': parseFloat(innerElem.css('margin-left')) + slideWidth}); innerElem.css({'margin-left': parseFloat(innerElem.css('margin-left')) + slideWidth});
setTimeout( function( ) setTimeout(function () {
{
fnc_startAnimation(outerElem, innerElem, direction); fnc_startAnimation(outerElem, innerElem, direction);
}, animationTime); }, animationTime);
} }
else else {
{
start = false; start = false;
} }
} }