80 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			80 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
require_once "globals.php";
 | 
						|
require_once "autologin.php";
 | 
						|
 | 
						|
$user_data = get_autologin_user_data();
 | 
						|
if (!get_autologin_state()) {
 | 
						|
    exit();
 | 
						|
}
 | 
						|
 | 
						|
// fetch game ID; cannot continue without specifying it
 | 
						|
$game_id = trim($_REQUEST["game_id"] ?: "");
 | 
						|
if ($game_id === "") {
 | 
						|
    exit();
 | 
						|
}
 | 
						|
 | 
						|
require_once "gamemgr.php";
 | 
						|
 | 
						|
// no user without access may tamper with the results
 | 
						|
if (!is_user_contributor_to_game($game_id, $user_data["nickname"])) {
 | 
						|
    exit();
 | 
						|
}
 | 
						|
 | 
						|
?>
 | 
						|
 | 
						|
<!DOCTYPE html>
 | 
						|
<html>
 | 
						|
<head>
 | 
						|
    <meta charset="UTF-8">
 | 
						|
    <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0'>
 | 
						|
    <title>SpreadQuiz - Eredménykezelő</title>
 | 
						|
    <script src="js/req.js"></script>
 | 
						|
    <script src="js/o.js"></script>
 | 
						|
    <script src="js/common.js"></script>
 | 
						|
    <script src="js/spreadquiz.js"></script>
 | 
						|
    <script src="js/result_analyzer.js"></script>
 | 
						|
    <link rel="stylesheet" href="style/spreadquiz.css">
 | 
						|
    <link rel="stylesheet" href="style/quizmaster_area.css"/>
 | 
						|
</head>
 | 
						|
<body>
 | 
						|
 | 
						|
<section style="margin-bottom: 0.3em">
 | 
						|
    <input type="text" placeholder="Szűrőfeltétel" id="filter" style="font-family: 'Monaco', monospace; width: 50em;">
 | 
						|
    <input type="button" value="Szűrés" onclick="fetch_results()">
 | 
						|
</section>
 | 
						|
<section>
 | 
						|
    <section id="table_section">
 | 
						|
        <table class="management">
 | 
						|
            <thead>
 | 
						|
            <tr>
 | 
						|
                <th></th>
 | 
						|
                <th>
 | 
						|
                    Felhasználónév<br>
 | 
						|
                    <code>
 | 
						|
                        [nickname]
 | 
						|
                    </code>
 | 
						|
                </th>
 | 
						|
                <th>Eredmény<br>
 | 
						|
                    <code>
 | 
						|
                        [result]
 | 
						|
                    </code>
 | 
						|
                </th>
 | 
						|
                <th>Időbélyeg<br>
 | 
						|
                    <code>
 | 
						|
                        [timestamp]
 | 
						|
                    </code>
 | 
						|
                </th>
 | 
						|
            </tr>
 | 
						|
            </thead>
 | 
						|
            <tbody id="results_display">
 | 
						|
            </tbody>
 | 
						|
        </table>
 | 
						|
    </section>
 | 
						|
</section>
 | 
						|
<script>
 | 
						|
    let GAMEID = <?="$game_id"?>;
 | 
						|
</script>
 | 
						|
</body>
 | 
						|
</html>
 |