<!doctype html>
<html class="no-js" lang="zxx">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>NWP ENGINEERING DEPARTMENT - SRI LANKA</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Favicon -->
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<!-- Google Fonts -->
<link href="css/fonts.css" rel="stylesheet">
<!-- Bootstrap-->
<link rel="stylesheet" href="css/assets/bootstrap.min.css">
<!-- Fontawesome Icon -->
<link rel="stylesheet" href="css/assets/font-awesome.min.css">
<!-- Animate CSS -->
<link rel="stylesheet" href="css/assets/animate.css">
<!-- Mean Menu -->
<link rel="stylesheet" href="css/assets/meanmenu.min.css">
<!-- Owl Carousel -->
<link rel="stylesheet" href="css/assets/owl.carousel.min.css">
<!-- Magnific Popup -->
<link rel="stylesheet" href="css/assets/magnific-popup.css">
<!-- Custom Style -->
<link rel="stylesheet" href="css/assets/normalize.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/assets/responsive.css">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-69018766-3"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-69018766-3');
</script>
</head>
<body>
<!-- Pre-Loader -->
<div id="page-preloader"><span class="spinner"></span></div>
<!-- End Pre-Loader --> 

<!-- Top Bar -->
<?php 
include 'common/top-bar.php';
include 'common/mobile-menu.php';
?>
<!-- End Top Bar --> 

<!-- Page Heading -->
<section class="p-heading text-center">
  <div class="container">
    <div class="page-bg">
      <div class="row">
        <div class="col-md-12">
          <div class="p-content">
            <h4>
              <?php if($lang == 1) { ?>
              PROCUREMENT COMMITTEE DECISION
              <?php } if($lang == 2) { ?>
           ප්‍රසම්පාදන තීරණ
              <?php } if($lang == 3) { ?>
          கொள்முதல் முடிவுகள்
              <?php } ?>
            </h4>
            <ul class="list-unstyled list-inline">
              <li class="list-inline-item"><a href="home">
                <?php if($lang == 1) { ?>
                Home
                <?php } if($lang == 2) { ?>
                මුල් පිටුව
                <?php } if($lang == 3) { ?>
                முகப்பு
                <?php } ?>
                </a></li>
              <li class="list-inline-item"><i class="fa fa-long-arrow-right" aria-hidden="true"></i>
                <?php if($lang == 1) { ?>
                Procurement Committee
                <?php } if($lang == 2) { ?>
              ප්‍රසම්පාදන තීරණ
                <?php } if($lang == 3) { ?>
             கொள்முதல் முடிவுகள்
                <?php } ?>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>
<!-- End Page Heading --> 

<!-- Contact Page -->
<section class="catagory contact">
  <div class="container">
    <div class="row">
      <div class="col-lg-3 col-sm-4 hidden-xs">
        <?php include 'common/common-sidebar.php'; ?>
      </div>
      <div class="col-lg-9 col-sm-8">
        <div class="col-md-12">
          <div class="contact-details">
            <h4>
              <?php if($lang == 1) { ?>
              PROCUREMENT COMMITTEE DECISION
              <?php } if($lang == 2) { ?>
        ප්‍රසම්පාදන තීරණ
              <?php } if($lang == 3) { ?>
          கொள்முதல் முடிவுகள்
              <?php } ?>
            </h4>
          </div>
        </div>
			        
		<form class="form-horizontal" name="form" id="form">
          <div class="row">
            <div class="col-sm-12">  	
				<div class="form-group">
					<label>Select Division:</label>
					<select class="form-control" name="division" id="division" onChange="formHandler($(this).val())">
					  <option value=""></option>
						<?php 
						$sql="SELECT group_id, division FROM divisional_offices WHERE del=0 AND lang=1 ORDER BY division DESC";
						$result=mysqli_query($conn, $sql);
						while ($row = mysqli_fetch_array($result)){ ?>
						<option value="<?php echo $row['group_id']; ?>"><?php echo $row['division']; ?></option>
						<?php } ?>
					</select>
				</div>
            </div>
          </div>
		  </form>
          <hr>

		  <?php 
		  if(isset($_GET['div'])) {
			$div = htmlspecialchars(strip_tags(trim($_GET['div'])), ENT_QUOTES, 'UTF-8');
		  ?>
		<div class="row news-details">
        	<?php $sql_m = mysqli_query($conn, "SELECT * FROM procurements WHERE division = '$div'"); 
			$row_m = mysqli_fetch_assoc($sql_m); ?>

            <div class="col-lg-12 col-md-12">
              <div class="news-author">
				<h5 style="margin:10px; font-size: 15px">Procurement Committee Decision Report</h5>                
				<h6 style="text-transform:uppercase; margin:10px;">DIVISION: <span><?php $sql_d = mysqli_fetch_assoc(mysqli_query($conn, "SELECT division FROM divisional_offices WHERE group_id='$div' AND del=0 AND lang=1")); echo $sql_d['division']; ?></span></h6>
				
				<?php if(mysqli_num_rows($sql_m) > 0) { ?>
				<span style="margin:10px; font-size: 12px"><?php echo $row_m['date']; ?></span>
				<h6 style="margin:30px 8px"><a href="backend/upload/PDF/procurements/<?php echo $row_m['pdf']; ?>" target="new" style="color: #fff; background: #d32f2f; padding: 8px 15px; font-weight: 500; border-radius: 2px;"><?php if($lang == 1) { ?> VIEW & DOWNLOAD <?php } if($lang == 2) { ?> බලන්න <?php } if($lang == 3) { ?> பார்க்கவும் <?php } ?></a></h6>
				<?php } ?>
				
              </div>
            </div>
        </div>	
		<?php } ?>		
        <br>
      </div>
    </div>
  </div>
</section>
<!-- End Contact Page --> 

<!-- Footer -->
<?php include 'common/footer.php'; ?>
<!-- End Footer --> 

<!-- =========================================
JavaScript Files
========================================== --> 

<!-- jQuery JS --> 
<script src="js/assets/vendor/jquery-1.12.4.min.js"></script> 
<!-- Poppers Js --> 
<script src="js/assets/popper.js"></script> 
<!-- Bootstrap --> 
<script src="js/assets/bootstrap.min.js"></script> 
<!-- Sticky Js --> 
<script src="js/assets/jquery.sticky.js"></script> 
<!-- WOW JS --> 
<script src="js/assets/wow.min.js"></script> 
<!-- Smooth Scroll --> 
<script src="js/assets/smooth-scroll.js"></script> 
<!-- Mean Menu --> 
<script src="js/assets/jquery.meanmenu.min.js"></script> 
<!-- News Ticker --> 
<script src="js/assets/jquery.newsticker.min.js"></script> 
<!-- Owl Carousel --> 
<script src="js/assets/owl.carousel.min.js"></script> 
<!-- Magnific Popup --> 
<script src="js/assets/jquery.magnific-popup.min.js"></script> 
<!-- Syotimer --> 
<script src="js/assets/jquery.syotimer.min.js"></script> 
<!-- Custom JS --> 
<script src="js/plugins.js"></script> 
<script src="js/custom.js"></script> 
<!-- Vertical Nav Bar --> 
<script src="js/nav-bar/menu.min.js"></script>

<!-- JavaScript Validation For Login Page -->
<script src="js/assets/jquery.validate.min.js"></script>
<script src="js/form_validate.js"></script>

<script>
$(function() {
  $('#auto-collapse-menu-demo').metisMenu();
});

function formHandler(div){
  window.location.href = 'procurement-committee?div='+div;
}

</script>

</body>
</html>