ok
Direktori : /proc/thread-self/root/home2/selectio/www/obnovit-tracking/old/ |
Current File : //proc/thread-self/root/home2/selectio/www/obnovit-tracking/old/employee-add.php |
<?php include "header.php";?> <div class="content-wrapper" style="background:white;"> <div class="clearfix"></div> <section class="content"> <div class="row"> <div class="col-xs-12"> <div> <div class="box-header"> <h3 class="box-title"><b><i class="fa fa-list"></i> Create Employee: </b></h3> </div> <div class="box-body" style="padding: 0px;"> <div class="col-lg-12" style="padding: 0px;"> <form action="" enctype="multipart/form-data" id="register_form" method="post" accept-charset="utf-8"> <div class="col-lg-6" > <div style="padding: 10px;border: 1px solid brown;border-style: dashed;"> <center><h5 class="box-title"><b><i class="fa fa-user"></i> Employee Personal Information </b></h5></center> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="required" for="name">Name</label> <input type="text" name="name" placeholder="Name" class="form-control tip" id="name" required="required" /> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="fname">Father Name</label> <input type="text" name="fname" placeholder="Father Name" class="form-control tip" id="fname" required="required" /> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="dob">Date of Birth</label> <input type="date" name="dob" placeholder="Date of Birth" class="form-control tip" id="dob" required="required" /> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="category">Gender</label> <select name="category" class="form-control tip select2"> <option value="1">Male</option> <option value="2">Female</option> <option value="3">Other</option> </select> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="mobile">Mobile No</label> <input type="number" onKeyPress="if(this.value.length==10) return false;" name="mobile" placeholder="Mobile No" class="form-control tip" id="mobile" required="required" /> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="altermolbile">Alternate Mobile Number</label> <input type="number" onKeyPress="if(this.value.length==10) return false;" name="altermolbile" placeholder="Alternate Mobile Number" class="form-control tip" id="altermolbile" required="required" /> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="adress">Local Address</label> <textarea name="adress" placeholder="Local Address" rows="3" class="form-control tip" id="adress" required="required"></textarea> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="permanentadress">Permanent Address</label> <textarea name="permanentadress" placeholder="Permanent Address" rows="3" class="form-control tip" id="permanentadress" required="required"></textarea> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="aadhar"> Aadhar No</label> <input type="text" name="aadhar" placeholder="Enter Your Aadhar No" class="form-control tip" id="aadhar" required="required" /> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="national">Nationality</label> <input type="text" name="national" placeholder="Nationality" class="form-control tip" id="national" required="required" /> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="status1">Married Status</label> <select name="status1" class="form-control tip select2"> <option value="1">Single</option> <option value="2">Married</option> <!--<option value="1">Team Leader</option>--> </select> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="photo">Photo</label> <input type="file" name="photo" placeholder="Nationality" class="form-control tip" id="photo" /> </div><span style="color: red;" id="photospan"></span> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="comment">Comment</label> <textarea name="comment" placeholder="Enter Comment" rows="3" class="form-control tip" id="comment" required="required"></textarea> </div> </div> </div> </div> <div style="margin-top:20px;padding: 10px;border: 1px solid brown;border-style: dashed;"> <center><h5 class="box-title"><b><i class="fa fa-user"></i> Document Details </b></h5></center> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="resume">Resume</label> <input type="file" name="resume" placeholder="Resume" class="form-control tip" id="resume" /> </div><span style="color: red;" id="resumespan"></span> </div> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="offer_letter">Offer Letter</label> <input type="file" name="offer_letter" placeholder="Offer Letter" class="form-control tip" id="offer_letter" /> </div><span style="color: red;" id="offer_letterspan"></span> </div> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="joining_leter">Joining Letter</label> <input type="file" name="joining_leter" placeholder="Joining Letter" class="form-control tip" id="joining_leter" /> </div><span style="color: red;" id="joining_leterspan"></span> </div> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="contract">Contract & Aggrement</label> <input type="file" name="contract" placeholder="Contract" class="form-control tip" id="contract" /> </div><span style="color: red;" id="contractspan"></span> </div> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="certificate10">10 Certificate</label> <input type="file" name="certificate10" placeholder="Contract" class="form-control tip" id="certificate10" /> </div><span style="color: red;" id="certificate10span"></span> </div> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="certificate12">12 Certificate</label> <input type="file" name="certificate12" placeholder="Contract" class="form-control tip" id="certificate12" /> </div><span style="color: red;" id="certificate12span"></span> </div> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="certificateug">UG Certificate</label> <input type="file" name="certificateug" placeholder="Contract" class="form-control tip" id="certificateug" /> </div><span style="color: red;" id="certificateugspan"></span> </div> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="certificatepg">PG Certificate</label> <input type="file" name="certificatepg" placeholder="Contract" class="form-control tip" id="certificatepg" /> </div><span style="color: red;" id="certificatepgspan"></span> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="docaddress"> Address</label> <input type="file" name="docaddress" placeholder="Contract" class="form-control tip" id="docaddress" /> </div><span style="color: red;" id="docaddressspan"></span> </div> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="pancard">Pan Card</label> <input type="file" name="pancard" placeholder="Contract" class="form-control tip" id="pancard" /> </div><span style="color: red;" id="pancardspan"></span> </div> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="proof">Other Proof's</label> <input type="file" name="proof" placeholder="Other Proof's" class="form-control tip" id="proof" /> </div><span style="color: red;" id="proofspan"></span> </div> </div> </div> </div> <div class="col-lg-6" > <div style="padding: 10px;border: 1px solid brown;border-style: dashed;"> <center><h5 class="box-title"><b><i class="fa fa-user"></i> Account Login Details </b></h5></center> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="required" for="role1">Role</label> <!--<input type="text" name="role1" placeholder="Enter Your Role" class="form-control tip" id="role1" required="required" />--> <select name="role1" class="form-control tip select2"> <option value="1">Manager</option> <option value="2">Project Manager</option> <option value="3">Team Leader</option> </select> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="email">Email Id</label> (Unique email id required) <input type="email" name="email" placeholder="Email Id" class="form-control tip" id="email" required="required" /> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="password">Password</label> <input type="password" name="password" placeholder="Password" class="form-control tip" id="password" required="required" /> </div> </div> </div> </div> <div style="margin-top:20px;padding: 10px;border: 1px solid brown;border-style: dashed;"> <center><h5 class="box-title"><b><i class="fa fa-user"></i> Company Details </b></h5></center> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="required" for="employeeid">Employee Id</label> <input type="text" name="employeeid" placeholder="Employee Id" class="form-control tip" id="employeeid" required="required" readonly/> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="Department">Department</label> <select name="department" id="department" class="form-control tip select2"> <?php $statement = $pdo->prepare("SELECT * FROM tbl_departement"); $statement->execute(); $result = $statement->fetchAll(PDO::FETCH_ASSOC); foreach ($result as $data) { echo "<option value=".$data['id'].">".$data['departement']."</option>"; }?> </select> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="desgination">Designation</label> <select name="desgination" id="desgination" class="form-control tip "> <option value="">Select Department First</option> </select> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="joiningdate">Date of Joining</label> <input type="date" name="joiningdate" placeholder="Date of Joining" class="form-control tip" id="joiningdate" required="required" /> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="required" for="companystatus">Status</label> <select class="form-control tip select2"> <option value="1">Active</option> <option value="1">Inactive</option> </select> </div> </div> </div> </div> <div style="margin-top:20px;padding: 10px;border: 1px solid brown;border-style: dashed;"> <center><h5 class="box-title"><b><i class="fa fa-user"></i> Finacial Details </b></h5></center> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="required" for="pftype">BF Type</label> <select name="pftype" class="form-control tip select2"> <option value="2">PF Account</option> <option value="1">Non-PF Account</option> </select> </div> </div> <div class="col-md-6"> </div> </div> </div> <div style="margin-top:20px;padding: 10px;border: 1px solid brown;border-style: dashed;"> <center><h5 class="box-title"><b><i class="fa fa-user"></i> Bank Account Details Details </b></h5></center> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="accontername">Account Holder Name</label> <input type="text" name="accontername" placeholder="Account Holder Name" class="form-control tip" id="accontername" /> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="account_number">Account Number</label> <input type="text" name="account_number" placeholder="Account Number" class="form-control tip" id="account_number" /> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="bankname">Bank Name</label> <input type="text" name="bankname" placeholder=" Enter Bank Name" class="form-control tip" id="bankname" /> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="branch">Branch</label> <input type="text" name="branch" placeholder="Enter Bank Branch" class="form-control tip" id="branch" /> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="bankcode">Bank Code</label> <input type="text" name="bankcode" placeholder="Enter Bank Code" class="form-control tip" id="bankcode" /> </div> </div> </div> </div> <div style="margin-top:20px;padding: 10px;border: 1px solid brown;border-style: dashed;"> <center><h5 class="box-title"><b><i class="fa fa-user"></i> Update Basic Pay Details </b></h5></center> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="optional" for="basicpay">Basic Pay</label> <input type="number" name="basicpay" placeholder="Enter Basic Salery" class="form-control tip" id="basicpay" required/> </div> </div> </div> </div> </div> <div class="row"><div class="col-lg-12" style="padding: 0px;"><br> <div class="form-group" style="text-align:center;"> <input type="submit" name="add_employee" value="Add Employee" class="btn btn-success" /> </form> </div></div></div> </div> <div class="form-group" style="text-align:center;"> <a href="employee-add.php"><button class="btn btn-primary" ><i class="fa fa-refresh"></i> Reset Form</button></a> <a href="employee.php"><button class="btn btn-warning" ><i class="fa fa-chevron-left"></i> Back to List</button></a> </div> <div class="clearfix"></div> </div> </div> </div> </div> </section> <script> var photo = document.getElementById("photo"); var resume = document.getElementById("resume"); photo.onchange = function() { $('#photospan').text(''); if(this.files[0].size > 1000141){ $('#photospan').text('Photo Image Maximum 1 mb Allowed'); alert("photo File is too big!"); this.value = ""; }; }; resume.onchange = function() { $('#resumespan').text(''); if(this.files[0].size > 1000141){ $('#resumespan').text('Resume Image Maximum 1 mb Allowed'); alert("File is too big!"); this.value = ""; }; }; offer_letter.onchange = function() { $('#offer_letterspan').text(''); if(this.files[0].size > 1000141){ $('#offer_letterspan').text('Offer Letter Image Maximum 1 mb Allowed'); alert("File is too big!"); this.value = ""; }; }; joining_leter.onchange = function() { $('#joining_leterspan').text(''); if(this.files[0].size > 1000141){ $('#joining_leterspan').text('Joining Letter Image Maximum 1 mb Allowed'); alert("File is too big!"); this.value = ""; }; }; contract.onchange = function() { $('#contractspan').text(''); if(this.files[0].size > 1000141){ $('#contractspan').text('Contract Image Maximum 1 mb Allowed'); alert("File is too big!"); this.value = ""; }; }; certificate10.onchange = function() { $('#certificate10span').text(''); if(this.files[0].size > 1000141){ $('#certificate10span').text('10 Certificate Image Maximum 1 mb Allowed'); alert("File is too big!"); this.value = ""; }; }; certificate12.onchange = function() { $('#certificate12span').text(''); if(this.files[0].size > 1000141){ $('#certificate12span').text('12 Certificate Image Maximum 1 mb Allowed'); alert("File is too big!"); this.value = ""; }; }; certificateug.onchange = function() { $('#certificateugspan').text(''); if(this.files[0].size > 1000141){ $('#certificateugspan').text('UG Certificate Image Maximum 1 mb Allowed'); alert("File is too big!"); this.value = ""; }; }; certificatepg.onchange = function() { $('#certificatepgspan').text(''); if(this.files[0].size > 1000141){ $('#certificatepgspan').text('PG Certificate Image Maximum 1 mb Allowed'); alert("File is too big!"); this.value = ""; }; }; docaddress.onchange = function() { $('#docaddressspan').text(''); if(this.files[0].size > 1000141){ $('#docaddressspan').text('Address Document Image Maximum 1 mb Allowed'); alert("File is too big!"); this.value = ""; }; }; pancard.onchange = function() { $('#pancardspan').text(''); if(this.files[0].size > 1000141){ $('#pancardspan').text('Pan Card Image Maximum 1 mb Allowed'); alert("File is too big!"); this.value = ""; }; }; proof.onchange = function() { $('#proofspan').text(''); if(this.files[0].size > 1000141){ $('#proofspan').text('Other Proof Image Maximum 1 mb Allowed'); alert("File is too big!"); this.value = ""; }; }; $(document).ready(function(){ get_desgination(); $("#department").change(function () { get_desgination(); }); function get_desgination(){ $('#desgination').empty(); var departement_id=$('#department').val(); $.ajax({ url: 'api/get-desgination-api.php', type: 'post', dataType: 'json', data: {type:'get_desgination',departement_id:departement_id}, success: function (response) { console.log(response); if(response['error']==false){ var m=''; for(var n=0;n<response['data'].length;n++){ m+='<option value='+response['data'][n]['id']+'>'+response['data'][n]['desgination']+'</option>'; } $('#desgination').append(m); } } }); } $('#register_form').on('submit', function(e){ e.preventDefault(); console.log('Form Submitted U can Enable Payment Option...'); var formData = new FormData(this); formData.append('type', 'create_employe'); $.ajax({ url: 'api/create-employee-api.php', type: 'post', dataType: 'json', data: formData, cache: false, contentType: false, processData: false, enctype: 'multipart/form-data', success: function (response) { console.log(response); if(response['status']==200){ //put success coode alert(response['message']); $('#register_form').trigger("reset"); }else{ //put falied code alert(response['message']); } } }); }); }); </script> <script> </script> <?php include "footer.php";?>