'; ?>
sdf 0, 'allow_mycode' => 1, 'allow_imgcode' => 1, 'filter_badwords' => 1, 'allow_smilies' => 0 ); if (isset($_GET['show'])) { $ile = trim(strip_tags($_GET['show'])); if ($ile <= 0) { $ile = 1; } } else { $ile = 1; } $sql = $db->simple_select('posts', 'COUNT(`tid`)', '`fid` IN ('.$fid.') AND `visible` = 1 AND `replyto` = 0'); $row = $db->fetch_array($sql); if ($row['COUNT(`tid`)'] <= 0) { throw new Exception('

Brak newsów

Brak newsów w tej kategorii.
'); } $count_rekords = $row['COUNT(`tid`)']; $podstron = ceil($count_rekords / $podziel); if ($ile >= $podstron) { $ile = $podstron; } $begin = $podziel * $ile - $podziel; $sql = $db->simple_select('posts', '`tid`, `subject`, `uid`, `username`, `dateline`, `message`', '`fid` IN ('.$fid.') AND `visible` = 1 AND `replyto` = 0', array('order_by' => '`tid` DESC', 'limit' => $podziel, 'limit_start' => $begin)); echo '

Newsy

'; if ($ile > 1) { $previous = $ile - 1; } else { $previous = $ile; } if ($ile < $podstron) { $next = $ile + 1; } else { $next = $ile; } switch ($ile) { case 1: $before = 1; break; case 2: $before = 1; break; case 3: $before = 1; break; default: $before = $ile - 3; break; } switch ($ile) { case $podstron: $site = $ile; break; case $podstron - 1: $site = $ile + 1; break; case $podstron - 2: $site = $ile + 2; break; default: $site = $ile + 3; break; } echo '
'; echo '

1 '; echo '« '; for ($link = $before; $link <= $site; $link++) { echo ''.$link.' '; } echo '» '; echo ''.$podstron.''; echo '

'; while ($news = $db->fetch_array($sql)) { echo '

'.htmlspecialchars_uni($parser->parse_badwords($news['subject'])).'

'; echo '
'.$parser->parse_message($news['message'], $parser_options); echo '

Napisane '.my_date($mybb->settings['dateformat'], $news['dateline']).' o godzinie '.my_date($mybb->settings['timeformat'], $news['dateline']).', przez '.$news['username'].'.

'; echo '
'; } echo '
'; echo '

1 '; echo '« '; for ($link = $before; $link <= $site; $link++) { echo ''.$link.' '; } echo '» '; echo ''.$podstron.''; echo '

'; } catch(Exception $e) { echo $e->getMessage(); } ?>




Reklama
sdf
sdf
Copyright 2007 © Music Band. All rights reserved. Terms of use   |   Privacy Policy