|
Server IP : 2a02:4780:11:1017:0:31f1:b895:8 / Your IP : 216.73.216.163 Web Server : LiteSpeed System : Linux in-mum-web917.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64 User : u837925013 ( 837925013) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u837925013/domains/tech2wizard.com/public_html/admin/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
$page='logo';
$page1='frontend';
include('inc/sidebar.php') ;
$get_blog= "select * from logo";
$query=mysqli_query($con,$get_blog);
$blog_data=mysqli_fetch_array($query);
if(!empty($_REQUEST['datafrmSubmit'])){
if($_REQUEST['datafrmSubmit'] == 'Update'){
$location = 'uploads/logo/';
$blog_image = $_FILES['logo']['name'];
$tmp_name = $_FILES['logo']['tmp_name'];
$upload_dir = $location.$blog_image;
if(move_uploaded_file($tmp_name, $upload_dir))
{ }
$blog_image1 = $_FILES['fevicon']['name'];
$tmp_name1 = $_FILES['fevicon']['tmp_name'];
$upload_dir1 = $location.$blog_image1;
if(move_uploaded_file($tmp_name1, $upload_dir1))
{ }
$blog_image2 = $_FILES['logo1']['name'];
$tmp_name2 = $_FILES['logo1']['tmp_name'];
$upload_dir2 = $location.$blog_image2;
if(move_uploaded_file($tmp_name2, $upload_dir2))
{ }
date_default_timezone_set("Asia/Kolkata"); //India time (GMT+5:30)
if(!empty($_FILES['logo']['name'])){
$sql_insert = "UPDATE logo set logo = '".$blog_image."'";
}
if(!empty($_FILES['logo1']['name'])){
$sql_insert = "UPDATE logo set logo1 = '".$blog_image2."'";
}
if(!empty($_FILES['fevicon']['name'])){
$sql_insert = "UPDATE logo set fevicon = '".$blog_image1."'";
}
$query_insert = mysqli_query($con, $sql_insert);
if($query_insert){
echo'<div id="hide-toast"class="toast" role="success" aria-live="assertive" aria-atomic="true">
<div class="toast-body success">
<i class="fa fa-warning"></i>Logo Updated.<i class="fa fa-close"id="close"></i>
</div>
</div>';
echo "<script type='text/javascript'>window.location=\"logo.php\";</script>";
}
}
}
?>
<!-- navbar-wrapper start -->
<div class="body-wrapper">
<div class="bodywrapper__inner">
<div class="row align-items-center mb-30 justify-content-between">
<div class="col-lg-4 col-sm-6">
<h6 class="page-title">Logo & Favicon</h6>
</div>
<div class="col-lg-8 col-sm-6 text-sm-right mt-sm-0 mt-3 right-part">
</div>
</div>
<div class="row mb-none-30">
<div class="col-md-12 mb-30">
<div class="card bl--5-primary">
<div class="card-body">
<p class="font-weight-bold text--info">If the logo and favicon are not changed after you update from this page, please clear the cache from your browser. As we keep the filename the same after the update, it may show the old image for the cache. usually, it works after clear the cache but if you still see the old logo or favicon, it may be caused by server level or network level caching. Please clear them too.</p>
</div>
</div>
</div>
<div class="col-md-12 mb-30">
<div class="card">
<div class="card-body">
<form method="post" action="" name="datafrm" id="datafrm" enctype="multipart/form-data">
<div class="row">
<div class="form-group col-xl-6">
<div class="image-upload">
<div class="thumb">
<div class="avatar-preview">
<div class="row">
<div class="col-sm-6">
<div class="profilePicPreview logoPicPrev" style="background-image: url('uploads/logo/<?php echo $blog_data['logo']; ?>')">
<button type="button" class="remove-image"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="col-sm-6 mt-sm-0 mt-4">
<div class="profilePicPreview logoPicPrev bg--dark" style="background-image: url('uploads/logo/<?php echo $blog_data['logo']; ?>')">
<button type="button" class="remove-image"><i class="fa fa-times"></i></button>
</div>
</div>
</div>
</div>
<div class="avatar-edit">
<input type="file" class="profilePicUpload" id="profilePicUpload1" accept=".png, .jpg, .jpeg, .gif" name="logo">
<label for="profilePicUpload1" class="bg--primary">Select White Logo </label>
</div>
</div>
</div>
</div>
<div class="form-group col-xl-6">
<div class="image-upload">
<div class="thumb">
<div class="avatar-preview">
<div class="row">
<div class="col-sm-6">
<div class="profilePicPreview logoPicPrev" style="background-image: url('uploads/logo/<?php echo $blog_data['logo1']; ?>')">
<button type="button" class="remove-image"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="col-sm-6 mt-sm-0 mt-4">
<div class="profilePicPreview logoPicPrev bg--dark" style="background-image: url('uploads/logo/<?php echo $blog_data['logo1']; ?>')">
<button type="button" class="remove-image"><i class="fa fa-times"></i></button>
</div>
</div>
</div>
</div>
<div class="avatar-edit">
<input type="file" class="profilePicUpload" id="profilePicUpload2" accept=".png, .jpg, .jpeg, .gif" name="logo1">
<label for="profilePicUpload2" class="bg--primary">Select Black Logo </label>
</div>
</div>
</div>
</div>
<div class="form-group col-xl-6">
<div class="image-upload">
<div class="thumb">
<div class="avatar-preview">
<div class="row">
<div class="col-sm-6">
<div class="profilePicPreview logoPicPrev" style="background-image: url('uploads/logo/<?php echo $blog_data['fevicon']; ?>')">
<button type="button" class="remove-image"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="col-sm-6 mt-sm-0 mt-4">
<div class="profilePicPreview logoPicPrev bg--dark" style="background-image: url('uploads/logo/<?php echo $blog_data['fevicon']; ?>')">
<button type="button" class="remove-image"><i class="fa fa-times"></i></button>
</div>
</div>
</div>
</div>
<div class="avatar-edit">
<input type="file" class="profilePicUpload" id="profilePicUpload3" accept=".png" name="fevicon">
<label for="profilePicUpload3" class="bg--primary">Select Favicon</label>
</div>
</div>
</div>
</div>
</div>
<button type="submit" name="datafrmSubmit" id="datafrmSubmit"value="Update"class="btn btn--primary btn-block btn-lg">Update</button>
</form>
</div>
</div>
</div>
</div>
</div><!-- bodywrapper__inner end -->
</div><!-- body-wrapper end -->
</div>
<!-- body-wrapper end -->
</div>
<!-- jQuery library -->
<?php include('inc/footer.php') ?>