<?php
	include('common/header.php');
?>
<?php  
foreach ($user_type as $value) {
   $user_type_id = $value['user_type_id'];
   $user_type =$value['user_type'];
   $module_id = $value['module_ids'];

}
?>
<div class="">
	<div class="col-xm-12">
		<div class="widget-box light-border">
			
			<div class="widget-body">
				<div class="widget-main">
					<div class="row">
						<div class="col-sm-12">
							<form class="form-horizontal" role="form">
							<div class="">
								<!-- PAGE CONTENT BEGINS -->	
								<div class="profile-user-info">
									
									<div class="profile-info-row">
										<div class="profile-info-name"><?php echo 'User Type: '; ?></div>
										<div class="profile-info-value">
											<span>			
											<?php
											if ($user_type!='') {
												echo $user_type;
											}else{
												echo '-';
											}
												
												echo form_hidden('admin_type_code','');
											?></span>
										</div>	
									</div>

									
									<div class="profile-info-row">
										<div class="profile-info-name"><?php echo 'Access Control: '; ?></div>
										<div class="profile-info-value">
											<span>
									     	<table class="table table-bordered">
   											 <tbody>
     										  <tr>
     										  <?php  
     										         $module=module_view($module_id);
                            						foreach ($module as  $m) {
                             					 ?>
                              					
                                					<td>
        									   			<?php
															echo "<b>".$m['module_name']."</b>";
															$mod_array=get_sub_module_view($m['module_id']);
															foreach ($mod_array as  $sub_m) {
																
																echo "<br>--".$sub_m['module_name'];
															}
                                  						  /* if ($m['module_parent_id']==0) {    		
        									       			echo "<b>".$m['module_name']."</b>"; 
        									        	   }elseif($m['module_parent_id']==$m['module_id']){
                                    						echo "".$m['module_name']."";
        									       			 }else{
        									        		echo "--".$m['module_name']."";
        									        		} */
        									             ?>
        									         </td>
      										  </tr>
      										<?php }?>
    										 </tbody>
  											</table>												
											</span>
										</div>	
									</div>
									
								</div>
							</div>
							</form>	
						</div>
					</div>
				</div>	
			</div>
		</div>
	</div>
    <!-- /.col -->
</div>
<div class="clearfix form-actions">
	<div class="col-md-5" style="margin-left: 142px">
		<button class="btn btn-info" type="button" onclick="javascript:window.location='<?php echo base_url();?>index.php/gc/user_type/list_user_type'">
			Back
		</button>
	</div>
</div>
<div class="space-4"></div>
	<!-- /.page-row -->
    <!-- /.page-content --> 
</div>
<!-- /.main-content -->  
</div>
<!-- /#ace-settings-container --> 
</div>
<!-- /.main-container-inner --> 
<?php
	include('common/footer.php');
?>