<?php				//Recent Uploads Get Link 			//$wp2ytUserAccount = ($_GET['wp2ytUserAccount']) 			$account = $_GET['account'];							$url = "http://gdata.youtube.com/feeds/api/users/" . $account . "/uploads?v=2&alt=json";			$data = json_decode(@file_get_contents($url),true);			$info = $data["feed"];			$video = $info["entry"];			$nVideo = count($video);					?>										<script>			jQuery(document).ready(function() {					jQuery('.wp2yt-video-thumbnail').mouseenter(function() {					jQuery(this).stop().fadeTo(375,.5);					jQuery(this).prev().fadeIn();					jQuery(this).mouseleave(function() {						jQuery(this).stop().fadeTo(375,1);						jQuery(this).prev().fadeOut();					});									});							/* jQuery to insert embed code into posts, and to close media upload thickbox */		jQuery(".preview-yt-video-btn").click(function() {						var e=jQuery(this).parents("div.videos").find("#embedLinkDiv").text();			e=jQuery.trim(e);			// get current SRC			var wp2ytEmbedLinkSRC = jQuery(e).attr("src");			// set new SRC			wp2ytNewEmbedLinkSRC = wp2ytEmbedLinkSRC+"?&autoplay=1&rel=0&showinfo=0";			// str_replace old src with new src			e = e.replace(wp2ytEmbedLinkSRC,wp2ytNewEmbedLinkSRC);									var videoTitle = jQuery(this).parents("div.videos").find(".titlebox").text();					jQuery('#wp2yt-uploader-preview-video').html(e).prepend('<h2 style="margin-bottom:0;">Preview '+videoTitle+'</h2>');					});				// hack to prevent iframe from playing when thicbox closes		window.setInterval(function(){				if (jQuery('#TB_ajaxContent').is(":visible")){					return;				} else {					jQuery('#wp2yt-uploader-preview-video').html('');				}			}, 500);				jQuery(".preview-yt-video").click(function() {						var e=jQuery(this).parents("div.videos").find("#embedLinkDiv").text();			e=jQuery.trim(e);					// get current SRC			var wp2ytEmbedLinkSRC = jQuery(e).attr("src");			// set new SRC			wp2ytNewEmbedLinkSRC = wp2ytEmbedLinkSRC+"?&autoplay=1&rel=0&showinfo=0";			// str_replace old src with new src			e = e.replace(wp2ytEmbedLinkSRC,wp2ytNewEmbedLinkSRC);					var videoTitle = jQuery(this).parents("div.videos").find(".titlebox").text();					jQuery('#wp2yt-uploader-preview-video').html(e).prepend('<h2 style="margin-bottom:0;">Preview '+videoTitle+'</h2>');				});						});				</script>			<div class="title_and_video_count_div"> 			<?php					echo "<h4>Recent ".$info["title"]['$t'].'</h4>';					echo "<b><i>Number of Videos: ".$nVideo."</i></b>";			?>				</div>				<div class="scrollable-content">						<?php for($i=0;$i<25;$i++){ ?>						<?php if($nVideo == '0') : ?>				<div class="no_videos_error" style="width:714px; padding-bottom:15px;">					<h3 style="color:red;"><img alt='' style="margin-right:10px; margin-bottom:0px; border:none; height:14px;" src="<?php echo  '/wp2yt-uploader-Uploader/includes/images/red-x.png' ;?>"> OH NO! <img alt='' style="margin-left:10px; margin-bottom:0px; border:none; height:14px;" src="<?php echo plugins_url( '/wp2yt-uploader-Uploader/includes/images/red-x.png' );?>"></h3>						<p><i>It appears that there is currently no content on <?php echo '<b>'.$account.'</b>'; ?>'s YouTube channel. If you are sure there are videos, double  						check that you have entered the account name properly. </i></p>						<br/>						<br/>						<li style="padding-left:15px; font-size:11px;"><i><b style="color:green;">Tip:</b> If the account name was mistyped you will receive this error.</i></li>						</div>						<?php break; ?> <!-- break loop -->				</div>							<!-- if loop returns no video title break loop -->			<?php elseif(@$video[$i]['title']['$t'] == '') : ?>					<?php break; ?> <!-- break loop -->							<!-- if title is found -->				<?php elseif($video[$i]['title']['$t'] !== '') : ?>											<div class="videos" style="display:inline; float:left; padding:1em;">							<!-- add if statement -->								<div class="titlebox">				<?php					//Print Video Title					echo "<a class='wp2yt-title-link' href='http://www.youtube.com/watch?feature=player_embedded&v=".$video[$i]['media$group']['yt$videoid']['$t']."' target='_blank'>".$video[$i]['title']['$t'].'</a><br/>'; ?>				   </div>				<div class="imagebox"><!-- start imagebox div -->														<?php echo "<a href='http://www.youtube.com/watch?feature=player_embedded&v=".$video[$i]['media$group']['yt$videoid']['$t']."' target='_blank'><span class='wp2yt-preview-image-overlay' style='position:relative;display:none;float:left'><span style='font-size:4em;position:absolute;display:block;width:500px;text-align:center;margin-top:1em;' class='wp2yt-icon-play'><i> </i></span></span><img class='wp2yt-video-thumbnail' alt='' src='".$video[$i]['media$group']['media$thumbnail'][1]['url']."' /></a><br />"; ?>					<!-- add a preview button -->					<div class="wp-2-yt-buttons">						<a href="#TB_inline?width=600&height=550&inlineId=wp2yt-uploader-preview-video" class="thickbox button-primary preview-yt-video-btn"><span class="wp2yt-icon-play"><i> </i></span></a>													<a href="#TB_inline?width=600&height=550&inlineId=wp2yt-uploader-embed-parameters" class="btn btn-small btn-success insert-video-to-post-btn thickbox"><span class="icon-forward"><i> </i></span></a>						<button class="btn btn-small btn-danger wp2yt-delete-video-btn" onclick="wp2yt_delete_video.call(this)"><span class="icon-remove"><i> </i></span></button>											</div>					</div><!--end imagebox --> 										<div class="statsBox"><!--start statsBox -->													<div class="viewBox"><?php if (@$video[$i]['yt$statistics']["viewCount"] == 0) { echo '<p>Total Views: 0</p>'; } else { echo "<p>Total Views:".@$video[$i]['yt$statistics']["viewCount"].'</p><br/>'; } ?> </div> <!-- end viewBox -->						<div class="likeBox"><?php if (@$video[$i]['yt$rating']["numLikes"] == 0) { echo '<p>Total Likes: 0</p>'; } else { echo "<p>Total Likes:".@$video[$i]['yt$rating']["numLikes"].'</p><br/>'; } ?> </div> 	<!-- end likeBox -->					</div><!-- end statsBox -->					<div id="descriptionDiv" style="padding-top:.3em; width:500px; overflow:hidden; max-height:155px; min-height:145px;"> 					<?php					// add description					echo "<p><b>Description:</b> ".$video[$i]['media$group']['media$description']['$t'].'<br/></p>';					?> </div> <!-- end descriptionDIV --> 					<div id="embedLinkDiv" style="width:500px; padding-top:.5em;">					<input name="uniqueVideoID" type="hidden" value="<?php echo $video[$i]['media$group']['yt$videoid']['$t']; ?>">						<?php echo  htmlentities('[iframe]<iframe width="640" height="480" src="http://www.youtube.com/embed/') . $video[$i]['media$group']['yt$videoid']['$t'] . htmlentities('" frameborder="0" allowfullscreen="1"></iframe>[/iframe]'); ?>										</div> <!-- end embedDiv div -->												</div> <!-- end videos div -->					<?php endif; ?>				<?php 			}		?>		