<?php
include('db_connect.php');
$analysis = mysqli_query($db,"SELECT * FROM `analysis` WHERE id in (select analysis_id from analysis_tags where tag_id = 19)");
$t = mysqli_num_rows($analysis);
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <!-- Meta -->
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="keywords" content="SITE KEYWORDS HERE" />
    <meta name="description" content="" />
    <meta name="copyright" content="" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1, shrink-to-fit=no"
    />
    <!-- Title -->
    <title>Covid-19</title>
    <!-- Favicon -->
    <link rel="icon" type="image/png" />
    <!-- Web Font -->
    <link
      href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900"
      rel="stylesheet"
    />
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css" />
    <!-- Font Awesome CSS -->
    <!-- Font Awesome Icons -->
    <link rel="stylesheet" href="fontawesome-free/css/all.min.css" />
    <link
      rel="stylesheet"
      type="text/css"
      href="css/bootstrap-datepicker.css"
    />
    <link
      rel="stylesheet"
      href="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.css"
    />
    <!-- Google Font: Source Sans Pro -->
    <link
      href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700"
      rel="stylesheet"
    />
    <link
      href="https://fonts.googleapis.com/icon?family=Material+Icons"
      rel="stylesheet"
    />
    <link
      rel="stylesheet"
      type="text/css"
      href="//fonts.googleapis.com/css?family=Vollkorn"
    />
    <link
      href="https://api.mapbox.com/mapbox-gl-js/v1.8.1/mapbox-gl.css"
      rel="stylesheet"
    />
    <link rel="stylesheet" href="css/style.css" />

    <style type="text/css">
      .useIt {
        font-family: Vollkorn;
        font-style: normal;
        font-variant: normal;
        font-weight: 400;
      }

      h1 {
        font-family: Vollkorn;
        font-size: 24px;
        font-style: normal;
        font-variant: normal;
        font-weight: 700;
        line-height: 26.4px;
      }

      h3 {
        font-family: Vollkorn;
        font-size: 14px;
        font-style: normal;
        font-variant: normal;
        font-weight: 700;
        line-height: 15.4px;
      }

      p {
        font-family: Vollkorn;
        font-size: 14px;
        font-style: normal;
        font-variant: normal;
        font-weight: 400;
        line-height: 20px;
      }

      blockquote {
        font-family: Vollkorn;
        font-size: 21px;
        font-style: normal;
        font-variant: normal;
        font-weight: 400;
        line-height: 30px;
      }

      pre {
        font-family: Vollkorn;
        font-size: 13px;
        font-style: normal;
        font-variant: normal;
        font-weight: 400;
        line-height: 18.5714px;
      }

      .card-header {
        background-color: #417dc1;
        color: white;
      }

      .project-tab {
    padding: 10%;
    margin-top: -8%;
}
.project-tab #tabs{
    background: #007b5e;
    color: #eee;
}
.project-tab #tabs h6.section-title{
    color: #eee;
}
.project-tab #tabs .nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active {
    color: #0062cc;
    background-color: transparent;
    border-color: transparent transparent #f3f3f3;
    border-bottom: 3px solid !important;
    font-size: 16px;
    font-weight: bold;
}
.project-tab .nav-link {
    border: 1px solid transparent;
    border-top-left-radius: .25rem;
    border-top-right-radius: .25rem;
    color: #0062cc;
    font-size: 16px;
    font-weight: 600;
}
.project-tab .nav-link:hover {
    border: none;
}
.project-tab thead{
    background: #f3f3f3;
    color: #333;
}
.project-tab a{
    text-decoration: none;
    color: #333;
    font-weight: 600;
}

* {box-sizing: border-box}
body {font-family: Verdana, sans-serif; margin:0}
.mySlides {display: none}
img {vertical-align: middle;}

/* Slideshow container */
.slideshow-container {
  max-width: 1000px;
  position: relative;
  margin: auto;
}

/* Next & previous buttons */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  margin-right:250px;
  margin-left:-250px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
}

/* Position the "next button" to the right */
.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
}

/* Caption text */
.text {
  color: #f2f2f2;
  font-size: 15px;
  padding: 8px 12px;
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
}

/* Number text (1/3 etc) */
.numbertext {
  color: #f2f2f2;
  font-size: 12px;
  padding: 8px 12px;
  position: absolute;
  top: 0;
}

/* The dots/bullets/indicators */
.dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin: 0 2px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.active{
    background-color: rgb(225, 231, 240);
}

 .dot:hover {
  background-color: #717171;
}

/* Fading animation */
.fade {
  -webkit-animation-name: fade;
  -webkit-animation-duration: 1.5s;
  animation-name: fade;
  animation-duration: 1.5s;
}

@-webkit-keyframes fade {
  from {opacity: .4} 
  to {opacity: 1}
}

@keyframes fade {
  from {opacity: .4} 
  to {opacity: 1}
}

/* On smaller screens, decrease text size */
@media only screen and (max-width: 300px) {
  .prev, .next,.text {font-size: 11px}
}
    </style>
  </head>
  <body>


        <div class="row">
            <div class="container-fluid">
                <nav class="navbar navbar-expand-md bg-dark sticky-top">
                    <a class="navbar-brand" href="#"><img src="https://nepalmonitor.org/frontend/images/logo.png"
                            alt="Logo" /></a>
                    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
                        aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                        <span class="navbar-toggler-icon"></span>
                    </button>
        
                    <div class="collapse navbar-collapse" id="navbarSupportedContent">
                        <ul class="navbar-nav ml-lg-auto">
                            <li class="nav-item active">
                                <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="dowload.html">Download</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#">News</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="#">Login</a>
                            </li>
                        </ul>
                    </div>
                </nav>
            </div>
        </div>
        <div class="content-wrapper">
            <section class="download">
                <div class="container">
                    <div class="row">
                        <div class="col-md-12 c0l-lg-12">
                            <div class="card text-center">
                                <div class="card-header">
                                   Reports and Analysis
                                </div>
                                <div class="card-body">
                                <div class="row">
                                  
                    <div class="col-md-12">
                        <nav>
                            <div class="nav nav-tabs nav-fill" id="nav-tab" role="tablist">
                                <a class="nav-item nav-link active" id="nav-home-tab" data-toggle="tab" href="#nav-home" role="tab" aria-controls="nav-home" aria-selected="true" style="color: #007bff;">Requirement Briefs</a>
                                <!-- <a class="nav-item nav-link" id="nav-profile-tab" data-toggle="tab" href="#nav-profile" role="tab" aria-controls="nav-profile" aria-selected="false" style="color: #007bff;">Other Resources</a> -->
                                
                            </div>
                        </nav>
                        <div class="tab-content" id="nav-tabContent">
                            <div class="tab-pane fade show active" id="nav-home" role="tabpanel" aria-labelledby="nav-home-tab">
                                <div class="slideshow-container">
   <?php 
   $i = 1;
   while($a = mysqli_fetch_array($analysis))
                                            {   ?>                         

<div class="mySlides">
  <div class="numbertext"><?php echo $i." / ".$t;?></div>
  <img src="uploads/images/analysis/<?php echo $a['image'];?>" style="width:50%; height: 340px;margin-top:20px;">
  <div class="text"><a class="btn btn-success" target="_blank"
                                                        href="uploads/images/analysis/media/<?php echo $a['media']; ?>"
                                                        target="_blank" title="view file"><i class="fa fa-eye"></i> View</a></div>
</div>



<a class="prev" onclick="plusSlides(-1)">&#10094;</a>
<a class="next" onclick="plusSlides(1)">&#10095;</a>
<?php $i += 1;} ?>
</div>
<br>

<div style="text-align:center">
 <?php while($a = mysqli_fetch_array($analysis))
                                            { ?>
  <span class="dot" onclick="currentSlide(<?php echo $i;?>)"></span> 
 <?php 


} ?>
</div>
                            </div>
                            <div class="tab-pane fade" id="nav-profile" role="tabpanel" aria-labelledby="nav-profile-tab">
                                                                                 <div class="slideshow-container">
   

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

    <!-- Jquery JS-->
    <script src="js/jquery.min.js"></script>
    <script src="js/jquery-migrate.min.js"></script>
    <!-- Popper JS-->
    <script src="js/popper.min.js"></script>
    <!-- Bootstrap JS-->
    <script src="js/bootstrap.min.js"></script>
    <!-- Main JS-->
    <script src="js/main.js"></script>
    <!-- chartjs -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js"></script>
    <script src="https://api.mapbox.com/mapbox-gl-js/v1.8.1/mapbox-gl.js"></script>
    <script>
var slideIndex = 1;
showSlides(slideIndex);

function plusSlides(n) {
  showSlides(slideIndex += n);
}

function currentSlide(n) {
  showSlides(slideIndex = n);
}

function showSlides(n) {
  var i;
  var slides = document.getElementsByClassName("mySlides");
  var dots = document.getElementsByClassName("dot");
  if (n > slides.length) {slideIndex = 1}    
  if (n < 1) {slideIndex = slides.length}
  for (i = 0; i < slides.length; i++) {
      slides[i].style.display = "none";  
  }
  for (i = 0; i < dots.length; i++) {
      dots[i].className = dots[i].className.replace(" active", "");
  }
  slides[slideIndex-1].style.display = "block";  
  dots[slideIndex-1].className += " active";
}
</script>
  </body>
</html>
