<?php 
session_start();
ob_start();
include("../../pidbco/pidbjoin.php");
if(isset($_SESSION['jay_proj_mngmnt']) && !empty($_SESSION['jay_proj_mngmnt'])){
	header("Location : ../index.php");
}
$sujpath="./";
?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?php echo $pageTitle; ?></title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.5 -->
    <link rel="stylesheet" href="<?php echo $sujpath; ?>bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->
     <link rel="stylesheet" href="<?php echo $sujpath; ?>font-awesome/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="<?php echo $sujpath; ?>font-awesome/ionicons.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="<?php echo $sujpath; ?>dist/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="<?php echo $sujpath; ?>dist/css/skins/_all-skins.min.css">
    <!-- iCheck -->
    <!-- bootstrap wysihtml5 - text editor -->
    <link rel="stylesheet" href="<?php echo $sujpath; ?>plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
    
    <script>
                                   function change_pass()
                                   {
                                       if(document.getElementById('pwd_old').value == "")
                                       {
                                           alert("Please Enter Old Password..!");
                                           return false;
                                           $('#pwd_old').focus();
                                       }
                                       if(document.getElementById('pwd_new').value == "")
                                       {
                                           alert("Please Enter New Password..!");
                                           return false;
                                           $('#pwd_new').focus();
                                       }
                                       if(document.getElementById('pwd_new_conf').value == "")
                                       {
                                           alert("Please Enter Confirm Password..!");
                                           return false;
                                           $('#pwd_new_conf').focus();
                                       }

                                       var pwd_old = $('#pwd_old').val();
                                       var pwd_new = $('#pwd_new').val();
                                       var pwd_new_conf = $('#pwd_new_conf').val();

                                       if(pwd_new != pwd_new_conf)
                                       {
                                           alert("New password Or Confirmation Miss Match.");
                                           return false;
                                       }

                                 
                                       $.ajax({
                                           type: "POST",
                                           url: "ajaxmarket.php",
                                           data: {
                                               btn_change_pass: 1,
                                               pwd_old     : pwd_old,
                                               pwd_new     : pwd_new,
                                               pwd_new_conf: pwd_new_conf
                                           },
                                           cache: true,
                                           success: function(res23)
                                           {
                                           	$('#pwd_old').val('');
                                           	$('#pwd_new').val('');
                                           	$('#pwd_new_conf').val('');
                                               $('#alerts').html(res23);
                                           }
                                       });
                                   }
                               </script>
    
  </head>
  <body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">
   <?php include("head.php");
         include("left.php"); ?> 
      <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            Change Password 
          </h1>  
          <ol class="breadcrumb">
            <li><a href="<?php echo $sujpath; ?>dash_board.php"><i class="fa fa-dashboard"></i> Home</a></li>
           </ol>
        </section>

       <br><br>
       
        <!-- Main content -->
        <section class="content">
          <!-- Small boxes (Stat box) -->
         <div class="row">
               <div class="col-md-6">
              <!-- small box -->
        
        
        
        
         <div class="panel panel-default">
                       <div class="panel-heading">Change Password</div>
                       <div class="panel-body">
                           <div class="col-md-12">
                               <div id="alerts" style=" color: red;"></div>
                               <form role="form">
                                   <div class="form-group">
                                       <label for="pwd">Old Password *</label>
                                       <input type="password" class="form-control" id="pwd_old" name="pwd_old">
                                   </div>
                                   <div class="form-group">
                                       <label for="pwd">New Password *</label>
                                       <input type="password" class="form-control" id="pwd_new" name="pwd_new">
                                   </div>
                                   <div class="form-group">
                                       <label for="pwd">Confirm Password *</label>
                                       <input type="password" class="form-control" id="pwd_new_conf" name="pwd_new_conf">
                                   </div>
                                   <button type="button" onclick="change_pass();" class="btn btn-default">Change</button>
                               </form>
                          
                               
                               
                               
                      </div>  </div></div>       
        
        
        
        
        
        
            </div><!-- ./col -->
          </div><!-- /.row -->
          <!-- Main row -->



        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->
</div>
	 <?php include("footer.php"); ?>
	<!-- jQuery 2.1.4 -->
    <script src="<?php echo $sujpath; ?>plugins/jQuery/jQuery-2.1.4.min.js"></script>
     <!-- Bootstrap 3.3.5 -->
    <script src="<?php echo $sujpath; ?>bootstrap/js/bootstrap.min.js"></script>
    <!-- Morris.js charts -->
    <script src="<?php echo $sujpath; ?>dist/js/app.min.js"></script>
  </body>
</html>
