Hirdetés
- HiFi műszaki szemmel - sztereó hangrendszerek
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
- Milyen házat vegyek?
- AMD Navi Radeon™ RX 9xxx sorozat
- Hobby elektronika
- NVIDIA GeForce RTX 5070 / 5070 Ti (GB205 / 203)
- Milyen asztali (teljes vagy fél-) gépet vegyek?
- Samsung LCD és LED TV-k
- Milyen processzort vegyek?
- Azonnali notebookos kérdések órája
Új hozzászólás Aktív témák
-
Alex123
senior tag
Itt a kódrészlet:
$now = $config->getTimeAndDate();
$query = "SELECT `title`, `icon`, `itemid` FROM `#__sobi2_item` WHERE (`itemid` IN ($sItems) AND `published` = 1 AND `publish_down` > '{$now}' OR `publish_down` = '{$config->nullDate}')";
$database->setQuery($query);
$itemsResArr = $database->loadObjectList();
$sobiItems = array();
if(!(empty($itemsResArr))) {
foreach ($itemsResArr as $itemArr) {
$sobiItem = new stdClass();
$sobiItem->id = $itemArr->itemid;
$sobiItem->title = $itemArr->title;
$sobiItem->icon = $itemArr->icon;
$sobiItem->latitude = null;
$sobiItem->longitude = null;
if(isset($data[$sobiItem->id]['latitude'])) {
$sobiItem->latitude = $data[$sobiItem->id]['latitude'];
}
if(isset($data[$sobiItem->id]['longitude'])) {
$sobiItem->longitude = $data[$sobiItem->id]['longitude'];
}
if($sobiItem->latitude && $sobiItem->longitude) {
if(is_numeric($sobiItem->longitude) && is_numeric($sobiItem->latitude)) {
$sobiItems[] = $sobiItem;
}
}
unset($sobiItem);
}
}
else {
return null;
}
if(empty($sobiItems)) {
return null;
}
echo "\n ";
echo "<!-- Start module -->";
echo "\n ";
echo "<div class=\"sobi2gcat{$class}\">";
echo "\n\t ";
echo "<script src=\"{$baseAddresse}/maps?file=api&v=2&key={$config->googleMapsApiKey}\" type=\"text/javascript\"></script>";
echo "\n\t <script type=\"text/javascript\">";
echo "\n\t ";
echo "//<

