2 /************************************************************************/
4 /************************************************************************/
5 /* Copyright (c) 2002-2008 by Greg Gay, Joel Kronenberg & Heidi Hazelton*/
6 /* Adaptive Technology Resource Centre / University of Toronto */
9 /* This program is free software. You can redistribute it and/or */
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /************************************************************************/
15 define('AT_INCLUDE_PATH', '../include/');
16 require(AT_INCLUDE_PATH.'vitals.inc.php');
17 admin_authenticate(AT_ADMIN_PRIV_ADMIN);
19 if (isset($_POST['back'])) {
20 header('Location: error_logging.php');
25 if (isset($_POST['view'])) { // check if a bug was selected
26 foreach($_POST as $elem => $val) {
27 $str_ = substr($elem, 0, 4);
28 if ($str_ == 'file') {
33 $msg->addError('NO_LOG_SELECTED');
34 header('Location: error_logging.php');
39 $back_ref = $_POST['profile_id'] . ':' . $_POST['profile_date'];
41 require(AT_INCLUDE_PATH.'header.inc.php');
43 <form name="form" method="post" action="<?php echo 'admin/error_logging_details.php'; ?>">
44 <input type="hidden" name="data" value="<?php echo $back_ref; ?>" />
45 <input type="hidden" name="view" value="<?php echo ''; ?>" />
47 <div class="input-form">
49 <h3><?php echo _AT('viewing_errors'); ?></h3>
52 foreach ($files as $file) {
53 if (isset($_POST[$file])) {
54 $dump = @file_get_contents(AT_CONTENT_DIR . 'logs/' . $_POST[$file]);
55 if ($dump !== false) { ?>
62 $msg->printErrors(array('CANNOT_READ_FILE', AT_CONTENT_DIR . 'logs/' . $_POST[$file]));
67 <div class="row buttons">
68 <input type="submit" name="back" value="<?php echo _AT('back_to_profile'); ?>" />
73 <?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>