<?php include('../../config/setup.php');?>
<?php

if(isset($_POST['game_menu_add']))
{
 
$maincate=date('Y-m-d');

$addsugcatephoto=$_FILES['icon']['name'];
$addsubphoto="../../../photos/gamesupport/".$addsugcatephoto;
move_uploaded_file($_FILES["icon"]["tmp_name"],$addsubphoto);
$addprotype=mysqli_query($config,"insert into game_support_flatform(Shop__setting,Shop_setting_status,order_list,icon)
                                 values('".$_POST['Add_game_menu']."','".$_POST['Add_game_status']."','".$_POST['Add_game_menu_order']."','$addsubphoto')");
								 
								 
if($addprotype==false)
{
 	
 	 echo "<script>window.location.href='../game_support_plat.php?erro=0';</script>".mysqli_error();	 
}
else{
	
	echo "<script>window.location.href='../game_support_plat.php?msg=505';</script>";	 

	
}	






}


if(isset($_GET['id']))
{
	 $id=$_GET['id'];
	 $sql = "DELETE FROM game_support_flatform WHERE shop_id='$id'";

mysqli_query($config, $sql);
echo "<script>window.location.href='../game_support_plat.php?msg=505';</script>";	 


}
?>
