Viewing File: /people/testlab/www/testlab.com.pl/news_left.php

<?

$sql = "select * from `pages` where id in (27)";// and jezyk=".$_SESSION['language']."";

$result = $db->query($sql);
$row=$db->fetchrow();

echo "
<div id=nowosci>

<div id=nowosci_header>".$row['nazwa']."</div>";

$link=$row['link'];
$sql = "select * from `aktualnosci` where skrypt_id=".$row['id']." order by data desc limit 1;";
$result = $db->query($sql);

while ($row=$db->fetchrow())
{
if ($row['opcje']=='') $row['opcje']='left;100;';
$params=explode(";",$row['opcje']);

$nazwa=str_replace("-","",$row['nazwa']);
$nazwa=str_replace("\"","",$nazwa);
$nazwa=str_replace("__","_",$nazwa);
echo "<div class=nowosci_title><a href='".str_replace(" ","_",$nazwa).",".$row['skrypt_id'].",".$row['id']."' style=''>".$row['nazwa']."</a></div>";
//echo "<div class=nowosci_title>".$row['nazwa']."</div>";
if ($row['plik']!='') //wczytanie miniaturki
{
	list($width, $height, $type, $attr) = getimagesize("upload/".$row['plik']);
	$style="float:".$params[0].";margin:5px;";
	$style = $style."width:".$params[1]."px;";
	echo "<img src='upload/".$row['plik']."' style=\"$style\">";
}
echo "<div class=nowosci_body>".$row['tresc_krotka']."</div>";

echo "<div class=nowosci_more><a href='".str_replace(" ","_",$nazwa).",".$row['skrypt_id'].",".$row['id']."' style='color:#FF9900;font-size:13px;border-bottom:4px solid #FF9900;text-decoration:none;'>".$languages['wiecej']."</a></div>";
}

echo "<div id=nowosci_showall><a href='$link.html' style='color:#FFf;font-size:13px;text-decoration:none;'>".$languages['pokaz_wszystkie']."</a></div>";
echo "</div>";
?>
Back to Directory File Manager