<script language='javascript' type='text/javascript'>

			function play(id)

			{

				window.open('player.php?id=' + id, 'player', 'width=200, height=80, menubar=no, directories=no, toolbar=no, top=100, left=100, location=no, scrollbars=no, resizable=no');

			}

			</script>	

	<div id="register_form01">
	<?php
	
		$filename = 'conf/eurochartdatum.dat';
		if(file_exists($filename))
		{
			$datum = file_get_contents($filename);
		}
		else 
		{
			$datum = date("j.n.Y");
			$fp = fopen($filename, "w");
			fputs($fp, $datum);
			fclose($fp);
		}
	
	
	?>
	  <div id="menu01_head">:: EURO CHART <?php echo $datum; ?></div>
	  <div id="melodie_01"><br/>
	  
	  	Pre stiahnutie melódie priamo do telefónu zadajte v telefóne adresu http://4mobile.sk/melodia/<i>ID melódie</i>/ ktoré sa Vám zobrazí pri
	  	podrľaní kurzora nad ikonkou diskety.
	  
	  <br/><br/>
	  	<table width="85%" align="center" cellpadding="3" cellspacing="0" border="0">
	  		<tr bgcolor="#171717">
	  			<td width="35"><b>Rank</b></td>
	  			<td align="left"><b>Interpret</b></td>
	  			<td align="left"><b>Názov</b></td>
	  			<td colspan="2" align="center"><b>Midi</b></td>
	  			<td colspan="2" align="center"><b>MP3</b></td>
	  		</tr>
	    <?php 
	    
	    	$genre = '';
	    
	    	$query = "SELECT * FROM mobile_euro_chart ORDER BY rank ASC";
	    	$data = $dba->GetArray($query);
	    	$stripe = false;
	    	foreach($data as $row)
	    	{
	    		$bg_color = ($stripe) ? ' bgcolor="#171717"' : '';
				$stripe = !$stripe;
	    		echo "<tr$bg_color>";
	    		echo "<td align='center'>".$row['rank']."</td>";
	    		echo "<td align='left'>".ucwords($row['interpret'])."</td>";
	    		echo "<td align='left'>".ucwords($row['nazov'])."</td>";
	    		echo "<td align='center'>";
	    		if($row['midi'] != 0)
	    		{
	    			echo "<a href='javascript:play(".$row['midi'].");' class='icon'><img src='images/icons/play.gif' width='16' height='16' border='0' class='icon' alt='Vypoču»' title='Vypoču»'></a>";
	    		}
	    		else 
	    		{
	    			echo " - ";
	    		}
	    		echo "</td>";
	    		echo "<td align='center'>";
	    		if($row['midi'] != 0)
	    		{
	    			echo "<a href='melodia.php?id=".$row['midi']."' class='icon' target='_blank'><img src='images/icons/save.gif' width='16' height='16' border='0' class='icon' alt='Stiahnu»' title='Stiahnu» MIDI | http://4mobile.sk/melodia/".$row['midi']."/'></a>";
	    		}
	    		else 
	    		{
	    			echo " - ";
	    		}
	    		echo "</td>";
	    		
	    		echo "<td align='center'>";
	    		if($row['mp3'] != 0)
	    		{
	    			echo "<a href='javascript:play(".$row['mp3'].");' class='icon'><img src='images/icons/play.gif' width='16' height='16' border='0' class='icon' alt='Vypoču»' title='Vypoču»'></a>";
	    		}
	    		else 
	    		{
	    			echo " - ";
	    		}
	    		echo "</td>";
	    		echo "<td align='center'>";
	    		if($row['mp3'] != 0)
	    		{
	    			echo "<a href='melodia.php?id=".$row['mp3']."' class='icon' target='_blank'><img src='images/icons/save.gif' width='16' height='16' border='0' class='icon' alt='Stiahnu»' title='Stiahnu» MP3 | http://4mobile.sk/melodia/".$row['mp3']."/'></a>";
	    		}
	    		else 
	    		{
	    			echo " - ";
	    		}
	    		echo "</td>";
	    	}
	    
    	?>
    	</table><br/><br/>
	  </div>
	</div>