Viewing File: /home/webrbaew/candycleansestore.co/admin/banner.php
<?php session_start(); ?>
<?php
include "database.php";
include "includes/operations.php";
if(!isset($_SESSION['admin_id'])){
echo '<script> window.location.href = "login.php"; </script>';
header("location:login.php"); exit();
}
$role = $_SESSION['role'];
$user_id = $_SESSION['admin_id'];
$result = mysqli_query($con, "SELECT * FROM banner");
$row = mysqli_fetch_array($result);
$banner_first_image = $row['banner_first_image'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include "includes/headerlinks.php";?>
</head>
<body class="fix-header fix-sidebar card-no-border">
<!-- ============================================================== -->
<!-- Preloader - style you can find in spinners.css -->
<!-- ============================================================== -->
<?php include "includes/loader.php";?>
<!-- ============================================================== -->
<!-- Main wrapper - style you can find in pages.scss -->
<!-- ============================================================== -->
<div id="main-wrapper">
<!-- ============================================================== -->
<!-- Topbar header - style you can find in pages.scss -->
<!-- ============================================================== -->
<?php include "includes/header.php";?>
<!-- ============================================================== -->
<!-- End Topbar header -->
<!-- ============================================================== -->
<!-- ============================================================== -->
<!-- Left Sidebar - style you can find in sidebar.scss -->
<!-- ============================================================== -->
<?php include "includes/sidebar.php";?>
<!-- ============================================================== -->
<!-- End Left Sidebar - style you can find in sidebar.scss -->
<!-- ============================================================== -->
<!-- ============================================================== -->
<!-- Page wrapper -->
<!-- ============================================================== -->
<div class="page-wrapper">
<!-- ============================================================== -->
<!-- Bread crumb and right sidebar toggle -->
<!-- ============================================================== -->
<div class="row page-titles">
<div class="col-md-5 align-self-center">
<h3 class="text-themecolor">Change Banner</h3>
</div>
</div>
<!-- ============================================================== -->
<!-- End Bread crumb and right sidebar toggle -->
<!-- ============================================================== -->
<!-- ============================================================== -->
<!-- Container fluid -->
<!-- ============================================================== -->
<div class="container">
<?php if($role=='Super Admin'){?>
<div class="card">
<div class="card-body">
<form class="form-horizontal bucket-form" method="POST" enctype="multipart/form-data">
<div class="form-group">
<label class="col-sm-12 control-label" style="font-size:14px">Banner Size should be (Width: 1920px | Height: 800px)</label>
<div class="col-sm-12">
<br><img src="../images/banner_images/<?php echo $banner_first_image?>" class="img-responsive" width="100%" onerror="this.onerror=null;this.src='../images/banner_images/by-deafult.png';"><br>
<label class="btn btn-default btn-sm center-block btn-file" style="width:100%"><br>
<i class="fa fa-upload fa-3x" aria-hidden="true"></i>
<input type="file" accept="images/*" name="banner_first_image" class="text-center form-control-file custom_file" id="upload" name="user_image" required>
<label for="file_default">No File Choosen </label>
<label for="file_name"><b></b></label>
</label><hr>
<button type="submit" class="btn btn-success" name="change_banner">Update</button>
</div>
</div>
</form>
</div>
</div>
<?php } ?>
</div>
<?php include "includes/footer.php";?>
</div>
<!-- ============================================================== -->
<!-- End Page wrapper -->
<!-- ============================================================== -->
</div>
<!-- ============================================================== -->
<!-- End Wrapper -->
<!-- ============================================================== -->
<!-- ============================================================== -->
<!-- All Jquery -->
<!-- ============================================================== -->
<?php include "includes/footerlinks.php";?>
</body>
</html>
Back to Directory
File Manager