Yangi formatda davom etish uchun: https://uzfor.net/view.php?act=post&id=25340
Postga havola
KooL [877] [ban]
DjHuSo, <?php
echo '<div class="phdr"><center>Kun yangiliklari</center></div>';
echo '<div class="menu">';
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_news`"), 0);
if( $total) {
$req = mysql_query("SELECT `id`, `name`, `text`, `time`, `reads` FROM `cms_news` ORDER BY `time` DESC LIMIT 15");
$i = 1;
while (( $row = mysql_fetch_assoc($req)) !== false) {
$comm = mysql_result(mysql_query("select count(*) from `cms_news_comments` where `refid` = '".$row['id']."'"), 0);
if( file_exists('files/news/small_news_' . $row['id'] . '.jpg') !== false) {
echo '<a href="../news/index.php?act=view&id=' . $row['id'] . '">';
echo '<img src="/ico/feed.png">';
echo ' ' . htmlentities($row['name'], ENT_QUOTES, 'UTF-8') . '</a><hr>';
} else {
echo '<a href="../news/index.php?act=view&id=' . $row['id'] . '"><img src="/ico/feed.png"> ' . htmlentities($row['name'], ENT_QUOTES, 'UTF-8') . '</a><hr>';
}
if( $row['time'] > time())
//echo '<p>' . $lng_news['begin_show_through'] . ': ' . timer($row['time'] - time()) . '</p>';
++ $i;
}
} else {
echo '<div class="rmenu">Yangiliklar yo`q</div>';
}
echo '<div style="text-align: right;"><span class="currentpage"><b>1</b></span> <a class="pagenav" href="/news/news.php?page=2">2</a> <a class="pagenav" href="/news/news.php?page=3">3</a> <a class="pagenav" href="/news/news.php?page=4">4</a> <a class="pagenav" href="/news/news.php?page=5">5</a> <a class="pagenav" href="/news/news.php?page=2">»</a></div></div>';
?>
echo '<div class="phdr"><center>Kun yangiliklari</center></div>';
echo '<div class="menu">';
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_news`"), 0);
if( $total) {
$req = mysql_query("SELECT `id`, `name`, `text`, `time`, `reads` FROM `cms_news` ORDER BY `time` DESC LIMIT 15");
$i = 1;
while (( $row = mysql_fetch_assoc($req)) !== false) {
$comm = mysql_result(mysql_query("select count(*) from `cms_news_comments` where `refid` = '".$row['id']."'"), 0);
if( file_exists('files/news/small_news_' . $row['id'] . '.jpg') !== false) {
echo '<a href="../news/index.php?act=view&id=' . $row['id'] . '">';
echo '<img src="/ico/feed.png">';
echo ' ' . htmlentities($row['name'], ENT_QUOTES, 'UTF-8') . '</a><hr>';
} else {
echo '<a href="../news/index.php?act=view&id=' . $row['id'] . '"><img src="/ico/feed.png"> ' . htmlentities($row['name'], ENT_QUOTES, 'UTF-8') . '</a><hr>';
}
if( $row['time'] > time())
//echo '<p>' . $lng_news['begin_show_through'] . ': ' . timer($row['time'] - time()) . '</p>';
++ $i;
}
} else {
echo '<div class="rmenu">Yangiliklar yo`q</div>';
}
echo '<div style="text-align: right;"><span class="currentpage"><b>1</b></span> <a class="pagenav" href="/news/news.php?page=2">2</a> <a class="pagenav" href="/news/news.php?page=3">3</a> <a class="pagenav" href="/news/news.php?page=4">4</a> <a class="pagenav" href="/news/news.php?page=5">5</a> <a class="pagenav" href="/news/news.php?page=2">»</a></div></div>';
?>