 <?php  
$sqlcon = "SELECT * FROM google_code";
    
      $myquerycon=$conn->query($sqlcon);
   $mydaracon= $myquerycon->fetchAll()  ;
   
   $rows_foundcon = $myquerycon->rowCount();
    if($rows_foundcon==0){
        $stat='0';
    }else{
         $stat='1';
    }

      foreach( $mydaracon as $rowcon ) {
            $con_id  = $rowcon['rowId'];
            $google_addis  = $rowcon['google_addis'];
            $google_adfeed = $rowcon['google_adfeed'];
            $google_adar   = $rowcon['google_adar'];
            $google_ad4 = $rowcon['google_ad4'];
               $adimg1  = $rowcon['adimg1'];
            $adimg2  = $rowcon['adimg2'];
            $adimg3  = $rowcon['adimg3'];
            $adimg4  = $rowcon['adimg4'];
         
      }
?>  
    
    <!-- check google code created  -->
<?php
if($_SESSION["google_code"]!=''){

?>
<script> swal("Successfully!", "Display advertisement has been saved!", "success");  </script>

<?php
unset($_SESSION["google_code"]);
}
?>


 
                        <div class="col-md-12">
                        <div class="alert alert-primary fs-14 mt-2" role="alert">
                                             <strong>Important message:</strong>  If you don't know how to create google adsense code then please read <a href="https://www.icouponworld.com/documentation/google-adsense-code.html">our documentation</a>.  
                                          </div>
                          
                              <div class="row">
                                  <form method="post" action="./backend/google_adsense.php" enctype="multipart/form-data">
                                 <!--Google Adsense Code 1 Begin-->
                                 <div class="col-md-12">
                                    <div class="card border-0  shadow mb-4">
                                       <div class="card-header bg-white border-bottom py-3">
                                          <h6 class="m-0 fw-bold text-inherit">Google adsense code 1</h6>
                                       </div>
                                       <div class="card-body">
                                          <textarea cols="55" class="form-control"  name="<?= SESS_MASTER ?>google_addis"><?=$google_addis?></textarea>
                                       </div>
                                    </div>
                                 </div>
                                 <!---Google Adsense Code 1 End-->
                                 <!--Google Adsense Code 2 Begin-->
                                 <div class="col-md-12">
                                    <div class="card border-0  shadow mb-4">
                                       <div class="card-header bg-white border-bottom py-3">
                                          <h6 class="m-0 fw-bold text-inherit">Google adsense code 2</h6>
                                       </div>
                                       <div class="card-body">
                                         <textarea cols="55" class="form-control"  name="<?= SESS_MASTER ?>google_adfeed"><?=$google_adfeed?></textarea>
                                       </div>
                                    </div>
                                 </div>
                                 <!---Google Adsense Code 2 End-->
                                 <!--Google Adsense Code 3 Begin-->
                                 <div class="col-md-12">
                                    <div class="card border-0  shadow mb-4">
                                       <div class="card-header bg-white border-bottom py-3">
                                          <h6 class="m-0 fw-bold text-inherit">Google adsense code 3</h6>
                                       </div>
                                       <div class="card-body">
                                          <textarea cols="55" class="form-control"  name="<?= SESS_MASTER ?>google_adar"><?=$google_adar?></textarea>
                                       </div>
                                    </div>
                                 </div>
                                 <!---Google Adsense Code 3 End-->
                                 <!--Google Adsense Code 4 Begin-->
                                 <div class="col-md-12">
                                    <div class="card border-0  shadow mb-4">
                                       <div class="card-header bg-white border-bottom py-3">
                                          <h6 class="m-0 fw-bold text-inherit">Google adsense code 4</h6>
                                       </div>
                                       <div class="card-body">
                                          <textarea cols="55" class="form-control"  name="<?= SESS_MASTER ?>google_ad4"><?=$google_ad4?></textarea>
   
                                       </div>
                                      
                                    </div>
                                 </div>
                                  <!--Google Adsense Code 4 End-->
                                  <div class="col-md-6">
                                    <input type="hidden" name="<?=SESS_MASTER?>stat" value="<?php echo $stat?>">
                                    <button type="submit" class="btn btn-primary mt-2 mb-5">Save</button>
                                 </div>
                              </form>
                                

                                  <form method="post" action="./backend/google_adsense_banner.php" enctype="multipart/form-data">
                                 <div class="col-lg-12">
                                    <div class="card border-0  shadow mb-4">
                                       <div class="card-header bg-white border-bottom py-3">
                                          <h6 class="m-0 fw-bold text-inherit">If you do not have the Google adsense code, you can add the banner</h6>
                                       </div>
                                       <div class="card-body">
                                          <div class="row">
                                             <div class="col-md-6">
                                                <div class="mb-3">
                                                   <label for="formFile" class="form-label">Add Vertical Banner <span class="text-danger ps-1">*</span><small class="fs-11">(Image Recommended size <strong>350*700</strong> in .png or jpg format)</small></label>
                                                   <input type="file" class="form-control"  name="<?= SESS_MASTER ?>adimg1" id="exampleFormControlFile1">
 <?php if($adimg1!=''){ ?>  <img src="forms/<?=$adimg1?>" class="img-fluid rounded-3 mt-3" /> <?php } ?>
                                                </div>
                                             </div>
                                             <div class="col-md-6">
                                                <div class="mb-3">
                                                   <label for="formFile" class="form-label">Add Vertical Banner <span class="text-danger ps-1">*</span><small class="fs-11">(Image Recommended size <strong>350*700</strong> in .png or jpg format)</small></label>
                                                  <input type="file" class="form-control" name="<?= SESS_MASTER ?>adimg2"  id="exampleFormControlFile1">
  <?php if($adimg2!=''){ ?>   <img src="forms/<?=$adimg2?>"  class="img-fluid rounded-3 mt-3" /> <?php } ?>
                                                </div>
                                             </div>
                                             <div class="col-md-6">
                                                <div class="mb-3">
                                                   <label for="formFile" class="form-label">Add  Horizontal Banner <span class="text-danger ps-1">*</span><small class="fs-11">(Image Recommended size <strong>1920*300</strong> in .png or jpg format)</small></label>
                                                    <input type="file" class="form-control" name="<?= SESS_MASTER ?>adimg3"  id="exampleFormControlFile1">
   <?php if($adimg3!=''){ ?>  <img src="forms/<?=$adimg3?>"  class="img-fluid rounded-3 mt-3" /> <?php } ?>
                                                </div>
                                             </div>
                                             <div class="col-md-6">
                                                <div class="mb-3">
                                                   <label for="formFile" class="form-label mb-3">Add  Horizontal Banner <span class="text-danger ps-1">*</span><small class="fs-11">(Image Recommended size <strong>1920*300</strong> in .png or jpg format)</small></label>
                                                  <input type="file" class="form-control" name="<?= SESS_MASTER ?>adimg4"  id="exampleFormControlFile1">
<?php if($adimg4!=''){ ?> <img src="forms/<?=$adimg4?>"  class="img-fluid rounded-3 mt-3"/><?php } ?>
                                                </div>
                                             </div>
                                          </div>
                                       </div>
                                    </div>
                                 </div>
                                 <div class="col-lg-12 col-sm-12 mx-auto">
                                    <input type="hidden" name="<?=SESS_MASTER?>stat" value="<?php echo $stat?>">
                                    <button type="submit" class="btn btn-primary mt-2 mb-5">Save</button>
                                 </div>
                                  </form>
                              </div>
                          
                        </div>
                   