<?php
if(!defined('MVROOT')) { define('MVROOT', getcwd()); }
require_once MVROOT."/aggregation_service/ContentImporter.class.php";

$data=ContentImporter::getData();

?>
<link rel="stylesheet" type="text/css" href="/beatembed/font/stylesheet.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/beatembed/style.css" media="screen" />

<div class="player-control">
	<div class="play-bttn"><span></span></div>
	<div class="now-playing">Now Playing:<br/><span></span></div>
	<div class="bttn purchase">Purchase This Beat</div>
	<div class="bttn lease">Lease This Beat</div>
	<div class="pos-slider"><div class="handle"><div class="tooltip">00:00</div></div></div>
</div>
<div class="player-playlist">
<table cellspacing="0">

	<tr class="thead">
		<th class="title">Beat Title</th>
		<th class="tags">Tags</th>
		<th class="price">Lease</th>
		<th class="price">Purchase</th>
	</tr>
<?php
$idx=0;
foreach($data as $item) { 
	$tags=explode(', ',$item->tags);
	$ntags=array();
	foreach($tags as $tag) {
		$ntags[]='<a class="filter-by-tag">'.$tag.'</a>';
	}
	$ntags=implode(', ',$ntags);
	$idx++;
?>

	<tr id="snd<?php print $idx; ?>|<?php print $item->snippet; ?>|<?php print $item->form_url; ?>">
		<td class="title"><?php print $item->title; ?></td>
		<td class="tags"><?php print $ntags; ?></td>
		<td class="price">$50</td>
		<td class="price">$400</td>
	</tr>

<?php } ?>

</table>
</div>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.1.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
<script type="text/javascript" src="/beatembed/soundManager/script/soundmanager2-jsmin.js"></script>
<script type="text/javascript" src="/beatembed/script.js"></script>
