<?php
/*
Template Name: AllMusic
*/
?>

<?

$mytitle = urldecode($_REQUEST['tt']); 

?>

<?php get_header(); ?>

<style>
.primary_col {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
-moz-box-shadow:0 0 4px #CCCCCC;
background:#FFFFFF none repeat scroll 0 0;
float:left;
margin:-21px 5px 0 0;
padding:0 7px 10px;
width:55.8%;
}
img {
	width:auto !important;
}
h1, h1 a, h1 a:visited, h1.title {
color:#000000;
font-family:Helvetica,Arial;
font-size:32px;
font-weight:bold;
letter-spacing:-1px;
margin:10px 0 0;
padding:5px 0 0;
text-decoration:none;
}
.button {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:none !important;
border:0 none;
cursor:pointer;
height:28px;
top:0;
width:33px;
}
.right_col {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
-moz-box-shadow:0 0 4px #CCCCCC;
background:#FFFFFF none repeat scroll 0 0;
clear:right;
float:right;
margin:-22px 0 36px;
padding:0 20px 18px;
position:relative;
width:217px;
z-index:22;
}
.thumbnail-small img {
border:1px solid #DDDDDD;
float:left;
height:117px;
margin:0 8px 0 0;
padding:1px;
}
#content li {
border-bottom:1px dashed #DDDDDD;
float:left;
height:189px;
line-height:16px;
list-style-type:none;
margin:0 19px 10px 0;
padding:7px 0;
text-align:center;
width:123px;
}
</style>


	<div id="content" class="container">
	
    <div id='topad'><!-- PubMatic ad tag (Javascript) : Music and Video Leaderboard | http://Radiohiphop.com | 728 x 90 Leaderboard -->
<script type="text/javascript">
var pubId=19039;
var siteId=24593;
var kadId=19189;
var kadwidth=728;
var kadheight=90;
var kadtype=1;
</script>
<script type="text/javascript" src="http://ads.pubmatic.com/AdServer/js/showad.js">
 </script>

</div>


<div style='float:right; padding:0px;'>
<img src='http://radiohiphop.com/ihponebadge.jpg' style='float:right;margin:-20px 0 0;padding:0;width:279px !important;'>
</div>

    <div style='clear:both;margin-bottom:33px;'></div>
    <div id='leftadtall'><!-- PubMatic ad tag (Javascript) : Skyscrape on Music and Video Pages | http://Radiohiphop.com | 160 x 600 Wide Skyscraper -->
<script type="text/javascript">
var pubId=19039;
var siteId=24593;
var kadId=19190;
var kadwidth=160;
var kadheight=600;
var kadtype=1;
</script>
<script type="text/javascript" src="http://ads.pubmatic.com/AdServer/js/showad.js">
 </script>

</div>
    
    <div class="right_col">
				
				<h5 class="tags">New Videos</h5>
                <?

 include 'wp-content/plugins/wp-o-matic/inc/simplepie/simplepie.class.php'; 
            
$feed = new SimplePie();  
$feed->set_feed_url('http://worldstarhiphop.com/videos/rss.php');
$feed->init();  
$feed->handle_content_type(); 


foreach($feed->get_items() as $item) { 
	$cnt++;
	if ($cnt == 6){ break; }
	$mylink =  $item->get_link();
	$mylink = explode ('v=',$mylink);
	preg_match('/(alt|title|src)=("[^"]*")/i', $item->get_description(), $mynewid);
	//echo $mynewid[0];
	$newdesc = preg_replace('/80/', '',$item->get_description());
	
	
        $output .= '<h2>'.$item->get_title().'</h2>';
        $alldesc = '<![CDATA['.$newdesc.'<object width="448" height="374"><param name="movie" value="http://www.worldstarhiphop.com/videos/e/16711680/'. $mylink[1].'"><param name="allowFullScreen" value="true"></param><embed src="http://www.worldstarhiphop.com/videos/e/16711680/'. $mylink[1].'" type="application/x-shockwave-flash" allowFullscreen="true" width="448" height="374"></embed></object>]]>';

	?>
	
    <? //$alldesc ?>
 <div class='avid'>
  <div class='vidtitle'>
  	<a href='/?page_id=88&myvid=<?= $mylink[1] ?>&tt=<?= urlencode($item->get_title()) ?>' style='color:#fff'>
	<?= $item->get_title() ?>
  </div>
  <? echo '<img class="vidpik" '.$mynewid[0].'>'; ?>
  </div>
  </a>
<?	
 }
?>
                
        </div>
        <!-- close // right col -->
    
    	<div class="primary_col">
			<ul >
				<? 
					$feed = new SimplePie();  
$feed->set_feed_url(' http://www.dapper.net/transform.php?dappName=ahhfeed&transformer=RSS&extraArg_title=songtitle&extraArg_description[]=artist&extraArg_description[]=artistpic&applyToUrl=http%3A%2F%2Fallhiphop.com%2Fmedia%2Fmusic.aspx%3Fapp%3Dmultimedia__music');

$feed->init();  
$feed->handle_content_type();

				foreach($feed->get_items() as $item) { ?>
					
                    
                    <?
						$getthis = explode('/', $item->get_description());
						$songid = explode ('.',  $getthis[9]);
					
						 preg_match('/(alt|title|src)=("[^"]*")/i', $item->get_description(), $mynewsong);
						//break;
					?>
                    
                    
                    <li>
						<a href='../listen?id=<?= $songid[0] ?>&tt=<?= urlencode($item->get_title()) ?>'>
                        <div class="thumbnail-small"><?= '<img '.$mynewsong[0].'>' ?></div>
						<span class="title"><?= str_replace(',','',strip_tags($item->get_description())) ?></span><br />
						<span class="meta"><?= $item->get_title() ?></span>
						</a>
                    </li>
					<?php } ?>
				</ul>
                
		</div>
		
        
        	<div class="dash"></div>
			
          	<div class='300250'></div>
            
            </div>
		
		<? //get_sidebar(); ?>
		
		
		
	</div>
    <div class='clear'></div>
    </div>
<?php get_footer(); ?>