<?php
  $detail=mysql_query("SELECT * FROM video,users,playlist WHERE users.username=video.username 
							AND   video.id_playlist=playlist.id_playlist AND id_video='$_GET[id]'");
  $d   = mysql_fetch_array($detail);
  $tgl = tgl_indo($d[tanggal]);
  $lihat = $d[dilihat]+1;
  $keterangan = nl2br($d[keterangan]);
	
  mysql_query("UPDATE video SET dilihat=$d[dilihat]+1 
              WHERE id_video='$_GET[id]'");
			  
	$komen3 = "SELECT * FROM komentarvid WHERE id_video = '$_GET[id]'";
	$komentar3 = mysql_query($komen3);
	$total_komentar = mysql_num_rows($komentar3);
?>	
						<div class="full-width">
							<div class="article-title">
								<div class="share-block right">
									<div>
										<div class="share-article left">
											<span>Social media</span>
											<strong>Share this article</strong>
										</div>
										<div class="left">
											<script language="javascript">
											document.write("<a href='http://www.facebook.com/share.php?u=" + document.URL + " ' target='_blank' class='custom-soc icon-text'>&#62220;</a> <a href='http://twitter.com/home/?status=" + document.URL + "' target='_blank' class='custom-soc icon-text'>&#62217;</a> <a href='https://plus.google.com/share?url=" + document.URL + "' target='_blank' class='custom-soc icon-text'>&#62223;</a>");
											</script>
											<a href="#" class="custom-soc icon-text">&#62232;</a>
											<a href="#" class="custom-soc icon-text">&#62226;</a>
										</div>
										<div class="clear-float"></div>
									</div>
									<div>
										<a href="javascript:printArticle();" class="small-button"><span class="icon-text">&#59158;</span>&nbsp;&nbsp;Print this article</a>
										<a href="#" class="small-button"><span class="icon-text">&#9993;</span>&nbsp;&nbsp;Send e-mail</a>
									</div>
								</div>

								<h1><?php echo "<b>Video - $d[jdl_video]</b>"; ?></h1>
								<div class="author">
									<span class="hover-effect left">
									<?php $test = md5(strtolower(trim($d['email']))); 
										echo "<img src=\"http://www.gravatar.com/avatar/".$test.".jpg?s=100&d=".$_GET['d']."\" />";
									?>
									</span>
									<div class="a-content">
										<span>By <b><?php echo "$d[nama_lengkap]"; ?></b></span>
										<span class="meta"><?php echo "$tgl, $d[jam] WIB"; ?><span class="tag" style="background-color: #2a8ece;"><a href="<?php echo "kategori-$d[id_kategori]-$d[kategori_seo].html"; ?>"><?php echo "$d[nama_kategori]"; ?></a></span></span>
									</div>
								</div>
							</div>

						</div>

						<div class="main-page left">
							<div class="single-block">
								<div class="content-block main left">
									
									<div class="block">
										<div class="block-content">
												
											<p><span style="height:10%; overflow:hidden; background:none;" class="hover-effect">
											<?php
												echo "<iframe width='855px' height='500px' src='$d[youtube]?rel=0&amp;showinfo=0&amp;wmode=opaque' frameborder='0' allowfullscreen></iframe>";		
												
											?>
											
											</span></p>
											<div class="shortcode-content">
												<div class="paragraph-row">
													<div class="column3">
														<h3 class="highlight-title">Random Video</h3>
														<ul>
															<?php 
																$random2 = mysql_query("SELECT * FROM video order by RAND() DESC LIMIT 3");
																while ($r2 = mysql_fetch_array($random2)){
																	echo "<li><a href='play-$r2[id_video]-$r2[video_seo].html'>$r2[jdl_video]</a></li>";
																}
															?>
														</ul>
													</div>
													<div class="column9">
														<?php 
															echo "$keterangan"; 
														?>
													</div>
												</div>
											</div>
										</div>

										
									</div>
								</div>
							</div>
						</div>