function listEntries($objTpl, $intView, $googleMapPlaceholder = null) { global $_ARRAYLANG, $_CORELANG, $objDatabase; $objFWUser = \FWUser::getFWUserObject(); $intToday = time(); $i = 0; switch ($intView) { case 1: //Backend View if (!empty($this->arrEntries)) { foreach ($this->arrEntries as $key => $arrEntry) { if (intval($arrEntry['entryAddedBy']) != 0) { if ($objUser = $objFWUser->objUser->getUser(intval($arrEntry['entryAddedBy']))) { $strAddedBy = $objUser->getUsername(); } else { $strAddedBy = "unknown"; } } else { $strAddedBy = "unknown"; } if ($arrEntry['entryActive'] == 1) { $strStatus = '../core/Core/View/Media/icons/status_green.gif'; $intStatus = 0; if (($arrEntry['entryDurationStart'] > $intToday || $arrEntry['entryDurationEnd'] < $intToday) && $arrEntry['entryDurationType'] == 2) { $strStatus = '../core/Core/View/Media/icons/status_yellow.gif'; } } else { $strStatus = '../core/Core/View/Media/icons/status_red.gif'; $intStatus = 1; } $objForm = new MediaDirectoryForm($arrEntry['entryFormId'], $this->moduleName); //get votes if ($this->arrSettings['settingsAllowVotes']) { $objVoting = new MediaDirectoryVoting($this->moduleName); $objVoting->getVotes($objTpl, $arrEntry['entryId']); if ($objTpl->blockExists('mediadirEntryVotes')) { $objTpl->parse('mediadirEntryVotes'); } } else { if ($objTpl->blockExists('mediadirEntryVotes')) { $objTpl->hideBlock('mediadirEntryVotes'); } } //get comments if ($this->arrSettings['settingsAllowComments']) { $objComment = new MediaDirectoryComment($this->moduleName); $objComment->getComments($objTpl, $arrEntry['entryId']); if ($objTpl->blockExists('mediadirEntryComments')) { $objTpl->parse('mediadirEntryComments'); } } else { if ($objTpl->blockExists('mediadirEntryComments')) { $objTpl->hideBlock('mediadirEntryComments'); } } $objTpl->setVariable(array($this->moduleLangVar . '_ROW_CLASS' => $i % 2 == 0 ? 'row1' : 'row2', $this->moduleLangVar . '_ENTRY_ID' => $arrEntry['entryId'], $this->moduleLangVar . '_ENTRY_STATUS' => $strStatus, $this->moduleLangVar . '_ENTRY_SWITCH_STATUS' => $intStatus, $this->moduleLangVar . '_ENTRY_VALIDATE_DATE' => date("H:i:s - d.m.Y", $arrEntry['entryValdateDate']), $this->moduleLangVar . '_ENTRY_CREATE_DATE' => date("H:i:s - d.m.Y", $arrEntry['entryCreateDate']), $this->moduleLangVar . '_ENTRY_AUTHOR' => htmlspecialchars($strAddedBy, ENT_QUOTES, CONTREXX_CHARSET), $this->moduleLangVar . '_ENTRY_HITS' => $arrEntry['entryHits'], $this->moduleLangVar . '_ENTRY_FORM' => $objForm->arrForms[$arrEntry['entryFormId']]['formName'][0])); foreach ($arrEntry['entryFields'] as $key => $strFieldValue) { $intPos = $key + 1; $objTpl->setVariable(array($this->moduleLangVar . '_ENTRY_FIELD_' . $intPos . '_POS' => contrexx_raw2xhtml(substr($strFieldValue, 0, 255)))); } //get order if ($this->arrSettings['settingsIndividualEntryOrder'] == 1) { $objTpl->setVariable(array($this->moduleLangVar . '_ENTRY_ORDER' => '<input name="entriesOrder[' . $arrEntry['entryId'] . ']" style="width: 30px; margin-right: 5px;" value="' . $arrEntry['entryOrder'] . '" onfocus="this.select();" type="text">')); if (intval($objTpl->blockExists($this->moduleNameLC . 'EntriesSaveOrder')) != 0) { $objTpl->touchBlock($this->moduleNameLC . 'EntriesSaveOrder'); } } else { if (intval($objTpl->blockExists($this->moduleNameLC . 'EntriesSaveOrder')) != 0) { $objTpl->hideBlock($this->moduleNameLC . 'EntriesSaveOrder'); } } $i++; $objTpl->parse($this->strBlockName); $objTpl->hideBlock('noEntriesFound'); $objTpl->clearVariables(); } } else { $objTpl->setGlobalVariable(array('TXT_' . $this->moduleLangVar . '_NO_ENTRIES_FOUND' => $_ARRAYLANG['TXT_MEDIADIR_NO_ENTRIES_FOUND'])); $objTpl->touchBlock('noEntriesFound'); $objTpl->clearVariables(); } break; case 2: //Frontend View if (!empty($this->arrEntries)) { foreach ($this->arrEntries as $key => $arrEntry) { if ($arrEntry['entryDurationStart'] < $intToday && $arrEntry['entryDurationEnd'] > $intToday || $arrEntry['entryDurationType'] == 1) { $objInputfields = new MediaDirectoryInputfield(intval($arrEntry['entryFormId']), false, $arrEntry['entryTranslationStatus'], $this->moduleName); $objInputfields->listInputfields($objTpl, 3, intval($arrEntry['entryId'])); if (intval($arrEntry['entryAddedBy']) != 0) { if ($objUser = $objFWUser->objUser->getUser(intval($arrEntry['entryAddedBy']))) { $strAddedBy = $objUser->getUsername(); } else { $strAddedBy = "unknown"; } } else { $strAddedBy = "unknown"; } $strCategoryLink = $this->intCatId != 0 ? '&cid=' . $this->intCatId : null; $strLevelLink = $this->intLevelId != 0 ? '&lid=' . $this->intLevelId : null; if ($this->checkPageCmd('detail' . intval($arrEntry['entryFormId']))) { $strDetailCmd = 'detail' . intval($arrEntry['entryFormId']); } else { $strDetailCmd = 'detail'; } if ($arrEntry['entryReadyToConfirm'] == 1 || $arrEntry['entryConfirmed'] == 1) { $strDetailUrl = 'index.php?section=' . $this->moduleName . '&cmd=' . $strDetailCmd . $strLevelLink . $strCategoryLink . '&eid=' . $arrEntry['entryId']; } else { $strDetailUrl = '#'; } $objForm = new MediaDirectoryForm($arrEntry['entryFormId'], $this->moduleName); $objTpl->setVariable(array($this->moduleLangVar . '_ROW_CLASS' => $i % 2 == 0 ? 'row1' : 'row2', $this->moduleLangVar . '_ENTRY_ID' => $arrEntry['entryId'], $this->moduleLangVar . '_ENTRY_TITLE' => contrexx_raw2xhtml($arrEntry['entryFields'][0]), $this->moduleLangVar . '_ENTRY_TITLE_URL_ENCODED' => urlencode($arrEntry['entryFields'][0]), $this->moduleLangVar . '_ENTRY_VALIDATE_DATE' => date("H:i:s - d.m.Y", $arrEntry['entryValdateDate']), $this->moduleLangVar . '_ENTRY_CREATE_DATE' => date("H:i:s - d.m.Y", $arrEntry['entryCreateDate']), $this->moduleLangVar . '_ENTRY_AUTHOR' => htmlspecialchars($strAddedBy, ENT_QUOTES, CONTREXX_CHARSET), $this->moduleLangVar . '_ENTRY_CATEGORIES' => $this->getCategoriesLevels(1, $arrEntry['entryId'], $objForm->arrForms[$arrEntry['entryFormId']]['formCmd']), $this->moduleLangVar . '_ENTRY_LEVELS' => $this->getCategoriesLevels(2, $arrEntry['entryId'], $objForm->arrForms[$arrEntry['entryFormId']]['formCmd']), $this->moduleLangVar . '_ENTRY_HITS' => $arrEntry['entryHits'], $this->moduleLangVar . '_ENTRY_POPULAR_HITS' => $arrEntry['entryPopularHits'], $this->moduleLangVar . '_ENTRY_DETAIL_URL' => $strDetailUrl, $this->moduleLangVar . '_ENTRY_EDIT_URL' => 'index.php?section=' . $this->moduleName . '&cmd=edit&eid=' . $arrEntry['entryId'], $this->moduleLangVar . '_ENTRY_DELETE_URL' => 'index.php?section=' . $this->moduleName . '&cmd=delete&eid=' . $arrEntry['entryId'], 'TXT_' . $this->moduleLangVar . '_ENTRY_DELETE' => $_ARRAYLANG['TXT_MEDIADIR_DELETE'], 'TXT_' . $this->moduleLangVar . '_ENTRY_EDIT' => $_ARRAYLANG['TXT_MEDIADIR_EDIT'], 'TXT_' . $this->moduleLangVar . '_ENTRY_DETAIL' => $_ARRAYLANG['TXT_MEDIADIR_DETAIL'], 'TXT_' . $this->moduleLangVar . '_ENTRY_CATEGORIES' => $_ARRAYLANG['TXT_MEDIADIR_CATEGORIES'], 'TXT_' . $this->moduleLangVar . '_ENTRY_LEVELS' => $_ARRAYLANG['TXT_MEDIADIR_LEVELS'])); $this->parseCategoryLevels(1, $arrEntry['entryId'], $objTpl); $this->parseCategoryLevels(2, $arrEntry['entryId'], $objTpl); foreach ($arrEntry['entryFields'] as $key => $strFieldValue) { $intPos = $key + 1; $objTpl->setVariable(array('MEDIADIR_ENTRY_FIELD_' . $intPos . '_POS' => substr($strFieldValue, 0, 255))); } if ($this->arrSettings['settingsAllowVotes']) { $objVoting = new MediaDirectoryVoting($this->moduleName); if (intval($objTpl->blockExists($this->moduleNameLC . 'EntryVoteForm')) != 0) { $objVoting->getVoteForm($objTpl, $arrEntry['entryId']); } if (intval($objTpl->blockExists($this->moduleNameLC . 'EntryVotes')) != 0) { $objVoting->getVotes($objTpl, $arrEntry['entryId']); } } if ($this->arrSettings['settingsAllowComments']) { $objComment = new MediaDirectoryComment($this->moduleName); if (intval($objTpl->blockExists($this->moduleNameLC . 'EntryComments')) != 0) { $objComment->getComments($objTpl, $arrEntry['entryId']); } if (intval($objTpl->blockExists($this->moduleNameLC . 'EntryCommentForm')) != 0) { $objComment->getCommentForm($objTpl, $arrEntry['entryId']); } } if (!$this->arrSettings['settingsAllowEditEntries'] && intval($objTpl->blockExists($this->moduleNameLC . 'EntryEditLink')) != 0) { $objTpl->hideBlock($this->moduleNameLC . 'EntryEditLink'); } if (!$this->arrSettings['settingsAllowDelEntries'] && intval($objTpl->blockExists($this->moduleNameLC . 'EntryDeleteLink')) != 0) { $objTpl->hideBlock($this->moduleNameLC . 'EntryDeleteLink'); } $i++; $objTpl->parse($this->strBlockName); $objTpl->clearVariables(); } } } else { $objTpl->setVariable(array('TXT_' . $this->moduleLangVar . '_SEARCH_MESSAGE' => $_ARRAYLANG['TXT_MEDIADIR_NO_ENTRIES_FOUND'])); $objTpl->parse($this->moduleNameLC . 'NoEntriesFound'); $objTpl->clearVariables(); } break; case 3: //Alphabetical View if (!empty($this->arrEntries)) { $arrAlphaIndexes = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0-9', '#'); $arrAlphaGroups = array(); foreach ($this->arrEntries as $key => $arrEntry) { $strTitle = $arrEntry['entryFields'][0]; $strAlphaIndex = strtoupper(substr($strTitle, 0, 1)); if (!in_array($strAlphaIndex, $arrAlphaIndexes)) { if (is_numeric($strAlphaIndex)) { $strAlphaIndex = '0-9'; } else { $strAlphaIndex = '#'; } } $arrAlphaGroups[$strAlphaIndex][] = $arrEntry; } if (intval($objTpl->blockExists($this->moduleNameLC . 'AlphaIndex')) != 0) { $objTpl->touchBlock($this->moduleNameLC . 'AlphaIndex'); foreach ($arrAlphaIndexes as $key => $strIndex) { if (array_key_exists($strIndex, $arrAlphaGroups)) { $strAlphaIndex = '<a href="#' . $strIndex . '">' . $strIndex . '</a>'; } else { $strAlphaIndex = '' . $strIndex . ''; } $objTpl->setVariable(array($this->moduleLangVar . '_ALPHA_INDEX_LINK' => $strAlphaIndex)); $objTpl->parse($this->moduleNameLC . 'AlphaIndexElement'); } } foreach ($arrAlphaGroups as $strAlphaIndex => $arrEntries) { if (intval($objTpl->blockExists($this->moduleNameLC . 'AlphabeticalTitle')) != 0) { $objTpl->setVariable(array($this->moduleLangVar . '_ALPHABETICAL_ANCHOR' => $strAlphaIndex, 'TXT_' . $this->moduleLangVar . '_ALPHABETICAL_TITLE' => $strAlphaIndex)); $objTpl->parse($this->moduleNameLC . 'AlphabeticalTitle'); } foreach ($arrEntries as $key => $arrEntry) { if ($arrEntry['entryDurationStart'] < $intToday && $arrEntry['entryDurationEnd'] > $intToday || $arrEntry['entryDurationType'] == 1) { $objInputfields = new MediaDirectoryInputfield(intval($arrEntry['entryFormId']), false, $arrEntry['entryTranslationStatus'], $this->moduleName); $objInputfields->listInputfields($objTpl, 3, intval($arrEntry['entryId'])); $strStatus = $arrEntry['entryActive'] == 1 ? 'active' : 'inactive'; if (intval($arrEntry['entryAddedBy']) != 0) { if ($objUser = $objFWUser->objUser->getUser(intval($arrEntry['entryAddedBy']))) { $strAddedBy = $objUser->getUsername(); } else { $strAddedBy = "unknown"; } } else { $strAddedBy = "unknown"; } $strCategoryLink = $this->intCatId != 0 ? '&cid=' . $this->intCatId : null; $strLevelLink = $this->intLevelId != 0 ? '&lid=' . $this->intLevelId : null; if ($this->checkPageCmd('detail' . intval($arrEntry['entryFormId']))) { $strDetailCmd = 'detail' . intval($arrEntry['entryFormId']); } else { $strDetailCmd = 'detail'; } if ($arrEntry['entryReadyToConfirm'] == 1 || $arrEntry['entryConfirmed'] == 1) { $strDetailUrl = 'index.php?section=' . $this->moduleName . '&cmd=' . $strDetailCmd . $strLevelLink . $strCategoryLink . '&eid=' . $arrEntry['entryId']; } else { $strDetailUrl = '#'; } $objForm = new MediaDirectoryForm($arrEntry['entryFormId'], $this->moduleName); $objTpl->setVariable(array($this->moduleLangVar . '_ROW_CLASS' => $i % 2 == 0 ? 'row1' : 'row2', $this->moduleLangVar . '_ENTRY_ID' => $arrEntry['entryId'], $this->moduleLangVar . '_ENTRY_TITLE' => contrexx_raw2xhtml($arrEntry['entryFields'][0]), $this->moduleLangVar . '_ENTRY_TITLE_URL_ENCODED' => urlencode($arrEntry['entryFields'][0]), $this->moduleLangVar . '_ENTRY_STATUS' => $strStatus, $this->moduleLangVar . '_ENTRY_VALIDATE_DATE' => date("H:i:s - d.m.Y", $arrEntry['entryValdateDate']), $this->moduleLangVar . '_ENTRY_CREATE_DATE' => date("H:i:s - d.m.Y", $arrEntry['entryCreateDate']), $this->moduleLangVar . '_ENTRY_AUTHOR' => htmlspecialchars($strAddedBy, ENT_QUOTES, CONTREXX_CHARSET), $this->moduleLangVar . '_ENTRY_CATEGORIES' => $this->getCategoriesLevels(1, $arrEntry['entryId'], $objForm->arrForms[$arrEntry['entryFormId']]['formCmd']), $this->moduleLangVar . '_ENTRY_LEVELS' => $this->getCategoriesLevels(2, $arrEntry['entryId'], $objForm->arrForms[$arrEntry['entryFormId']]['formCmd']), $this->moduleLangVar . '_ENTRY_HITS' => $arrEntry['entryHits'], $this->moduleLangVar . '_ENTRY_POPULAR_HITS' => $arrEntry['entryPopularHits'], $this->moduleLangVar . '_ENTRY_DETAIL_URL' => $strDetailUrl, $this->moduleLangVar . '_ENTRY_EDIT_URL' => 'index.php?section=' . $this->moduleName . '&cmd=edit&eid=' . $arrEntry['entryId'], $this->moduleLangVar . '_ENTRY_DELETE_URL' => 'index.php?section=' . $this->moduleName . '&cmd=delete&eid=' . $arrEntry['entryId'], 'TXT_' . $this->moduleLangVar . '_ENTRY_DELETE' => $_ARRAYLANG['TXT_MEDIADIR_DELETE'], 'TXT_' . $this->moduleLangVar . '_ENTRY_EDIT' => $_ARRAYLANG['TXT_MEDIADIR_EDIT'], 'TXT_' . $this->moduleLangVar . '_ENTRY_DETAIL' => $_ARRAYLANG['TXT_MEDIADIR_DETAIL'], 'TXT_' . $this->moduleLangVar . '_ENTRY_CATEGORIES' => $_ARRAYLANG['TXT_MEDIADIR_CATEGORIES'], 'TXT_' . $this->moduleLangVar . '_ENTRY_LEVELS' => $_ARRAYLANG['TXT_MEDIADIR_LEVELS'])); $this->parseCategoryLevels(1, $arrEntry['entryId'], $objTpl); $this->parseCategoryLevels(2, $arrEntry['entryId'], $objTpl); foreach ($arrEntry['entryFields'] as $key => $strFieldValue) { $intPos = $key + 1; $objTpl->setVariable(array('MEDIADIR_ENTRY_FIELD_' . $intPos . '_POS' => contrexx_raw2xhtml(substr($strFieldValue, 0, 255)))); } if ($this->arrSettings['settingsAllowVotes']) { $objVoting = new MediaDirectoryVoting($this->moduleName); if (intval($objTpl->blockExists($this->moduleNameLC . 'EntryVoteForm')) != 0) { $objVoting->getVoteForm($objTpl, $arrEntry['entryId']); } if (intval($objTpl->blockExists($this->moduleNameLC . 'EntryVotes')) != 0) { $objVoting->getVotes($objTpl, $arrEntry['entryId']); } } if ($this->arrSettings['settingsAllowComments']) { $objComment = new MediaDirectoryComment($this->moduleName); if (intval($objTpl->blockExists($this->moduleNameLC . 'EntryComments')) != 0) { $objComment->getComments($objTpl, $arrEntry['entryId']); } if (intval($objTpl->blockExists($this->moduleNameLC . 'EntryCommentForm')) != 0) { $objComment->getCommentForm($objTpl, $arrEntry['entryId']); } } if (!$this->arrSettings['settingsAllowEditEntries'] && intval($objTpl->blockExists($this->moduleNameLC . 'EntryEditLink')) != 0) { $objTpl->hideBlock($this->moduleNameLC . 'EntryEditLink'); } if (!$this->arrSettings['settingsAllowDelEntries'] && intval($objTpl->blockExists($this->moduleNameLC . 'EntryDeleteLink')) != 0) { $objTpl->hideBlock($this->moduleNameLC . 'EntryDeleteLink'); } $i++; $objTpl->parse($this->moduleNameLC . 'EntryList'); $objTpl->clearVariables(); } } } } else { $objTpl->setVariable(array('TXT_' . $this->moduleLangVar . '_SEARCH_MESSAGE' => $_ARRAYLANG['TXT_MEDIADIR_NO_ENTRIES_FOUND'])); $objTpl->parse($this->moduleNameLC . 'NoEntriesFound'); $objTpl->clearVariables(); } case 4: //Google Map if (!isset($googleMapPlaceholder)) { $googleMapPlaceholder = $this->moduleLangVar . '_GOOGLE_MAP'; } // abort in case the relevant placeholder is missing in the template if (!$objTpl->placeholderExists($googleMapPlaceholder)) { break; } $objGoogleMap = new \googleMap(); $objGoogleMap->setMapId($this->moduleNameLC . 'GoogleMap'); $objGoogleMap->setMapStyleClass('mapLarge'); $objGoogleMap->setMapType($this->arrSettings['settingsGoogleMapType']); $arrValues = explode(',', $this->arrSettings['settingsGoogleMapStartposition']); $objGoogleMap->setMapZoom($arrValues[2]); $objGoogleMap->setMapCenter($arrValues[1], $arrValues[0]); foreach ($this->arrEntries as $key => $arrEntry) { if ($arrEntry['entryDurationStart'] < $intToday && $arrEntry['entryDurationEnd'] > $intToday || $arrEntry['entryDurationType'] == 1) { $intEntryId = intval($arrEntry['entryId']); $intEntryFormId = intval($arrEntry['entryFormId']); $query = "\n SELECT\n inputfield.`id` AS `id`,\n rel_inputfield.`value` AS `value`\n FROM\n " . DBPREFIX . "module_" . $this->moduleTablePrefix . "_inputfields AS inputfield,\n " . DBPREFIX . "module_" . $this->moduleTablePrefix . "_rel_entry_inputfields AS rel_inputfield\n WHERE\n inputfield.`form` = '" . $intEntryFormId . "'\n AND\n inputfield.`type`= '15'\n AND\n rel_inputfield.`field_id` = inputfield.`id`\n AND\n rel_inputfield.`entry_id` = '" . $intEntryId . "'\n LIMIT 1\n "; $objRSMapKoordinates = $objDatabase->Execute($query); if ($objRSMapKoordinates === false || empty($objRSMapKoordinates->fields['value'])) { continue; } $arrValues = explode(',', $objRSMapKoordinates->fields['value']); $strValueLon = empty($arrValues[1]) ? 0 : $arrValues[1]; $strValueLat = empty($arrValues[0]) ? 0 : $arrValues[0]; if (empty($strValueLon) && empty($strValueLat)) { continue; } if ($this->checkPageCmd('detail' . intval($arrEntry['entryFormId']))) { $strDetailCmd = 'detail' . intval($arrEntry['entryFormId']); } else { $strDetailCmd = 'detail'; } $strEntryLink = '<a href="index.php?section=' . $this->moduleName . '&cmd=' . $strDetailCmd . '&eid=' . $arrEntry['entryId'] . '">' . $_ARRAYLANG['TXT_MEDIADIR_DETAIL'] . '</a>'; $strEntryTitle = '<b>' . contrexx_raw2xhtml($arrEntry['entryFields']['0']) . '</b>'; $mapIndex = $objGoogleMap->getMapIndex(); $clickFunction = <<<JSCODE infoWindow = cx.variables.get('map_{$mapIndex}_infoWindow', '{$objGoogleMap->getMapId()}'); if (infoWindow) { infoWindow.close(); } mapMarker = cx.variables.get('map_{$mapIndex}_markers', '{$objGoogleMap->getMapId()}')[{$intEntryId}]; infoWindow.setContent(mapMarker.info); infoWindow.open(map_{$mapIndex}, mapMarker.marker); JSCODE; $objGoogleMap->addMapMarker($intEntryId, $strValueLon, $strValueLat, $strEntryTitle . "<br />" . $strEntryLink, true, $clickFunction); } } $objTpl->setVariable(array($googleMapPlaceholder => $objGoogleMap->getMap())); break; } }
function getContent($intEntryId, $arrInputfield, $arrTranslationStatus) { global $objDatabase, $_CONFIG, $_ARRAYLANG; $intId = intval($arrInputfield['id']); $objInputfieldValue = $objDatabase->Execute("\n SELECT\n `value`\n FROM\n " . DBPREFIX . "module_" . $this->moduleTablePrefix . "_rel_entry_inputfields\n WHERE\n field_id=" . $intId . "\n AND\n entry_id=" . $intEntryId . "\n LIMIT 1\n "); $strValue = htmlspecialchars($objInputfieldValue->fields['value'], ENT_QUOTES, CONTREXX_CHARSET); $arrValues = explode(',', $strValue); $strValueLat = $arrValues[0]; $strValueLon = $arrValues[1]; $strValueZoom = $arrValues[2]; $strValueLink = '<a href="http://maps.google.com/maps?q=' . $strValueLat . ',' . $strValueLon . '" target="_blank">' . $_ARRAYLANG['TXT_MEDIADIR_GOOGLEMAPS_LINK'] . '</a>'; $strValueLinkHref = 'http://maps.google.com/maps?q=' . $strValueLat . ',' . $strValueLon; if (!empty($strValue)) { $objGoogleMap = new \googleMap(); $objGoogleMap->setMapId($this->moduleNameLC . 'Inputfield_' . $intId . '_' . $intEntryId . '_map'); $objGoogleMap->setMapStyleClass('map'); $objGoogleMap->setMapZoom($strValueZoom); $objGoogleMap->setMapCenter($strValueLon, $strValueLat); $objGoogleMap->setMapIndex($intId . '_' . $intEntryId); $objGoogleMap->addMapMarker($intId, $strValueLon, $strValueLat, null, true); $arrContent['TXT_' . $this->moduleLangVar . '_INPUTFIELD_NAME'] = htmlspecialchars($arrInputfield['name'][0], ENT_QUOTES, CONTREXX_CHARSET); $arrContent[$this->moduleLangVar . '_INPUTFIELD_VALUE'] = $objGoogleMap->getMap(); $arrContent[$this->moduleLangVar . '_INPUTFIELD_LINK'] = $strValueLink; $arrContent[$this->moduleLangVar . '_INPUTFIELD_LINK_HREF'] = $strValueLinkHref; } else { $arrContent = null; } return $arrContent; }