<?
require_once("include/bittorrent.php");
function bark($msg) {
 stdhead();
   stdmsg("Failed", $msg);
 stdfoot();
 exit;
}
dbconn();
loggedinorreturn();

if (get_user_class() < UC_MODERATOR)
die();
if ($_POST["takeit"]=="")
stderr("Sorry", "Du hast nichts markiert");
$page=$_POST["page"];
$letter=$_POST["letter"];
$res = mysql_query ("SELECT id FROM snatched WHERE takeuser=0 AND id IN (" . implode(", ", $_POST[takeit]) . ")");

while ($arr = mysql_fetch_assoc($res)){
mysql_query("UPDATE users SET slcount=slcount+1 WHERE id=".$CURUSER['id']);
mysql_query ("UPDATE snatched SET takeuser = $CURUSER[id] WHERE id = $arr[id]") or sqlerr();
}



header("Refresh: 0; url=hitrun.php?letter=$letter&page=$page");


?>