diff --git a/.config/config_global.php b/.config/config_global.php index 57808bd..ec4c462 100644 --- a/.config/config_global.php +++ b/.config/config_global.php @@ -74,6 +74,7 @@ define('PATH_CNF', PATH_ROOT . '.config/'); define('PATH_FNC', PATH_ROOT . '.functions/'); define('PATH_INC', PATH_ROOT . '.includes/'); define('PATH_LANG', PATH_ROOT . '.lang/'); +define('WEBSERVICE_MED', PATH_ROOT . 'media/'); /** diff --git a/.functions/fnc_portal.php b/.functions/fnc_portal.php index 4f2dc76..fdacfb6 100644 --- a/.functions/fnc_portal.php +++ b/.functions/fnc_portal.php @@ -17,17 +17,8 @@ function fnc_getNavigationArray($prefix, $onlyActive = true, $navPositions = arr ? ' WHERE ' . $str_filter : ''; - $navi = $db->query - ( - 'SELECT - * - FROM - ' . $prefix . '_' . TBL_NAVI . - $str_filter . ' - ORDER BY - ' . $prefix . '_navStart ASC , - ' . $prefix . '_navSort ASC;' - ); + $navi = $db->query('SELECT * FROM ' . $prefix . '_' . TBL_NAVI . $str_filter . ' ORDER BY ' . $prefix . '_navStart ASC , ' . $prefix . '_navSort ASC;'); + while ($dat_navi = $navi->fetch_assoc()) { if (!empty($namesFromConfig)) @@ -43,6 +34,7 @@ function fnc_getNavigationArray($prefix, $onlyActive = true, $navPositions = arr function fnc_getSingleNavigationArrays($prefix, $navArray, $params, $pathWay) { $i = 0; + $return = array(); foreach ($params['navLevel'] as $key => $depth) { @@ -129,15 +121,7 @@ function fnc_createPathHome($prefix, $navActive) { global $db; - $navi = $db->query - ( - 'SELECT - * - FROM - ' . $prefix . '_' . TBL_NAVI . ' - WHERE - ' . $prefix . '_navId = "' . $navActive . '";' - ); + $navi = $db->query('SELECT * FROM ' . $prefix . '_' . TBL_NAVI . ' WHERE ' . $prefix . '_navId = "' . $navActive . '";'); $arr_navi = $navi->fetch_assoc(); if ($arr_navi[$prefix . '_navStart'] !== '0' && !is_null($arr_navi)) { @@ -156,15 +140,7 @@ function fnc_getNavType($prefix, $navActive) { global $db; - $navi = $db->query - ( - 'SELECT - * - FROM - ' . $prefix . '_' . TBL_NAVI . ' - WHERE - ' . $prefix . '_navId = "' . $navActive . '";' - ); + $navi = $db->query('SELECT * FROM ' . $prefix . '_' . TBL_NAVI . ' WHERE ' . $prefix . '_navId = "' . $navActive . '";'); $navPoint = $navi->fetch_assoc(); if ($navPoint[$prefix . '_specialSite'] === 'Y') @@ -182,15 +158,7 @@ function fnc_getUsernameById($userId) global $db; $return = ''; - $user = $db->query - ( - 'SELECT - * - FROM - ' . TBL_USER . ' - WHERE - userId = "' . $userId . '";' - ); + $user = $db->query('SELECT * FROM ' . TBL_USER . ' WHERE userId = "' . $userId . '";'); if ($user->num_rows > 0) { $dat_user = $user->fetch_assoc(); @@ -231,16 +199,7 @@ function fnc_generateUniqueUsername($lastName, $firstName) global $db; $username = mb_strtolower(substr($firstName, 0, 1), 'UTF-8') . mb_strtolower($lastName, 'UTF-8'); - $count = $db->query - ( - 'SELECT - * - FROM - ' . TBL_USER . ' - WHERE - userUsername = "' . $username . '" OR - userUsername LIKE "' . $username . '_%";' - ); + $count = $db->query('SELECT * FROM ' . TBL_USER . ' WHERE userUsername = "' . $username . '" OR userUsername LIKE "' . $username . '_%";'); if ($count->num_rows !== 0) { @@ -253,15 +212,7 @@ function fnc_generateUniqueUsername($lastName, $firstName) function fnc_writeLog($entry, $params, $userId) { 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) @@ -283,28 +234,10 @@ function fnc_sendEmailToUser($mailId, $userId, $sessionUserId) global $vC; global $lang; - $result = $db->query - ( - 'SELECT - * - FROM - ' . TBL_USER . ' - WHERE - userId = "' . $userId . '" - LIMIT 1;' - ); + $result = $db->query('SELECT * FROM ' . TBL_USER . ' WHERE userId = "' . $userId . '" LIMIT 1;'); $recipient = $result->fetch_assoc(); - $result = $db->query - ( - 'SELECT - * - FROM - ' . TBL_USER . ' - WHERE - userId = "' . $sessionUserId . '" - LIMIT 1;' - ); + $result = $db->query('SELECT * FROM ' . TBL_USER . ' WHERE userId = "' . $sessionUserId . '" LIMIT 1;'); $sender = $result->fetch_assoc(); $mailSubj = $lang['mail']['subj'][$mailId]; @@ -368,28 +301,11 @@ function fnc_checkUniqueEmailAddress($emailAddress, $userId = '') if ($userId !== '') { - $count = $db->query - ( - 'SELECT - * - FROM - ' . TBL_USER . ' - WHERE - userId != "' . $userId . '" AND - userEmail = "' . $emailAddress . '";' - ); + $count = $db->query('SELECT * FROM ' . TBL_USER . ' WHERE userId != "' . $userId . '" AND userEmail = "' . $emailAddress . '";'); } else { - $count = $db->query - ( - 'SELECT - * - FROM - ' . TBL_USER . ' - WHERE - userEmail = "' . $emailAddress . '";' - ); + $count = $db->query('SELECT * FROM ' . TBL_USER . ' WHERE userEmail = "' . $emailAddress . '";'); } if ($count->num_rows === 0) { @@ -423,32 +339,11 @@ function fnc_getSiteContents($contentParts, $prefix) if ($table === 'textimage') { - $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;' - ); + $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;'); } else { - $tmp_content = $db->query - ( - 'SELECT - * - FROM - ' . $prefix . '_content_' . $table . ' - WHERE - id = ' . $id . ';' - ); + $tmp_content = $db->query('SELECT * FROM ' . $prefix . '_content_' . $table . ' WHERE id = ' . $id . ';'); } if ($tmp_content->num_rows === 0) diff --git a/administrator/css/svjf_editor.css b/administrator/css/svjf_editor.css index 9f20762..2e12dcb 100644 --- a/administrator/css/svjf_editor.css +++ b/administrator/css/svjf_editor.css @@ -122,6 +122,21 @@ 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) { float: left; } @@ -290,30 +305,36 @@ li.navclose ul { background-color: #ffffff; } -#imgHolder { +#editor_form .ui-icon { + background-image: url('../../css/images/ui-icons_e3000b_256x240.png'); +} + +#imagePlaceholder { padding: 0; position: relative; left: 22px; - margin-bottom: 48px; + margin-bottom: 55px; } -#imgImage { +#editImage { position: absolute; z-index: 10; } -#imgBlende { +#imageCover { position: absolute; - z-index: 100; + z-index: 20; } -#imgPreview { +#imagePreview { + position: absolute; left: 0; top: 0; cursor: move; + z-index: 30; } -#blendeTop, #blendeLeft, #blendeRight, #blendeBottom { +#coverTop, #coverRight, #coverBottom, #coverLeft { position: absolute; background-color: rgba(255, 255, 255, .7); } @@ -435,6 +456,13 @@ input.subline { color: #ffffff; font-weight: bold; padding: 0 11px; +} + +#element_title > .min { + cursor: pointer; +} + +#boxtitle { cursor: move; } @@ -481,7 +509,7 @@ input.subline { background-color: #ffffff; } -#content .sort_handle, #rist_editor .sort_handle { +#content .sort_handle, #editor_form .sort_handle { background-color: #ffffff; position: absolute; right: 0; @@ -492,7 +520,7 @@ input.subline { cursor: move; } -#content .del_handle, #rist_editor .del_handle { +#content .del_handle, #editor_form .del_handle { background-color: #ffffff; position: absolute; right: 24px; @@ -503,7 +531,11 @@ input.subline { cursor: pointer; } -#newSort_box li { +#newSort_box { + float: left; +} + +#newSort_box li, .navSort li { position: relative; list-style-type: none; } @@ -519,6 +551,7 @@ input.subline { #imgThumbs img { display: block; float: none; + position: relative; } #wait { diff --git a/administrator/popups/logfiles/index.php b/administrator/popups/logfiles/index.php index 9cf8f02..bec8052 100644 --- a/administrator/popups/logfiles/index.php +++ b/administrator/popups/logfiles/index.php @@ -2,8 +2,8 @@ session_start(); -define('PATH_ROOT', '../../../'); -include_once(PATH_ROOT . '.config/config_global.php'); +$pathRoot = dirname(dirname(dirname(__DIR__))) . '/'; +include_once($pathRoot . '.config/config_global.php'); require_once(PATH_CLS . 'rendering/viewClass.php'); /* Funktionen und Aktionen einbinden */ diff --git a/administrator/popups/usermanagement/index.php b/administrator/popups/usermanagement/index.php index 0112a73..e50e165 100644 --- a/administrator/popups/usermanagement/index.php +++ b/administrator/popups/usermanagement/index.php @@ -2,9 +2,8 @@ session_start(); -define('PATH_ROOT', '../../../'); - -include_once(PATH_ROOT . '.config/config_global.php'); +$pathRoot = dirname(dirname(dirname(__DIR__))) . '/'; +include_once($pathRoot . '.config/config_global.php'); require_once(PATH_CLS . 'rendering/viewClass.php'); /* Funktionen und Aktionen einbinden */ diff --git a/administrator/webservices/remote_data.php b/administrator/webservices/remote_data.php index 071ecc6..f504db7 100644 --- a/administrator/webservices/remote_data.php +++ b/administrator/webservices/remote_data.php @@ -4,22 +4,7 @@ header('Access-Control-Allow-Origin: *'); // unset( $_POST[ 'uploadFile' ] ); // die ( ); -if (!isset ($_POST['request'])) -{ - 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'])) +if (!isset($_POST['request']) || !isset($_POST['userId']) || !isset($_POST['dataSet']) || !isset($_POST['prefix'])) { die('Wrong parameters'); } @@ -63,7 +48,6 @@ if ($_POST['request'] === 'getData') while ($fetch_data = $result->fetch_assoc()) { $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)))) { @@ -99,7 +83,6 @@ if ($_POST['request'] === 'getData') echo json_encode($data, JSON_UNESCAPED_UNICODE); } - else if ($_POST['request'] === 'updateData') { $error = false; @@ -151,6 +134,7 @@ else if ($_POST['request'] === 'updateData') { $columns = $db->query('SHOW COLUMNS FROM ' . $_POST['prefix'] . '_' . $table . ';'); $fieldNames = array(); + while ($column = $columns->fetch_assoc()) { $fieldNames[] = $column['Field']; @@ -164,13 +148,12 @@ else if ($_POST['request'] === 'updateData') } } - /* Behandlung Keyvisual und 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'])) @@ -180,7 +163,7 @@ else if ($_POST['request'] === 'updateData') 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 */ 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_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); - fnc_checkOrigResize(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/', $file_name_orig, $file_name_temp, $extension, ${$_POST['prefix']}['dimOrig']); + file_put_contents(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name_temp, $decodedData); + 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') { @@ -223,13 +206,7 @@ else if ($_POST['request'] === 'updateData') } } - $new = $db->query - ( - 'INSERT INTO - ' . $_POST['prefix'] . '_' . $table . ' - SET - ' . implode(' , ', $data) - ); + $new = $db->query('INSERT INTO ' . $_POST['prefix'] . '_' . $table . ' SET ' . implode(' , ', $data)); $new_id = $db->insert_id; unset ($data); @@ -264,7 +241,7 @@ else if ($_POST['request'] === 'updateData') $extension = $img_data['imgExtension']; $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_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 = 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_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(PATH_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $old_name_orig, PATH_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_thumb, WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name_thumb); + rename(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $old_name_orig, WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name_orig); + rename(WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $old_name, WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name); } else { $file_name = $old_name; $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']; } - $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 */ 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']; } - $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 */ @@ -371,7 +348,6 @@ else if ($_POST['request'] === 'updateData') } else if ($_POST['request'] === 'insertData') { - $error = false; if ($table === 'navi') { @@ -496,7 +472,7 @@ else if ($_POST['request'] === 'insertData') else { $columns = $db->query('SHOW COLUMNS FROM ' . $_POST['prefix'] . '_' . $table . ';'); - + $fieldNames = array(); while ($column = $columns->fetch_assoc()) { $fieldNames[] = $column['Field']; @@ -512,9 +488,9 @@ else if ($_POST['request'] === 'insertData') 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 */ @@ -532,15 +508,15 @@ else if ($_POST['request'] === 'insertData') /* Originales Bild speichern */ $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 */ - $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 */ 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 */ @@ -556,9 +532,9 @@ else if ($_POST['request'] === 'insertData') 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 */ @@ -567,13 +543,13 @@ else if ($_POST['request'] === 'insertData') /* Originales Bild speichern */ $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(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_orig); + copy(WEBSERVICE_MED . $_POST['prefix'] . '/sample_image.jpg', WEBSERVICE_MED . $_POST['prefix'] . '/' . $_POST['navId'] . '/' . $file_name); /* Thumbnail aus generiertem Bild erzeugen */ 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) @@ -585,22 +561,10 @@ else if ($_POST['request'] === 'insertData') $img_name = $db->real_escape_string(str_replace('.' . $extension, '', $file_name)); $img_title = $db->real_escape_string('Sample Image'); - $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 . '" );' - ); + $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 . '");'); $image_id = $db->insert_id; - $text = $db->query - ( - 'INSERT INTO - ' . $_POST['prefix'] . '_' . TBL_TEXT . ' - VALUES ( NULL , "' . $_POST['content'] . '" );' - ); + $text = $db->query('INSERT INTO ' . $_POST['prefix'] . '_' . TBL_TEXT . ' VALUES (NULL, "' . $_POST['content'] . '" );'); $text_id = $db->insert_id; $data['content_text_id'] = $text_id; @@ -625,16 +589,7 @@ else if ($_POST['request'] === 'insertData') if ($_POST['dataSet'] === 'keyvisual') { $insert = $db->insert_id; - $update = $db->query - ( - 'UPDATE - ' . $_POST['prefix'] . '_' . TBL_NAVI . ' - SET - ' . $_POST['prefix'] . '_keyvisual = "' . $insert . '" - WHERE - ' . $_POST['prefix'] . '_navId = "' . $_POST['navId'] . '" - LIMIT 1;' - ); + $update = $db->query('UPDATE ' . $_POST['prefix'] . '_' . TBL_NAVI . ' SET ' . $_POST['prefix'] . '_keyvisual = "' . $insert . '" WHERE ' . $_POST['prefix'] . '_navId = "' . $_POST['navId'] . '" LIMIT 1;'); if ($update) { @@ -648,7 +603,7 @@ else if ($_POST['request'] === 'insertData') elseif ($table === 'content_text' || $table === 'content_subline' || $table === 'content_textimage') { $insert = $db->insert_id; - $siteContents = json_decode($_POST['order']); + $siteContents = $_POST['order']; foreach ($siteContents as $key => $value) { @@ -656,20 +611,11 @@ else if ($_POST['request'] === 'insertData') $siteContents[$key] = str_replace('content_', '', $value); if (!is_numeric(end($content))) { - $siteContents[$key] .= '_' . $insert; + $siteContents[$key] .= $insert; } } - $update = $db->query - ( - 'UPDATE - ' . $_POST['prefix'] . '_' . TBL_CONTENT . ' - SET - siteContents = "' . implode(';', $siteContents) . '" - WHERE - siteId = "' . $_POST['navId'] . '" - LIMIT 1;' - ); + $update = $db->query('UPDATE ' . $_POST['prefix'] . '_' . TBL_CONTENT . ' SET siteContents = "' . implode(';', $siteContents) . '" WHERE siteId = "' . $_POST['navId'] . '" LIMIT 1;'); if ($update) { @@ -684,32 +630,16 @@ else if ($_POST['request'] === 'insertData') } elseif (isset ($_POST['formAction']) && $_POST['formAction'] === 'appendContent') { + /** + * TODO: Eventuell unnötig + */ $newId = $table . '_' . $db->insert_id; $mainSet = explode('_', $_POST['mainContent']); - $oldContent = $db->query - ( - 'SELECT - * - FROM - ' . $_POST['prefix'] . '_' . $mainSet[0] . ' - WHERE - id = "' . $mainSet[1] . '";' - ); + $oldContent = $db->query('SELECT * FROM ' . $_POST['prefix'] . '_' . $mainSet[0] . ' WHERE id = "' . $mainSet[1] . '";'); $content = $oldContent->fetch_assoc(); - $siteContent = ($content['siteContents'] === '') - ? $newId - : $content['siteContents'] . ';' . $newId; - $update = $db->query - ( - 'UPDATE - ' . $_POST['prefix'] . '_' . $mainSet[0] . ' - SET - siteContents = "' . $siteContent . '" - WHERE - id = "' . $mainSet[1] . '" - LIMIT 1;' - ); + $siteContent = ($content['siteContents'] === '') ? $newId : $content['siteContents'] . ';' . $newId; + $update = $db->query('UPDATE ' . $_POST['prefix'] . '_' . $mainSet[0] . ' SET siteContents = "' . $siteContent . '" WHERE id = "' . $mainSet[1] . '" LIMIT 1;'); if ($update) { json_encode($update); @@ -751,33 +681,16 @@ else if ($_POST['request'] === 'deleteData') if ($result && strpos($table, 'content_') !== false) { $content_part = str_replace('content_', '', $_POST['dataSet']); - $content_data = $db->query - ( - 'SELECT - * - FROM - ' . $_POST['prefix'] . '_' . TBL_CONTENT . ' - WHERE - siteId = "' . $_POST['navId'] . '";' - ); + $content_data = $db->query('SELECT * FROM ' . $_POST['prefix'] . '_' . TBL_CONTENT . ' WHERE siteId = "' . $_POST['navId'] . '";'); $content = $content_data->fetch_assoc(); $siteContents = explode(';', $content['siteContents']); $content_key = array_keys($siteContents, $content_part); - if (!empty ($content_key)) + if (!empty($content_key)) { unset ($siteContents[$content_key[0]]); - $db->query - ( - 'UPDATE - ' . $_POST['prefix'] . '_' . TBL_CONTENT . ' - SET - siteContents = "' . implode(';', $siteContents) . '" - WHERE - id = "' . $content['id'] . '" - LIMIT 1;' - ) || $error = true; + $db->query('UPDATE ' . $_POST['prefix'] . '_' . TBL_CONTENT . ' SET siteContents = "' . implode(';', $siteContents) . '" WHERE id = "' . $content['id'] . '" LIMIT 1;') || $error = true; } } diff --git a/css/svjf_l1.css b/css/svjf_l1.css index 2e969c3..41883a5 100644 --- a/css/svjf_l1.css +++ b/css/svjf_l1.css @@ -1,634 +1,629 @@ -body - { - font-family : verdana; - padding : 0px; - height : 100%; - } -input , select , textarea - { - font-family : verdana; - font-size : .625rem; - line-height : 1rem; - } -b , strong - { - font-weight : bold; - } -i - { - font-style : italic; - } -a - { - color : #E3000B; - } -h1 - { - font-size : 1.5rem; - font-weight : bold; - } -h2 - { - font-size : 1.25rem; - font-weight : bold; - border-bottom : 1px dotted #000000; - } -.uebersicht h2 - { - border : 0px none; - } +body { + font-family: verdana; + padding: 0px; + height: 100%; +} -.uebersicht .datum - { - border : 0px none; - } -p - { - text-align : justify; - } +input, select, textarea { + font-family: verdana; + font-size: .625rem; + line-height: 1rem; +} -.grid_1col - { - width : 24px; - } -.grid_2col - { - width : 48px; - } -.grid_3col - { - width : 72px; - } -.grid_4col - { - width : 96px; - } -.grid_5col - { - width : 120px; - } -.grid_6col - { - width : 144px; - } -.grid_7col - { - width : 168px; - } -.grid_8col - { - width : 192px; - } -.grid_9col - { - width : 216px; - } -.grid_10col - { - width : 240px; - } -.grid_11col - { - width : 264px; - } -.grid_12col - { - width : 288px; - } -.grid_13col - { - width : 312px; - } -.grid_14col - { - width : 336px; - } -.grid_15col - { - width : 360px; - } -.grid_16col - { - width : 384px; - } -.grid_17col - { - width : 408px; - } -.grid_18col - { - width : 432px; - } -.grid_19col - { - width : 456px; - } -.grid_20col - { - width : 480px; - } -.grid_21col - { - width : 504px; - } -.grid_22col - { - width : 528px; - } -.grid_23col - { - width : 552px; - } -.grid_24col - { - width : 576px; - } -.grid_25col - { - width : 600px; - } -.grid_26col - { - width : 624px; - } -.grid_27col - { - width : 648px; - } -.grid_28col - { - width : 672px; - } -.grid_29col - { - width : 696px; - } -.grid_30col - { - width : 720px; - } -.grid_31col - { - width : 744px; - } -.grid_32col - { - width : 768px; - } -.grid_33col - { - width : 792px; - } -.grid_34col - { - width : 816px; - } -.grid_35col - { - width : 840px; - } -.grid_36col - { - width : 864px; - } -.grid_37col - { - width : 888px; - } -.grid_38col - { - width : 912px; - } -.grid_39col - { - width : 936px; - } -.grid_40col - { - width : 960px; - clear : both; - } -.grid_1col , -.grid_2col , -.grid_3col , -.grid_4col , -.grid_5col , -.grid_6col , -.grid_7col , -.grid_8col , -.grid_9col , -.grid_10col , -.grid_11col , -.grid_12col , -.grid_13col , -.grid_14col , -.grid_15col , -.grid_16col , -.grid_17col , -.grid_18col , -.grid_19col , -.grid_20col , -.grid_21col , -.grid_22col , -.grid_23col , -.grid_24col , -.grid_25col , -.grid_26col , -.grid_27col , -.grid_28col , -.grid_29col , -.grid_30col , -.grid_31col , -.grid_32col , -.grid_33col , -.grid_34col , -.grid_35col , -.grid_36col , -.grid_37col , -.grid_38col , -.grid_39col - { - float : left; - display : inline-block; - min-height : 1px; - text-align : justify; - } -.spacer - { - height : 12px; - } -.full_width - { - float : none; - width : 100%; - } -.fix - { - clear : both; - float : none; - } -.left - { - text-align : left; - } -#content .floatleft - { - float : left; - } -.right - { - text-align : right; - } -#content .floatright - { - float : right; - margin-left : 24px; - } -.content - { - text-align : justify; - } -.wrapper - { - margin : 0px auto; - position : relative; - } -.background - { - background-image: linear-gradient(#E3000B 0%, #000000 100%); - } -.datum - { - font-size : 1.25rem; - font-weight : bold; - border-bottom : 1px dotted #000000; - } -.box - { - border : 1px solid #cccccc; - padding : 0px 23px; - box-shadow : 2px 2px 2px #cccccc; - } -.box > .box-header - { - background-color : #cccccc; - padding : 12px 23px; - margin-left : -24px; - font-weight : bold; - } -.sliderLeft, .sliderRight - { - height : 24px; - position : absolute; - z-index : 3; - background-color : inherit; - cursor : pointer; - } -.sliderLeft - { - left : 0px; - } -.sliderLeft_inner , .sliderRight_inner - { - color : #999999; - } -.sliderRight_inner - { - float : right; - } -.sliderLeft_inner:hover, .sliderRight_inner:hover - { - color : #ffffff; - } -.sliderLeft_inner:before - { - content : '<'; - } -.sliderRight - { - right : 0px; - text-align : right; - } -.sliderRight_inner:before - { - content : '>'; - } -.uebersicht > div - { - padding-bottom : 24px; - border-bottom : 1px solid #aaaaaa; - margin-bottom : 24px; - } -.uebersicht .link - { - color : #000000; - display : block; - } -.uebersicht .link:hover - { - text-decoration : underline; - color : #e3000b; - } +b, strong { + font-weight: bold; +} -.custom-tooltip - { - background-color : #ffffff; - color : #000000; - border : 1px solid #cccccc; - } -#navi_main_outer - { - position : fixed; - z-index : 50; - border-bottom : 2px solid #E3000B; - background-color : #ffffff; - } -#navi_main > ul > li - { - display : inline-block; - position : relative; - padding : 0px 12px; - border : 1px solid #999999; - border-right : 0px none; - z-index : 5; - min-width : 100px; - } -#navi_main > ul > li:last-of-type - { - border-right : 1px solid #999999; - } -#navi_main > ul > li:hover - { - border-bottom : 1px solid #ffffff; - } -#navi_main > ul > li > ul - { - position : absolute; - display : none; - border : 1px solid #999999; - box-shadow : 2px 2px 2px #999999; - min-width : 120px; - margin-left : -13px; - background-color : #ffffff; - border-top : 0px none; - z-index : -1; - } -#navi_main > ul > li:hover ul - { - display : block; - } -#navi_main a - { - padding : 6px 0px; - width : 100%; - color : #000000; - text-decoration : none; - font-size : .75rem; - line-height : .75rem; - display : inline-block; - white-space : nowrap; - } -#navi_main a.active - { - font-weight : bold; - } -#navi_main li li > a - { - padding : 6px 12px; - } -#navi_main li li li > a - { - padding : 6px 24px; - } -#navi_main a:before - { - content : ">"; - color : #e3000b; - display : inline-block; - margin-right : 6px; - font-weight : bold; - } -#navi_main a.active:before , #navi_main a:hover:before - { - content : ">"; - color : #e3000b; - -webkit-transform : rotate(90deg); - -moz-transform : rotate(90deg); - -ms-transform : rotate(90deg); - transform : rotate(90deg); - } -#logo - { - position : absolute; - text-align : right; - z-index : 5; - right : 0px; - } -#page - { - position : relative; - z-index : 1; - padding-top : 76px; - padding-bottom : 96px; - } -#headline_wrapper - { - height : 288px; - overflow : hidden; - position : relative; - } -.keyvisual - { - height : 288px; - } -.keyvisual img - { - width : 864px; - height : 288px; - } -#headline_site - { - position : absolute; - } -#navi_sub_outer - { - background-color : #000000; - color : #ffffff; - height : 48px; - } -#navi_last_outer - { - height : 50px; - border-bottom : 2px solid #E3000B; - background-color : #ffffff; - } -#navi_sub - { - background-color : #000000; - } -#navi_sub , #navi_last - { - overflow : hidden; - position : relative; - min-height : 24px; - } -#navi_sub ul , #navi_last ul - { - height : 24px; - line-height : 24px; - overflow : hidden; - z-index : 1; - } -#navi_sub ul li , #navi_last ul li - { - float : left; - padding-right : 24px; - } -#navi_sub ul li:last-of-type , #navi_sub_ul li:last-of-type - { - padding-right : 0px; - } -#navi_sub a , #navi_last a - { - color : #ffffff; - text-decoration : none; - font-size : .75rem; - } -#navi_last a - { - color : #E3000B; - } -#navi_sub a:before , #navi_last a:before - { - content : ">"; - color : #ffffff; - display : inline-block; - margin-right : 6px; - font-weight : bold; - } -#navi_last a:before - { - color : #E3000B; - } -#navi_sub a.active:before , #navi_sub a:hover:before , #navi_last a.active:before , #navi_last a:hover:before - { - color : #E3000B; - -webkit-transform : rotate(90deg); - -moz-transform : rotate(90deg); - -ms-transform : rotate(90deg); - transform : rotate(90deg); - font-weight : bold; - } -#content - { - padding-top : 24px; - } -#footer - { - position : fixed; - z-index : 50; - bottom : 0px; - left : 0px; - height : 48px; - background-color : #999999; - } -#galeryslider - { - position : fixed; - z-index : 999; - width : 100%; - height : 100%; - padding : 48px 72px; - background-color : rgba( 0 , 0 , 0 , .9 ); - display : none; - } -#galeryslider .slider - { - width : 100%; - height : 100%; - position : static; - } -#galeryslider img - { - object-fit : contain; - max-width : 100%; - max-height : 100%; - width : 100%; - } -#galeryslider .nivo-prevNav - { - left : 12px; - } -#galeryslider .nivo-nextNav - { - right : 12px; - } -#galeryslider .nivo-caption - { - opacity : .9; - background-color : transparent; - } -#galeryslider .nivo-slice - { - display : none; - } -#galeryslider .nivoSlider - { - position : static; - } -.close - { - position : absolute; - top : 0px; - left : 0px; - color : #ffffff; - font-size : 2rem; - font-weight : bold; - } -.close span - { - float : right; - cursor : pointer; - margin-right : 24px; - } +i { + font-style: italic; +} + +a { + color: #E3000B; +} + +h1 { + font-size: 1.5rem; + font-weight: bold; +} + +h2 { + font-size: 1.25rem; + font-weight: bold; + border-bottom: 1px dotted #000000; +} + +.uebersicht h2 { + border: 0px none; +} + +.uebersicht .datum { + border: 0px none; +} + +p { + text-align: justify; +} + +.grid_1col { + width: 24px; +} + +.grid_2col { + width: 48px; +} + +.grid_3col { + width: 72px; +} + +.grid_4col { + width: 96px; +} + +.grid_5col { + width: 120px; +} + +.grid_6col { + width: 144px; +} + +.grid_7col { + width: 168px; +} + +.grid_8col { + width: 192px; +} + +.grid_9col { + width: 216px; +} + +.grid_10col { + width: 240px; +} + +.grid_11col { + width: 264px; +} + +.grid_12col { + width: 288px; +} + +.grid_13col { + width: 312px; +} + +.grid_14col { + width: 336px; +} + +.grid_15col { + width: 360px; +} + +.grid_16col { + width: 384px; +} + +.grid_17col { + width: 408px; +} + +.grid_18col { + width: 432px; +} + +.grid_19col { + width: 456px; +} + +.grid_20col { + width: 480px; +} + +.grid_21col { + width: 504px; +} + +.grid_22col { + width: 528px; +} + +.grid_23col { + width: 552px; +} + +.grid_24col { + width: 576px; +} + +.grid_25col { + width: 600px; +} + +.grid_26col { + width: 624px; +} + +.grid_27col { + width: 648px; +} + +.grid_28col { + width: 672px; +} + +.grid_29col { + width: 696px; +} + +.grid_30col { + width: 720px; +} + +.grid_31col { + width: 744px; +} + +.grid_32col { + width: 768px; +} + +.grid_33col { + width: 792px; +} + +.grid_34col { + width: 816px; +} + +.grid_35col { + width: 840px; +} + +.grid_36col { + width: 864px; +} + +.grid_37col { + width: 888px; +} + +.grid_38col { + width: 912px; +} + +.grid_39col { + width: 936px; +} + +.grid_40col { + width: 960px; + clear: both; +} + +.grid_1col, +.grid_2col, +.grid_3col, +.grid_4col, +.grid_5col, +.grid_6col, +.grid_7col, +.grid_8col, +.grid_9col, +.grid_10col, +.grid_11col, +.grid_12col, +.grid_13col, +.grid_14col, +.grid_15col, +.grid_16col, +.grid_17col, +.grid_18col, +.grid_19col, +.grid_20col, +.grid_21col, +.grid_22col, +.grid_23col, +.grid_24col, +.grid_25col, +.grid_26col, +.grid_27col, +.grid_28col, +.grid_29col, +.grid_30col, +.grid_31col, +.grid_32col, +.grid_33col, +.grid_34col, +.grid_35col, +.grid_36col, +.grid_37col, +.grid_38col, +.grid_39col { + float: left; + display: inline-block; + min-height: 1px; + text-align: justify; +} + +.spacer { + height: 12px; +} + +.full_width { + float: none; + width: 100%; +} + +.fix { + clear: both; + float: none; +} + +.left { + text-align: left; +} + +#content .floatleft { + float: left; +} + +.right { + text-align: right; +} + +#content .floatright { + float: right; + margin-left: 24px; +} + +.content { + text-align: justify; +} + +.wrapper { + margin: 0px auto; + position: relative; +} + +.background { + background-image: linear-gradient(#E3000B 0%, #000000 100%); +} + +.datum { + font-size: 1.25rem; + font-weight: bold; + border-bottom: 1px dotted #000000; +} + +.box { + border: 1px solid #cccccc; + padding: 0px 23px; + box-shadow: 2px 2px 2px #cccccc; +} + +.box > .box-header { + background-color: #cccccc; + padding: 12px 23px; + margin-left: -24px; + font-weight: bold; +} + +.sliderLeft, .sliderRight { + height: 24px; + position: absolute; + z-index: 3; + background-color: inherit; + cursor: pointer; +} + +.sliderLeft { + left: 0px; +} + +.sliderLeft_inner, .sliderRight_inner { + color: #999999; +} + +.sliderRight_inner { + float: right; +} + +.sliderLeft_inner:hover, .sliderRight_inner:hover { + color: #ffffff; +} + +.sliderLeft_inner:before { + content: '<'; +} + +.sliderRight { + right: 0px; + text-align: right; +} + +.sliderRight_inner:before { + content: '>'; +} + +.uebersicht > div { + padding-bottom: 24px; + border-bottom: 1px solid #aaaaaa; + margin-bottom: 24px; +} + +.uebersicht .link { + color: #000000; + display: block; +} + +.uebersicht .link:hover { + text-decoration: underline; + color: #e3000b; +} + +.custom-tooltip { + background-color: #ffffff; + color: #000000; + border: 1px solid #cccccc; +} + +#navi_main_outer { + position: fixed; + z-index: 50; + background-color: #ffffff; +} + +#navi_main > ul > li { + display: inline-block; + position: relative; + padding: 0px 12px; + border: 1px solid #999999; + border-right: 0px none; + z-index: 5; + min-width: 100px; +} + +#navi_main > ul > li:last-of-type { + border-right: 1px solid #999999; +} + +#navi_main > ul > li:hover { + border-bottom: 1px solid #ffffff; +} + +#navi_main > ul > li > ul { + position: absolute; + display: none; + border: 1px solid #999999; + box-shadow: 2px 2px 2px #999999; + min-width: 120px; + margin-left: -13px; + background-color: #ffffff; + border-top: 0px none; + z-index: -1; +} + +#navi_main > ul > li:hover ul { + display: block; +} + +#navi_main a { + padding: 6px 0px; + width: 100%; + color: #000000; + text-decoration: none; + font-size: .75rem; + line-height: .75rem; + display: inline-block; + white-space: nowrap; +} + +#navi_main a.active { + font-weight: bold; +} + +#navi_main li li > a { + padding: 6px 12px; +} + +#navi_main li li li > a { + padding: 6px 24px; +} + +#navi_main a:before { + content: ">"; + color: #e3000b; + display: inline-block; + margin-right: 6px; + font-weight: bold; +} + +#navi_main a.active:before, #navi_main a:hover:before { + content: ">"; + color: #e3000b; + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); +} + +#logo { + position: absolute; + text-align: right; + z-index: 5; + right: 0px; +} + +#page { + position: relative; + z-index: 1; + padding-top: 76px; + padding-bottom: 96px; +} + +#headline_wrapper { + height: 288px; + overflow: hidden; + position: relative; +} + +.keyvisual { + height: 288px; +} + +.keyvisual img { + width: 864px; + height: 288px; +} + +#headline_site { + position: absolute; +} + +#navi_sub_outer { + background-color: #000000; + color: #ffffff; + height: 48px; +} + +#navi_last_outer { + height: 50px; + border-bottom: 2px solid #E3000B; + background-color: #ffffff; +} + +#navi_sub { + background-color: #000000; +} + +#navi_sub, #navi_last { + overflow: hidden; + position: relative; + min-height: 24px; +} + +#navi_sub ul, #navi_last ul { + height: 24px; + line-height: 24px; + overflow: hidden; + z-index: 1; +} + +#navi_sub ul li, #navi_last ul li { + float: left; + padding-right: 24px; +} + +#navi_sub ul li:last-of-type, #navi_sub_ul li:last-of-type { + padding-right: 0px; +} + +#navi_sub a, #navi_last a { + color: #ffffff; + text-decoration: none; + font-size: .75rem; +} + +#navi_last a { + color: #E3000B; +} + +#navi_sub a:before, #navi_last a:before { + content: ">"; + color: #ffffff; + display: inline-block; + margin-right: 6px; + font-weight: bold; +} + +#navi_last a:before { + color: #E3000B; +} + +#navi_sub a.active:before, #navi_sub a:hover:before, #navi_last a.active:before, #navi_last a:hover:before { + color: #E3000B; + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + font-weight: bold; +} + +#content { + padding-top: 24px; +} + +#footer { + position: fixed; + z-index: 50; + bottom: 0px; + left: 0px; + height: 48px; + background-color: #999999; +} + +#galeryslider { + position: fixed; + z-index: 999; + width: 100%; + height: 100%; + padding: 48px 72px; + background-color: rgba(0, 0, 0, .9); + display: none; +} + +#galeryslider .slider { + width: 100%; + height: 100%; + position: static; +} + +#galeryslider img { + object-fit: contain; + max-width: 100%; + max-height: 100%; + width: 100%; +} + +#galeryslider .nivo-prevNav { + left: 12px; +} + +#galeryslider .nivo-nextNav { + right: 12px; +} + +#galeryslider .nivo-caption { + opacity: .9; + background-color: transparent; +} + +#galeryslider .nivo-slice { + display: none; +} + +#galeryslider .nivoSlider { + position: static; +} + +.close { + position: absolute; + top: 0px; + left: 0px; + color: #ffffff; + font-size: 2rem; + font-weight: bold; +} + +.close span { + float: right; + cursor: pointer; + margin-right: 24px; +} \ No newline at end of file diff --git a/js/common.js b/js/common.js index 1d23a80..e53c9f2 100644 --- a/js/common.js +++ b/js/common.js @@ -1,128 +1,114 @@ -var start = false; -var slideWidth = 3; -var animationTime = 40; +var start = false; +var slideWidth = 3; +var animationTime = 40; -$( function( ) { - $( document ).tooltip( - { - tooltipClass: 'custom-tooltip' - } ); - } ); +$(function () { + $(document).tooltip( + { + tooltipClass: 'custom-tooltip' + }); +}); -$( document ).ready( function( ) - { - /* Subnavigation: Fix für überbreite Navigation */ - var outerWidth = $( '#navi_sub' ).innerWidth( ); - var width = 0; - var mainElem = $( 'ul' , '#navi_sub' ); +$(document).ready(function () { + /* Subnavigation: Fix für überbreite Navigation */ + var outerWidth = $('#navi_sub').innerWidth(); + var width = 0; + var mainElem = $('ul', '#navi_sub'); - $( 'li' , mainElem ).each( function( key , elem ) - { - width += $( elem ).innerWidth( ) + 1; - } ); - - if ( width > outerWidth ) - { - mainElem.innerWidth ( width ); - $( '
' ).insertBefore ( mainElem ); - $( '' ).insertBefore ( mainElem ); - mainElem.css( { 'margin-left' : $( '.sliderLeft' , '#navi_sub' ).innerWidth( ) , 'margin-right' : $( '.sliderRight' , '#navi_sub' ).innerWidth( ) } ); - } - - $( 'body' ).on( 'mouseenter' , '.sliderRight_inner' , function( ) - { - start = true; - fnc_startAnimation ( $( '#navi_sub' ) , mainElem , 'left' ); - } ); - $( 'body' ).on( 'mouseleave' , '.sliderRight' , function( ) - { - start = false; - } ); - $( 'body' ).on( 'mouseenter' , '.sliderLeft_inner' , function( ) - { - start = true; - fnc_startAnimation ( $( '#navi_sub' ) , mainElem , 'right' ); - } ); - $( 'body' ).on( 'mouseleave' , '.sliderLeft' , function( ) - { - start = false; - } ); - - if( typeof(editorData) === 'undefined' && $( '#galeryslider' ).length !== 0 ) - { - $('.keyvisual' ).css({cursor: 'pointer'}); - $( '.keyvisual' ).on( 'click' , 'img' , function () - { - $('#galeryslider').show(); - } ); - } - - /* Scroll - Event für Navigationselemente: Position fixed */ - var display = false; - var sub_outer = $( '#navi_sub_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' } ); - 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' ); - last_outer.appendTo( 'body' ); - - $( window ).on( 'scroll' , function( ) - { - var offsetBody = $( window ).scrollTop( ) + parseInt( $( '#navi_main_outer' ).css( 'height' ) ); - var offsetNavi = ( $( '#navi_sub_outer' ).position( ) ) - ? $( '#navi_sub_outer' ).position( ).top - : 0; - if ( display === false && offsetBody >= offsetNavi ) - { - display = true; - sub_outer.show( ); - last_outer.show( ); - } - else if ( display === true && offsetBody <= offsetNavi ) - { - display = false; - sub_outer.hide( ); - last_outer.hide( ); - } - } ); - } ); + $('li', mainElem).each(function (key, elem) { + width += $(elem).innerWidth() + 1; + }); -function fnc_startAnimation ( outerElem , innerElem , direction ) - { - if ( start === true ) - { - outerElemWidth = outerElem.innerWidth( ); - innerElemWidth = innerElem.innerWidth( ) + parseFloat( innerElem.css( 'margin-left' ) ) + parseFloat( innerElem.css( 'margin-right' ) ); - if ( direction === 'left' ) - { - if ( outerElemWidth < innerElemWidth ) - { - innerElem.css( { 'margin-left' : parseFloat( innerElem.css( 'margin-left' ) ) - slideWidth } ); - setTimeout( function( ) - { - fnc_startAnimation ( outerElem , innerElem , direction ); - } , animationTime ); - } - else - { - start = false; - } - } - if ( direction === 'right' ) - { - maxWidth = innerElem.innerWidth( ) + $( '.sliderLeft' , outerElem ).innerWidth( ) + $( '.sliderRight' , outerElem ).innerWidth( ); - if ( maxWidth > innerElemWidth ) - { - innerElem.css( { 'margin-left' : parseFloat( innerElem.css( 'margin-left' ) ) + slideWidth } ); - setTimeout( function( ) - { - fnc_startAnimation ( outerElem , innerElem , direction ); - } , animationTime ); - } - else - { - start = false; - } - } - } - } \ No newline at end of file + if (width > outerWidth) { + mainElem.innerWidth(width); + $('').insertBefore(mainElem); + $('').insertBefore(mainElem); + mainElem.css({ + 'margin-left': $('.sliderLeft', '#navi_sub').innerWidth(), + 'margin-right': $('.sliderRight', '#navi_sub').innerWidth() + }); + } + + $('body').on('mouseenter', '.sliderRight_inner', function () { + start = true; + fnc_startAnimation($('#navi_sub'), mainElem, 'left'); + }); + $('body').on('mouseleave', '.sliderRight', function () { + start = false; + }); + $('body').on('mouseenter', '.sliderLeft_inner', function () { + start = true; + fnc_startAnimation($('#navi_sub'), mainElem, 'right'); + }); + $('body').on('mouseleave', '.sliderLeft', function () { + start = false; + }); + + if (typeof(editor) === 'undefined' && $('#galeryslider').length !== 0) { + $('.keyvisual').css({cursor: 'pointer'}); + $('.keyvisual').on('click', 'img', function () { + $('#galeryslider').show(); + }); + } + + /* Scroll - Event für Navigationselemente: Position fixed */ + var display = false; + var sub_outer = $('#navi_sub_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'}); + 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'); + last_outer.appendTo('body'); + + $(window).on('scroll', function () { + var offsetBody = $(window).scrollTop() + parseInt($('#navi_main_outer').css('height')); + var offsetNavi = ( $('#navi_sub_outer').position() ) + ? $('#navi_sub_outer').position().top + : 0; + if (display === false && offsetBody >= offsetNavi) { + display = true; + sub_outer.show(); + last_outer.show(); + } + else if (display === true && offsetBody <= offsetNavi) { + display = false; + sub_outer.hide(); + last_outer.hide(); + } + }); +}); + +function fnc_startAnimation(outerElem, innerElem, direction) { + if (start === true) { + outerElemWidth = outerElem.innerWidth(); + innerElemWidth = innerElem.innerWidth() + parseFloat(innerElem.css('margin-left')) + parseFloat(innerElem.css('margin-right')); + if (direction === 'left') { + if (outerElemWidth < innerElemWidth) { + innerElem.css({'margin-left': parseFloat(innerElem.css('margin-left')) - slideWidth}); + setTimeout(function () { + fnc_startAnimation(outerElem, innerElem, direction); + }, animationTime); + } + else { + start = false; + } + } + if (direction === 'right') { + maxWidth = innerElem.innerWidth() + $('.sliderLeft', outerElem).innerWidth() + $('.sliderRight', outerElem).innerWidth(); + if (maxWidth > innerElemWidth) { + innerElem.css({'margin-left': parseFloat(innerElem.css('margin-left')) + slideWidth}); + setTimeout(function () { + fnc_startAnimation(outerElem, innerElem, direction); + }, animationTime); + } + else { + start = false; + } + } + } +} \ No newline at end of file