<?php require 'config.php'; require 'lib.php'; connectdb(); if (array_key_exists('username', $_POST)) { OnLogin2('admin.php'); } require_login('admin.php'); $result = mysql_query("SELECT * FROM {$CFG->prefix}users WHERE id={$userid}"); $user = mysql_fetch_assoc($result); if ($user['userlevel'] != 1) { echo GetHeader('login'); die('Ο χρήστης δεν έχει δικαίωμα σε αυτή την οθόνη'); } if (!array_key_exists('question', $_POST)) { DoSelectQuestion(); die; } $action = $_POST['action']; if ($action == 'startquestion') { if (array_key_exists('show', $_POST)) { DoStartQuestion(false, false); } else { DoStartQuestion(true, false); } die; } if ($action == 'starttimer') { OnStartTimer(); die;
<?php require 'config.php'; require 'lib.php'; connectdb(); if (array_key_exists('username', $_POST)) { OnLogin2('index.php'); ShowForm(); die; } require_login('index.php'); echo GetHeader('Εμφάνιση ερωτήσεων') . '<body>'; if (array_key_exists('answer', $_GET)) { OnGrade($_GET['answer'], $_SESSION['userid']); } ShowForm(); function ShowForm() { ComputeTimerStudent($resttime, $question, $questiontext, $md5, $infoanswer); if ($resttime <= 0) { $divanswervisibility = ' style="visibility: hidden"'; } else { $divanswervisibility = ''; } $divtimerhtml = "Υπόλοιπο χρόνου: {$resttime} δευτερόλεπτα"; $divquestionhtml = $questiontext; ?> <div id="divmd5" style="visibility: hidden"> <?php echo $md5; ?>
<?php require 'config.php'; require 'lib.php'; connectdb(); if (array_key_exists('username', $_POST)) { OnLogin2(); } require_login('results.php'); echo GetHeader('Αποτελέσματα'); if (array_key_exists('kind', $_GET)) { $s_kind = $_GET['kind']; } else { $s_kind = 2; } if (array_key_exists('sort', $_GET)) { $s_sort = $_GET['sort']; } else { $s_sort = ''; } if (array_key_exists('count', $_GET)) { $s_countquestions = $_GET['count']; } else { $s_countquestions = 5; } if (array_key_exists('top', $_GET)) { $s_top = intval($_GET['top']); } else { $s_top = 0; } $userid = $_SESSION['userid'];