<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title></title>

<?php

$url = "".substr($_GET['downurl'],31).".mp3";

$size=formatsize($_GET['size']);

?>

<script>

opener.document.getElementById('S_Vdata').value= "wk_<?php echo $url; ?>";

<?php

if($_GET['type']=="ht"){

?>

opener.document.getElementById('S_Remark').value= "wk_<?php echo $url; ?>";

opener.document.getElementById('S_Dx').value= "<?php echo $size; ?>";

<?php

}

function formatsize($size) {

	$prec=3;

	$size = round(abs($size));

	$units = array(0=>" B ", 1=>" KB", 2=>" MB", 3=>" GB", 4=>" TB");

	if ($size==0) return str_repeat(" ", $prec)."0$units[0]";

	$unit = min(4, floor(log($size)/log(2)/10));

	$size = $size * pow(2, -10*$unit);

	$digi = $prec - 1 - floor(log($size)/log(10));

	$size = round($size * pow(10, $digi)) * pow(10, -$digi);

	return $size.$units[$unit];

}

?>

window.close();

</script>

</head>

<body>

</body>

</html>