


<div class="yanyana">
<h3 class="anabaslik">Video Düzenle</h3>
<div class="formlar">
<?php
	extract($_POST);
	if (isset($submit))
	{
	include_once('class.upload.php');
	$vresim = new upload($_FILES['resim']);
	if ($vresim->uploaded)
	{
	$vresim->file_auto_rename = true;
	$vresim->image_resize = false;
	$vresim->image_x = 400;
	$vresim->image_ratio_y = true;
	$vresim->process('../resim');
 
	if ($vresim->processed)
	{
	$vresim->clean();
	}}
			
	$resim ="$vresim->file_dst_name";
	
	

	

$sql = "UPDATE videolar Set video_adi ='$videoadi' ,video_resim='$resim' ,video_embed='$videoembed' ,video_sure='$videosure', video_etiket='$etiket', video_aciklama='$aciklama' , video_kat = '$vkategori' WHERE id= '$id' ";
	
$sql2 = "UPDATE videolar Set video_adi ='$videoadi' , video_embed='$videoembed' ,video_sure='$videosure', video_etiket='$etiket', video_aciklama='$aciklama' , video_kat = '$vkategori' WHERE id= '$id' ";	


		 if($resim=="")
		 { mysql_query( $sql2 ) ;echo '<div class="uyar basarili"><img src="images/icon/basarili.png"><span>Video Başarı İle Güncellendi...</span></div>';}
		
		else  if( mysql_query( $sql ) )  echo '<div class="uyar basarili"><img src="images/icon/basarili.png"><span>Video Başarı İle Güncellendi...</span></div>';		
		
	}
	
			
			?>
            
            <?php  
$id = $_GET["id"];
$sql = "SELECT * FROM videolar where id='$id'";
$result = mysql_query ($sql) or die (mysql_error());

$goster = mysql_fetch_array($result) ;
$id = $_GET["id"];
$katid = $goster['video_kat'];
?>

<form action="" method="POST" enctype="multipart/form-data">
 <input name="id" type="hidden" value="<?php echo $id; ?>" />
<div class="">
  <li class="sol_li">Video  Adı<span>:</span></li><input name="videoadi" class="input inp5" value="<?php echo $goster['video_adi']; ?>" /></div>
<div class="">
  <li class="sol_li">Anahtar Kelimeler<span>:</span></li><input name="etiket" class="input inp5" value="<?php echo $goster['video_etiket']; ?>" /> (virgül ile ayırınız örn: leman sam indir , leman sam yükle)
</div>
 


<div class=""><li class="sol_li">Video Resmi<span>:</span></li><input type="file" name="resim" class="input inp3" /></div>  <br />

<div class=""><li class="sol_li">Yüklü Olan Resim<span>:</span></li><img height="90" width="120" src="../resim/<?=$goster['video_resim'];?>" class="input inp2" /></div><br />

<div class=""><li class="sol_li">Video Embed<span>:</span></li><input name="videoembed" class="input inp5" value="<?php echo $goster['video_embed']; ?>" /></div>

<div class=""><li class="sol_li">Video Süre<span>:</span></li><input name="videosure" class="input inp1" value="<?php echo $goster['video_sure']; ?>" ></div>

<div class=""><li class="sol_li">Video Açıklama<span>:</span></li> <textarea name="aciklama" class="input inp5 "><?php echo $goster['video_aciklama']; ?></textarea></div>

<div class=""><li class="sol_li">Kategori<span>:</span></li> 
<select class="input inp2" name="vkategori">
<?php 
$a1=mysql_query("select * from kategoriler order by kat_adi asc");
while ($a2=mysql_fetch_array($a1)){
?>
<option value="<?php echo $a2['id'];?>"<? if($goster['video_kat']=="$a2[id]"){echo " selected";}?>><?php echo $a2['kat_adi'];?></option>
<?php } ?>
</select>
</div>
<div class="yolla">
  <input name="submit" type="submit" class="button" value="Kaydet"> 
</div>

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






