<?php 
include('includes/header.php');
include('includes/topbar.php');
include('includes/sidebar.php');
include('dbcon.php');
?>

<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1 class="m-0">Dealers Banners</h1>
                </div><!-- /.col -->
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item"><a href="#">Home</a></li>
                        <li class="breadcrumb-item active">Dealers Banners</li>
                    </ol>
                </div><!-- /.col -->
            </div><!-- /.row -->
        </div><!-- /.container-fluid -->
    </div>
    <!-- /.content-header -->
    <!-- Main content -->
    <section class="content">
        <div class="container-fluid">



            <div class="card">
                <div class="card-header">
                    <h4>
                       Dealers Banners
                    </h4>
                </div>

                <div class="card-body">

                    <form action="code.php" method="post" enctype="multipart/form-data">
                        <?php  
                          $ref = "DealerBanners/";
                          $row = $database->getReference($ref)->getValue();
                        ?>
                        <label for="exampleInputFile">Banner 1</label>
                        <div class="form-group mb-3">

                            <img src="<?php $expiresAt = new \DateTime('tomorrow');
                                    echo $bucket->object('dealersbanners/banner1/'.$row['banner1'])->signedUrl($expiresAt); ?>"
                                alt="Banner 1" width="100%" height="300">
                        </div>
                        <div class="input-group">
                            <div class="custom-file">
                                <label for="file-upload" class="custom-file-label" for="photo">Choose file</label>
                                <input type="file" id="file-upload" class="custom-file-input" accept="image/*" name="banner1"
                                    id="photo">
                            </div>
                        </div>

                        <label class="mt-4" for="exampleInputFile">Banner 2</label>
                        <div class="form-group mb-3">

                            <img src="<?php $expiresAt = new \DateTime('tomorrow');
                                    echo $bucket->object('dealersbanners/banner2/'.$row['banner2'])->signedUrl($expiresAt); ?>"
                                alt="Banner 2" width="100%" height="300">
                        </div>
                        <div class="input-group">
                            <div class="custom-file">
                                <label for="file-upload1" class="custom-file-label" for="photo">Choose file</label>
                                <input type="file" id="file-upload1" class="custom-file-input" accept="image/*" name="banner2"
                                    id="photo">
                            </div>
                        </div>

                        <label class="mt-4" for="exampleInputFile">Banner 3</label>
                        <div class="form-group mb-3">

                            <img src="<?php $expiresAt = new \DateTime('tomorrow');
                                    echo $bucket->object('dealersbanners/banner3/'.$row['banner3'])->signedUrl($expiresAt); ?>"
                                alt="Banner 3" width="100%" height="300">
                        </div>
                        <div class="input-group">
                            <div class="custom-file">
                                <label for="file-upload2" class="custom-file-label" for="photo">Choose file</label>
                                <input type="file" id="file-upload2" class="custom-file-input" accept="image/*" name="banner3"
                                    id="photo">
                            </div>
                        </div>

                        <div class="form-group mb-3 mt-4">
                                <button type="submit" name="dealers_banners_btn"
                                    class="btn btn-primary float-sm-right">Submit</button>
                        </div>
                    </form>

                  

                </div>
            </div>
        </div>



</div><!-- /.container-fluid -->
</section>
</div>

<?php
include('includes/script.php');
include('includes/footer.php');
?>