<?php
	include_once("admin/settings/settings.php");
	include_once("admin/lib/include_all.php");
	$voteFormSymbol="dsf-awards-2014";
	$param=new AssetDataFetcherParameters();
	$param->setAssetFilter("symbol", "=", $voteFormSymbol);
	$formDataFetcher=new AssetDataFetcher("vote_form",array(),array());
	$formData=$formDataFetcher->getData(false,$param);
	$voteFormId=$formData[0]['id'];
	$param=new AssetDataFetcherParameters();
	$param->setListOrder(1, 4, "num_of_votes", true);
	$param->setFetchOnlyPublishedComponentsInList();
	$dataFetcher=new AssetDataFetcher("vote_form",array("vote_form_title"),array(array(array('identifier'=>"polls", 'fields'=>array()),array('identifier'=>"list", 'fields'=>array("poll_title","symbol")),array('identifier'=>"poll_items", 'fields'=>array()),array('identifier'=>"list", 'fields'=>array("poll_item_title","num_of_votes")))),$param);
	$pollData=$dataFetcher->getData($voteFormId);
	$pollList=$pollData['polls']['list'];
	$pollColors=array('best-producer-2014' => "#E71442", 'best-new-producer-2014' => "#E41821", 'best-website-blog-2014' => "#4237B0", 'best-track-2014' => "#CBD134", 'best-remix-2014' => "#A4D234", 'best-radio-station-2014' => "#01ACCC", 'best-radio-show-2014' => "#00A9AB", 'best-new-label-2014' => "#D6C219", 'best-mix-podcast-2014' => "#01A478", 'best-vocalist-mc-2014' => "#0180CA", 'best-label-2014' => "#E1AD08", 'best-dj-2014' => "#ED5921", 'best-album-compilation-2014' => "#38B449", 'best-120-140bpm-producer-2014' => "#5F2FAE", 'best-120-140bpm-dj-2014' => "#BE5595");
	$pollLinks=array('best-producer-2014' => "best-producer.php", 'best-new-producer-2014' => "best-new-producer.php", 'best-website-blog-2014' => "best-website-magazine.php", 'best-track-2014' => "best-track.php", 'best-remix-2014' => "best-remix.php", 'best-radio-station-2014' => "best-radio-station.php", 'best-radio-show-2014' => "best-radio-show.php", 'best-new-label-2014' => "best-new-label.php", 'best-mix-podcast-2014' => "best-mix.php", 'best-vocalist-mc-2014' => "best-mc-vocalist.php", 'best-label-2014' => "best-label.php", 'best-dj-2014' => "best-dj.php", 'best-album-compilation-2014' => "best-album-compilation.php", 'best-120-140bpm-producer-2014' => "best-120-140-bpm-producer.php", 'best-120-140bpm-dj-2014' => "best-120-140-bpm-dj.php");
	$maxBarLength=200;
?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="KeyWords" content="">
	<meta name="Description" content="">
	<meta name="title" content="Dubstepforum Awards">
	<title>DUBSTEPFORUM AWARDS 2014 RESULTS</title>
	<link rel="stylesheet" type="text/css" href="screen.css" media="screen">
    <link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
</head>
<body>
<div class="main">
	<div class="masthead" style="position: relative;">
    	<a href="http://www.dubstepforum.com" class="masthead_dsf_link"></a>
        <div class="wellcome_note">
        Big up to all people who voted this year and congratulations to all the nominees and overall winners. Here you can check out who won what, listen to tracks and enjoy the best of what the scene had to offer in 2013. We’ll see you back here later in the year when nominations for the 2015 awards will begin.
        </div>
    </div>
    <br class="clearing" />
    <div class="menu">
    	<div style="color: white; font-size: 26px; font-weight: normal;" class="menu_link_container">
        	<!--<a class="menu_link" href="file:///Macintosh HD/Users/index.html">Back to results page</a>-->
            And the winners are:
        </div>
        <div class="menu_link_container best_producer_menu" style="display: inline; float: left; margin: 16px 0px 0px 230px">
        	<a class="menu_link" href="dubstepforum-awards-banners-promotional-material.html" >Promo material</a>
        </div>
    </div>
    <div class="addthis_toolbox addthis_default_style addthis_32x32_style" style="float: right; width: 162px; margin: 24px 0px 0px 0px;">
<a class="addthis_button_compact" style="margin-right: 0px;
	float: right;"></a>
<a class="addthis_button_preferred_3" style="margin-right: 0px;
	float: right;"></a>
<a class="addthis_button_preferred_2" style="margin-right: 0px;
	float: right;"></a>
<a class="addthis_button_preferred_1" style="margin-right: 0px;
	float: right;"></a>
</div>
<script type="text/javascript">var addthis_config =
{"data_track_clickback":true};</script>
<script type="text/javascript"
src="http://s7.addthis.com/js/250/addthis_widget.js#username=dubstepforum"></script>
    <br class="clearing" />
    <div class="main_container">	
	<?php
		for ($i=0; $i<count($pollList); $i++) {
			echo ('<div class="category_header_container"><div class="'.$pollList[$i]['symbol'].'"></div></div><div class="nominees_conatiner">');		
            for ($j=0; $j<3; $j++) {
				echo ('<div class="nominee"><div class="nominee_order_num"><h1>'.($j+1).'<h1/></div><div class="nominee_name_order"><h1>'.$pollList[$i]['poll_items']['list'][$j]['poll_item_title'].'</h1></div>');
				if ($pollList[$i]['poll_items']['list'][$j]['num_of_votes']!=0) {
					echo ('<div class="nominee_bar_container"><div class="nominee_bar" style="background-color: '.$pollColors[$pollList[$i]['symbol']].'; width: '.ceil($pollList[$i]['poll_items']['list'][$j]['num_of_votes']*$maxBarLength/$pollList[$i]['poll_items']['list'][0]['num_of_votes']).'px;"></div></div></div>');
				} else {
					echo ('</div>');
				}
			}
			echo ('<div class="nominee"><div class="votes_stats_title"><a href="dubstepforum-awards-categories/'.$pollLinks[$pollList[$i]['symbol']].'" style="color: '.$pollColors[$pollList[$i]['symbol']].'; text-decoration: none;">view more</a></div>
            </div>');
			echo ('</div><div class="nominees_conatiner_bottom" style="margin-bottom: 25px;"></div>');
		}
		?>           
</div>
    <br class="clearing" />
    <!--<div style="margin: 6px 0px 12px 0px;" class="menu">
    	<div class="menu_link_container best_album_menu">
        	<a class="menu_link" href="file:///Macintosh HD/Users/index.html">Back to results page</a>
        </div>
    </div>-->
	
	
	<div class="footer">
        <a style="float: left;" href="http://www.dubstepforum.com">www.dubstepforum.com</a>
		
	</div>
</div>
</body>
</html>
