<?php include('../../config/setup.php');?>
<?php
 if(isset($_POST['slider_image__pro']))
 { 
$editon=date('Y-m-d');
$update_main_cate=mysqli_query($config,"update game_banner set Slider_order='".$_POST['slider_display_order']."',Slider_Status='".$_POST['pro_gall_status']."',Slider_title='".$_POST['Slider_title']."',Slider_contecnt='".$_POST['Slider_contecnt']."',Slider_link='".$_POST['Slider_link']."' where slider_id='".$_POST['id']."'");
 if($update_main_cate==false)
{
echo mysqli_error();	 
}
else{
	
	echo "<script>window.location.href='../game_banner.php?msg=100';</script>";	 

	
}

 }

?>
<?php
 if(isset($_POST['Edit_Slider_image']))
 {
// 	 $up_main_cate=mysqli_query($config,"select Sub_Category_image from slider_master where slider_id='".$_POST['Edit_pro_slider_id']."'");
// $up_cate=mysqli_fetch_array($up_main_cate);
// unlink($up_cate[0]);
// $timezone = new DateTimeZone("Asia/Kolkata" );
// $date = new DateTime();
// $date->setTimezone($timezone );
// $today2=$date->format('s');	
$subimage=$_FILES['slider__image']['name'];
$subcatephoto="../../../photos/banner/".$subimage;
move_uploaded_file($_FILES["slider__image"]["tmp_name"],$subcatephoto);
// $imageediton=date('Y-m-d'); 
  $sql="update game_banner set Slider_Image='$subimage' where slider_id='".$_POST['slider_image_id']."'";

$update_service_photo=mysqli_query($config,$sql);
 if($update_service_photo==false)
{
echo "<script>window.location.href='../game_banner.php?erro=0';</script>".mysqli_error();	 
}
else{
	
	echo "<script>window.location.href='../game_banner.php?msg=100';</script>";	 

	
}

 }

?>
