<html>
<head>
<link rel="stylesheet" href="../../css/font.css" type="text/css" />

<link href="../../css/pop_up style.css" rel="stylesheet" type="text/css">

<script src="../../js/machine_creation_ajax.js"         type="text/javascript"></script>
<script src="../../js/jquery/jquery.js"         type="text/javascript"></script>
<script src="../../js/shortcut.js"  type="text/javascript"></script>
<script src="../../js/enter_event_ajax.js"       type="text/javascript"></script>

<script>
shortcut.add("Alt+f",function() 
{
	document.getElementById("from_place").focus();
});

shortcut.add("Alt+t",function() 
{
	document.getElementById("to_place").focus();
});

shortcut.add("Alt+k",function() 
{
	document.getElementById("kms").focus();
});

</script>
</head>
<?php
error_reporting(0);
$edit_id=$_GET['edit_id'];
include("../../include/db.php");
if($_GET['edit_id']!='')
{
$measurement_table_display_style='style="display:inline;"';
} 
else
{
$measurement_table_display_styles='style="display:none;"';
}
 
 $id=$_GET[edit_id];
  $sql="select * from machine_creation where id='$_GET[edit_id]'";
  $rs=mysql_query($sql);
  $rscount=mysql_num_rows($rs);
 
  while($rsdata=mysql_fetch_array($rs))
  {
	  $mach_type=$rsdata['mach_type'];
	  $machine_no=$rsdata['machine_no'];
	  $description=$rsdata['description'];
	  $system_no=$rsdata['system_no'];
  }
?>
<style type="text/css">
.style2 {color: #FF0000}
.style7{font-family: Tahoma, Arial, Helvetica, sans-serif;font-size: 13px;}
.headings{ font-family:verdana; font-size:10px;}
.txt{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size:13px;}
</style>
<style type="text/css">
<!--
.style1 {color: #FF0000}
.types_class { 
    height: 25px; 
    width: 200px; 
    background-color: transparent;  
    border-style: solid;  
    border-width: 0px 0px 1px 0px;  
    border-color:#CCC; 
    outline:0;
	font-size:14px;
  } 
  input:focus {  border-color:#87BB07; }
  select:focus {  border-color:#87BB07; } 
  textarea:focus {  border-color:#87BB07; } 
-->
</style>
    <table width="100%">
  <tr>
    <td height="26" colspan="6" class="txt" style="font-size:14px;"><strong>Machine Creation</strong></td>
  </tr>
  
  <tr>
    <td height="30" align="left" class="field"></td>
    <td align="left" class="txt"><span class="style1"><strong>M</strong></span>achine type&nbsp;<span class="style2 style1">*</span></td>
    <td class="style7 txt">
    <select name="mach_type" id="mach_type"  class="types_class" autofocus tabindex="1" style="height:25px;" onChange="machine_clear_validation(this.value),enterevent(event,'machine_no','mach_type')" >
      <option value="">Select</option>
      <option value="Printer" <?php if($mach_type == 'Printer') { ?> selected="selected";<?php } ?>>Printer</option>
      <option value="Fusing" <?php if($mach_type == 'Fusing') { ?> selected="selected";<?php } ?>>Fusing</option>
    </select>
    
    <div id="mach_type_validation_div" style="color:#F00"></div></td>
     
     
    <td class="style7">&nbsp;</td>
  </tr>
  <tr>
    <td height="37" align="left" class="field"></td>
    <td align="left" class="txt"><strong><span style="color: #F00">M</span></strong>achine No <span class="style2 style1">*</span>&nbsp;</td>
    <td class="style7"><input type="text" id="machine_no" name="machine_no"  tabindex="2" class="types_class" value="<?php echo $machine_no;?>" onKeypress="machine_clear_validation(this.value),enterevent(event,'system_no','mach_type')">
    
    <div id="machine_no_div" style="color:#F00"></div> </td>
       
    <td class="style7">&nbsp;</td>
  </tr>
  
  <tr>
    <td height="37" align="left" class="field"></td>
    <td align="left" class="txt"><strong><span style="color: #F00">S</span></strong>ystem No <span class="style2 style1">*</span>&nbsp;</td>
    <td class="style7"><input type="text" id="system_no" name="system_no"  tabindex="2" class="types_class" value="<?php echo $system_no;?>" onKeypress="enterevent(event,'description','machine_no')"></td>
    <td  >&nbsp;</td>
  </tr>
  <tr>
  <td width="106" height="37" align="left" class="field"></td>
  <td width="494" align="left" class="txt"><span class="style1"><strong>D</strong></span>escription&nbsp;<span class="style2 style1"></span></td>
    <td width="344" class="style7"><input type="text" name="description" id="description" tabindex="3"  class="types_class" value="<?php echo $description; ?>"  onKeypress="enterevent(event,'action','description')">
    <div id="description_div" style="color:#F00"> </div></td>

  <td  >&nbsp;</td>
  </tr>
<tr>
  <td height="34" valign="top" class="style7">&nbsp;</td>
  <td valign="top" class="style7">&nbsp;</td>
  <td valign="top"  >&nbsp;</td>
  <td  >&nbsp;</td>
  </tr>
    <tr>
    <td colspan="6">
    <span style="color:#F00" class="headings">&nbsp;&nbsp;&nbsp;</span></td>
  </tr>
        <tr>  
    <td colspan="8" class="style7" align="center">
    <input type="button" name="action"  id="action" tabindex="4" value="<?php if($_GET['edit_id']!='') {echo "EDIT";  } else {echo "ADD"; } ?>" class="add_button" 
    onClick="machine_entry_add(mach_type.value,machine_no.value,description.value,system_no.value,'<?php echo $id;?>',this.value)" style="background-color: #87BB07;
    color: #fff;
    border: 0px;
    padding: 10px 15px 8px;"  />&nbsp;&nbsp;</td>
            </tr>
  </table>   
</html>