function show_delete_page($err) { $id = $_GET['ID']; $query = 'SELECT name FROM users WHERE id="' . mysqli_real_escape_string(DB::get(), $id) . '" AND permissions="T"'; $result = DB::queryRaw($query); if (mysqli_num_rows($result) != 1) { trigger_error('Show_Delete: Invalid User ID', E_USER_ERROR); } $row = mysqli_fetch_assoc($result); $name = $row['name']; page_header('Temporary Users'); // If an error message is given, put it inside this div if ($err != '') { $err = "\n <div class=\"error\">{$err}</div><br />\n"; } echo <<<HEREDOC <h1>Temporary Users</h1> {$err} <span class="b">{$name}'s Temporary Test Scores</span><br /><br /> HEREDOC; echo create_score_table($id); $request_uri = htmlentities($_SERVER['REQUEST_URI']); echo <<<HEREDOC <br /><br /> <form method="post" action="{$request_uri}"><div> Are you sure you want to delete this temporary account?<br /><br /> <input type="hidden" name="xsrf_token" value="{$_SESSION['xsrf_token']}"/> <input type="submit" name="do_delete" value="Delete"/> <a href="Temporary_Users">Cancel</a> </div></form> HEREDOC; }
/** Specifies the content of a page with the scores for a specific testsurvey */ public function testinvite($testinvite_id) { $testinvite = $this->testInviteModel->get_testinvite_by_id($testinvite_id); $test = $this->testInviteModel->get_test_by_testinvite($testinvite); $participant = $this->testInviteModel->get_participant_by_testinvite($testinvite); create_score_table(NULL, 'testinvite'); $data['ajax_source'] = 'score/table_by_testinvite/' . $testinvite_id; $data['page_title'] = sprintf(lang('scores_for'), name($participant)); $data['page_info'] = 'Bekijk het score-overzicht via ' . anchor('c/' . $test->code . '/' . $testinvite->token . '/home', 'deze link', 'target="_blank"') . '.'; $this->load->view('templates/header', $data); $this->load->view('templates/list_view', $data); $this->load->view('templates/footer'); }
<!-- Download scores --> <?php if (in_array($test->code, array('ncdi_wz', 'anamnese'))) { echo '<p>'; echo anchor('testsurvey/download_scores/' . $testsurvey->id, lang('download_scores')); echo '</p>'; } ?> <!-- Scores --> <?php echo heading(lang('scores'), 3); ?> <div> <?php create_score_table('scores', 'testsurvey'); $scores['id'] = 'scores'; $scores['ajax_source'] = 'score/table_by_testsurvey/' . $testsurvey->id; $this->load->view('templates/list_view', $scores); ?> </div> <!-- Testinvites --> <?php echo heading(lang('testinvites'), 3); ?> <div> <?php create_testinvite_table('testinvites'); $testinvites['id'] = 'testinvites'; $testinvites['ajax_source'] = 'testinvite/table_by_testsurvey/' . $testsurvey->id;
?> </table> <!-- Scores --> <?php echo heading(lang('scores'), 3); ?> <div> <?php if ($is_parent) { $scores['id'] = 'scores'; $scores['table'] = create_total_score_table(array($testcat), $testinvites); // FIXME! $this->load->view('templates/table_view', $scores); } else { create_score_table('scores', 'testcat'); $scores['id'] = 'scores'; $scores['ajax_source'] = 'score/table_by_testcat/' . $testcat->id; $this->load->view('templates/list_view', $scores); } ?> </div> <!-- Child categories --> <?php if ($is_parent) { ?> <?php echo heading(lang('testcats'), 3); ?> <div>