83 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			83 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?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>
 | 
						|
            <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></td>
 | 
						|
                <td><textarea id="group_members" 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>
 | 
						|
 | 
						|
<script>
 | 
						|
    list_all_groups();
 | 
						|
</script>
 | 
						|
 | 
						|
</body>
 | 
						|
</html>
 | 
						|
 | 
						|
 |