
<?php require('include/header.php');?>

   <?php require('include/sidenav.php');?>

   
    <!-- BEGIN: Content-->
    <div class="app-content content">
      <div class="content-overlay"></div>
      <div class="content-wrapper">
        <div class="content-header row">
          <div class="content-header-left col-md-12 col-12 mb-2 breadcrumb-new">
            <h3 class="content-header-title mb-0 d-inline-block">User Access</h3>
            <div class="row breadcrumbs-top d-inline-block">
              <div class="breadcrumb-wrapper col-12">
                <ol class="breadcrumb">
                  <li class="breadcrumb-item"><a href="index-2.html">Home</a>
                  </li>
                  <li class="breadcrumb-item"><a href="#">User</a>
                  </li>
                  <li class="breadcrumb-item active">User Access
                  </li>
                </ol>
              </div>
            </div>
          </div>
          
        </div>
        <div class="content-body"><!-- Basic form layout section start -->
<section id="basic-form-layouts">
	
	<div class="row justify-content-md-center">
		<div class="col-md-12">
			<div class="card">
				<div class="card-header">
					<h4 class="card-title" id="basic-layout-form-center">User Access</h4>
					<a class="heading-elements-toggle"><i class="la la-ellipsis-v font-medium-3"></i></a>
					<div class="heading-elements">
						<ul class="list-inline mb-0">
							<li><a data-action="collapse"><i class="ft-minus"></i></a></li>
							<li><a data-action="reload"><i class="ft-rotate-cw"></i></a></li>
							<li><a data-action="expand"><i class="ft-maximize"></i></a></li>
							<li><a data-action="close"><i class="ft-x"></i></a></li>
						</ul>
					</div>
				</div>
				<div class="card-content collapse show">
					<div class="card-body">
						<form class="form" action="<?php echo site_url('User/addUserAccess'); ?>" method="POST" autocomplete="off">
							<div class="row justify-content-md-center">
								<div class="col-md-6">
									<div class="form-body">
										<div class="form-group">
											<label for="eventInput1">Module</label>
											<select name="module_id" id="module_id" class="select2 form-control" required>
												<option value="">Select Module</option>
												<?php  foreach($modules as $row)
													{
														echo '<option value="'.$row->sub_mod_id.'">'.$row->sub_mod_name.'</option>';
													} 
												?>
											</select>
											<input type="hidden" id="module_name" name="module_name" class="form-control" >
										</div>
									</div>
								</div>
								<div class="col-md-6">
									<div class="form-body">
										<div class="form-group">
											<label for="eventInput1">Branch</label>
											<select name="branch" id="branch" class="select2 form-control" required>
												<option value="">Select Branch</option>
												<?php  foreach($branch as $row)
													{
														echo '<option value="'.$row->branch_id.'">'.$row->branch_name.'</option>';
													} 
												?>
											</select>
											<input type="hidden" id="branch_name" name="branch_name" class="form-control" >
										</div>
									</div>
								</div>
							</div>
							<div class="row justify-content-md-center">
								<div class="col-md-6">
									<div class="form-body">
										<div class="form-group">
											<label for="eventInput1">Access name</label>
											<input type="text" id="access_name" name="access_name" class="form-control" placeholder="Access name" >
										</div>
									</div>
								</div>
								<div class="col-md-6">
									<div class="form-body">
										<div class="form-group">
											<label for="eventInput1">Access Branch</label>
											<select name="access_branch" id="access_branch" class="select2 form-control" >
												<option value="">Select Branch</option>
												<?php  foreach($branch as $row)
													{
														echo '<option value="'.$row->branch_name.'">'.$row->branch_name.'</option>';
													} 
												?>
											</select>
										</div>
									</div>
								</div>
							</div>
							<div class="row justify-content-md-center">
								<div class="col-md-6">
									<div class="form-body">
										<div class="form-group">
											<label for="eventInput1">Access Username</label>
											<select name="access_uid" id="access_uid" class="select2 form-control" >
												<option value="">Select Username</option>
												<?php  foreach($username as $row)
													{
														echo '<option value="'.$row->user_id.'">'.$row->username.'</option>';
													} 
												?>
											</select>
											<input type="hidden" id="access_uname" name="access_uname" class="form-control" >
										</div>
									</div>
								</div>
								<div class="col-md-6">
									<div class="form-body">
										<div class="form-group">
											<label for="eventInput1">Access Category</label>
											<select name="access_cat_id" id="access_cat_id" class="select2 form-control" >
												<option value="">Select Category</option>
												<?php  foreach($category as $crow)
													{
												?>
													<option value="<?php echo $crow->pr_cat_id ?>"><?php echo $crow->pr_cat_name ?></option>
												<?php
													} 
												?>
											</select>
											<input type="hidden" id="access_category" name="access_category" class="form-control" >
										</div>
									</div>
								</div>
							</div>
							<div class="row justify-content-md-center">
								<div class="col-md-6">
									<div class="form-body">
										<div class="form-group">
											<label for="eventInput1">Access Tab</label>
											<input type="text" id="access_tab" name="access_tab" class="form-control" placeholder="Access Tab" >
										</div>
									</div>
								</div>
								<div class="col-md-6">
									<div class="form-body">
										<div class="form-group">
											<label for="eventInput1">Access Bank</label>
											<input type="text" id="access_bank" name="access_bank" class="form-control" placeholder="Access Bank" >
										</div>
									</div>
								</div>
							</div>
							<div class="form-actions text-right">
								<button type="reset" class="btn btn-warning mr-1">
									<i class="ft-x"></i> Reset
								</button>
								<button type="submit" class="btn btn-primary">
									<i class="la la-check-square-o"></i> Save
								</button>
							</div>
						</form>	

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

</section>
<!-- // Basic form layout section end -->
        </div>
      </div>
    </div>
    <!-- END: Content-->


   <?php //require('include/theme_customizer.php');?>

   <?php require('include/footer.php');?>
	<script type="text/javascript">
		$("#module_id").change(function (){
			var module_name = $(this).find("option:selected").text();
			$("#module_name").val(module_name);
		});
		
		$("#branch").change(function (){
			var branch_name = $(this).find("option:selected").text();
			$("#branch_name").val(branch_name);
		});
		
		$("#access_uid").change(function (){
			var access_uname = $(this).find("option:selected").text();
			$("#access_uname").val(access_uname);
		});
		
		$("#access_cat_id").change(function (){
			var access_category = $(this).find("option:selected").text();
			$("#access_category").val(access_category);
		});
    </script>

  </body>
  <!-- END: Body-->

<!-- Mirrored from pixinvent.com/modern-admin-clean-bootstrap-4-dashboard-html-template/html/ltr/vertical-modern-menu-template/form-layout-basic.html by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Apr 2020 09:38:02 GMT -->
</html>