
<?php
include("../../config.php");
?>

    <?php include("inc/header.php") ?>


  <body data-spy="scroll" data-target="#navSection" data-offset="100">

    <?php include("inc/sidebar.php") ?>
    
    
    <!-- sidebar -->

    <div class="content">
      <div class="header">
        <div class="header-left">
          <a href="#" class="burger-menu"><i data-feather="menu"></i></a>

        </div><!-- header-left -->

        <div class="header-right">
          
          <div class="dropdown dropdown-loggeduser">
            <a href="#" class="dropdown-link" data-toggle="dropdown">
              <div class="avatar avatar-sm">
                <img src="assets/img/img1.jpg" class="rounded-circle" alt="">
              </div><!-- avatar -->
            </a>
            <div class="dropdown-menu dropdown-menu-right">
              <div class="dropdown-menu-header">
                <div class="media align-items-center">
                  <div class="avatar">
                    <img src="assets/img/img1.jpg" class="rounded-circle" alt="">
                  </div><!-- avatar -->
                  <div class="media-body mg-l-10">
                    <h6>Louise Kate Lumaad</h6>
                    <span>Administrator</span>
                  </div>
                </div><!-- media -->
              </div>
              <div class="dropdown-menu-body">
                <a href="#" class="dropdown-item"><i data-feather="user"></i> View Profile</a>
                
                <a href="../Login/" class="dropdown-item"><i data-feather="log-out"></i> Sign Out</a>
              </div>
            </div><!-- dropdown-menu -->
          </div>
        </div><!-- header-right -->
      </div><!-- header -->
      <div class="content-header">
        <div>
          
          <h4 class="content-title">Password Management</h4>
        </div>
      </div><!-- content-header -->
     
      <div class="content-body content-body-components">
	   
	  
	  
       
          
           
            <div class="content-panel" style="padding:30px;">
            <form method="post">
             <label>Enter Old Password</label>
             <input type="password" class="form-control" name="old" placeholder="Enter Old Password"/>
             <br>
             <label>Enter New Password</label>
             <input type="password" class="form-control" name="new" placeholder="Enter New Password"/>
             <br>
             
             <button type="submit" class="btn btn-success" name="sub">
                 CHANGE PASSWORD
             </button>
             </form>
            </div>
          
          <?php
          
          if(isset($_POST['sub'])){
              $old=$_POST['old'];
              $new=$_POST['new'];
              
              $ins="update Admin set password='$new' where password='$old'";
              $run=mysqli_query($conn, $ins);
              
          }
          ?>
           
          
           
		 

      </div><!-- content-body -->
     
    </div><!-- content -->

	
    <script src="lib/jquery/jquery.min.js"></script>
    <script src="lib/bootstrap/js/bootstrap.bundle.min.js"></script>
    <script src="lib/feather-icons/feather.min.js"></script>
    <script src="lib/perfect-scrollbar/perfect-scrollbar.min.js"></script>
    <script src="lib/prismjs/prism.js"></script>
    <script src="lib/js-cookie/js.cookie.js"></script>

    <script src="assets/js/cassie.js"></script>
    <script>
      $(function(){

        'use strict'

      })
    </script>
	
	<script>
      $(function(){

        'use strict'

        $('#modal6').on('show.bs.modal', function (event) {

          var animation = $(event.relatedTarget).data('animation');
          $(this).addClass(animation);
        })

        // hide modal with effect
        $('#modal6').on('hidden.bs.modal', function (e) {
          $(this).removeClass (function (index, className) {
              return (className.match (/(^|\s)effect-\S+/g) || []).join(' ');
          });
        });

      })
    </script>
  </body>

</html>
