input->clean_array_gpc('r', array( 'Message_ID' => TYPE_INT, 'Thread_ID' => TYPE_INT )); $postid = $vbulletin->GPC['Message_ID']; $threadid = $vbulletin->GPC['Thread_ID']; //print_r($vbulletin->GPC);exit; if(!empty($postid)) { $post = $db->query_first(" SELECT post.postid FROM " . TABLE_PREFIX . "post AS post WHERE post.importpostid = $postid; "); //print_r($post); //exit; if (!$post['postid']) { eval(standard_error(fetch_error('invalidid', $vbphrase['post'], $vbulletin->options['contactuslink']))); } else { exec_header_redirect('http://jetem.ru/showthread.php?p=' .$post['postid'] .'#post' . $post['postid']); } } else if(!empty($threadid)) { $thread = $db->query_first(" SELECT thread.threadid FROM " . TABLE_PREFIX . "thread AS thread WHERE thread.importthreadid = $threadid; "); if (!$post['postid']) { eval(standard_error(fetch_error('invalidid', $vbphrase['thread'], $vbulletin->options['contactuslink']))); } else { $url = 'http://jetem.ru/showthread.php?t=' .$thread['threadid']; header("HTTP/1.1 301 Moved Permanently"); header("Location: $url"); // exec_header_redirect('http://jetem.ru/showthread.php?t=' .$thread['threadid'] ); } } else { $url = 'http://jetem.ru/'; header("HTTP/1.1 301 Moved Permanently"); header("Location: $url"); } ?>