";
echo "";
}
elseif ($objectData['page-background-color']) {
$backgroundColor = $objectData['page-background-color'];
// echo "";
echo "";
}
}
else {
if ($objectData['object-width'] > 1) {
///////////////// PARSING BRGINN /////////////////
$objectType = $objectData['type'];
$zIndex = $objectData['object-zindex'];
$height = $objectData['object-height'];
$heightNumb = substr($height, 0, strlen($height)-3);
$screenHeight = 907;
$heightCalc = $heightNumb / $screenHeight * 100;
$heightProcent = $heightCalc . "vh";
$top = $objectData['object-top'];
$topNumb = substr($top, 0, strlen($lft)-3);
$topCalc = $topNumb / $screenHeight * 100;
$topProcent = $topCalc . "vh";
$width = $objectData['object-width'];
$widthNumb = substr($width, 0, strlen($width)-3);
$screenWidth = 1919;
$widthCalc = $widthNumb / $screenWidth * 100;
$widthProcent = $widthCalc . "vw";
$left = $objectData['object-left'];
$leftNumb = substr($left, 0, strlen($lft)-3);
$leftCalc = $leftNumb / $screenWidth * 100;
$leftProcent = $leftCalc . "vw";
$link = substr($objectData['object-link'], 0, -1);
if (str_contains($objectType, 'image')) {
//// iamg file specifications alayisis
// echo "yes its an image
";
$path = "https://pl4tform.org/".$hotglueSitePathFromDatabase."shared/" . $objectData['image-file'];
}
// elseif (str_contains($objectType, 'iframe')) {
// $iframeUrl = $objectData['iframe-url'];
// $objectWidth = $objectData['object-width'];
// }
else {
//// text file specifications alayisis
$lastLines = array_slice($lines, $textStartLine);
$text = implode("
", $lastLines);
// echo "its a text
text: $text
";
$path = "";
$fontSize = $objectData['text-font-size'];
$fontColor = $objectData['text-font-color'];
$backgroundColor = $objectData['text-background-color'];
$objectWidth = $objectData['object-width'];
// attention there will be "" inside the font family
$fontFamily = $objectData['text-font-family'];
$fontStyle = $objectData['text-font-style'];
$fontWeight = $objectData['text-font-weight'];
$letterSpacing = $objectData['text-letter-spacing'];
$lineHeight = $objectData['text-line-height'];
$paddingTop = $objectData['text-padding-y'];
$paddingBottom = $objectData['text-padding-y'];
$paddingLeft = $objectData['text-padding-x'];
$paddingRight = $objectData['text-padding-x'];
$textAlign = $objectData['text-align'];
$wordSpacing = $objectData['text-word-spacing'];
$iframeUrl = $objectData['iframe-url'];
}
///////////////// PARSING END /////////////////
$ratioHW = $heightNumb / $widthNumb;
$heightNew = $ratioHW * $widthCalc . "vw";
$ratioTW = $topNumb / $widthNumb;
$topNew = $ratioTW * $widthCalc . "vw";
$url = "";
if (strlen($link < 1)) {
#### NOFUNCTION
$btnType = 'noFunctionBtn';
$load = "";
$directFocus = "";
$cat = "";
$onclick = '';
$loadOnHover = $link;
$loadOnHover_name = $loadOnHover;
}
elseif (str_contains($link, "livestream")){
##### LIVESTREAM
$load = "loadLiveBtn";
$directFocus = "";
$cat = "";
$onclick = 'audioPlay("https://pl4tform.org/stream","livestream")';
$loadOnHover = 'Livestream';
$loadOnHover_name = "Livestream";
}
elseif (str_contains($link, "play")){
##### DIRECT PLAY
$load = "";
$cat = $link;
$loadOnHover = "";
$cat = str_replace('play', '', $cat);
$file_id = $cat;
// Abrufen der Datei-Informationen
$file_info = getFileInfo($file_id);
// Überprüfen, ob die Datei gefunden wurde
if ($file_info) {
$file_id = $file_info['file_id'];
$file_name = $file_info['file_name'];
$file_size = $file_info['file_size'];
$mimetype_name = $file_info['mimetype_name'];
$file_tags = $file_info['file_tags'];
$file_title = $file_info['file_title'];
}
// echo "CAAAT: $cat and file_name: $file_name";
$loadOnHover_name = $file_title;
$onclick = 'audioPlay("https://pl4tform.org/ncdata/'.$file_name.'","'.$file_name.'");';
}
########## HAVE TO FIX HOVER LATER !!!
// elseif (str_contains($link, "hover")){
// $load = "hoverFocusBtn";
// $directFocus = "";
// $cat = $btnId;
// if (str_contains($btnId, ".txt")) {
// $loadOnHover = file_get_contents("https://pl4tform.org/data/files/".$cat);
// $loadOnHover = str_replace("\n", '', $loadOnHover);
// }
// else {
// $loadOnHover = $btnId;
// }
// $onclick = '';
// }
elseif (str_contains($link, "archive")){
##### ARCHIVE CHRONOLOGIC
$load = "loadMapBtn";
$directFocus = "";
$btnId = $link;
$cat = $btnId;
$onclick = 'openMap("archive")';
$loadOnHover = "Chronologic Archive";
$loadOnHover_name = $loadOnHover;
}
elseif (str_contains($link, "url")){
##### ARCHIVE CHRONOLOGIC
$load = "loadMapBtn";
$directFocus = "";
$btnId = $link;
$cat = $btnId;
$onclick = '';
$url = str_replace("url","https://",$link);
$loadOnHover = $url;
$loadOnHover_name = $loadOnHover;
}
elseif (str_contains($link, "home")){
##### HOME CLOSE ALL
$load = "loadMapBtn";
$directFocus = "";
$btnId = $link;
$cat = $btnId;
$onclick = 'closeAll()';
$loadOnHover = "Home";
$loadOnHover_name = $loadOnHover;
}
elseif (str_contains($link, "search")){
##### SEARCH
$load = "loadMapBtn";
$directFocus = "";
$btnId = $link;
$cat = $btnId;
$onclick = 'openSearchBar()';
$loadOnHover = "Search";
$loadOnHover_name = $loadOnHover;
}
elseif(preg_match("/[a-z]/i", $link) OR strlen($link < 3)){
##### MAP (and old zone) (it has letters !)
$load = "loadMapBtn";
$directFocus = "";
$btnId = $link;
$cat = $btnId;
$onclick = 'openMap("'.$btnId.'")';
$loadOnHover = $link;
$loadOnHover_name = $loadOnHover;
}
elseif (strlen($link > 3) AND preg_match('~[0-9]+~', $link)) {
// echo "itsafocusss";
#### FOCUS
$btnType = "focus";
$load = "";
$cat = $link;
$loadOnHover = $cat;
// Beispiel: Datei-ID, die du abfragen möchtest
$file_id = $cat;
// Abrufen der Datei-Informationen
$file_info = getFileInfo($file_id);
// Überprüfen, ob die Datei gefunden wurde
if ($file_info) {
$file_id = $file_info['file_id'];
$file_name = $file_info['file_name'];
$file_size = $file_info['file_size'];
$mimetype_name = $file_info['mimetype_name'];
$file_tags = $file_info['file_tags'];
$file_title = $file_info['file_title'];
}
// echo "CAAAT: $cat and file_name: $file_name";
$loadOnHover_name = $file_title;
$onclick = 'focusItem("'.$file_id.'");';
}
// $btnType = "NOMOREBTNTYPE";
///////////////// OUTPUT /////////////////
if (strlen($url > 1)) {
echo "";
// echo "yoo";
}
if (str_contains($objectType, 'image')) {
// IMAGE
echo "
";
}
elseif (str_contains($objectType, 'iframe')) {
// IFRAME
echo "
";
}
else {
// TEXT
echo "
";
}
if (strlen($url > 1)) {
echo "";
}
}
else {
}
}
};
if (isset($_POST["mapId"])) {
$mapId = substr($_POST["mapId"], 0, strlen($_POST["mapId"]));
echo "";
}
?>