<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  
<link rel="stylesheet" type="text/css" href="popup.css" />
<script language="JavaScript" src="gen_validatorv4.js"  type="text/javascript" xml:space="preserve"></script>
<?php

//include('../include/db.php');
include('../include/session.php');	
include('../include/formValidations.php');


$time_id = $_GET['time_id'];




$table_name = $_SESSION['db_prefix']."_time_record";
$time_query = "SELECT * FROM $table_name WHERE time_id ='".$time_id."' ";
$time_result = mySQL_query($time_query);
$emp_name = mysql_result($time_result, 0, "emp_id");
$edit_date = mysql_result($time_result, 0, "date");
$status = mysql_result($time_result, 0, "status");
$permission = mysql_result($time_result, 0, "permission");


if ($status=="L") {$status1="Late" ; }
if ($status=="A") {$status1="Absent";}
if ($status=="P") {$status1="Present";}
if ($status=="I") {$status1="Sick";}
if ($status=="F") {$status1="Leave";}



?>
<script type="text/javascript">
function stopRKey(evt) {
  var evt = (evt) ? evt : ((event) ? event : null);
  var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
  if ((evt.keyCode == 13) && (node.type=="text"))  {return false;}
}
document.onkeypress = stopRKey;
</script> 

<script type="text/javascript">
<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
//-->
</script>

 
<link href="../css/popup.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
label.label_std {	margin-left:5px;
    line-height:20px;
	padding-top:6px;
    color:#000;
    text-shadow:1px 1px 1px #fff;
    font:bold 12px Arial;
}
select.select50 {    background:#FFEAEA;
    border: 1px solid #ddd;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 1px;
    outline: none;
    padding: 2px;
    width:50px;
	height:24px;
	color:#000;
}
select.select80 {background:#FFF;
    border: 1px solid #ddd;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 1px;
    outline: none;
    padding: 2px;
    width:80px;
	height:24px;
	color:#000;
}

-->
</style>
</head>
<form action="../hr_module/edit_timekeeping.php" method="get" name="form1" target="_top" id="form1">
<body onload="document.getElementById(;MM_callJS('document.getElementById(\'quantityText\').focus();')"editText").focus();">
<table width="290" border="0" align="center" cellpadding="0" cellspacing="0" class="list2">
  <tr>
    <td width="290" align="center"><p><label class="label_std">Edit the value and click "Edit"<br />
If you don't want to change, click "cancel"</label>
        <br />
        </p>
      <table width="500" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><label class="label_std">status:</label>&nbsp;&nbsp;&nbsp;&nbsp;<select name="status_select" class="select80" >
            <option value="L">Late</option>
            <option value="A">Absent</option>
            <option value="P">Present</option>
            <option value="I">Sick</option>
            <option value="F">Leave</option>
            <option value="<?php echo $status ?>" selected="selected"><?php echo $status1 ?></option>
          </select></td>
          <td><p>
            <label>
<input type="radio" name="permission_group" value="yes" id="permission_group_0" <?php if ($permission=="yes") { ?> checked="checked" <?php } ?>  />
yes</label>
            
            <label>
<input type="radio" name="permission_group" value="no" id="permission_group_1" <?php if ($permission=="no") { ?> checked="checked" <?php } ?>/>
no</label>
<label>
              <input type="radio" name="permission_group" value="" id="permission_group_2" <?php if ($permission=="") { ?> checked="checked" <?php } ?>/>
              n/a</label>
            <br />
          </p></td>
        </tr>
      </table>
      
        
  <input name="edit" type="hidden" id="edit" value="2"  />
        <input name="time_id" type="hidden" id="time_id" value="<?php echo $time_id ?>" />
        
        <input name="edit_date" type="hidden" id="edit_date" value="<?php echo $edit_date ?>" />
        <br />
    </td>
  </tr>
  <tr>
    <td align="center">
      <input name="input" type="submit" value="Edit" class="imagebutton"  />
      <input name="button" type="button" class="imagebutton" id="button" onclick="MM_goToURL('parent','../hr_module/edit_timekeeping.php?edit_date=<?php echo $edit_date ?>&edit=0');return document.MM_returnValue"  value="Cancel" /></form>
    </td>
  </tr>
</table>

<script language="JavaScript" type="text/javascript" xml:space="preserve">
  var frmvalidator  = new Validator("form1");
  frmvalidator.EnableMsgsTogether();
  frmvalidator.addValidation("ProductSelect","req","Please select a product.");
  frmvalidator.addValidation("QuantityText","req","Please enter the quantity.");
    
    
    
   


  
</script>
</body>
</html>