<?php include '../connection.php'; ?>
<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	  <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
        <title>DGRC dashboard
		</title>
	    <!-- Bootstrap CSS -->
        <link rel="stylesheet" href="css/bootstrap.min.css">
	    <!----css3---->
        <link rel="stylesheet" href="css/custom.css">
		<!-- SLIDER REVOLUTION 4.x CSS SETTINGS -->
	
	<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=Roboto:wght@300;400;500;700;900&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="css/table-style.css">
<!--google material icon-->
        <link href="https://fonts.googleapis.com/css2?family=Material+Icons"
      rel="stylesheet">
  </head>
  <body>
 
<div class="wrapper">


<div class="body-overlay"></div>


        <!-- Sidebar  -->
        <nav id="sidebar">
            <div class="sidebar-header">
                <h3><span>dgrc</span></h3>
            </div>
            <ul class="list-unstyled components">
			<li  class="active">
                    <a href="index.php" class="dashboard"><i class="material-icons">dashboard</i><span>Dashboard</span></a>
                </li>
		
		      <div class="small-screen navbar-display">
                <li class="dropdown d-lg-none d-md-block d-xl-none d-sm-block">
                    <a href="#homeSubmenu0" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle">
					<i class="material-icons">person</i><span>User</span></a>
                    <ul class="collapse list-unstyled menu" id="homeSubmenu0">
                        <li>
                        <a href="#">Profile</a>
                        </li>
                        <li>
                        <a href="#">Update Password</a>
                        </li>
                        <li>
                            <a href="logout.php">Logout</a>
                        </li>
                    </ul>
                </li>
				
				</div>
			
			
                
                
                <li class="">
                    <a href="#"><i class="material-icons">date_range</i><span>Inbox</span></a>
                </li>
                <li class="">
                    <a href="atr.php"><i class="material-icons">date_range</i><span>ATR</span></a>
                </li>
                
                <li class="">
                    <a href="#"><i class="material-icons">date_range</i><span>Sent</span></a>
                </li>
                
                <li class="">
                    <a href="#"><i class="material-icons">date_range</i><span>Monitoring Desk</span></a>
                </li>

                <li class="">
                    <a href="#"><i class="material-icons">date_range</i><span>Resolved</span></a>
                </li>
                <li class="">
                    <a href="#"><i class="material-icons">date_range</i><span>Inprogress</span></a>
                </li>
                <li class="">
                    <a href="#"><i class="material-icons">date_range</i><span>Unsatisfactory</span></a>
                </li>
                <li class="">
                    <a href="#"><i class="material-icons">date_range</i><span>Under Review</span></a>
                </li>
                <li class="">
                    <a href="#"><i class="material-icons">date_range</i><span>Reminder</span></a>
                </li>
                <li class="">
                    <a href="#"><i class="material-icons">date_range</i><span>Review</span></a>
                </li>
                <li class="">
                    <a href="#"><i class="material-icons">date_range</i><span>Emergency</span></a>
                </li>
                <li class="">
                    <a href="#"><i class="material-icons">date_range</i><span>Chat</span></a>
                </li>
                <li class="">
                    <a href="#"><i class="material-icons">date_range</i><span>Logout</span></a>
                </li>

               
            </ul>

           
        </nav>
		
		

        <!-- Page Content  -->
        <div id="content">
		
		<div class="top-navbar">
            <nav class="navbar navbar-expand-lg">
                <div class="container-fluid">

                    <button type="button" id="sidebarCollapse" class="d-xl-block d-lg-block d-md-mone d-none">
                        <span class="material-icons">arrow_back_ios</span>
                    </button>
					
					<a class="navbar-brand" href="#">Nodal Officer Dashboard </a>
					
                    <button class="d-inline-block d-lg-none ml-auto more-button" type="button" data-toggle="collapse"
					data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                        <span class="material-icons">more_vert</span>
                    </button>

                    <div class="collapse navbar-collapse d-lg-block d-xl-block d-sm-none d-md-none d-none" id="navbarSupportedContent">
                        <ul class="nav navbar-nav ml-auto">   
                            <li class="dropdown nav-item active">
                                <a href="#" class="nav-link" data-toggle="dropdown">
                                   <span class="material-icons">person</span>
                               </a>
                                <ul class="dropdown-menu">
                                    <li>
                                        <a href="#">Profile</a>
                                    </li>
                                    <li>
                                        <a href="#">Update Password</a>
                                    </li>
                                    <li>
                                        <a href="logout.php">Logout</a>
                                    </li>
                                  
                                </ul>
                            </li>
                            
                        </ul>
                    </div>
                </div>
            </nav>
	    </div>
			
			
			<div class="main-content">
			     <div class="row">
                    <div class="col-md-12">
                        <h3 class="text-center text-danger mt-5 mb-3">Grievance Registration Data:</h3>
                        <table class="table table-striped table-bordered" id="myTable">
                          <thead class="thead-dark" id="tabel_head">
                            <tr>
                              <th scope="col">S.No</th>
                              <th scope="col">Grievance Id</th>
                              <th scope="col">First Name</th>
                              <th scope="col">Middle Name</th>
                              <th scope="col">Last Name</th>
                              <th scope="col">Mobile Number</th>
                              <th scope="col">Grievance Date</th>
                              <th scope="col">Call Nature</th>
                            </tr>
                          </thead>
                          <tbody>
                            <?php
                              $num=1;
                              $date=date("Y-m-d");
                              $grievance="SELECT * FROM grievence_from ORDER BY reg_date DESC";
                              $query=mysqli_query($con,$grievance);
                              while ($row=mysqli_fetch_assoc($query)) {
                            ?>
                              <tr>
                                <th scope="row"><?php echo $num; ?></th>
                                <td><a href="forword-grievance.php?gr_id=<?php echo $row['id']; ?>" style="color: red;"><?php echo $row['grievance_id']; ?></a></td>
                                <td><?php echo $row['first_name']; ?></td>
                                <td><?php echo $row['middle_name']; ?></td>
                                <td><?php echo $row['last_name']; ?></td>
                                <td><?php echo $row['mobile']; ?></td>
                                <td><?php echo $row['reg_date']; ?></td>
                                <td><?php echo $row['call_nature']; ?></td>
                              </tr>
                            <?php
                                $num++;
                              }

                            ?>
                          </tbody>
                        </table>
                    </div>         
                 </div>

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

     <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
   <script src="js/jquery-3.3.1.slim.min.js"></script>
   <script src="js/popper.min.js"></script>
   <script src="js/bootstrap.min.js"></script>
   <script src="js/jquery-3.3.1.min.js"></script>
   <!------Data Table------->
     <script type="text/javascript" src="https://cdn.datatables.net/1.11.3/js/jquery.dataTables.min.js"></script>
  
  
  <script type="text/javascript">
  $(document).ready(function () {

    $('#myTable').DataTable();

        $('#sidebarCollapse').on('click', function () {
            $('#sidebar').toggleClass('active');
    		$('#content').toggleClass('active');
        });
    	
    	 $('.more-button,.body-overlay').on('click', function () {
            $('#sidebar,.body-overlay').toggleClass('show-nav');
        });
    	
    });

     
</script>

</body>

</html>


