$kwicks = TRUE;
include("includes/mysql.inc.php");
$url_array=explode("/",$_SERVER['REQUEST_URI']);
$page = (int)$url_array[2];
if(empty($page) || $page<1)
$page = 1;
$GLOBALS['n'] = '/news';
include("header.php");
// *** DISPLAY DAILY NEWS ***
echo '
';
$hits = 10;
$query = "SELECT * FROM news_rss WHERE headline<>'' AND description<>'' AND category<>107 ORDER BY datum DESC, id DESC ";
$res = mysql_query($query);
$num = mysql_num_rows($res);
$start = ($page-1)*$hits;
$query .= " LIMIT ".$start.",".$hits;
$res = mysql_query($query) or die("ERROR ".__LINE__.": ".mysql_error());
while($ar = mysql_fetch_array($res))
{
$zs++;
if($zs == 4)
{
echo '
';
ShowBanner300x250();
echo '
';
}
$ar[headline] = preg_replace("/<\!\[CDATA\[/i","",$ar[headline]);
$ar[headline] = preg_replace("/\]\]>/i","",$ar[headline]);
$ar[description] = preg_replace("/</i","<",$ar[description]);
$ar[description] = preg_replace("/>/i",">",$ar[description]);
$ar[description] = preg_replace("/"/i","\"",$ar[description]);
$ar[description] = preg_replace("/</i","<",$ar[description]);
$ar[description] = preg_replace("/</i","<",$ar[description]);
$ar[description] = preg_replace("/\[More\]/i","",$ar[description]);
//$slika = getSlika($ar[description]);
$nid = (int)($ar[id]/100);
if(file_exists($_SERVER['DOCUMENT_ROOT'].'/files/pictures/'.$nid.'/'.$ar[id].'.jpg'))
$slika = '/files/pictures/'.$nid.'/'.$ar[id].'.jpg';
else
$slika = '/gfx/noPic.png';
//print_r($slika);
$ar[description] = trim(strip_tags($ar[description],"
"));
$ar[description] = iconv("windows-1250","utf-8",$ar[description]);
$ar[headline] = iconv("windows-1250","utf-8",$ar[headline]);
$ar[description] = stripslashes($ar[description]);
// Display News
echo '
';
echo '
'."\n";
echo '
';
echo '
';
echo '';
echo '
'.$ar[description].' >> Read
'."\n";
echo '
';
}
echo '
';
echo '';
ShowBanner300x250();
$startx = rand(1,25000);
$pixQuery = "SELECT wallpapers.*,categories.*, wallpapers.id AS id, wallpapers.name AS name, categories.name AS cname FROM wallpapers INNER JOIN categories ON (wallpapers.category=categories.id) WHERE active=1 ORDER BY datum DESC LIMIT ".$startx.",7";
echo '
';
$resg = mysql_query($pixQuery) or die("ERROR ".__LINE__.": ".mysql_error());
while($arg = mysql_fetch_array($resg))
{
if(empty($arg[picture_name]))
{
$arg[picture_name] = preg_replace("/_/"," ",$arg[name]);
$arg[picture_name] = preg_replace("/-/"," ",$arg[picture_name]);
$arg[picture_name] = preg_replace("/\.jpg/i","",$arg[picture_name]);
$arg[picture_name] = ucwords($arg[picture_name]);
}
if(empty($arg[picture_alt]))
$arg[picture_alt] = $arg[picture_name];
if(!empty($arg[picture_alt]))
$pictureAlt = $arg[picture_alt];
else
$pictureAlt = $arg[name].' Wallpaper';
$filename = $arg[folder].'thumb/320_'.$arg[name];
$nid = (int)($arg[category]/100);
$filename = '/wallpapers/'.$nid.'/'.$arg[category].'/thumb/200_'.$arg[name];
$filename_full = '/photo/'.$arg[id].'/'.$arg[name];
$webURL = '';
echo '
';
// *** Tiny Navigation ****
echo '
';
echo '
Zoom';
echo '
';
echo '
View';
echo '
';
// *** Display Wallpaper ***
echo '
';
echo '
';
echo '';
// *** Name of the wallpaper ***
echo '
';
echo '
';
}
echo '
';
echo '
';
echo '