<?php include('../../config/setup.php');?>
<?php
 if(isset($_POST['feature__pro']))
 { 
$editon=date('Y-m-d');
$update_main_cate=mysqli_query($config,"update feature set title='".$_POST['feature_title']."',feature_desc='".$_POST['feature_desc']."' where id='".$_POST['Edit_feature_id']."'");
 if($update_main_cate==false)
{
echo mysqli_error();	 
}
else{
	
	echo "<script>window.location.href='../feature.php?msg=100';</script>";	 
	
}

 }

?>
<?php
 if(isset($_POST['Edit_feature_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['feature__image']['name'];
$subcatephoto="../../../img/events/".$subimage;
// $subcatephoto="../../../photos/feature/".$subimage;
move_uploaded_file($_FILES["feature__image"]["tmp_name"],$subcatephoto);
$imageediton=date('Y-m-d'); 
 $sql="update feature set icon='$subimage' where id='".$_POST['feature_image_id']."'";

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

	
}

 }

?>

