Afaceri si Economie
Calculatoare si Internet
Educatie si Cultura
Timp liber
Turism
Diverse
|
Categoria Timp liber - Filme
if ($cat)
{
$res = mysql_query("SELECT ad_id,ad_name, link_url, banner_url FROM ad_info where (((state='Enabled') || (state='EnabledSound')) && (category='$cat'))");
if(mysql_num_rows($res)<=0)
{
$res = mysql_query("SELECT ad_id,ad_name, link_url, banner_url FROM ad_info where ((state='Enabled') || (state='EnabledSound'))");
}
}
else
{
$res = mysql_query("SELECT ad_id,ad_name, link_url, banner_url FROM ad_info where ((state='Enabled') || (state='EnabledSound'))");
}
for ($i = 0; $i < mysql_num_rows($res); $i++) {
$array_random_list[] = $i;
}
shuffle($array_random_list);
$max_banners = mysql_num_rows($res);
$div=4;
$max_banners = floor($max_banners/$div)*$div;
if($max_banners>80)
$max_banners = 80;
for ($i = 0; $i < $max_banners; $i++) {
$ad_name = mysql_real_escape_string(stripslashes(strip_tags(mysql_result($res, $array_random_list[$i], "ad_name"))));
$newtext = wordwrap($ad_name, 13, " ", 1);
$banner_url = mysql_result($res, $array_random_list[$i], "banner_url");
$ad_id = mysql_result($res, $array_random_list[$i], "ad_id");
//$link_url = mysql_result($res, $array_random_list[$i], "link_url");
$link_url = "http://trafic-site.ro/banner.php?action=r&id=$ad_id";
echo "$newtext ";
}
echo "
|
";
ufooter();
mysql_close();
exit;
?>