<?php

	error_reporting(0);
	session_start();
	require_once('conf/definitions.php');
	require_once('conf/objs.php');
	require_once('conf/functions.php');
	
	$id = fnAdjustID();
	
	if(is_numeric($id) && $id>0)
	{
//		if($_SERVER['HTTP_REFERER'] == 'http://4mobile.peterpech.com/player2.php' || eregi('player', $_SERVER['HTTP_USER_AGENT']))
		if(true)
		{
			$dba = new db;
			$filename = $dba->GetOne('mobile_melody', $id, 'file');
			if(readfile('melody/'.$filename))
			{
				error_log(time().' Preslo', 3, $_SERVER['DOCUMENT_ROOT'].'/lib/log/request.log');
			}
			else 
			{
				error_log('Nepreslo', 3, $_SERVER['DOCUMENT_ROOT'].'/lib/log/request.log');
			}
		}
		else 
		{
			ob_start();
			print_r($_SERVER);
			$buffer = ob_get_contents();
			error_log($buffer, 3, $_SERVER['DOCUMENT_ROOT'].'/lib/log/request.log');
		}
	}
	
?>