Yangi formatda davom etish uchun: https://uzfor.net/view.php?act=post&id=83734
Postga havola
program [145] [off]
<?php
$kmess = '8';
echo '<div class="phdr">Новые статьи</div>';
$bolm_sql = mysql_query("SELECT `id`, `name`, `dir`, `time`, `description` FROM `library_cats` WHERE `parent`=0 ORDER BY `pos` DESC");
$sql = mysql_result(mysql_query('SELECT COUNT(*) FROM `library_texts` WHERE `premod`=1'), 0);
$page = $page >= ceil($sql / $kmess) ? ceil($sql / $kmess) : $page;
$start = $page == 1 ? 0 : ($page - 1) * $kmess;
$bolm = mysql_fetch_assoc($bolm_sql);
$req_lib = mysql_query("SELECT * FROM `library_texts` WHERE `premod`='1' ORDER BY `time` DESC LIMIT 8 ");
if ($sql) {
$i = 0;
while ($lib = mysql_fetch_assoc($req_lib)) {
$comm = mysql_result( mysql_query("select count(*) from `cms_library_comments` where `refid` = '".$lib['id']."'"),0);
echo ($i % 2) ? '<div class="list1">' : '<div class="list2">';
++$i;
echo '<a href="' . $set['homeurl'] . '/library/index.php?id=' . $lib['id'] . '"><b>' . $lib['name'] . '</b></a> <span style="font-size:xx-small">['. functions::display_date($lib['time']) . ']</span><br>'.mb_substr($lib['announce'],0,100).'...<br>';
$catalog = mysql_fetch_assoc(mysql_query("SELECT `id`, `name` FROM `library_cats` WHERE `id` = " . $lib['cat_id'] . " LIMIT 1"));
echo '<span style="font-size:xx-small">[<a href="/library/index.php?do=dir&id=' . $catalog['id'] . '">' . functions::checkout($catalog['name']) . '</a>' . ($page > 1 ? ' | ' . functions::checkout($res['name']) : '') . ']';
echo '</span><span style="float:right;"><b>[' . $lib['count_views'] . ']</b> <a href="/library/index.php?id=' . $lib['id'] . '"></span></div>';
}
}
echo '</div>';
?>
$kmess = '8';
echo '<div class="phdr">Новые статьи</div>';
$bolm_sql = mysql_query("SELECT `id`, `name`, `dir`, `time`, `description` FROM `library_cats` WHERE `parent`=0 ORDER BY `pos` DESC");
$sql = mysql_result(mysql_query('SELECT COUNT(*) FROM `library_texts` WHERE `premod`=1'), 0);
$page = $page >= ceil($sql / $kmess) ? ceil($sql / $kmess) : $page;
$start = $page == 1 ? 0 : ($page - 1) * $kmess;
$bolm = mysql_fetch_assoc($bolm_sql);
$req_lib = mysql_query("SELECT * FROM `library_texts` WHERE `premod`='1' ORDER BY `time` DESC LIMIT 8 ");
if ($sql) {
$i = 0;
while ($lib = mysql_fetch_assoc($req_lib)) {
$comm = mysql_result( mysql_query("select count(*) from `cms_library_comments` where `refid` = '".$lib['id']."'"),0);
echo ($i % 2) ? '<div class="list1">' : '<div class="list2">';
++$i;
echo '<a href="' . $set['homeurl'] . '/library/index.php?id=' . $lib['id'] . '"><b>' . $lib['name'] . '</b></a> <span style="font-size:xx-small">['. functions::display_date($lib['time']) . ']</span><br>'.mb_substr($lib['announce'],0,100).'...<br>';
$catalog = mysql_fetch_assoc(mysql_query("SELECT `id`, `name` FROM `library_cats` WHERE `id` = " . $lib['cat_id'] . " LIMIT 1"));
echo '<span style="font-size:xx-small">[<a href="/library/index.php?do=dir&id=' . $catalog['id'] . '">' . functions::checkout($catalog['name']) . '</a>' . ($page > 1 ? ' | ' . functions::checkout($res['name']) : '') . ']';
echo '</span><span style="float:right;"><b>[' . $lib['count_views'] . ']</b> <a href="/library/index.php?id=' . $lib['id'] . '"></span></div>';
}
}
echo '</div>';
?>