if (dbrows($result) != 0) {
$i=0;
if ($theme_width == "100%") echo "\n";
while ($data = dbarray($result)) {
if ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl1"; }
$new_posts = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."' and post_datestamp>'$lastvisited'");
$thread_replies = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."'") - 1;
$forum_id = $data['forum_id'];
if ($new_posts > 0) {
$folder123 = "";
} else if ($new_posts > 19) {
$folder123 = "
";
} else {
if ($data['thread_locked'] == 1) {
$folder123 = "
";
} else if ($data['thread_locked'] == 0) {
$folder123 = "
";
}
}
$reply_count = dbcount("(thread_id)", "posts", "thread_id='".$data['thread_id']."'");
$data2 = dbarray(dbquery("SELECT post_id FROM ".$db_prefix."posts WHERE thread_id='".$data['thread_id']."' ORDER BY post_id DESC LIMIT 1"));
$threads_message = $data['thread_subject'];
$threads_message = strtr($threads_message, "'", "");
$rstart = ($reply_count > 20 ? "rowstart=".((ceil($reply_count / 20)-1)*20)."&" : "");
echo "
";
if ($theme_width == "100%") {
echo "$folder123 ° ".$locale['XXX_017']." ° ".$locale['XXX_019'].": ".$threads_message." ".$locale['XXX_020']." ".($reply_count - 1)."/".$data['thread_views']." ".$locale['XXX_021']." ".$data['user_name']." ".$locale['XXX_022']." ".showdate("forumdate", $data['thread_lastpost']).";')\"'>".trimlink($data['thread_subject'], 16)." | \n";
echo "[".($reply_count - 1)." / ".$data['thread_views']."] | "; } else { echo "$folder123 ° ".$locale['XXX_017']." °[".($reply_count - 1)." / ".$data['thread_views']."] | "; } echo "