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

<!--style sheets-->
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<!--jscript-->
<script language="JavaScript" src="../jscript/gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>


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


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


$table_name = $_SESSION['db_prefix']."_users";
$select_query = "SELECT userid, username FROM $table_name ORDER BY username ";
	$arrId = array ();
	$arrName = array ();
	$select_result = execsql($select_query);
	$select_num = mysql_num_rows($select_result);
	$a = 0;
	while ($a < $select_num) {
		$arrId[$a] = mysql_result($select_result, $a, "username");
		$arrName[$a] = mysql_result($select_result, $a, "username");
		$a++;
	}


?>
<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">Report error</label></td>
        <td align="right">&nbsp;</td>
      </tr>
    </table>
  </div>
 <form action="new_error_save.php" method="get" name="form1" id="form1">
<div class="page_middle_frame">  
<div class="page_inside_frame">
    Report error to developer.
    <br /><br />

    <table width="600" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="113" height="36" valign="top">Error title:</td>
        <td width="487" valign="top"><input type="text" name="title_text" id="title_text"  class="text300"/>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="../images/exclamation.png" width="16" height="16" />High importance<input type="checkbox" name="importance_checkbox" id="importance_checkbox" /></td>
      </tr>
      <tr>
        <td height="36" valign="top">Error in module:</td>
        <td valign="top"><select name="module_select" class="selectbox160" id="module_select">
          <option value="HR">HR</option>
          <option value="Sales">Sales</option>
          <option value="Orders">Orders</option>
          <option value="Maintenance">Maintenance</option>
          <option value="Stores">Stores</option>
          <option value="Production">Production</option>
          <option value="Transport">Transport</option>
          <option value="Admin">Admin</option>
          <option value="Other">Other</option>
          <option value="Database">Database</option>
          <option value="  " selected="selected"> </option>
        </select></td>
      </tr>
      <tr>
        <td height="130" valign="top">Error description:</td>
        <td valign="top"><textarea name="description_text" id="description_text" cols="90" rows="6" class="text_box"></textarea></td>
      </tr>
      <tr>
        <td valign="top">Error logged by:</td>
        <td valign="top">
          <select name="user_select" class="selectbox120">
            <option value=""></option>
            <?php
        	for ($i = 0; $i < count($arrId); $i++) {
    		echo "<option value=" . "\"" . $arrId[$i] . "\"" . ">" . $arrName[$i] . "</option>";
	}
?>
          </select>  
        &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;
        <?php echo date("d-m-Y, H:i", strtotime($date_time)) ?>
        <input type="hidden" name="date_text" id="date_text" />
        </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
  </table>
    </div> 
    
<div class="page_inside_frame">
      <table width="645" border="0">
        <tr>
          <td width="20"><?php if ($_SESSION['username']=='huubvm') {?><a href="system.php"><input name="system_button" type="button" value="System" class="imagebutton"></a><?php } ?></td>
          <td width="615" align="right">
            <input name="button2" type="button" class="imagebutton" id="button2" onclick="cancel_confirmation(3, '../admin_module/user_list.php');" value="Close"/>
            <input name="save_new_button"  id="save_new_button" type="submit" class="imagebutton" value="Save & New" onclick="needToConfirm = false; " />
            <input name="save_close_button"  id="save_close_button" type="submit" class="imagebutton" value="Save &amp; Close" onclick="needToConfirm = false; " /></td>
        </tr>
      </table>
    </div>    
    
    
</div> 
</form>  
</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>