<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


<?php 
include('../include/session.php');


date_default_timezone_set('Africa/Gaborone');
$date_time = date("Y-m-d H:i:s", time()); 

$error_id = $_GET['error_id']; 

$table_name = $_SESSION['db_prefix']."_error_log";
$log_query = "SELECT * FROM $table_name WHERE error_id = '".$error_id."' ";
$log_result = mySQL_query($log_query);
$log_num = mysql_num_rows($log_result);
$error_report_date = mysql_result($log_result, 0, "error_report_date");
$error_title = mysql_result($log_result, 0, "error_title");
$error_module = mysql_result($log_result, 0, "error_module");
$error_description = mysql_result($log_result, 0, "error_description");
$error_reported_by = mysql_result($log_result, 0, "error_reported_by");
$error_importance = mysql_result($log_result, 0, "error_importance");
$error_entered_by = mysql_result($log_result, 0, "error_entered_by");
$error_solved_date = mysql_result($log_result, 0, "error_solved_date");
$error_solved_by = mysql_result($log_result, 0, "error_solved_by");
$error_solution = mysql_result($log_result, 0, "error_solution");
$error_solved = mysql_result($log_result, 0, "error_solved");



?>
<script language="JavaScript" src="../jscript/cancel_confirmation.js"  type="text/javascript"></script> 
</head>

<body>
<?php
include ("../navigation/header.php");
$page_name = "AD-remove user";
include ("../navigation/access.php");

if ($permission_num==1) {
	include ("../navigation/admin_sidebar.php");
?>


<div class="main_frame">

  <div class="page_head_frame">
    <table width="809" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="385"><label class="label_page_head">Error report</label></td>
        <td align="right">&nbsp;</td>
      </tr>
    </table>
  </div>

<div class="page_middle_frame">  
<div class="page_inside_frame">
    Error report to developer.
    <br /><br />

    <table width="600" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="28" valign="middle">Error id: </td>
        <td valign="middle"><?php echo $error_id ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <?php if ($error_importance=='yes') {?>
          <img src="../images/exclamation.png" width="16" height="16" />High importance
          <?php } ?></td>
        <td valign="middle">&nbsp;</td>
      </tr>
      <tr>
        <td width="113" height="28" valign="middle">Error title:</td>
        <td width="243" valign="middle"><?php echo $error_title ?></td>
        <td width="244" valign="middle">&nbsp;</td>
      </tr>
      <tr>
        <td height="30" valign="middle">Error in module:</td>
        <td valign="middle"><?php echo $error_module ?></td>
        <td valign="middle">&nbsp;</td>
      </tr>
      <tr>
        <td height="130" valign="top">Error description:</td>
        <td colspan="2" valign="top"><?php echo $error_description ?></td>
      </tr>
      <tr>
        <td height="22" valign="top">Error reported by:</td>
        <td colspan="2" valign="top"><?php echo $error_reported_by?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
      </tr>
      <tr>
        <td>Error logged by:</td>
        <td colspan="2" valign="top"><?php echo $error_entered_by?>&nbsp;&nbsp;on &nbsp;<?php echo date("d-m-Y, H:i", strtotime($error_report_date)) ?></td>
      </tr>
  </table>
    </div> 
    
  

  


<div class="page_inside_frame">
   <?php if ($error_solved=='yes') { ?> 
   <img src="../images/check_mark_green.png" width="32" height="32" /> This error was closed on &nbsp;<?php echo date("d-m-Y, H:i", strtotime($error_solved_date));?>&nbsp; by &nbsp; <?php echo $error_solved_by ;} ?>
   <?php if ($error_solved=='no') { ?> 
   <img src="../images/check_mark_orange.png" width="32" height="32" /> This error attended to &nbsp;on <?php echo date("d-m-Y, H:i", strtotime($error_solved_date));?>&nbsp; by &nbsp; <?php echo $error_solved_by ;} ?> <br />
<br />
Comments:<br />
<br />

<?php echo $error_solution ?>  </div>
</div> 
</div>
<?php include ('../navigation/side_bar.php'); ?>


<?php } else {
    $_SESSION['denied_return'] = "admin_module/user_list.php";	
    include ("../navigation/admin_sidebar.php");?>
	<body onLoad="needToConfirm = false; accessdenied(); return false">	
    <?php include ('../navigation/side_bar.php'); ?>
	</body>
<?php }
?>
</body>
</html>