Esempio n. 1
0
    }
}
if ($seeder == 'yes') {
    if ($torrent['banned'] != 'yes') {
        $torrent_updateset[] = 'visible = \'yes\'';
    }
    $torrent_updateset[] = 'last_action = ' . TIME_NOW;
    $mc1->begin_transaction('torrent_details_' . $torrentid);
    $mc1->update_row(false, array('visible' => 'yes'));
    $mc1->commit_transaction($INSTALLER09['expires']['torrent_details']);
    $mc1->begin_transaction('last_action_' . $torrentid);
    $mc1->update_row(false, array('lastseed' => TIME_NOW));
    $mc1->commit_transaction(1800);
}
if (count($torrent_updateset)) {
    ann_sql_query('UPDATE LOW_PRIORITY torrents SET ' . join(',', $torrent_updateset) . ' WHERE id = ' . ann_sqlesc($torrentid)) or ann_sqlerr(__FILE__, __LINE__);
}
if (count($snatch_updateset)) {
    ann_sql_query('UPDATE LOW_PRIORITY snatched SET ' . join(',', $snatch_updateset) . ' WHERE torrentid = ' . ann_sqlesc($torrentid) . ' AND userid = ' . ann_sqlesc($userid)) or ann_sqlerr(__FILE__, __LINE__);
}
if (count($user_updateset)) {
    ann_sql_query('UPDATE LOW_PRIORITY users SET ' . join(',', $user_updateset) . ' WHERE id = ' . ann_sqlesc($userid)) or ann_sqlerr(__FILE__, __LINE__);
    $mc1->delete_value('userstats_' . $userid);
    $mc1->delete_value('user_stats_' . $userid);
}
if (isset($_SERVER["HTTP_ACCEPT_ENCODING"]) && $_SERVER["HTTP_ACCEPT_ENCODING"] == "gzip") {
    header("Content-Encoding: gzip");
    echo gzencode(benc_resp_raw($resp), 9, FORCE_GZIP);
} else {
    benc_resp_raw($resp);
}
Esempio n. 2
0
function auto_enter_abnormal_upload($userid, $rate, $upthis, $diff, $torrentid, $client, $realip, $last_up)
{
    ann_sql_query('INSERT LOW_PRIORITY INTO cheaters (added, userid, client, rate, beforeup, upthis, timediff, userip, torrentid) VALUES(' . ann_sqlesc(TIME_NOW) . ', ' . ann_sqlesc($userid) . ', ' . ann_sqlesc($client) . ', ' . ann_sqlesc($rate) . ', ' . ann_sqlesc($last_up) . ', ' . ann_sqlesc($upthis) . ', ' . ann_sqlesc($diff) . ', ' . ann_sqlesc($realip) . ', ' . ann_sqlesc($torrentid) . ')') or ann_sqlerr(__FILE__, __LINE__);
}