<?php include('../../config/setup.php');?>
<?php
 if(isset($_POST['ps_name_edit']))
 { 
 
$update_app_Name=mysqli_query($config,"update ps_master set ps_type='".$_POST['Edit_ps_type']."',ps_video_link='".$_POST['Edit_ps_videolink']."',ps_banner_status='".$_POST['ps_banner_status']."',ps_status='".$_POST['ps_video_status']."' where ps_id='".$_POST['Edit_ps_id']."'");
 if($update_app_Name==false)
{
echo "<script>window.location.href='../ps_banner.php?erro=0';</script>".mysqli_error();	 
}
else{
	
	echo "<script>window.location.href='../ps_banner.php?msg=100';</script>";	 

	
}

 }

?>
<?php
 if(isset($_POST['ps_image_change']))
 {
 

$logoimage=$_FILES['ps_logo']['name'];
$logophoto="../../../img/psbanner/".$logoimage;
move_uploaded_file($_FILES["ps_logo"]["tmp_name"],$logophoto);
$imageediton=date('Y-m-d'); 

if($logoimage){
$update_service_photo=mysqli_query($config,"update ps_master set ps_banner='$logoimage',ps_status='".$_POST['ps_status']."' where ps_id='".$_POST['ps_logo_id']."'");
}else{
	 $cc="update ps_master set ps_status='".$_POST['ps_status']."' where ps_id='".$_POST['ps_logo_id']."'";
	
	$update_service_photo=mysqli_query($config,$cc);

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

	
}

 }

?>
