Správy z terénu – MELOVCI

{source}

<!– You can place html anywhere within the source tags –>

<?php

$id = JRequest::getInt(‘id’);
$article =& JTable::getInstance(‘content’);
$article->load($id);
$article_author = $article->created_by;

$config = new JConfig();

$conn = mysql_connect($config->host, $config->user, $config->password);
$db = mysql_select_db($config->db);
mysql_query(“SET NAMES ‘utf8′”);

$sledovaniaQuery = mysql_query(“select meno, text, start_date, start_miesto, end_date, number from details where user_id = ‘$article_author’;”);

while ($row = mysql_fetch_assoc($sledovaniaQuery)) {

if ($row[“start_date”] > date(‘Y-m-d H:i:s’))

{ $stav = ‘Pripravuje sa’; }

elseif($row[“end_date”] < date(‘Y-m-d H:i:s’) and $row[“end_date”] != “0000-00-00 00:00:00”)

{ $stav = ‘ukončené sledovanie’; }

else { $stav = ‘Na ceste’; }

#$newDate = date(“d-m-Y”, strtotime($row[“start_date”]);

echo “<table style=’border: 0px solid #006600; width: 552px;’ border=’0′ cellspacing=’5′ cellpadding=’5′ frame=’void’> <tbody> <tr> <td style=’border: 1px solid #8ca040; width: 562px; text-align: justify;’ colspan=’4′><img src=’/images/stories/Clanky/Akcie/popis.png’ border=’0′ alt=’Popis’ title=’Popis’ style=’float: left; border: 0px none; margin: 10px;’> <div> <div> <div>” . $row[“text”] . “</div> </div> </div> <span style=’font-size: medium;’><span style=’color: #800000;’><strong> </strong></span></span></td> </tr> <tr> <td style=’border: 1px solid #8ca040; width: 562px; text-align: left;’ colspan=’4′><img src=’/images/stories/Clanky/Akcie/start.png’ border=’0′ alt=’štartuje sa’ title=’štartuje sa’ style=’vertical-align: middle; margin-left: 10px; margin-right: 10px; border: 0pt none;’>” .date(“j.n.Y”,strtotime($row[“start_date”])).”<img src=’/images/stories/Clanky/Akcie/kde.png’ border=’0′ alt=’kde sa štartuje’ title=’kde sa štartuje’ style=’vertical-align: middle; margin-left: 10px; margin-right: 10px; border: 0px none;’>”.$row[“start_miesto”].”<img src=’/images/stories/Clanky/Akcie/user.png’ border=’0′ alt=’počet ľudí’ title=’počet ľudí’ style=’vertical-align: middle; margin-left: 10px; margin-right: 10px; border: 0px none;’>”.$row[“number”].”<span style=’color: #800000;’><img src=’/images/stories/Ostatne/turista.png’ border=’0′ alt=’stav sledovania’ title=’stav sledovania’ style=’vertical-align: middle; margin: 10px 20px; border: 0px none;’><strong>”. $stav.”<br></strong></span></td> </tr>

<tr> <td style=’width: 562px; text-align: right’ colspan=’4′><a href=’/index.php/spravy-z-terenu/”.$id.”#comments’><u>Komentáre / Pridaj komentár</u></a></td> </tr>

</tbody> </table>”;

}
    
?>
<br>
{/source}

{source}

<style>

#wrapper { text-align:left; }

#mapa { display:inline; margin-right:2px; }

#obrazok { display:inline; margin-right:2px;text-align:right; }

</style>

<?php


$id = JRequest::getInt(‘id’);
$article =& JTable::getInstance(‘content’);
$article->load($id);
$article_author = $article->created_by;

$config = new JConfig();

$conn = mysql_connect($config->host, $config->user, $config->password);
$db = mysql_select_db($config->db);
mysql_query(“SET NAMES ‘utf8′”);

$sledovaniaQuery = mysql_query(“select lat, lon, pub_date from spravy where user_id = ‘$article_author’ order by pub_date desc LIMIT 1;”);

while($row = mysql_fetch_assoc($sledovaniaQuery)){

echo “<iframe style=’width:564px; height:310px;’ src=’http://embedded.freemap.sk/?layers=T&lon=19.7&amp;lat=48.75&amp;zoom=7&amp;mlon=”.$row[“lon”].”&amp;mlat=“.$row[“lat”].”&amp;marker=http://cestasnp.sk/download/icon_position.png,15,15,-7,-7” scrolling=’no’ marginheight=’0′ marginwidth=’0′ frameborder=’0′></iframe></p>“;

}

$sledovaniaQuery = mysql_query(“select text, lat, lon, pub_date, img from spravy where user_id = ‘$article_author’ order by pub_date desc LIMIT 200;”);

while($row = mysql_fetch_assoc($sledovaniaQuery)){

 

if ($toComapreLon == $row[“lon”] and $toCompareLat == $row[“lat”]){

echo <p style=’text-align: justify’> <b>“.date(“j.n.Y H:i:s”,strtotime($row[“pub_date”])). “</b></br><b>poloha je rovnaká ako v správe vyššie.</b>“. $row[“text”]. “</p>” . “<p>

<div id=’obrazok’>

<a href=‘/images/stories/Ostatne/sledovanie_upload/”.$article_author.”/”.$row[“img”].”‘> <img src=’/images/stories/Ostatne/sledovanie_upload/”.$article_author.”/”.$row[“img”].”‘ height=’185′ width=’241′ border=’0′ onerror=’this.style.display = \”none\”‘ alt=’foto’ title=’foto’></a>

</div>“;

continue;

}

echo “

<p style=’text-align: justify’> <b>“.date(“j.n.Y H:i:s”,strtotime($row[“pub_date”])). “</b> <br>“. $row[“text”]. “</p>” . “<p>

<div id=’wrapper’>

<div id=’mapa’>

<iframe style=’width:306px; height:185px;’ src=’http://embed2.freemap.sk/index.html?lat=“.$row[“lat”].”&amp;lon=“.$row[“lon”].”&amp;zoom=12&amp;layers=T&amp;markerLat=“.$row[“lat”].”&amp;markerLon=“.$row[“lon”].”‘ scrolling=’no’ marginheight=’0′ marginwidth=’0′ frameborder=’0′></iframe>

</div>

<div id=’obrazok’>

<a href=‘/images/stories/Ostatne/sledovanie_upload/”.$article_author.”/”.$row[“img”].”‘> <img src=’/images/stories/Ostatne/sledovanie_upload/”.$article_author.”/”.$row[“img”].”‘ height=’185′ width=’241′ border=’0’ onerror=’this.style.display = \”none\”‘ alt=’foto’ title=’foto’></a>

</div>

</div>

</p>“;

$toComapreLon = $row[“lon”];

$toCompareLat = $row[“lat”];

}
    
?>
<br>
{/source}

{jcomments on}

Pridaj komentár

Vaša e-mailová adresa nebude zverejnená. Vyžadované polia sú označené *