safesql( trim( convert_unicode( $_POST['title'], $config['charset'] ) ) ); if( $title == "" ) die(); $buffer = ""; $id = intval( $_POST['id'] ); if( $id ) $where = " AND id != '" . $id . "'"; else $where = ""; $db->query( "SELECT id, title, date, alt_name, MATCH (title, short_story) AGAINST ('$title') as score FROM " . PREFIX . "_post WHERE MATCH (title, short_story) AGAINST ('$title') AND approve='1'" . $where . " ORDER BY score DESC, date DESC LIMIT 5" ); while ( $related = $db->get_row() ) { $related['date'] = strtotime( $related['date'] ); $news_date = date( 'd-m-Y', $related['date'] ); $full_link = $config['http_home_url'] . $related['id'] . "-" . $related['alt_name'] . ".html"; $buffer .= "