. / Your favourite news server is missing?
.
if (isset($_REQUEST['i']) && $_REQUEST['i'] > 0){
$LIMIT_COUNT = 40;
if (isset($_REQUEST['o'])){
$LIMIT_FROM = $LIMIT_COUNT * $_REQUEST['o'];
}else{
$LIMIT_FROM = 0;
}
//definice
$sql = "SELECT t1.id, t1.lng, t1.titulek, t1.url, t1.url_txt
FROM " . T_W_NEWS_I . " AS t1
WHERE t1.visible = '1'
AND t1.id = '" . $_REQUEST['i'] . "'
ORDER BY t1.lng, t1.ord
";
$db->query($sql);
if ($db->nr == 1){
$y = $db->fetch();
$site = '
';
echo '
' . $RSS_LANG[$y['lng']] . '
';
$datum_den = date("Y-m-d",mktime(date("H"),date("i"),0,date("m"),date("d")-1,date("Y")));
$datum_tyden = date("Y-m-d",mktime(date("H"),date("i"),0,date("m"),date("d")-7,date("Y")));
//vypis jednotlivych sites
echo '
' . $site . '
';
//echo 'URL: ' . $y['url_txt'] . '
';
$sql = "SELECT id, titulek, url, perex, DATE_FORMAT(datum,'%d.%m.%Y') AS d, datum
FROM " . T_W_NEWS_ITEM . "
WHERE visible = '1'
AND id_def = '" . $_REQUEST['i'] . "'
ORDER BY datum DESC, titulek
";
$db->query($sql);
$totalcount = $db->nr;
$sql = "SELECT id, titulek, url, perex, DATE_FORMAT(datum,'%d.%m.%Y') AS d, datum
FROM " . T_W_NEWS_ITEM . "
WHERE visible = '1'
AND id_def = '" . $_REQUEST['i'] . "'
ORDER BY datum DESC, titulek
LIMIT $LIMIT_FROM, $LIMIT_COUNT
";
$db->query($sql);
if ($db->nr > 0){
$t = '';
$tt = '';
while ($y = $db->fetch()){
//datum
$class = 'd0';
if ($y['datum'] > $datum_tyden) $class = 'd1';
if ($y['datum'] > $datum_den) $class = 'd2';
$urlt = str_replace('', '', $y['url']);
$urlt = str_replace('', '', $urlt);
$titulek = usekni($y['titulek'], 130);
if ($urlt != ''){
$url = '
' . $titulek . '';
}else{
$url = $titulek;
}
if ($y['perex'] != ''){
$t .= '
' . $y['d'] . ' | ' . $url . '
';
$t .= '
' . $y['perex'] . '
';
//$tt .= '
' . $y['perex'] . '
';
}else{
$t .= '
' . $y['d'] . ' | ' . $url . '
';
}
}
$t .= nav($LIMIT_COUNT, $totalcount, 'atari_news_detail.php?i=' . $_REQUEST['i']);
echo $t;
echo '
Zpět na seznam novinek / Back to news list';
}
echo '