File Manager
Melihat File: UpdateLogo.php
<?php
session_start();
require('include/AppController.php');
$Object = new AppController;
$Object->SessionLogin();
$Object->SetTimeZone();
?>
<?php include("include/sweetalert.php");
include("include/footer.php");
if(isset($_POST['submit'])){
$Image = $_FILES['file'];
$ImageName = str_replace(" ","_",$Image['name']);
$path1 ="images/".$ImageName;
if (move_uploaded_file($Image['tmp_name'], $path1)){
$Sql = "update tb_admins set adm_logo='$ImageName' where adm_id='1'";
$Res = $Object->Query($Sql);
if($Res){
echo"<script type='text/javascript'>
swal({title: 'Congratulations !',text: 'Website Logo Updated SucceFully.!',type: 'success'
}, function() {
window.location = 'Profile.php';
});
</script>";
}
}else{
echo"Not Updated"; die;
}
}
?>