Current File : /home/obabain/anms_obaba_in/Employee.jsp
<%@include file="master.jsp"%>
 <%@include file="Connection.jsp" %> 
   

<%


 
ResultSet rs= null;
%>
<%@page import="java.sql.*,java.util.*"%>
<%@page import="java.sql.ResultSet"%>

<style type="text/css">
.highlight-error {
	border-color: red;
}
/* table, th, td {
    border: 1px solid black;
    width:30px;
} */

.inlineTable {
            display: inline-block;
        }

.panel-default>.panel-heading-custom {
	background: #ff0000;
	color: #fff;
}
.vr {
    width:10px;
    background-color:#000;
    position:absolute;
    top:0;
    bottom:0;
    left:150px;
}

</style>
<!-- <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">-->
<script
	src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script
	src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="
https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.5.20/jquery.datetimepicker.full.js"></script>
 
<body>
	<div class="row">
		
			<section id="main">
				<div class="container">
					<div class="row" style="width: 110%">
						<div class="col-md-10" style="width:88%;">
							<div class="panel panel-default">
								<div class="panel-heading main-color-bg">
									<h3 class="panel-title">Employee Details:</h3>
								</div>


<%-- <%!int id;Stringf_name,l_name,position,f_dDate,s_date,martial,state;ResultSet rs=null;%> --%>
<form action="" method="post" >
								
      
                                
 





								
								

								<div class="panel-body" style="background-color:#eae9e9;">

									
									
									<div class="row">
									


<!-- <label for="lastname" style="margin-left:48px;">Type &nbsp; :&nbsp;<a onclick="show('Page1');"><button type="button" class="btn btn-primary "style="margin:px;">Payment</button></a>&nbsp;<a onclick="show('Page2');"><button type="button" class="btn btn-primary"style="margin:px;">Refund</button></a></label>	<br> -->			
												
<%-- <label for="lastname" style="margin-left:50px;">Type  &nbsp; &nbsp;   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :&nbsp;<%=l_name%></label>  --%>
								
							
				</div>
					
                                  <div class="column">
   <div id="Page1" class="page" style="display:">
 <div class="panel-body">
 <!--  <b style="float:left;color:#0071df;margin-top:-20px;">PayGST :</b> -->
         
<a href="View_Employee.jsp"><input type="button" value="View " style="background:#009191;margin-right:15px;float:right;margin-top:-10px;" class="btn btn-info"  /></a>

 
    <b>Personal Details:</b> <hr>   
  <table>
  
        <tr>  
    <td class="tdLabel"><label for="" style="margin-left:35px">First Name:&nbsp;</label></td>  
    <td><input type="text" name="f_name"   placeholder="First Name" id="datetimepicker" style="width:160px;margin-top:-1px;height:28px;border-radius:5px;border:1px solid #ccc;"/></td>
        
        <td class="tdLabel"><label for="" style="margin-left:60px" >Last Name&nbsp;&emsp;:</label></td>  
    <td><input type="text" name="l_name" value="" id="register_name" style="width:160px;height:25px;margin-top:-1px;height:28px;border-radius:5px;border:1px solid #ccc;"/></td>   
       
        <td class="tdLabel"><label for="" style="margin-left:80px" >Position:&nbsp;</label></td>  
    <td><input type="text" name="position" value="" id="register_name" style="width:160px;height:25px;margin-top:-1px;height:28px;border-radius:5px;border:1px solid #ccc;"/></td>   
         
        
        </tr>
        </table><br>
 <table>
        <tr>  
        <td class="tdLabel"><label for="" style="margin-left:35px">Start Date&nbsp; :</label></td>  
    
    <td><input type="date" name="s_date" value="" id="register_name" style="width:160px;margin-top:-1px;margin-left:3px;height:28px;border-radius:5px;border:1px solid #ccc;"/></td>
    
    <td class="tdLabel"><label for="" style="margin-left:55px">Gender&nbsp;&nbsp;&nbsp;&emsp;&emsp;:&nbsp;</label></td>  
<td><!-- <input type="text" name="gender" value="" id="register_name" style="width:160px;margin-top:-1px;margin-left:-1px"/> -->
<select name="gender" style="width:160px;height:25px;height:31px;border-radius:5px;border:1px solid #ccc;">
					<option>Select</option>
					<option>Male</option>
					<option>Female</option>
					
				</select>


</td>
        
        <td class="tdLabel"><label for="" style="margin-left:80px" >Martial&nbsp;&nbsp; :&nbsp; </label></td>  
    <td><select name="martial" style="width:160px;height:25px;height:28px;border-radius:5px;border:1px solid #ccc;">
					<option>Select</option>
					<option>Single</option>
					<option>Married</option>
					
				</select></td>   
        
        
        </tr>
        </table><br>
      
<script type="text/javascript">

function s_dateOnly(id) {
    var element = document.getElementById(id);
    var regex = /[^0-9]/gi;
    element.value = element.value.replace(regex, "");
}
1
function s_dateOnly(id) {
2
    var element = document.getElementById(id);
3
    var regex = /[^0-9]/gi;
4
    element.value = element.value.replace(regex, "");
5
}


</script>


         <table>
  
        <tr>  
    <td class="tdLabel"><label for="Address" style="margin-left:38px">State&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;:&nbsp;</label></td>  
    <td><input type="text" name="state" value="" id="register_name" style="width:160px;margin-top:-1px;height:28px;border-radius:5px;border:1px solid #ccc;"/></td>
        
        <td class="tdLabel"><label for="" style="margin-left:58px" >Date&nbsp;of&nbsp;Birth&nbsp;:&nbsp;</label></td>  
    <td><input type="date" name="dob" value="" id="register_name" style="width:160px;height:25px;margin-top:-1px;height:28px;border-radius:5px;border:1px solid #ccc;"/></td> 
      
         <td class="tdLabel"><label for="" style="margin-left:80px">Pincode :&nbsp;</label></td>  
  <td><input  type="text" maxlength="6" name="pincode"  style="width:160px;margin-top:-1px;margin-left:px;height:28px;border-radius:5px;border:1px solid #ccc;" oninput="s_dateOnly(this.id);" /></td>
    
        
        </tr>
        </table><br>
 
 <table>
        <tr>  
    <td class="tdLabel"><label for="" style="margin-left:40px">Mobile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :</label></td>  
    <td><input type="text" name="mobile" value="" id="register_name" style="width:160px;margin-top:-1px;margin-left:5px;height:28px;border-radius:5px;border:1px solid #ccc;"Maxlength="10" oninput="s_dateOnly(this.id);"/></td>
        
        <td class="tdLabel"><label for="" style="margin-left:58px" >Email&emsp;&emsp;&emsp;&nbsp;&nbsp;:&nbsp;</label></td>  
    <td><input type="text" name="email" value="" id="register_name" style="width:160px;height:25px;margin-top:-1px;margin-left:px;height:28px;border-radius:5px;border:1px solid #ccc;"/></td>   
        
        
        <td class="tdLabel"><label for="" style="margin-left:80px" >Address&nbsp;:&nbsp;</label></td>  
 <td><!-- <input type="text" name="position" value="" id="register_name" style="width:160px;margin-top:-1px;margin-left:-2px"/> -->
		<textarea class="form-control"name="address" rows="1" cols="17"></textarea>			
					
				</td>   
        </tr>
        </table><hr>
      <b>Bank Details:</b>
        
     <table>
     
        <tr>  
    <td class="tdLabel"><label for="" style="margin-left:80px;margin-top:10px; ">Bank&nbsp;Name&nbsp;&nbsp;:</label></td>  
    <td><input type="text" name="BankName" value="" id="register_name" style="width:160px;margin-top:-1px;margin-left:5px;height:28px;border-radius:5px;border:1px solid #ccc;"/></td>
        
        <td class="tdLabel"><label for="" style="margin-left:122px" >Branch&emsp;&emsp;&emsp;&nbsp;&nbsp;:&nbsp;</label></td>  
    <td><input type="text" name="Branch" value="" id="register_name" style="width:160px;height:25px;margin-top:-1px;margin-left:px;height:28px;border-radius:5px;border:1px solid #ccc;"/></td>   
        
        
        </tr>
        </table> <br>
         <table>
  
        <tr>  
    <td class="tdLabel"><label for="" style="margin-left:79px">Account&nbsp;No&nbsp;&nbsp;:&nbsp;</label></td>  
    <td><input type="text" name="AccountNo" value="" id="register_name" style="width:160px;margin-top:-1px;height:28px;border-radius:5px;border:1px solid #ccc;"/></td>
        
        <td class="tdLabel"><label for="" style="margin-left:120px" >Account&nbsp;Name&nbsp;:&nbsp;</label></td>  
    <td><input type="text" name="AccountName" value="" id="register_name" style="width:160px;height:25px;margin-top:-1px;height:28px;border-radius:5px;border:1px solid #ccc;"/></td>   
        
        
        </tr>
        </table>

</div>
    
  	</div>    

                 <!-- <div class="col-md-10"> -->
                <div class="modal-footer" >

       <!--  <a class="btn btn-info" href="FiscalTaxPayment.jsp" style="background:#204b58">Enter Payment</a>
          <button type="submit" style="background:#204b58" class="btn btn-info" >Delete</button>   
 </div>
 <a class="btn btn-info" href="ModifyFiscalTax.jsp"  style="background:#204b58 ;margin-left:100px;" class="btn btn-info">Modify </a> -->
 <a href="<%-- <%=rs.getString("f_id")%>"> --%>"><input type="button" value="Back" style="background:#009191;margin-right:680px" class="btn btn-info" /></a>
          <a class="btn btn-default"  href="#">Reset</a>
      <!--  <button type="submit" style="background:#204b58" class="btn btn-info" >Save Changes</button>-->
         <input type="submit" style="background:#009191;" class="btn btn-info" value="Save Changes">
 	
</div>                                
<!-- </div> -->
                                                  
          <!-- -----  Refund start -->  
          
     	
  
									
	                               
                                
                                
                                
							</form>
							
	
   <%
String f_name=request.getParameter("f_name");
String l_name=request.getParameter("l_name");
String position=request.getParameter("position");
String s_date=request.getParameter("s_date");
String gender=request.getParameter("gender");
String martial=request.getParameter("martial");
String state=request.getParameter("state");
String dob=request.getParameter("dob");
String pincode=request.getParameter("pincode");
String mobile=request.getParameter("mobile");
String email=request.getParameter("email");
String address=request.getParameter("address");
String BankName=request.getParameter("BankName");
String Branch=request.getParameter("Branch");
String AccountNo=request.getParameter("AccountNo");
String AccountName=request.getParameter("AccountName");
try
{
	if(f_name!=null||f_name.length()!=0){
	
		Statement st=con.createStatement();
	 st=con.createStatement();
int i=st.executeUpdate("insert into employee_table(f_name,l_name,position,s_date,gender,martial,state,dob,pincode,mobile,email,address,BankName,Branch,AccountNo,AccountName)values('"+f_name+"','"+l_name+"','"+position+"','"+s_date+"','"+gender+"','"+martial+"','"+state+"','"+dob+"','"+pincode+"','"+mobile+"','"+email+"','"+address+"','"+BankName+"','"+Branch+"','"+AccountNo+"','"+AccountName+"')");
out.println("");
}}
catch(Exception e)
{
System.out.print(e);
e.printStackTrace();
}
%>    						
							
							
							
							
					
					</div>
				</div>
	</div>
	
	</section>
	<%-- <% }else{ 
     response.sendRedirect("login.jsp");
    } %> --%>
	<script src="http://cdn.ckeditor.com/4.6.1/standard/ckeditor.js"></script>
	<script src="http://cdn.ckeditor.com/4.6.1/standard/ckeditor.js"></script>

	<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
	<script
		src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
	<script
		src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
	<script
		src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
	
	
	</div>
</body>
</html>