$Token) { list($UserID, $TorrentID) = explode(':', $Token); if (!is_number($UserID) || !is_number($TorrentID)) { continue; } $Cond[] = "(UserID=$UserID AND TorrentID=$TorrentID)"; $UserIDs[] = $UserID; } if (!empty($Cond)) { $Query = "UPDATE users_freeleeches SET Expired=TRUE WHERE ".implode(" OR ", $Cond); $DB->query($Query); foreach ($UserIDs as $UserID) { $Cache->delete_value('users_tokens_'.$UserID); } } } else { $TorrentID = $_REQUEST['torrentid']; $UserID = $_REQUEST['userid']; if (!is_number($TorrentID) || !is_number($UserID)) { error(403); } $DB->query("UPDATE users_freeleeches SET Expired=TRUE WHERE UserID=$UserID AND TorrentID=$TorrentID"); $Cache->delete_value('users_tokens_'.$UserID); } break; } ?>