<?php session_start();
if(empty($_SESSION['id'])):
header('Location:../index.php');
endif;
	include('../dist/dbcon.php');
	date_default_timezone_set('Asia/Manila');
$iduser=$_SESSION['id'];
	$date = date("Y-m-d");
	
	?>

<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <meta name="description" content="">
        <meta name="author" content="">

        <title>HYDROCHECK</title>

        <!-- CSS FILES -->                
        <link rel="preconnect" href="https://fonts.googleapis.com">
        
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>

        <link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,200;0,400;0,700;1,200&family=Unbounded:wght@400;700&display=swap" rel="stylesheet">
        
        <link href="../css/bootstrap.min.css" rel="stylesheet">

        <link href="../css/bootstrap-icons.css" rel="stylesheet">

        <link href="../css/tooplate-kool-form-pack.css" rel="stylesheet">
        
    </head>
    
    <body>
        
          <style>
    .image-checkbox-container {
      display: flex;
      gap: 20px;
      flex-wrap: wrap;
    }

    .image-checkbox {
      position: relative;
      display: inline-block;
      cursor: pointer;
      border-radius: 10px;
      overflow: hidden;
      transition: transform 0.3s, box-shadow 0.3s;
    }

    /* Hide the actual checkbox */
    .image-checkbox input[type="checkbox"] {
     
    }

    .image-checkbox img {
      width: 100px;
      height: 100px;
      object-fit: cover;
      display: block;
      border-radius: 10px;
      transition: transform 0.3s, border 0.3s;
      border: 3px solid transparent;
    }

    /* When checkbox is checked, apply border and zoom */
    .image-checkbox input[type="checkbox"]:checked + img {
      border: 3px solid #28a745; /* Green border */
      transform: scale(1.30);     /* Zoom effect */
      box-shadow: 0 0 10px rgba(40, 167, 69, 0.6);
    }
  </style>
<style>
table {
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width: 100%;
}

td, th {
  border: 1px solid #ddd;
  padding: 8px;
  background-color: #00BFFF;
  color: #000000;
}

tr:nth-child(even){background-color: #f2f2f2;}

tr:hover {background-color: #ddd;}

th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  background-color: #04AA6D;
  color: white;
}
</style>
        <main>

            <header class="site-header">
                <div class="container">
                    <div class="row justify-content-between">

                        <div class="col-lg-12 col-12 d-flex align-items-center">
                            <a class="site-header-text d-flex justify-content-center align-items-center me-auto" href="index.php">
                                <i class="bi bi-droplet-half"></i>

                                <span>
                                    HYDROCHECK
                                </span>
                            </a>

                            <ul class="social-icon d-flex justify-content-center align-items-center mx-auto">
                                <span class="text-white me-4 d-none d-lg-block">Stay connected</span>

                                <li class="social-icon-item">
                                    <a href="#" class="social-icon-link bi-instagram"></a>
                                </li>

                                <li class="social-icon-item">
                                    <a href="#" class="social-icon-link bi-twitter"></a>
                                </li>

                                <li class="social-icon-item">
                                    <a href="#" class="social-icon-link bi-whatsapp"></a>
                                </li>
                            </ul>

                            <div>
                                <!--<a href="#" class="custom-btn custom-border-btn btn" data-bs-toggle="modal" data-bs-target="#subscribeModal" > Login-As
                                    <i class="bi bi-person-check"></i>
                                </a> -->
                                 <a href="index.php" class="custom-btn custom-border-btn btn" > Back
                                    <i class="bi bi-arrow-left"></i>
                                </a>
                            </div>

                            <a class="bi-list offcanvas-icon" data-bs-toggle="offcanvas" href="#offcanvasMenu" role="button" aria-controls="offcanvasMenu"></a>

                        </div>

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


            <div class="offcanvas offcanvas-end" data-bs-scroll="true" tabindex="-1" id="offcanvasMenu" aria-labelledby="offcanvasMenuLabel">                
                <div class="offcanvas-header">                    
                    <button type="button" class="btn-close ms-auto" data-bs-dismiss="offcanvas" aria-label="Close"></button>
                </div>
                
                <div class="offcanvas-body d-flex flex-column justify-content-center align-items-center">
                    <nav>
                        <ul>
                            <li>
                                <a href="tasks.php">Assign Tasks</a>
                            </li>

                            <li>
                                <a href="visit.php">Site Visists</a>
                            </li>

                            <li>
                                <a href="repair.php">Repair Documentation</a>
                            </li>

                            <li>
                              <a href="status.php">Tasks Status</a>
                            </li>

                            <li>
                                <a href="404.php">About</a>
                            </li>
                        </ul>
                    </nav>
                </div>
            </div>


           


            <section class="hero-section d-flex justify-content-center align-items-center" id="section_1">
                <div class="container">
                    <div class="row">

                        <div class="col-lg-6 col-12 mx-auto">
                           <center><h3 style="color:white;">Tasks Status</h3> </center>
                              
                     <table>
  <tr>
    <th>Task #</th>
    <th>Tasks Name</th>
    <th>Resident Name</th>
    <th>Status</th>
   
   
  </tr>
  <?php

		$id=$_SESSION['id'];
		$usertype=$_SESSION['usertype'];
		$query=mysqli_query($con,"select * from tasks where techid='$id' and remarks='pending' order by id ASC")or die(mysqli_error());
		$pos=0;

		while($row=mysqli_fetch_array($query)){
		$useridko=$row['userid'];
		$pos++;	
			$query1=mysqli_query($con,"select * from users where id='$id'")or die(mysqli_error());
		$row1=mysqli_fetch_array($query1);

$query2=mysqli_query($con,"select * from users where id='$useridko'")or die(mysqli_error());
		$row2=mysqli_fetch_array($query2);

?>
  <tr>
    <td><?php echo $pos; ?></td>
    <td><?php echo $row['taskname'];?></td>
    <td><?php echo $row2['fullname'];?></td>
     <td>  
     <div class="image-checkbox-container">
  <label class="image-checkbox">Finished
    <input type="checkbox" name="image2">
    <img style="width:50px;height:50px;"src="check.jpg" alt="Image 2">
  </label>
<label class="image-checkbox">Unfinished
    <input type="checkbox" name="image3">
 <img style="width:50px;height:50px;"src="wrong.jpg" alt="Image 2">
  </label>
      
</div>
  </td>
     
  </tr>
 <?php } ?>
</table>
                           
                           
                            
                        
                        </div>
                    </div>
                </div>
                <div class="video-wrap">
                    <video autoplay="" loop="" muted="" class="custom-video" poster="">
                        <source src="../videos/video.mp4" type="video/mp4">

                       
                    </video>
                </div>
            </section>
            
        </main>

        <!-- JAVASCRIPT FILES -->
        <script src="../js/jquery.min.js"></script>
        <script src="../js/bootstrap.bundle.min.js"></script>
        <script src="../js/countdown.js"></script>
        <script src="../js/init.js"></script>
<h5 style="color:white;margin-top:0px;font-size:11px;">Developed By:PRECY R. ADORICO AND ANGELINE L. ALAHID</h5>
    </body>
</html>
