include ("../reklama460.php");
?>
// includes
$asport =mysql_connect("localhost", "sportal_mnd", "13shtator") or die ("E pamundur lidhja!");
mysql_select_db("albsport",$asport) or die (mysql_error());
// generate and execute query
$query = "SELECT * FROM materiali WHERE faqe1 = 'Normal' ORDER BY data DESC, idmateriali limit 15";
$result = mysql_query($query) or die ("Error in query: $query. " . mysql_error());
// if records present
if (mysql_num_rows($result) > 0)
{
echo "\n";
while ($rubrika = mysql_fetch_array($result)) {
$idmateriali = $rubrika["idmateriali"];
$id_rubrike = $rubrika["id_rubrike"];
$titulli = $rubrika["titulli"];
$teksti = stripslashes($rubrika["teksti"]);
$foto = $rubrika["foto"];
$attach = $rubrika["attach"];
$data = $rubrika["data"];
$gjuha = $rubrika["gjuha"];
//$rubi = ID2VlereFushe("rubrika", $id_rubrike, "menuAL");
$teksti = substr($teksti, 0,170);
echo " \n";
echo " $titulli | \n";
echo " \n";
echo " \n";
echo " \n";
echo " \n";
echo " \n";
if (strlen($foto) > 5){
echo " | \n";
}
echo " $teksti | \n";
echo " \n";
echo " \n";
echo " | \n";
echo " ";
echo " | \n";
}
echo " ";
}
// if no records present
// display message
else
{
?>
Nuk ka lajme aktualisht
}
?>
|