<?php
session_start();
include("config.php");
include("plugin/functions.php");
mysql_query("SET NAMES 'utf8'");
mysql_query("SET CHARACTER SET utf8");
mysql_query("SET COLLATION_CONNECTION = 'utf8_bin'");
$query = mysql_query("select * from settings");
while($print = mysql_fetch_array($query)){
$url = $_GET['url'];
$gelen = mysql_query("select * from videos where sefurl='$url'"); if(mysql_num_rows($gelen)=="0"){ header("Location:404.php"); exit(); }else{
while($yazdir = mysql_fetch_array($gelen)){

			$yorum_za=strtotime($yazdir['tarih']);
			$ay=array('','Ocak','Şubat','Mart','Nisan','Mayıs','Haziran','Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'); 
			$yorum_z=date('d',$yorum_za)." ".$ay[date("n",$yorum_za)]." ".date('Y', $yorum_za); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="description" content="<?php echo $print['description']; ?>" />
	<meta name="keywords" content="<?php echo $print['keywords']; ?>" />	
	<meta name="author" content="radyo sitesi, radyo dinle" />	
	<link rel="shortcut icon" href="/images/favicon.png">
	<title><?php echo $yazdir['baslik']; ?> | <?php echo $print['title']; ?></title>	
	
	<link rel="stylesheet" media="screen" href="css/superfish.css" type="text/css" />
	<link rel="stylesheet" media="screen" href="css/stylesheet.css" type="text/css" />
	<link rel="stylesheet" media="screen" href="css/color.css" type="text/css" />		
	<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Droid+Serif:regular,italic,bold,bolditalic" type="text/css" />
	
	<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>
	<script src="js/hoverIntent.js" type="text/javascript"></script>
	<script src="js/superfish.js" type="text/javascript"></script>
	<script type="text/javascript" src="js/jquery-ui.min.js"></script>
	<script type="text/javascript" src="js/custom.js"></script>
	<script type="text/javascript" src="js/jquery.animate-shadow.js"></script>
</head>
<body>
<?php include("plugin/writelogin.php"); ?> 
<?php include("header.php"); ?> 
  
  <div id="outer-wrapper">
    <div id="content-wrapper">
      <div id="inner-content">
        <div id="entry">
          <div id="post-top">
            <h3 id="post-title"><?php echo $yazdir['baslik']; ?></h3>
            <div class="post-meta"> <span class="posting-date"><?php echo $yorum_z; ?></span> </div>
          </div>
          <div class="entry-content">
		<?php echo $yazdir['iframe']; echo '<br><br>'; echo $yazdir['text']; ?>
		
      <div class="social_sharing_post"> 
	<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/tr_TR/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" style="padding-right:40px;" data-send="false" data-layout="button_count" data-width="450" data-show-faces="true"></div>

<a href="https://twitter.com/share" class="twitter-share-button" data-lang="tr">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>		

<div class="g-plusone" data-size="medium"></div>
<script type="text/javascript">
  window.___gcfg = {lang: 'tr'};

  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>			
			</div>		
          </div>
          <div id="related_posts" class="clearfix">
            <h3><span>Diğer Videolar</span></h3>
            <ul>
<?php $dgh = mysql_query("select * from videos order by id desc limit 0,4"); while($hdg = mysql_fetch_array($dgh)){ ?>			
              <li>
		<?php if($print['seourl']==".php"){ ?>  
                <div class="thumb"><a href="video.php?url=<?php echo $hdg['sefurl']; ?>"><img src="<?php echo $hdg['resimyolu']; ?>" width="144" height="105" alt="" /></a></div>
		<?php }elseif($print['seourl']==".html"){ ?>
                <div class="thumb"><a href="video-<?php echo $hdg['sefurl']; ?>.html"><img src="<?php echo $hdg['resimyolu']; ?>" width="144" height="105" alt="" /></a></div><?php } ?>		
                <div class="heading-container">
		<?php if($print['seourl']==".php"){ ?>		
                  <h4 class="post_title"><a href="video.php?url=<?php echo $hdg['sefurl']; ?>"><?php echo $hdg['baslik']; ?></a></h4>
		<?php }elseif($print['seourl']==".html"){ ?>
                  <h4 class="post_title"><a href="video-<?php echo $hdg['sefurl']; ?>.html"><?php echo $hdg['baslik']; ?></a></h4><?php } ?>		
              </div>
              </li>
	<?php } ?>	
            </ul>
          </div>
        </div>
      </div>
	  
      <div id="sidebar">
	<?php include("plugin/sidebar.php"); ?>
      </div>
      <div class="clear"></div>
    </div>
  </div>
  
  <div id="footer"> <span id="Scroll"><a href="#">&uarr;</a></span>
    <div id="footer_inner">
<?php echo $print['reklam3']; ?>
      <div class="clear"></div>
      <div class="footer_bottom">
        <ul class="footer_menu">
          <li><a href="index<?php echo $print['seourl']; ?>">Anasayfa</a> /</li>		
<?php $whistle = mysql_query("select * from pages order by sira asc"); while($baby = mysql_fetch_array($whistle)){ if($print['seourl']==".php"){ ?>		
          <li><a href="pages.php?url=<?php echo $baby['sefurl']; ?>"><?php echo $baby['baslik']; ?></a> /</li>
	<?php }elseif($print['seourl']==".html"){ ?>	  
          <li><a href="sayfa-<?php echo $baby['sefurl']; ?>.html"><?php echo $baby['baslik']; ?></a> /</li>
	<?php } } ?>	
          <li><a href="iletisim<?php echo $print['seourl']; ?>">İletişim</a></li>
        </ul>
        <p>&copy; Copyright <?php echo date('Y'); ?>, <?php echo $print['title']; ?>. Tüm hakları saklıdır.</a></p>
      </div>
    </div>
  </div>
</div>
</body>
</html>
<?php } } } ?>