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

<?

$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;
}
</style>


	<div id="content" class="container">
	
    <div id='topad'><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'>
<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(); 
$cnt = 0;
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">
			<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
			<h2><?php the_category(', '); ?><i> &mdash; <?php the_time('F j, Y G:i'); ?> &mdash; <a href="#comments" title="Jump to the comments"><?php comments_number('0 Comments','1 Comment','% Comments'); ?></a></i></h2>
			<h1><?php echo urldecode($_REQUEST['tt']); ?></h1>
			<div class="dash"></div>
			<div id="entry">
				<?php if(get_option('gp_retweet_article')=="true"): ?>
				<span class="tweet">
					<script type="text/javascript">
					tweetmeme_source = '<?php echo stripslashes(get_option('gp_retweet_username')); ?>';
					tweetmeme_service = 'bit.ly';
					</script>
					<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>
				</span>
				<?php endif; ?> 
				<?php the_content(); ?>

                
                <center>
               <object width="448" height="374"><param name="movie" value="http://www.worldstarhiphop.com/videos/e/16711680/<?= $_REQUEST['myvid'] ?>"><param name="allowFullScreen" value="true"></param><embed src="http://www.worldstarhiphop.com/videos/e/16711680/<?= $_REQUEST['myvid'] ?>" type="application/x-shockwave-flash" allowFullscreen="true" width="448" height="374"></embed></object>
</center>
        <? mc_display_widget();  ?>        
                
                
			</div>
			<div class="dash"></div>
			
          	<div class='300250'></div>
            
            <div class="postmetadata">
				<h2><i>This article was written by <?php the_author_posts_link(); ?> on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>.
				
				<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
					// Both Comments and Pings are open ?>
					You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(true); ?>" rel="trackback">trackback</a> from your own site.
				
				<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
					// Only Pings are Open ?>
					Responses are currently closed, but you can <a href="<?php trackback_url(true); ?> " rel="trackback">trackback</a> from your own site.
				
				<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
					// Comments are open, Pings are not ?>
					You can skip to the end and leave a response. Pinging is currently not allowed.
	
				<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
					// Neither Comments, nor Pings are open ?>
					Both comments and pings are currently closed.			
				
				<?php } ?>
				This article was tagged under the following &mdash;</i> <?php the_category(', ') ?></h2>
			</div>
					
			<?php comments_template(); ?>
			
			<?php endwhile; else: ?>
				<h1>Sorry, no posts matched your criteria.</h1>
			<?php endif; ?>
		</div></div>
		
		<? //get_sidebar(); ?>
		
		
		
	</div>
    <div class='clear'></div>
    </div>
<?php get_footer(); ?>