<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/ratefix_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+p",function() 
{
	document.getElementById("place_name").focus();
});

shortcut.add("Alt+m",function() 
{
	document.getElementById("measre_qty").focus();
});
shortcut.add("Alt+r",function() 
{
	document.getElementById("rate").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 place_ratefix where id='$_GET[edit_id]'";
  $rs=mysql_query($sql);
  $rscount=mysql_num_rows($rs);
 
  while($rsdata=mysql_fetch_array($rs))
  {
	  $place=$rsdata['place'];
	  $id=$rsdata['id'];
	  $measurement=$rsdata['measurement'];
	  $rate=$rsdata['rate'];
  }
?>

<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;}

</style>
<style type="text/css">
<!--
.txt{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size:13px;}
.types_class { 
    height: 25px; 
    width: 350px; 
    background-color: transparent;  
    border-style: solid;  
    border-width: 0px 0px 1px 0px;  
    border-color:#CCC; 
    outline:0;
	font-size:14px;
  } 
-->
</style>

<style> 
.textboxs {
    height: 25px;
    width: 275px;
    border: solid 1px #E5E5E5;
    outline: 0;
    font: normal 13px/100% Verdana, Tahoma, sans-serif;
    background: #FFFFFF url('bg_form.png') left top repeat-x;
    background: -webkit-gradient(linear, left top, left 25, from(#FFFFFF), color-stop(4%, #EEEEEE), to(#FFFFFF));
    background: -moz-linear-gradient(top, #FFFFFF, #EEEEEE 1px, #FFFFFF 25px);
    box-shadow: rgba(0, 0, 0, 0.1) 0 0 8px;
    -moz-box-shadow: rgba(0, 0, 0, 0.1) 0 0 8px;
    -webkit-box-shadow: rgba(0, 0, 0, 0.1) 0 0 8px;
}

.textbox:focus {
    border-color: #C9C9C9;
    -webkit-box-shadow: rgba(0, 0, 0, 0.15) 0 0 8px;
}   
input:focus {  border-color:#0171b9; }
 select:focus {  border-color:#0171b9; } 
 textarea:focus {  border-color:#0171b9; } 
</style> 

    <table width="100%" >
  <tr>
    <td height="26" colspan="6" class="txt" style="font-size:14px;"><strong>Place Ratefix</strong></td>
  </tr>
<tr>

  <td width="106" height="37" align="left" class="field"></td>
  <td width="494" align="left" class="txt"><span class="style2"><strong>P</strong></span>lace Name <span class="style2">*</span></td>
  
  <td width="344" class="style7"> <select id="place_name" name="place_name"  tabindex="1"style="width:160px; height:26px;" class="types_class" autofocus onChange="rate_fix_clear_validation(this.value),enterevent(event,'measre_qty','place_name')">
       <?php
			$sql1="select * from place_creation ";
            $rs1=mysql_query($sql1);
            while($rsdata1=mysql_fetch_array($rs1))
            {
			  $location=$rsdata1['location'];
	          $place_id=$rsdata1['id'];
			?>
            <option value="<?php echo $place_id;?>" <?php if($place_id== $place){ echo "Selected"; } ?>><?php echo $location;?></option>
 <?php } ?> 
  </select><div id="place_name_validation_div" style="color:#F00"></div></td>
  <td width="344" class="style7">&nbsp;</td>
  </tr>
<tr>
  <td width="106" height="37" align="left" class="field"></td>
  <td width="494" align="left" class="txt"><span class="style2"><strong>M</strong></span>easurement Qty <span class="style2">*</span></td>
  
  <td width="344" class="style7"> <select id="measre_qty" name="measre_qty"  tabindex="2"style="width:160px; height:26px;" class="types_class" onChange="rate_fix_clear_validation(this.value),enterevent(event,'rate','measre_qty')">
       <?php
			$sql1="select * from measurement_creation";
            $rs1=mysql_query($sql1);
            while($rsdata1=mysql_fetch_array($rs1))
            {
			  $measurement_name=$rsdata1['measurement_name'];
	          $measure_id=$rsdata1['id'];
			?>
            <option value="<?php echo $measure_id;?>" <?php if($measure_id == $measurement){ echo "Selected"; } ?>><?php echo $measurement_name;?></option>
 <?php } ?> 
  </select><div id="measre_qty_validation_div" style="color:#F00"></div></td>
  <td width="344" class="style7">&nbsp;</td>
  </tr>
<tr>

  <td width="106" height="37" align="left" class="field"></td>
  <td width="494" align="left" class="txt"><span class="style2"><strong>R</strong></span>ate <span class="style2">*</span></td>
  
  <td width="344" class="style7"><input type="text" id="rate" name="rate"  tabindex="3"class="types_class" style="width:160px; height:26px;" onKeyUp="rate_fix_clear_validation(this.value),enterevent(event,'action','rate')" value="<?php if($_GET['edit_id']!=''){echo $rate; } else { } ?>" >
    <div id="rate_validation_div" style="color:#F00"></div></td>
  <td width="344" class="style7">&nbsp;</td>
  </tr>
<tr>

  <td  valign="top" class="style7">&nbsp;</td>
  <td  valign="top" class="style7">&nbsp;</td>
  </tr>

<tr>

  <td valign="top" class="style7">&nbsp;</td>
  <td valign="top" class="style7">&nbsp;</td>
  </tr>
    <tr>
    <td colspan="6">
    <span style="color:#F00" class="headings">&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="place_ratefix_main(place_name.value,measre_qty.value,rate.value,'<?php echo $id;?>',this.value)"style="
    background-color: #0171b9;      color: #fff;      border: 0px;      
    padding: 9px 15px 9px;
">&nbsp;&nbsp;</td>
            </tr>
  </table>   
</html>