<?php 
session_start();
if(isset($_SESSION['newsphp']))
{
$kuladi = $_SESSION['newsphp']; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="robots" content="noindex,nofollow,nosnippet,noodp,noarchive,noimageindex">
	<link rel="stylesheet" media="screen,projection" type="text/css" href="css/reset.css" /> 
	<link rel="stylesheet" media="screen,projection" type="text/css" href="css/main.css" /> 
	<link rel="stylesheet" media="screen,projection" type="text/css" href="css/2col.css" title="2col" /> 
	<link rel="alternate stylesheet" media="screen,projection" type="text/css" href="css/1col.css" title="1col" /> 
	<!--[if lte IE 6]><link rel="stylesheet" media="screen,projection" type="text/css" href="css/main-ie6.css" /><![endif]--> 
	<link rel="stylesheet" media="screen,projection" type="text/css" href="css/style.css" />
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/switcher.js"></script>
<script type="text/javascript" src="js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
	tinyMCE.init({
		entity_encoding : "utf-8",
        mode : "exact",
        elements : "elm1",		
		theme : "advanced",
		plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",

		// Theme options
		theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
		theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
		theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,

		// Example content CSS (should be your site CSS)
		content_css : "css/content.css",

		// Drop lists for link/image/media/template dialogs
		template_external_list_url : "lists/template_list.js",
		external_link_list_url : "lists/link_list.js",
		external_image_list_url : "lists/image_list.js",
		media_external_list_url : "lists/media_list.js",

		// Style formats
		style_formats : [
			{title : 'Bold text', inline : 'b'},
			{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
			{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
			{title : 'Example 1', inline : 'span', classes : 'example1'},
			{title : 'Example 2', inline : 'span', classes : 'example2'},
			{title : 'Table styles'},
			{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
		],

		// Replace values for the template plugin
		template_replace_values : {
			username : "Some User",
			staffid : "991234"
		}
	});
</script>		<title>Radyo Sitesi Yönetim Paneli</title>	</head><body><div id="main">	<div id="tray" class="box">		<p class="f-left box">			<span class="f-left" id="switcher">				<a href="#" rel="1col" class="styleswitch ico-col1" title="Display one column"><img src="design/switcher-1col.gif" alt="1 Column" /></a>				<a href="#" rel="2col" class="styleswitch ico-col2" title="Display two columns"><img src="design/switcher-2col.gif" alt="2 Columns" /></a>			</span>			<strong>Radyo Sitesi Yönetim Paneli</strong>		</p>		<p class="f-right"><strong><a href="admin.php"><?php echo $kuladi; ?></a></strong> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong><a href="logout.php" id="logout">Çıkış</a></strong></p>	</div>	<hr class="noscreen" />	<div id="menu" class="box">		<ul class="box f-right">			<li><a href="../index.php" target="_blank"><span><strong>Siteyi Görüntüle &raquo;</strong></span></a></li>		</ul>		<ul class="box">			<li><a href="home.php"><span>Anasayfa</span></a></li>							<li><a href="sayfalar.php"><span>Sayfalar</span></a></li>						<li><a href="yazilar.php"><span>Haberler</span></a></li>					<li><a href="fotogaleri.php"><span>Galeriler</span></a></li>				<li><a href="videolar.php"><span>Klipler</span></a></li>									<li><a href="yazarlar.php"><span>Yayıncılar</span></a></li>					<li><a href="yorumlar.php"><span>Yorumlar</span></a></li>									<li><a href="contact.php"><span>İletişim</span></a></li>			<li><a href="admin.php"><span>Yönetici Bilgileri</span></a></li>			<li><a href="ayarlar.php"><span>Ayarlar</span></a></li>		</ul>	</div>	<hr class="noscreen" />	<div id="cols" class="box">		<div id="aside" class="box">			<div class="padding box">				<p id="logo"><a href="home.php"><img src="design/logo.png" title="Radyo Sitesi Yönetim Paneli" alt="" /></a></p><br><br>			</div>						<div class="padding box">				<p id="btn-create" class="box"><a href="sayfaekle.php"><span>Sayfa Ekle</span></a></p>		<p id="btn-create" class="box"><a href="galeriekle.php"><span>Galeri Oluştur</span></a></p>		<p id="btn-create" class="box"><a href="resimekle.php"><span>Resim Ekle</span></a></p>		<p id="btn-create" class="box"><a href="videoekle.php"><span>Video Ekle</span></a></p>		<p id="btn-create" class="box"><a href="yazarekle.php"><span>Yayıncı Ekle</span></a></p>					</div>						<div class="padding box" class="info msg">			<br><br>									</div>		</div>		<hr class="noscreen" />

		<div id="content" class="box">
			<h1>Yazı Düzenle</h1>
			<br>
<?php include("../config.php");
$id = $_GET['id'];
include("plugin/yazisave.php"); 
mysql_query("SET NAMES 'utf8'");
mysql_query("SET CHARACTER SET utf8");
mysql_query("SET COLLATION_CONNECTION = 'utf8_bin'");
$sorgu = mysql_query("select * from news where id='$id'");
if(mysql_num_rows($sorgu)=="0"){

echo '<div class="warning msg"><b>Ulaşmaya çalıştığınız değer veritabanın da mevcut değil. Lütfen kaydedilen verileri yazılar sayfasından takip ediniz!</b></div>'; }else{
while($gelen = mysql_fetch_array($sorgu)){ $uid = $gelen['uID']; 

			$yorum_za=strtotime($gelen['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); ?>
						<form method="post">

						<div class="col50">
			
		<p class="t-justify">   <br>
		<b>Yazıyı gönderen yazar :</b> <?php $days = mysql_query("select * from uyeler where id='$uid'"); while($letgo = mysql_fetch_array($days)){ echo $letgo['adsoyad']; } ?> &nbsp;&nbsp; - &nbsp;&nbsp; <b>Kayıt Tarihi :</b> <?php echo $yorum_z; ?> 					
						<br><br>
						<label><b>Başlık</b></label><br>
						<input type="text" size="100" name="baslik" value="<?php echo $gelen['baslik']; ?>" class="input-text" /><br><br>
					
						<label><b>Küçük Resim</b> (200 x 200)</label> <a onclick="window.open('/upload/upload.php','Upload','width=500,height=200,scrollbars=1');return false;" href="">Resim Yükle</a><br>
						<input type="text" size="100" name="resimyolu" value="<?php echo $gelen['resimyolu']; ?>" class="input-text" /><br><br>

						<label><b>Manşet Resim</b> (700 x 306 - Bu alanı sadece manşet olarak seçtiğiniz yazılar da kullanın.)</label> <a onclick="window.open('/upload/upload.php','Upload','width=500,height=200,scrollbars=1');return false;" href="">Resim Yükle</a><br>
						<input type="text" size="100" name="mansetresim" value="<?php echo $gelen['mansetresim']; ?>" class="input-text" /><br><br>			

						<label><b>Anahtar kelimeler</b>(keywords)</label><br>
						<textarea cols="75" rows="7" name="keywords" class="input-text"><?php echo $gelen['keywords']; ?></textarea><br><br>

						<label><b>Tanımlama</b> (description)</label><br>
						<textarea cols="75" rows="7" name="description" class="input-text"><?php echo $gelen['description']; ?></textarea><br><br>							

						<label><b>Kategori</b></label><br>
						<select name="kategori" style="width:300px;" class="input-text">
						<option><?php echo $gelen['kategori']; ?></option>
				<?php $sorgu1 = mysql_query("select * from newskat order by id desc"); while($gelen1 = mysql_fetch_array($sorgu1)){ ?>		
						<option value="<?php echo $gelen1['sefurl']; ?>"><?php echo $gelen1['baslik']; ?></option>
						<?php } ?>
						</select><br><br>

						<label><b>Manşet</b></label><br>
				<?php if($gelen['manset']=="0"){ ?>		
						<input type="radio" name="manset" value="0" checked>  Hayır, bu yazı manşette yer almasın.
						<input type="radio" name="manset" value="1">  Evet, bu yazı manşette yer alsın.<br><br>
				<?php }elseif($gelen['manset']=="1"){ ?>
						<input type="radio" name="manset" value="0">  Hayır, bu yazı manşette yer almasın.
						<input type="radio" name="manset" value="1" checked>  Evet, bu yazı manşette yer alsın.<br><br>
				<?php } ?>						

						<label><b>İçerik</b></label> <a onclick="window.open('/upload/upload.php','Upload','width=500,height=200,scrollbars=1');return false;" href="">Resim Yükle</a><br>
						<textarea cols="75" rows="20" name="content" id="elm1" class="input-text"><?php echo $gelen['icerik']; ?></textarea><br><br>								
		
						<label><b>Onay</b></label><br>
						<?php if($gelen['onay']=="1"){ ?>
						<input type="radio" name="onay" value="1" checked><img src="design/ico-done.gif" /> &nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="onay" value="0"><img src="design/ico-delete.gif" /><br><br>
						<?php }elseif($gelen['onay']=="0"){ ?>
						<input type="radio" name="onay" value="1"><img src="design/ico-done.gif" /> &nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="onay" value="0" checked><img src="design/ico-delete.gif" /><br><br>						
						<?php } ?>			
					</p>
				
			</div> 

			<div class="fix"></div>						

			<input type="submit" class="input-submit" name="gonder" style="width:500px;" value="Kaydet" />
						</form>
			<?php } } ?>
			
			<br>
		</div>

	</div>

	<hr class="noscreen" />

	<div id="footer" class="box">

		<p class="f-left">&copy; 2016 Radyo Sitesi</p>

		

	</div> 

</div>

</body>
</html>
<?php } else { echo '<script language="javascript">location.href="../404.php";</script>'; } ?>