Room Management In Settings
This commit is contained in:
		@@ -13,4 +13,9 @@ table.table th {
 | 
				
			|||||||
  text-align: left;
 | 
					  text-align: left;
 | 
				
			||||||
  background-color: #121a2b;
 | 
					  background-color: #121a2b;
 | 
				
			||||||
  color: white;
 | 
					  color: white;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					button:disabled,
 | 
				
			||||||
 | 
					button[disabled] {
 | 
				
			||||||
 | 
					  opacity: .4;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -121,17 +121,57 @@
 | 
				
			|||||||
				<form method="post">
 | 
									<form method="post">
 | 
				
			||||||
					<div class="field">
 | 
										<div class="field">
 | 
				
			||||||
						<div class="label"><?php $LANGMNG->echo('l_userName') ?>:</div>
 | 
											<div class="label"><?php $LANGMNG->echo('l_userName') ?>:</div>
 | 
				
			||||||
						<input type="text" class="input" name="userName" value="" data-cip-id="cIPJQ342845639">
 | 
											<input type="text" class="input" name="userName" value="">
 | 
				
			||||||
					</div>
 | 
										</div>
 | 
				
			||||||
					<div class="field">
 | 
										<div class="field">
 | 
				
			||||||
						<div class="label"><?php $LANGMNG->echo('l_password') ?>:</div>
 | 
											<div class="label"><?php $LANGMNG->echo('l_password') ?>:</div>
 | 
				
			||||||
						<input type="password" class="input" name="userPassword" value="" data-cip-id="cIPJQ342845639">
 | 
											<input type="password" class="input" name="userPassword" value="">
 | 
				
			||||||
					</div>
 | 
										</div>
 | 
				
			||||||
					<div class="field">
 | 
										<div class="field">
 | 
				
			||||||
						<input type="submit" name="submitCreateUser" class="button" value="Uložit">
 | 
											<input type="submit" name="submitCreateUser" class="button" value="Uložit">
 | 
				
			||||||
					</div>
 | 
										</div>
 | 
				
			||||||
				</form>
 | 
									</form>
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								<!--Room Managment-->
 | 
				
			||||||
 | 
								<div class="col-12 col-sm-9 mx-auto mt-4">
 | 
				
			||||||
 | 
									<h4 class="mb-4"><?php $LANGMNG->echo('t_listRooms') ?></h4>
 | 
				
			||||||
 | 
									<table class="table is-fluid">
 | 
				
			||||||
 | 
										<thead>
 | 
				
			||||||
 | 
											<tr>
 | 
				
			||||||
 | 
												<th><?php $LANGMNG->echo('t_roomName');?></th>
 | 
				
			||||||
 | 
												<th><?php $LANGMNG->echo('t_action');?></th>
 | 
				
			||||||
 | 
											</tr>
 | 
				
			||||||
 | 
										</thead>
 | 
				
			||||||
 | 
										<tbody>
 | 
				
			||||||
 | 
											<?php foreach ($ROOMS as $key => $room) { ?>
 | 
				
			||||||
 | 
												<tr>
 | 
				
			||||||
 | 
													<td><?php echo $room['name']; ?></td>
 | 
				
			||||||
 | 
													<td>
 | 
				
			||||||
 | 
														<button name="deleteRoom" type="button" class="button is-danger fa"></button>
 | 
				
			||||||
 | 
														<button name="defaultRoom" type="button" class="button fa" <?php echo ($room['default'] ? 'disabled' : ''); ?>></button>
 | 
				
			||||||
 | 
													</td>
 | 
				
			||||||
 | 
												</tr>
 | 
				
			||||||
 | 
											<?php } ?>
 | 
				
			||||||
 | 
										</tbody>
 | 
				
			||||||
 | 
									</table>
 | 
				
			||||||
 | 
								</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								<!--Room Creation-->
 | 
				
			||||||
 | 
								<div class="col-12 col-sm-9 mx-auto mt-4">
 | 
				
			||||||
 | 
									<h4 class="mb-4"><?php $LANGMNG->echo('t_createRoom') ?></h4>
 | 
				
			||||||
 | 
									<form method="post">
 | 
				
			||||||
 | 
										<div class="field">
 | 
				
			||||||
 | 
											<div class="label"><?php $LANGMNG->echo('l_roomName') ?>:</div>
 | 
				
			||||||
 | 
											<input type="text" class="input" name="roomName" value="">
 | 
				
			||||||
 | 
										</div>
 | 
				
			||||||
 | 
										<div class="field">
 | 
				
			||||||
 | 
											<input type="submit" name="submitCreateUser" class="button" value="<?php $LANGMNG->echo('b_create') ?>">
 | 
				
			||||||
 | 
										</div>
 | 
				
			||||||
 | 
									</form>
 | 
				
			||||||
 | 
								</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		</div>
 | 
							</div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -45,6 +45,9 @@ class Setting extends Template
 | 
				
			|||||||
			// echo "Checking Code '$oneCode' and Secret '$otaSecret':\n";
 | 
								// echo "Checking Code '$oneCode' and Secret '$otaSecret':\n";
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							$rooms = RoomManager::getAllRooms();
 | 
				
			||||||
 | 
							$template->prepare('rooms', $rooms);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		$template->render();
 | 
							$template->render();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user