kohjhjhصثقصثقصثقgdfgdg
Ele57885fddfgdfgfghgقفغفغفقhfg555434536
/
home
/
u138293434
/
domains
/
ramachandrantravelsindia.in
/
public_html
/
admin
/
Upload FileeE
HOME
<?php include("inc/conn.php"); extract($_POST); $name=addslashes($name); $page=$_SERVER['HTTP_REFERER']; if($hotel){ $hotel=1; } else{ $hotel=0; } if($sightseeing){ $sightseeing=1; } else{ $sightseeing=0; } if($transfer_icon){ $transfer_icon=1; } else{ $transfer_icon=0; } if($meal_icon){ $meal_icon=1; } else{ $meal_icon=0; } $date = date("ymdhis"); $target_dir = "uploads/".$date; $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]); if(!$package){ if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) { if(mysqli_query($conn,"Insert into advertise_package(name,advertise,price,day,hotel,sightseeing,thumbnail,rating,night,transfer_icon,meal_icon,destination) values('$name','$id','$price','$day','$hotel','$sightseeing','$target_file','$rating','$night','$transfer_icon','$meal_icon','$destination')")){ echo "<script>alert('Package added successfully!'); location.href='$page';</script>"; } else{ echo mysqli_error($conn); } } } else{ move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file); if(basename($_FILES["fileToUpload"]["name"])){ if(mysqli_query($conn,"Update advertise_package set name='$name',price='$price',day='$day',hotel='$hotel',sightseeing='$sightseeing',rating='$rating',night='$night',transfer_icon='$transfer_icon',meal_icon='$meal_icon',destination='$destination',thumbnail='$target_file' where id = ".$package)){ echo "<script>alert('Package Updated successfully!'); location.href='$page';</script>"; } else{ echo mysqli_error($conn); } } else{ if(mysqli_query($conn,"Update advertise_package set name='$name',price='$price',day='$day',hotel='$hotel',sightseeing='$sightseeing',rating='$rating',night='$night',transfer_icon='$transfer_icon',meal_icon='$meal_icon',destination='$destination' where id = ".$package)){ echo "<script>alert('Package Updated successfully!'); location.href='$page';</script>"; } else{ echo mysqli_error($conn); } } }