Exemple #1
0
        }
        foreach (explode(".", "peers.files.comments.rating") as $x) {
            sql_query('DELETE FROM ' . $x . ' WHERE torrent IN (' . implode(', ', $ids) . ')');
        }
        sql_query('DELETE FROM deathrow WHERE tid IN (' . implode(', ', $ids) . ')') or sqlerr(__FILE__, __LINE__);
        sql_query('DELETE FROM thanks WHERE torrentid IN (' . implode(', ', $ids) . ')') or sqlerr(__FILE__, __LINE__);
        sql_query('DELETE FROM thankyou WHERE torid IN (' . implode(', ', $ids) . ')') or sqlerr(__FILE__, __LINE__);
        write_log(' ' . $lang['deathrow_torr'] . ' (' . implode(', ', $names) . '.)  ' . $lang['deathrow_were'] . ' ' . $CURUSER['username'] . ' (' . $page . ')' . "\n");
        return $countids;
    } else {
        return false;
    }
}
// end
if (!empty($_POST['remove'])) {
    $deleted = delete_torrent($_POST['remove'], 'deathrow');
    if ($deleted) {
        stderr($lang['deathrow_success'], $lang['deathrow_deleted'] . $deleted . $lang['deathrow_torrs']);
    } else {
        stderr($lang['deathrow_err'], $lang['deathrow_no_torr']);
    }
}
// Give 'em 5 days to seed back their torrent (no peers, not seeded with in x days)
$x_time = 604800;
// Delete Routine 1 // 5 days
// Give 'em 7 days to seed back their torrent (no peers, not snatched in x days)
$y_time = 2419200;
// Delete Routine 2 // 28 days
// Give 'em 2 days to seed back their torrent (no seeder activity within x hours of torrent upload)
$z_time = 2 * 86400;
// Delete Routine 3 // 2 days
Exemple #2
0
            stop_rtorrent();
        } else {
            if (isset($_POST["list_screen"])) {
                list_screen();
            } else {
                if (isset($_POST["list_torrent"])) {
                    header("refresh:5;");
                } else {
                    if (isset($_POST["start_torrent"])) {
                        start_torrent($torrent_hash);
                    } else {
                        if (isset($_POST["stop_torrent"])) {
                            stop_torrent($torrent_hash);
                        } else {
                            if (isset($_POST["delete_torrent"])) {
                                delete_torrent($torrent_hash);
                            } else {
                                if (isset($_POST["purge_torrent"])) {
                                    purge_torrent($torrent_hash);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
##### Panel Control Check #####
##### Upload File Validation #####
if (isset($_POST["submit_file"])) {
            $tor_type = 0;
        }
        change_tor_type($attach_id, $tor_type);
        $title = $lang['CHANGE_TOR_TYPE'];
        $url = make_url(TOPIC_URL . $torrent['topic_id']);
        break;
    case 'reg':
        tracker_register($attach_id);
        $url = TOPIC_URL . $torrent['topic_id'];
        break;
    case 'unreg':
        tracker_unregister($attach_id);
        $url = TOPIC_URL . $torrent['topic_id'];
        break;
    case 'del_torrent':
        if (empty($this->request['confirmed'])) {
            $this->prompt_for_confirm($lang['DEL_TORRENT']);
        }
        delete_torrent($attach_id);
        $url = make_url(TOPIC_URL . $torrent['topic_id']);
        break;
    case 'del_torrent_move_topic':
        if (empty($this->request['confirmed'])) {
            $this->prompt_for_confirm($lang['DEL_MOVE_TORRENT']);
        }
        delete_torrent($attach_id);
        $url = make_url("modcp.php?t={$torrent['topic_id']}&mode=move&sid={$userdata['session_id']}");
        break;
}
$this->response['url'] = $url;
$this->response['title'] = $title;
Exemple #4
0
	if($Report) { $Cache->decrement('num_torrent_reportsv2'); }
	
	if(isset($Escaped['upload'])) {
		$Upload = true;
	} else {
		$Upload = false;
	}
	
	//Log and delete
	if(isset($Escaped['delete'])) {
		$Log = "Torrent ".$TorrentID." (".$RawName.") was deleted by ".$LoggedUser['Username'];
		$Log .= ($Escaped['resolve_type'] == 'custom' ? "" : " for the reason: ".$ResolveType['title'].".");
		if(isset($Escaped['log_message']) && $Escaped['log_message'] != "") {
			$Log .= " ( ".$Escaped['log_message']." )";
		}
		delete_torrent($TorrentID);
		write_log($Log);
	} else {
		$Log = "No log message (Torrent wasn't deleted)";
	}
	
	//Warnings / remove upload
	if($Upload) {
		$Cache->begin_transaction('user_info_heavy_'.$UploaderID);
		$Cache->update_row(false, array('DisableUpload' => '1'));
		$Cache->commit_transaction(0);
	
		$DB->query("UPDATE users_info SET
			DisableUpload='1'
			WHERE UserID=".$UploaderID);
	}
Exemple #5
0
list($UserID, $GroupID, $Size, $Name, $ArtistName, $Time, $Snatches) = $DB->next_record();

if(($LoggedUser['ID']!=$UserID || time_ago($Time) > 3600*24*7 || $Snatches > 4) && !check_perms('torrents_delete')) {
	error(403);
}

if($ArtistName) {
	$Name = $ArtistName.' - '.$Name;
}

if($LoggedUser['multi_delete']>=3 && !check_perms('torrents_delete_fast')) {
	error('You have recently deleted 3 torrents, please contact a staff member if you need to delete more.');
}

if(isset($LoggedUser['multi_delete'])) {
	$_SESSION['logged_user']['multi_delete']++;
} else {
	$_SESSION['logged_user']['multi_delete'] = 1;
}

delete_torrent($TorrentID, $GroupID);
write_log('Torrent '.$TorrentID.' ('.$Name.') ('.number_format($Size/(1024*1024), 2).' MB) was deleted by '.$LoggedUser['Username'].': ' .$_POST['reason'].' '.$_POST['extra']);

show_header('Torrent deleted');
?>
<div class="thin">
	<h3>Torrent was successfully deleted.</h3>
</div>
<?
show_footer();
Exemple #6
0
		AND t.last_action!='0000-00-00 00:00:00'
		OR t.Time<'".time_minus(3600*24*14)."'
		AND t.last_action='0000-00-00 00:00:00'");
	$TorrentIDs = $DB->to_array();
	
	$LogEntries = array();
	
	foreach ($TorrentIDs as $TorrentID) {
		list($ID, $GroupID, $Name, $ArtistName, $LastAction, $Format, $Encoding, $UserID) = $TorrentID;
		if($ArtistName) {
			$Name = $ArtistName.' - '.$Name;
		}
		if($Format && $Encoding) {
			$Name.=' ['.$Format.' / '.$Encoding.']';
		}
		delete_torrent($ID, $GroupID);
		$LogEntries[] = "Torrent ".$ID." (".$Name.") was deleted for inactivity (unseeded)";
		
		send_pm($UserID,0,db_string('One of your torrents has been deleted for inactivity'), db_string("The torrent ".$Name." was deleted for being unseeded. Since it didn't break any rules (we hope), you can feel free to re-upload it."));
		
		++$i;
	}
	
	if(count($LogEntries) > 0) {
		$Values = "('".implode("', '".$sqltime."'), ('",$LogEntries)."', '".$sqltime."')";
		$DB->query('INSERT INTO log (Message, Time) VALUES '.$Values);
		echo "\nDeleted $i torrents for inactivity\n";
	}
	
	$DB->query("SELECT SimilarID FROM artists_similar_scores WHERE Score<=0");
	$SimilarIDs = implode(',',$DB->collect('SimilarID'));
Exemple #7
0
    exit;
}
// Unregister torrent from tracker
if ($mode == 'unreg') {
    tracker_unregister($attach_id, 'request');
    exit;
}
// Delete torrent
if ($mode == 'del' && $confirm) {
    delete_torrent($attach_id, 'request');
    $redirect_url = append_sid("viewtopic.php?" . POST_TOPIC_URL . "={$topic_id}");
    redirect($redirect_url);
}
// Delete torrent and move topic
if ($mode == 'del_move' && $confirm) {
    delete_torrent($attach_id, 'request');
    $redirect_url = "modcp.php?" . POST_TOPIC_URL . "={$topic_id}&mode=move&sid=" . $userdata['session_id'];
    redirect($redirect_url);
}
// Generate passkey
if ($mode == 'gen_passkey') {
    if ($req_uid == $user_id || $userdata['user_level'] == ADMIN) {
        generate_passkey($req_uid, FALSE);
        if (!defined('AUTH_KEY_INSERT_OK')) {
            message_die(GENERAL_ERROR, 'Could not insert passkey', '', __LINE__, __FILE__, $sql);
        }
        message_die(GENERAL_MESSAGE, $lang['Bt_Gen_Passkey_OK']);
    } else {
        message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
    }
}