if($thread_id = (isset($_GET['thread_id']) && isnum($_GET['thread_id']) ? $_GET['thread_id'] : 0)){ list($thread_subject) = dbarraynum(dbquery("SELECT thread_subject from ".DB_THREADS." WHERE thread_id=".$thread_id."")); $rel_thread_res = dbquery(" SELECT tt.thread_id, tt.thread_subject, tf.forum_id, tf.forum_name, tf.forum_access, tt.thread_postcount, tt.thread_views, tt.thread_lastpost, tt.thread_lastpostid FROM ".DB_THREADS." tt INNER JOIN ".DB_FORUMS." tf ON tt.forum_id=tf.forum_id WHERE MATCH (thread_subject) AGAINST ('".$thread_subject."' IN BOOLEAN MODE) AND thread_id != ".$thread_id." AND ".groupaccess('tf.forum_access')." ORDER BY tt.thread_lastpost DESC LIMIT 10"); if(dbrows($rel_thread_res)){ opentable('Похожие темы'); echo "
".$locale['global_044']." | ".$locale['global_048']." | ".$locale['global_046'].' / '.$locale['global_045']." | ".$locale['global_047']." |
---|---|---|---|
".$thread['thread_subject']." → | ".''.$thread['forum_name']." | ".($thread['thread_postcount']-1).' / '.$thread['thread_views']." | ".showdate("forumdate", $thread['thread_lastpost'])." |