113 lines
3.7 KiB
PHP
113 lines
3.7 KiB
PHP
<?php
|
|
|
|
require_once "check_maintenance.php";
|
|
|
|
require_once "globals.php";
|
|
require_once "autologin.php";
|
|
|
|
$user_data = get_autologin_user_data();
|
|
if (!get_autologin_state() || ($user_data["privilege"] !== PRIVILEGE_QUIZMASTER)) {
|
|
exit(); // this page is only available for quizmasters
|
|
}
|
|
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="hu">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>SpreadQuiz</title>
|
|
<script src="js/o.js"></script>
|
|
<script src="js/req.js"></script>
|
|
<script src="js/spreadquiz.js"></script>
|
|
<script src="js/quizmaster_common.js"></script>
|
|
<script src="js/groupmgr.js"></script>
|
|
<link rel="stylesheet" href="style/spreadquiz.css"/>
|
|
<link rel="stylesheet" href="style/quizmaster_area.css"/>
|
|
</head>
|
|
<body>
|
|
<section id="table_section">
|
|
<table class="management">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Név</th>
|
|
<th>Leírás</th>
|
|
<th>Tulajdonos</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="group_manager_table">
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<section>
|
|
<input type="button" value="Új csoport" onclick="create_edit_group();">
|
|
<input type="button" value="Csoport(ok) törlése" onclick="delete_groups();">
|
|
</section>
|
|
<section class="window" shown="false" id="group_editor_window">
|
|
<section class="window-inner">
|
|
<table>
|
|
<tr>
|
|
<td><label for="groupname">Név:</label></td>
|
|
<td><input type="text" id="groupname"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="group_description">Leírás:</label></td>
|
|
<td><input type="text" id="group_description"></td>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="group_owner">Tulajdonos:</label></td>
|
|
<td><input type="text" id="group_owner"></td>
|
|
</tr>
|
|
</table>
|
|
<table id="group_editor_additional_fields">
|
|
<tr>
|
|
<td><label for="group_editors">Szerkesztők:</label></td>
|
|
<td><input type="text" id="group_editors"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="group_members">Tagok:</label><br>
|
|
<input type="button" value="+" onclick="open_element_change_window('add', 'member')">
|
|
<input type="button" value="-" onclick="open_element_change_window('remove', 'member')">
|
|
</td>
|
|
<td>
|
|
<textarea id="group_members" readonly></textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="group_games">Játékok:</label><br>
|
|
<input type="button" value="+" onclick="open_element_change_window('add', 'game')">
|
|
<input type="button" value="-" onclick="open_element_change_window('remove', 'game')">
|
|
</td>
|
|
<td>
|
|
<textarea id="group_games" readonly></textarea>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<section style="display: block; text-align: right">
|
|
<input type="button" value="" id="group_editor_submit_btn">
|
|
<input type="button" value="Mégse" onclick="hide('group_editor_window')">
|
|
</section>
|
|
</section>
|
|
</section>
|
|
|
|
<section class="window" shown="false" id="element_manager_window">
|
|
<section class="window-inner">
|
|
<section id="element_manager_window_title">
|
|
</section>
|
|
<textarea id="add_remove_element_area"></textarea><br>
|
|
<input type="button" value="OK" onclick="change_group_elements()">
|
|
<input type="button" value="Mégse" onclick="hide('element_manager_window')">
|
|
</section>
|
|
</section>
|
|
|
|
<script>
|
|
list_all_groups();
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|
|
|
|
|