<?php
$article_section=mysql_query("SELECT quick, name FROM kcms_sections WHERE id='".addslashes($section)."'");
$article_section=mysql_fetch_array($article_section);

if ($type==3) { $h2_class="promo"; } else { $h2_class="standard"; }

echo "<h2 class=\"$h2_class\"><a href=\"/".$article_section["quick"]."/$quick/\">".stripslashes($title)."</a></h2>\n\n";

if ($perex!="") {

echo "<p>"; if ($type==3) { echo "<em>"; }

if ($pereximg!="" ) { echo "<img src=\"$pereximg\" alt=\"".stripslashes($title)."\" class=\"perex-img\" />"; }

echo (stripslashes($perex));

if ($pereximg!="") { echo "<span class=\"cb2\"><!-- --></span>"; }

if ($type==3) { echo "</em>"; } echo "</p>\n\n";

}

if ($perex=="" AND $show_text==1) {

echo (stripslashes($text)."\n\n");

}

$author=mysql_query("SELECT login FROM kcms_users WHERE id='".addslashes($author)."'");
$author=mysql_fetch_array($author);

echo "<p class=\"article-info\">";

if (date("d.m.Y", $published)==date("d.m.Y", time())) { echo ($lang_index_today." ".date("(G:i)", $published)); } elseif (date("d.m.Y", $published)==date("d.m.Y", time()-86400)) { echo ($lang_index_yesterday." ".date("(G:i)", $published)); } else { echo (date("d.m.Y (G:i)", $published)); }

$count_comments=mysql_query("SELECT COUNT(*) AS id FROM kcms_comments WHERE article='".addslashes($id)."' ORDER by id DESC");
$count_comments=mysql_fetch_array($count_comments);

echo ", <a href=\"/profiles/".$author["login"]."/\">".$author["login"]."</a>, <a href=\"/".$article_section["quick"]."/\">".$article_section["name"]."</a>, $lang_index_commented ".$count_comments["id"]."×, ".strtolower($lang_index_viewed)." ".$views."×</p>";
?>