".$lastvisited." OR tp.post_edittime > ".$lastvisited.")"); $rows = dbrows($result); $threads = 0; if ($rows) { $_GET['rowstart'] = !isset($_GET['rowstart']) || !isnum($_GET['rowstart']) ? 0 : $_GET['rowstart']; $result = dbquery("SELECT tp.forum_id, tp.thread_id, tp.post_id, tp.post_author, IF(tp.post_datestamp>tp.post_edittime, tp.post_datestamp, tp.post_edittime) AS post_timestamp, tf.forum_name, tf.forum_access, tt.thread_subject, tt.thread_postcount, tu.user_id, tu.user_name, tu.user_status FROM ".DB_FORUM_POSTS." tp LEFT JOIN ".DB_FORUMS." tf ON tp.forum_id = tf.forum_id LEFT JOIN ".DB_FORUM_THREADS." tt ON tp.thread_id = tt.thread_id LEFT JOIN ".DB_USERS." tu ON tp.post_author = tu.user_id ".(multilang_table("FO") ? "WHERE ".in_group('tf.forum_language', LANGUAGE)." AND" : "WHERE")." ".groupaccess('tf.forum_access')." AND tp.post_hidden='0' AND tt.thread_hidden='0' AND (tp.post_datestamp > '".$lastvisited."' OR tp.post_edittime > '".$lastvisited."') GROUP BY tp.thread_id ORDER BY post_timestamp DESC LIMIT ".$_GET['rowstart'].",20"); echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $threads = dbrows($result); while ($data = dbarray($result)) { $thread_rowstart = ''; if (!empty($inf_settings['posts_per_page']) && $data['thread_postcount'] > $inf_settings['posts_per_page']) { $thread_posts = dbquery("SELECT p.post_id, p.forum_id, p.thread_id, p.post_author, p.post_datestamp FROM ".DB_FORUM_POSTS." p LEFT JOIN ".DB_FORUM_THREADS." t ON p.thread_id=t.thread_id WHERE p.forum_id='".$data['forum_id']."' AND p.thread_id='".$data['thread_id']."' AND thread_hidden='0' AND post_hidden='0' ORDER BY post_datestamp ASC"); if (dbrows($thread_posts)) { $counter = 1; while ($thread_post_data = dbarray($thread_posts)) { if ($thread_post_data['post_id'] == $data['post_id']) { $thread_rowstart = $inf_settings['posts_per_page'] * floor(($counter - 1) / $inf_settings['posts_per_page']); $thread_rowstart = "&rowstart=".$thread_rowstart; } $counter++; } } } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } echo ""; echo "
".$locale["global_048"]."".$locale["global_044"]."".$locale["global_050"]."
".$data['forum_name']."".trimlink($data['thread_subject'], 40)."".profile_link($data['post_author'], $data['user_name'], $data['user_status'])."
\n".showdate("forumdate", $data['post_timestamp'])."
"; echo "
".sprintf($locale["global_055"], $rows, $threads)."
"; } else { echo "
".sprintf($locale['global_055'], 0, 0)."
\n"; } closetable(); if ($threads > 20) { echo "
".makepagenav($_GET['rowstart'], 20, $threads, 3, INFUSIONS."forum_threads_list_panel/new_posts.php?")."
\n"; } require_once THEMES.'templates/footer.php';