<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/store_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+s",function() 
{
	document.getElementById("store_name").focus();
});

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

shortcut.add("Alt+d",function() 
{
	document.getElementById("description").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 store_creation where id='$_GET[edit_id]'";
  $rs=mysql_query($sql);
  $rscount=mysql_num_rows($rs);
 
  while($rsdata=mysql_fetch_array($rs))
  {
	  $store_name=$rsdata['store_name'];
	  $branch_name_id=$rsdata['branch_id'];
	  $description=$rsdata['description'];
	
  }
?>

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

.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;
  } 
  
</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;
}   
</style> 

<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
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>Store Creation</strong></td>
  </tr>
 
  <tr>
    <td width="106" height="30" align="left" class="field"></td>
    <td width="494" align="left" class="txt"><span class="style1"><strong>S</strong></span>tore Name&nbsp;<span class="style2 style1">*</span></td>
    <td width="344" class="style7 txt"><input type="text" name="store_name" id="store_name" autofocus class="types_class" tabindex="1" onKeyUp="store_clear_validation(this.value),enterevent(event,'branch_id','store_name')" style="height:26px;" value="<?php if($_GET['edit_id']!='') { echo $store_name; } ?>"><div id="store_name_validation_div" style="color:#F00"></div></td>
    <td width="344" class="style7">&nbsp;</td>
  </tr>
  <tr>
    <td height="37" align="left" class="txt"></td>
    <td align="left" class="txt"><span class="style1"><strong>B</strong></span>ranch Name<span class="style2 style1">*</span>&nbsp;</td>
    <td class="style7"><select id="branch_id" name="branch_id" style="width:200px; height:27px;" class="types_class" tabindex="2" onChange="store_clear_validation(this.value),enterevent(event,'description','branch_id')">
       <?php
			$sql1="select * from branch_creation where delete_status!='1' ";
            $rs1=mysql_query($sql1);
            while($rsdata1=mysql_fetch_array($rs1))
            {
			  $branch_name=$rsdata1['branch_name'];
	          $branch_id=$rsdata1['branch_id'];
			?>
            <option value="<?php echo $branch_id;?>" <?php if($branch_id== $branch_name_id){ echo "Selected"; } ?>><?php echo $branch_name;?></option>
 <?php } ?> 
  </select><div id="branch_name_validation_div" style="color:#F00"></div></td>
    <td class="style7">&nbsp;</td>
  </tr>
  <tr>
    <td height="34" valign="top" class="style7">&nbsp;</td>
    <td valign="top"  class="style7"><span class="txt"><span class="style1"><strong>D</strong></span>escription</span></td>
    <td  ><textarea name="description" id="description" cols="45" rows="5" class="types_class" tabindex="3"  style="width:200px; height:50px;" onKeyUp="store_clear_validation(this.value),enterevent(event,'action','description')"><?php if($_GET['edit_id']!='') { echo $description; } ?></textarea></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="store_entry_add(store_name.value,branch_id.value,description.value,'<?php echo $id;?>',this.value)" style="
    background-color: #0171b9;      color: #fff;      border: 0px;      
    padding: 9px 15px 9px;
">&nbsp;&nbsp;</td>
            </tr>
  </table>   
</html>