<?php include('includes/config.php');?>
<?php include('includes/session_check.php');?>

<?php 

   /*if(isset($_SESSION['id'])){*/

    
    // $db->where("user_id", $_SESSION['user_id']);
     $admin = $db->get("admin_login");
      //$db->where("status", '0');
      //$db->where("branch_id", $_SESSION['branch']);
     
/*   }*/
//print_r($user);

?>




<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Edit Profile | Traders </title>

    <!-- Bootstrap -->
    <link href="../vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="../vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <!-- NProgress -->
    <link href="../vendors/nprogress/nprogress.css" rel="stylesheet">
    
    <!-- Custom Theme Style -->
    <link href="../build/css/custom.min.css" rel="stylesheet">
  </head>

  <body class="nav-md">
    <div class="container body">
      <div class="main_container">
        <div class="col-md-3 left_col">
         
        <?php include('includes/sidebar.php');?>
        <?php include('includes/header.php');?>
  
        <!-- page content -->
        <div class="right_col" role="main">
          <div class="">
            <div class="page-title">
              <div class="title_left">
                <h3>Edit admin Profile</h3>
              </div>

             
            </div>
            <div class="clearfix"></div>

            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                 
                  <div class="x_content">
				  
					
                     <form action="<?php echo DOMAIN.AdminDirectory; ?>includes/InsertMe.php" method="post" enctype="multipart/form-data" class="form-horizontal form-label-left" novalidate>
						
	            <input type="hidden" name="action" value="updateprofile_user" />
              <input type="hidden" name="user_id"  value="<?php echo $_SESSION['user_id']; ?>">

				
					
              
                   


				   <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">User Name <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                         
                           <input id="" class="form-control col-md-7 col-xs-12" data-validate-length-range="3"  name="usnam" placeholder="eg Ali Shah" required="required" type="text" value="<?php echo $admin[0]['fname']; ?>">

                        </div>
                    </div>
                     
                      
                    <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Father Name  <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="owner_name" class="form-control col-md-7 col-xs-12" data-validate-length-range="3"  name="fanam" placeholder="" required="required" type="text" value="<?php echo $admin[0]['lname']; ?>">
                        </div>
                      </div>

                      <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Current Session  <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                    <select name="session" class="form-control"  style="height:40px;">

                              
                        <?php

                       $match;
                        if(!isset($_REQUEST['session'])){
                          $match=$_SESSION['current_session'];
                        }else { $match=$_REQUEST['session']; }
                       
                                 
                        $WorkAssignList = $db->get("edu_session_config");
                        foreach($WorkAssignList as $WorkAssignListVal)
                        { ?>

                           <option <?php if($match==$WorkAssignListVal['session_id']){echo 'selected';}?> value="<?php echo $WorkAssignListVal['session_id']; ?>"><?php echo $WorkAssignListVal['session_year']; ?></option>


                                <?php
                        } ?>

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

					
                      <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="number">User Email <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input type="email" id="owner_number" name="usreml" required="required"  class="form-control col-md-7 col-xs-12" value="<?php echo $admin[0]['adminemail']; ?>">
                        </div>
                      </div> 
                  
					             <div class="item form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">User Password</label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="sms_name" class="form-control col-md-7 col-xs-12"  name="pswrd" placeholder="" type="password" value="<?php echo $admin[0]['password']; ?>">
                        </div>
                      </div>
                    
									 

                      <div class="ln_solid" style="border-top:none;"></div>
                      <div class="form-group">
                        <div class="col-md-6 col-md-offset-3">
                          
                          <button id="send" type="submit" class="btn btn-success">Submit</button>
                          <button type="submit" class="btn btn-primary">Cancel</button>

                        </div>
                      </div>

                    </form>
	            
					</div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <!-- /page content -->

  <?php include('includes/footer.php');?>

  </div>
    </div>

    <!-- jQuery -->
    <script src="../vendors/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap -->
    <script src="../vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="../vendors/fastclick/lib/fastclick.js"></script>
    <!-- NProgress -->
    <script src="../vendors/nprogress/nprogress.js"></script>
    <!-- validator -->
    <script src="../vendors/validator/validator.js"></script>

    <!-- Custom Theme Scripts -->
    <script src="../build/js/custom.min.js"></script>
	
  </body>
</html>