//Start usergold addon
takegold($userdata['user_name'],$userdata['user_id'],10);
//end usergold addon
redirect($data['download_url']);
$result = dbquery("UPDATE ".$db_prefix."downloads SET download_count=download_count+1 WHERE download_id='$download_id'");