<html>
<head>
<link href="../../css/pop_up style.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../css/jquery-ui.css" />
<link rel="stylesheet" href="../../css/jquery.autocomplete.css" type="text/css" />
<script src="../../js/jquery/jquery.js" type="text/javascript"></script>
<script src="../../js/jquery/jquery-1.8.2.js"></script>
<script src="../../js/jquery/jquery-ui.js"></script>
<script type="text/javascript" src="../../js/jquery/autocomplete_jquery_plugin.js"></script>
<script src="../../js/user_name_creation_ajax.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("staff_name").focus();
});
shortcut.add("Alt+d",function() 
{
	document.getElementById("designation").focus();
});

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

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

shortcut.add("Alt+u",function() 
{
	document.getElementById("user_name").focus();
});
shortcut.add("Alt+p",function() 
{
	document.getElementById("password").focus();
});

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


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

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


</script>
</head>
<?php
error_reporting(0);
$edit_id=$_GET['edit_id'];
include("../../include/db.php");

ob_start();
session_start();
//echo "dasf". $_SESSION['branch'];

if($_GET['edit_id']!='')
{
$user_table_display_style='style="display:inline;"';
} 
else
{
$user_table_display_styles='style="display:none;"';
}
 $id=$_GET[edit_id];
  $sql="select * from user_creation where user_id='$_GET[edit_id]'";
  $rs=mysql_query($sql);
  $rscount=mysql_num_rows($rs);
 
  while($rsdata=mysql_fetch_array($rs))
  {
	  $staff_name=$rsdata['staff_name'];
	  $staff_designation=$rsdata['staff_designation'];
	  $staff_ph_no=$rsdata['staff_ph_no'];
	  $staff_address=$rsdata['staff_address'];
	  $user_name=$rsdata['user_name'];
	  $password=$rsdata['password'];
	  $confirm_password=$rsdata['confirm_password'];
	  $user_type=$rsdata['user_type'];
	  $ac_type=$rsdata['acc_year'];
	  $status=$rsdata['status'];
	  $branch=$rsdata['branch'];
	  $jo_yr=$rsdata['join_year'];
  }
?>
<style type="text/css">
.txt{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size:13px;}

.style2 {color: #FF0000}
.style7{font-family: Tahoma, Arial, Helvetica, sans-serif;font-size: 13px;}
.headings{ font-family:verdana; font-size:10px;}
.style9 {font-size: 12}
.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: 250px;
    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%" height="44%" cellspacing="15" >
  <tr>
    <td valign="top">
   <!--Design Start--> 
   <!--Write Your Code Here--> 

    <table width="100%">
  <tr>
    <td colspan="5" class="txt" ><strong>Staff/User Creation</strong></td>
  </tr>
    <tr>
      <td colspan="5">&nbsp;</td>
    </tr>
    <tr>
      <td width="259" height="30" align="left" class="txt"><span style="color:#F00"><strong>S</strong></span>taff Name <span class="style2">*</span></td>
      <td class="field"><input type="text" name="staff_name" id="staff_name" class="types_class" tabindex="1" autofocus onKeyUp="user_clear_validate(this.value),enterevent(event,'designation','staff_name')" style="height:25px;" value="<?php if($_GET['edit_id']!='') { echo $staff_name; } ?>"  ><div id="staff_name_err_design" style="color:#F00"></div></td>
      <td width="294" align="left" class="txt"><span style="color:#F00"><strong>D</strong></span>esignation <span class="style2">*</span></td>
      <td class="field"><input type="text" name="designation" id="designation" class="types_class" tabindex="2" onKeyUp="user_clear_validate(this.value),enterevent(event,'ph_no','designation')" style="height:25px;" value="<?php if($_GET['edit_id']!='') { echo $staff_designation; } ?>"  ><div id="designation_err_design" style="color:#F00"></div>
      </td>
    </tr>
    <tr>
      <td height="47" align="left" class="txt"><span class="style2"><strong>M</strong></span>ob <span style="color:#000000">N</span>o <span class="style2">*</span></td>
      <td class="field"><input type="text" name="ph_no" id="ph_no" class="types_class" tabindex="3" autofocus maxlength="10" onKeyUp="user_clear_validate(this.value),enterevent(event,'staff_adres','ph_no')" style="height:25px;" value="<?php if($_GET['edit_id']!='') { echo $staff_ph_no; } ?>" onKeyPress="if ((event.keyCode &lt; 46) || (event.keyCode &gt; 57)) event.returnValue = false"><div id="mob_no_name_err_design" style="color:#F00"></div></td>
      <td align="left" class="txt"><span class="style2"><strong>A</strong></span>ddress</td>
      <td class="field"><textarea name="staff_adres" id="staff_adres" class="types_class" tabindex="4" style="width:200px; height:40px; text-align:left;" onKeyUp="enterevent(event,'user_name','staff_adres')">
	  <?php if($_GET['edit_id']!='') { echo $staff_address; } ?>
      </textarea>&nbsp;</td>
    </tr>
    <tr>
      <td height="30" align="left" class="txt"><span style="color:#F00"><strong>U</strong></span>ser Name <span class="style2">*</span>&nbsp;</td>
      <td class="field"><input type="text" name="user_name" id="user_name" class="types_class" tabindex="5" autofocus onKeyUp="user_clear_validate(this.value),enterevent(event,'branch_val','user_name')" style="height:25px;" value="<?php if($_GET['edit_id']!='') { echo $user_name; } ?>"  ><div id="user_name_err_design" style="color:#F00"></div></td>
      <td align="left">&nbsp;</td>
      <td class="field">&nbsp;</td>
    </tr>
    <tr>
  <td width="259" height="30" align="left" class="txt"><span class="txt" style="color:#F00"><strong>P</strong></span>assword <span class="style2">*</span></td>
  <td width="358" class="field"><input type="password" name="password" id="password" class="types_class" tabindex="7" onKeyUp="user_clear_validate(this.value),enterevent(event,'confirm_password','password')"  style="height:25px;" value="<?php if($_GET['edit_id']!='') { echo $password; } ?>" /><div id="password_name_err_design" style="color:#F00"></div></td>
  <td width="294" align="left" class="txt"><span class="txt" style="color:#F00"><strong>C</strong></span>onfirm Password <span class="style2">*</span></td>
  <td width="286" align="left"><span class="field"><input type="password" name="confirm_password" id="confirm_password" class="types_class" tabindex="8" onKeyUp="user_clear_validate(this.value),enterevent(event,'user_type','confirm_password')"  style="height:25px;" value="<?php if($_GET['edit_id']!='') { echo $confirm_password; } ?>" /><div id="confirm_password_err_design" style="color:#F00"></div>
    
  </span></td>
  </tr>
  <tr>
    <td width="259" height="31" align="left" class="field style9"><span class="txt">User <span class="style2"><strong>T</strong></span>ype<span class="style2">*</span></span></td>
    <td class="field"><select name="user_type" id="user_type" class="types_class" onChange="user_clear_validate(this.id),enterevent(event,'active','user_type')" style="width:200px; height:25px;" tabindex="9">
          <option value="">Select</option>
            <?php
			$sql1="select * from user_type where delete_status!='1'";
            $rs1=mysql_query($sql1);
            while($rsdata1=mysql_fetch_array($rs1))
            {
			  $user_type_id=$rsdata1['user_type_id'];
	          $user_types=$rsdata1['user_type'];
			?>
      <option value="<?php echo $user_type_id; ?>" <?php if($user_type== $user_type_id){ echo "Selected"; } ?>><?php echo $user_types; ?></option>
            <?php } ?>
          </select><div id="user_type_err_design" style="color:#F00"></div></td>
     <td height="30" align="left" class="txt"><span class="txt"> A</span>ctive <span class="style2">*</span>&nbsp;</td>
      <td colspan="3" class="field"><select name="active" id="active" class="types_class"  tabindex="10" onChange="user_clear_validate(this.value),enterevent(event,'action','active')" style="height:25px; width:100px;">
        <option value="">Select</option>
        <option value="Yes" <?php if($status == 'Yes') { ?> selected="selected";<?php } ?>>Yes</option>
        <option value="No" <?php if($status == 'No') { ?> selected="selected";<?php } ?>>No</option>
      </select><div id="active_err_designs" style="color:#F00"></div></td>
      </tr>
<tr>
  <td align="left" valign="top" class="field">&nbsp;</td>
  <td class="field" >&nbsp;</td>
  <td width="294" align="left">&nbsp;</td>
  <td width="286" align="left">&nbsp;</td>
</tr>
    <tr>
    <td height="35" colspan="5" class="txt"><span style="color:#F00; font-size:11px">&nbsp; Shortcut-Alt+Key</span></td>
  </tr>

        <tr>  
    <td colspan="7" class="style7" align="center"><input type="button" name="action"  style="height:25px; width:95px; background-color: #0171b9;color: #fff;border: 0px;" id="action" tabindex="11" value="<?php if($_GET['edit_id']!='') { echo "EDIT";  } else { echo "ADD"; } ?>" class="add_button" onClick="user_add(staff_name.value,designation.value,ph_no.value,staff_adres.value,user_type.value,user_name.value,password.value,confirm_password.value,active.value,'<?php echo $id;?>',this.value)"/>&nbsp;&nbsp;</td>
            </tr>
  </table>   
  <!--Design End-->  
</td>
  </tr>
</table>
</html>


 
      
      
     