Advertisement
JDVU

Untitled

Nov 8th, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. if (!empty($setmodules))
  2. {
  3. $module['Mods']['Массовое закрытие'] = basename(__FILE__);
  4. return;
  5. }
  6. require('./pagestart.php');
  7. require(INC_DIR .'functions_torrent.php');
  8.  
  9. $url = isset($_POST['url']) ? $_POST['url'] : '';
  10. $url = str_replace('http://www.', 'http://', $url);
  11.  
  12. if($url)
  13. {
  14. preg_match_all("#". make_url('/') ."viewtopic.php\?t=([\d]+)#", $url[0], $content);
  15.  
  16. $count_tid = 0;
  17. foreach($content[1] as $tid)
  18. {
  19. if(!DB()->fetch_row("SELECT topic_id FROM ". BB_TOPICS ." WHERE topic_id = $tid")) continue;
  20.  
  21. $attach_id = DB()->fetch_row("SELECT attach_id FROM bb_bt_torrents WHERE topic_id = $tid");
  22.  
  23. $new_status = '6';
  24. change_tor_status($attach_id, $new_status);
  25. $count_tid++;
  26. }
  27.  
  28. $message .= '<a href="admin_close_topic.php">Вернуться в панель</a>' .'<br /><br />';
  29. $message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>');
  30.  
  31. message_die(GENERAL_MESSAGE, $message);
  32. }
  33.  
  34.  
  35. print_page('admin_close_topic.tpl', 'admin');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement