| 
									
										
										
										
											2019-01-09 23:18:46 +08:00
										 |  |  | <div class="container"> | 
					
						
							| 
									
										
										
										
											2011-08-18 08:16:27 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-09 23:18:46 +08:00
										 |  |  | <br> | 
					
						
							| 
									
										
										
										
											2011-08-18 08:16:27 +08:00
										 |  |  | <?php if($this->session->flashdata('notice')) { ?>
 | 
					
						
							|  |  |  | 	<div id="message" > | 
					
						
							|  |  |  |     	<?php echo $this->session->flashdata('notice'); ?>
 | 
					
						
							|  |  |  | 	</div> | 
					
						
							|  |  |  | <?php } ?>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-20 22:51:55 +08:00
										 |  |  | <h2><?php echo $page_title; ?></h2>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-09 23:18:46 +08:00
										 |  |  | <div class="card"> | 
					
						
							|  |  |  |   <div class="card-header"> | 
					
						
							| 
									
										
										
										
											2020-10-20 22:51:55 +08:00
										 |  |  |     User List | 
					
						
							| 
									
										
										
										
											2019-01-09 23:18:46 +08:00
										 |  |  |   </div> | 
					
						
							|  |  |  |   <div class="card-body"> | 
					
						
							| 
									
										
										
										
											2020-10-20 22:51:55 +08:00
										 |  |  |     <p class="card-text">Cloudlog needs at least one user configured in order to operate.</p> | 
					
						
							|  |  |  |     <p class="card-text">Users can be assigned roles which give them different permissions, such as adding QSOs to the logbook and accessing Cloudlog APIs.</p> | 
					
						
							| 
									
										
										
										
											2020-10-29 02:03:30 +08:00
										 |  |  |     <p class="card-text">The currently logged-in user is displayed at the upper-right of each page.</p> | 
					
						
							| 
									
										
										
										
											2019-01-09 23:18:46 +08:00
										 |  |  |     <div class="table-responsive"> | 
					
						
							|  |  |  | 		<table class="table table-striped"> | 
					
						
							|  |  |  | 		  <thead> | 
					
						
							|  |  |  | 		    <tr> | 
					
						
							|  |  |  | 		      <th scope="col">User</th> | 
					
						
							|  |  |  | 		      <th scope="col">E-mail</th> | 
					
						
							|  |  |  | 		      <th scope="col">Type</th> | 
					
						
							|  |  |  | 		      <th scope="col">Options</th> | 
					
						
							|  |  |  | 		    </tr> | 
					
						
							|  |  |  | 		  </thead> | 
					
						
							|  |  |  | 		  <tbody> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				<?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 				$i = 0; | 
					
						
							|  |  |  | 				foreach ($results->result() as $row) { ?>
 | 
					
						
							|  |  |  | 				<?php  echo '<tr class="tr'.($i & 1).'">'; ?>
 | 
					
						
							|  |  |  | 					<td><a href="<?php echo site_url('user/edit')."/".$row->user_id; ?>"><?php echo $row->user_name; ?></a></td>
 | 
					
						
							|  |  |  | 					<td><?php echo $row->user_email; ?></td>
 | 
					
						
							|  |  |  | 					<td><?php $l = $this->config->item('auth_level'); echo $l[$row->user_type]; ?></td>
 | 
					
						
							| 
									
										
										
										
											2021-08-12 19:13:03 +08:00
										 |  |  | 					<td> | 
					
						
							|  |  |  | 						<a href="<?php echo site_url('user/edit')."/".$row->user_id; ?>" class="btn btn-outline-primary btn-sm"><i class="fas fa-user-edit"></i> Edit</a> | 
					
						
							|  |  |  | 						<?php | 
					
						
							|  |  |  | 						if ($_SESSION['user_id'] != $row->user_id) { | 
					
						
							|  |  |  | 							echo "<a href=" . site_url('user/delete'). "/" . $row->user_id . " class=\"btn btn-danger btn-sm\"><i class=\"fas fa-user-minus\"></i> Delete</a>"; | 
					
						
							|  |  |  | 						} | 
					
						
							|  |  |  | 						?>
 | 
					
						
							|  |  |  | 					</td> | 
					
						
							| 
									
										
										
										
											2019-01-09 23:18:46 +08:00
										 |  |  | 				</tr> | 
					
						
							|  |  |  | 				<?php $i++; } ?>
 | 
					
						
							|  |  |  | 			</tbody> | 
					
						
							|  |  |  | 		</table> | 
					
						
							| 
									
										
										
										
											2011-11-07 07:09:51 +08:00
										 |  |  | 	</div> | 
					
						
							| 
									
										
										
										
											2019-01-09 23:18:46 +08:00
										 |  |  | 		<p> | 
					
						
							| 
									
										
										
										
											2020-10-26 16:58:49 +08:00
										 |  |  | 			<a class="btn btn-primary" href="<?php echo site_url('user/add'); ?>"><i class="fas fa-user-plus"></i> Create user</a> | 
					
						
							| 
									
										
										
										
											2019-01-09 23:18:46 +08:00
										 |  |  | 		</p> | 
					
						
							|  |  |  |   </div> | 
					
						
							| 
									
										
										
										
											2011-08-18 08:16:27 +08:00
										 |  |  | </div> | 
					
						
							| 
									
										
										
										
											2019-01-09 23:18:46 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-12 19:13:03 +08:00
										 |  |  | </div> |