whoami7 - Manager
:
/
home
/
gracious
/
hris.graciousphils.com
/
backup hris employee
/
Upload File:
files >> /home/gracious/hris.graciousphils.com/backup hris employee/registrationbackup.php
<?php include('includes/config.php'); if(isset($_POST['update'])) { $empid=$_POST['empcode']; $nickname=$_POST['nickname']; $fname=utf8_decode($_POST['firstName']); $mname=utf8_decode($_POST['middlename']); $lname=utf8_decode($_POST['lastName']); $suffix=utf8_decode($_POST['suffix']); $gender=$_POST['gender']; $civilstats=$_POST['civilstats']; $dob=$_POST['dob']; $mobileno=$_POST['phone']; $mobileno2=$_POST['phone2']; $height=$_POST['height']; $weight=$_POST['weight']; $religion=$_POST['religion']; $address=$_POST['address']; $address2=$_POST['address2']; $sss=$_POST['sss']; $pagibig=$_POST['pagibig']; $philhealth=$_POST['philhealth']; $tin=$_POST['tin']; $schoolname=$_POST['schoolname']; $datefrom=$_POST['datefrom']; $dateto=$_POST['dateto']; $secschoolname=$_POST['secschoolname']; $secdatefrom=$_POST['secdatefrom']; $secdateto=$_POST['secdateto']; $hsecschoolname=$_POST['hsecschoolname']; $strand=$_POST['strand']; $hsecdatefrom=$_POST['hsecdatefrom']; $hsecdateto=$_POST['hsecdateto']; $terschoolname=$_POST['terschoolname']; $degree=$_POST['degree']; $terdatefrom=$_POST['terdatefrom']; $terdateto=$_POST['terdateto']; $otherschoolname=$_POST['otherschoolname']; $otherdegree=$_POST['otherdegree']; $otherdatefrom=$_POST['otherdatefrom']; $otherdateto=$_POST['otherdateto']; $fathername=utf8_decode($_POST['fathername']); $foccupation=$_POST['foccupation']; $fbirthday=$_POST['fbirthday']; $ftelnum=$_POST['ftelnum']; $mothername=utf8_decode($_POST['mothername']); $moccupation=$_POST['moccupation']; $mbirthday=$_POST['mbirthday']; $mtelnum=$_POST['mtelnum']; $spousename=utf8_decode($_POST['spousename']); $soccupation=$_POST['soccupation']; $sbirthday=$_POST['sbirthday']; $stelnum=$_POST['stelnum']; $scompany=$_POST['scompany']; $incasename=utf8_decode($_POST['incasename']); $incasetelnum=$_POST['incasetelnum']; $incaseaddress=$_POST['incaseaddress']; $incaserelation=$_POST['incaserelation']; $status=1; $comp=$_POST['comp']; $dept=$_POST['dept']; $position=$_POST['position']; $poslevel=$_POST['poslevel']; $natureofemployment=$_POST['natureofemployment']; $emplevel = $_POST['emplevel']; $area=$_POST['area']; if ($_POST['poslevel'] == 1.1) { $position = $_POST['position'] = 'Staff'; }elseif ($_POST['poslevel'] == 1.2) { $position = $_POST['position'] = 'Executive Secretary'; }elseif($_POST['poslevel'] == 2) { $position = $_POST['position'] = 'Account Officer'; }elseif($_POST['poslevel'] == 3.1){ $position = $_POST['position'] = 'Department Officer'; }elseif($_POST['poslevel'] == 3.2){ $position = $_POST['position'] = 'Area Manager'; }elseif ($_POST['poslevel'] == 4.1) { $position = $_POST['position'] = 'Information Technology Head'; }elseif ($_POST['poslevel'] == 4.2){ $position = $_POST['position'] = 'Audit Head'; }elseif ($_POST['poslevel'] == 4.3){ $position = $_POST['position'] = 'Operations Head Faithful'; }elseif ($_POST['poslevel'] == 4.4){ $position = $_POST['position'] = 'HR Head'; }elseif ($_POST['poslevel'] == 4.5){ $position = $_POST['position'] = 'Operations Head Fast Cash'; }elseif ($_POST['poslevel'] == 5.1){ $position = $_POST['position'] = 'Operations Head Gracious'; }elseif ($_POST['poslevel'] == 5.2){ $position = $_POST['position'] = 'Finance and Admin Head'; }elseif ($_POST['poslevel'] == 5.3){ $position = $_POST['position'] = 'Operations Assistant'; }elseif ($_POST['poslevel'] == 0.1){ $position = $_POST['position'] = 'Trainee'; }elseif ($_POST['poslevel'] == 0.2){ $position = $_POST['position'] = 'OJT'; }elseif ($_POST['poslevel'] == 0.3){ $position = $_POST['position'] = 'Intern'; }else{ $position = $_POST['position'] = 'Project Base'; } if ($_POST['emplevel'] == 0.1) { $natureofemployment = $_POST['natureofemployment'] = 'Training'; }elseif ($_POST['emplevel'] == 0.2) { $natureofemployment = $_POST['natureofemployment'] = 'Intern'; }elseif ($_POST['emplevel'] == 0.3) { $natureofemployment = $_POST['natureofemployment'] = 'Project Base'; }elseif ($_POST['emplevel'] == 0.4) { $natureofemployment = $_POST['natureofemployment'] = 'Contractual'; }elseif ($_POST['emplevel'] == 0.5) { $natureofemployment = $_POST['natureofemployment'] = 'OJT'; }elseif ($_POST['emplevel'] == 1.1) { $natureofemployment = $_POST['natureofemployment'] = 'Probationary'; }else{ $natureofemployment = $_POST['natureofemployment'] = 'Regular'; } $email=$_POST['email']; $password=md5($_POST['password']); /*/ $imgfile=$_FILES["postimage"]["name"]; // get the image extension $extension = substr($imgfile,strlen($imgfile)-4,strlen($imgfile)); // allowed extensions $allowed_extensions = array(".jpg",".jpeg",".png",".gif"); // Validation for allowed extensions .in_array() function searches an array for a specific value. if(!in_array($extension,$allowed_extensions)) { echo "<script>alert('Invalid format. Only jpg / jpeg/ png /gif format allowed');</script>"; } else { //rename the image file $imgnewfile=md5($imgfile).$extension; // Code for move image into directory move_uploaded_file($_FILES["postimage"]["tmp_name"],"image/".$imgnewfile); /*/ $sql = "INSERT IGNORE INTO tblemployees(EmpId,NickName,FirstName,MiddleName,LastName,Suffix,Gender,CivilStatus,Dob,Address,Second_Address,Phonenumber,Second_Number,Height,Weight,Religion,SSS,Pagibig,Philhealth,Tin, SchoolName,DateAttendFrom,DateAttendTo,SecSchoolName,SecDateAttendFrom,SecDateAttendTo,HSecSchoolName,Strand,HSecDateAttendFrom,HSecDateAttendTo,TerSchoolName,Degree,TerDateAttendFrom,TerDateAttendTo,OtherSchoolName,OtherDegree,OtherDateAttendFrom,OtherDateAttendTo, FatherName,FOccupation,FBirthday,Ftelnum,MotherName,MOccupation,MBirthday,MTelnum, SpouseName,SOccupation,SBirthday,STelNum,SCompany, IncaseName,IncaseTelNum,IncaseAddress,IncaseRelation, Status,Department,Position,Company,Natureofemployment,Company_Area,Position_Level,Employment_Level,EmailId,PW) VALUES(:empid,:nickname,:fname,:mname,:lname,:suffix,:gender,:civilstats,:dob,:address,:address2,:mobileno,:mobileno2,:height,:weight,:religion,:sss,:pagibig,:philhealth,:tin, :schoolname,:datefrom,:dateto,:secschoolname,:secdatefrom,:secdateto,:hsecschoolname,:strand,:hsecdatefrom,:hsecdateto,:terschoolname,:degree,:terdatefrom,:terdateto,:otherschoolname,:otherdegree,:otherdatefrom,:otherdateto, :fathername,:foccupation,:fbirthday,:ftelnum,:mothername,:moccupation,:mbirthday,:mtelnum,:spousename,:soccupation,:sbirthday,:stelnum,:scompany, :incasename,:incasetelnum,:incaseaddress,:incaserelation, :status,:dept,:position,:comp,:natureofemployment,:area,:poslevel,:emplevel, :email,:password)"; $query = $dbh->prepare($sql); $query->bindParam(':empid',$empid,PDO::PARAM_STR); $query->bindParam(':nickname',$nickname,PDO::PARAM_STR); $query->bindParam(':fname',$fname,PDO::PARAM_STR); $query->bindParam(':mname',$mname,PDO::PARAM_STR); $query->bindParam(':lname',$lname,PDO::PARAM_STR); $query->bindParam(':suffix',$suffix,PDO::PARAM_STR); $query->bindParam(':gender',$gender,PDO::PARAM_STR); $query->bindParam(':civilstats',$civilstats,PDO::PARAM_STR); $query->bindParam(':dob',$dob,PDO::PARAM_STR); $query->bindParam(':address',$address,PDO::PARAM_STR); $query->bindParam(':address2',$address2,PDO::PARAM_STR); $query->bindParam(':mobileno',$mobileno,PDO::PARAM_STR); $query->bindParam(':mobileno2',$mobileno2,PDO::PARAM_STR); $query->bindParam(':height',$height,PDO::PARAM_STR); $query->bindParam(':weight',$weight,PDO::PARAM_STR); $query->bindParam(':religion',$religion,PDO::PARAM_STR); $query->bindParam(':sss',$sss,PDO::PARAM_STR); $query->bindParam(':pagibig',$pagibig,PDO::PARAM_STR); $query->bindParam(':philhealth',$philhealth,PDO::PARAM_STR); $query->bindParam(':tin',$tin,PDO::PARAM_STR); $query->bindParam(':schoolname',$schoolname,PDO::PARAM_STR); $query->bindParam(':datefrom',$datefrom,PDO::PARAM_STR); $query->bindParam(':dateto',$dateto,PDO::PARAM_STR); $query->bindParam(':secschoolname',$secschoolname,PDO::PARAM_STR); $query->bindParam(':secdatefrom',$secdatefrom,PDO::PARAM_STR); $query->bindParam(':secdateto',$secdateto,PDO::PARAM_STR); $query->bindParam(':hsecschoolname',$hsecschoolname,PDO::PARAM_STR); $query->bindParam(':strand',$strand,PDO::PARAM_STR); $query->bindParam(':hsecdatefrom',$hsecdatefrom,PDO::PARAM_STR); $query->bindParam(':hsecdateto',$hsecdateto,PDO::PARAM_STR); $query->bindParam(':terschoolname',$terschoolname,PDO::PARAM_STR); $query->bindParam(':degree',$degree,PDO::PARAM_STR); $query->bindParam(':terdatefrom',$terdatefrom,PDO::PARAM_STR); $query->bindParam(':terdateto',$terdateto,PDO::PARAM_STR); $query->bindParam(':otherschoolname',$otherschoolname,PDO::PARAM_STR); $query->bindParam(':otherdegree',$otherdegree,PDO::PARAM_STR); $query->bindParam(':otherdatefrom',$otherdatefrom,PDO::PARAM_STR); $query->bindParam(':otherdateto',$otherdateto,PDO::PARAM_STR); $query->bindParam(':fathername',$fathername,PDO::PARAM_STR); $query->bindParam(':foccupation',$foccupation,PDO::PARAM_STR); $query->bindParam(':fbirthday',$fbirthday,PDO::PARAM_STR); $query->bindParam(':ftelnum',$ftelnum,PDO::PARAM_STR); $query->bindParam(':mothername',$mothername,PDO::PARAM_STR); $query->bindParam(':moccupation',$moccupation,PDO::PARAM_STR); $query->bindParam(':mbirthday',$mbirthday,PDO::PARAM_STR); $query->bindParam(':mtelnum',$mtelnum,PDO::PARAM_STR); $query->bindParam(':spousename',$spousename,PDO::PARAM_STR); $query->bindParam(':soccupation',$soccupation,PDO::PARAM_STR); $query->bindParam(':sbirthday',$sbirthday,PDO::PARAM_STR); $query->bindParam(':stelnum',$stelnum,PDO::PARAM_STR); $query->bindParam(':scompany',$scompany,PDO::PARAM_STR); $query->bindParam(':incasename',$incasename,PDO::PARAM_STR); $query->bindParam(':incasetelnum',$incasetelnum,PDO::PARAM_STR); $query->bindParam(':incaseaddress',$incaseaddress,PDO::PARAM_STR); $query->bindParam(':incaserelation',$incaserelation,PDO::PARAM_STR); $query->bindParam(':status',$status,PDO::PARAM_STR); $query->bindParam(':dept',$dept,PDO::PARAM_STR); $query->bindParam(':position',$position,PDO::PARAM_STR); $query->bindParam(':comp',$comp,PDO::PARAM_STR); $query->bindParam(':natureofemployment',$natureofemployment,PDO::PARAM_STR); $query->bindParam(':area',$area,PDO::PARAM_STR); $query->bindParam(':poslevel',$poslevel,PDO::PARAM_STR); $query->bindParam(':emplevel',$emplevel,PDO::PARAM_STR); $query->bindParam(':email',$email,PDO::PARAM_STR); $query->bindParam(':password',$password,PDO::PARAM_STR); $query->execute(); if($query->rowCount() > 0) { echo "<script>alert('Successfully Registered');</script>"; echo "<script type='text/javascript'> document.location = 'index.php'; </script>"; }else{ echo "<script>alert('Unsuccessfull Registration');</script>"; } //} $child = utf8_encode($_POST['member']); $empid = $_POST['empcode']; $birth = $_POST['birthdate']; foreach (array_combine($child, $birth) as $childs => $births) { $sql = "INSERT INTO tbl_dependents (empid,Dependents,Birthday) values (:empid,:child,:birth)"; $query = $dbh->prepare($sql); $query->bindParam(':child',$childs,PDO::PARAM_STR); $query->bindParam(':empid',$empid,PDO::PARAM_STR); $query->bindParam(':birth',$births,PDO::PARAM_STR); $query->execute(); } } ?> <!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> <style> body { background-image: url('image/nature3.jpg'); background-repeat: no-repeat; background-attachment: fixed; background-size: 100% 100%; } label{ font-weight: bolder; color: black; font-size: 20px; opacity: 100%; } form{ opacity: 90%; background-color: black; } .errorWrap { padding: 10px; margin: 0 0 20px 0; background: #fff; border-left: 4px solid #dd3d36; -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); } .succWrap{ padding: 10px; margin: 0 0 20px 0; background: #fff; border-left: 4px solid #5cb85c; -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); } </style> <style> * { box-sizing: border-box; } body { background-color: #f1f1f1; } #regForm { background-color: #ffffff; margin: 100px auto; font-family: Raleway; padding: 40px; width: 70%; min-width: 300px; } h1 { text-align: center; } input { padding: 10px; width: 100%; font-size: 17px; font-family: Raleway; border: 1px solid #aaaaaa; } /* Mark input boxes that gets an error on validation: */ input.invalid { background-color: #ffdddd; } /* Hide all steps by default: */ .tab { display: none; } button { background-color: #04AA6D; color: #ffffff; border: none; padding: 10px 20px; font-size: 17px; font-family: Raleway; cursor: pointer; } button:hover { opacity: 0.8; } #prevBtn { background-color: #bbbbbb; } /* Make circles that indicate the steps of the form: */ .step { height: 15px; width: 15px; margin: 0 2px; background-color: #bbbbbb; border: none; border-radius: 50%; display: inline-block; opacity: 0.5; } .step.active { opacity: 1; } /* Mark the steps that are finished and valid: */ .step.finish { background-color: #04AA6D; } input.invalid { border-color: #DD2C00; } .emsg{ color: red; } .hidden { visibility:hidden; } </style> <script type='text/javascript'> function checkAvailabilityEmpid() { $("#loaderIcon").show(); jQuery.ajax({ url: "check_availability.php", data:'empcode='+$("#empcode").val(), type: "POST", success:function(data){ $("#empid-availability").html(data); $("#loaderIcon").hide(); }, error:function (){} }); } </script> <script type='text/javascript'> function checkAvailabilityEmailid() { $("#loaderIcon").show(); jQuery.ajax({ url: "check_availability.php", data:'emailid='+$("#email").val(), type: "POST", success:function(data){ $("#emailid-availability").html(data); $("#loaderIcon").hide(); }, error:function (){} }); } </script> <script type='text/javascript'> function addFields(){ // Generate a dynamic number of inputs var number = document.getElementById("member").value; // Get the element where the inputs will be added to var container = document.getElementById("container"); // Remove every children it had before while (container.hasChildNodes()) { container.removeChild(container.lastChild); } for (i=0;i<number;i++){ // Append a node with a random text container.appendChild(document.createTextNode("Child " + (i+1))); // Create an <input> element, set its type and name attributes var input = document.createElement("input"); input.type = "text"; input.name = "member[]"; input.id = "member" +i; input.placeholder = "Full Name(Surname, Firstname, Middlename)"; container.appendChild(input); container.appendChild(document.createTextNode("Birthdate")); var input = document.createElement("input"); input.type = "date"; input.name = "birthdate[]"; input.id = "birthdate" +i; input.placeholder = "Birthdate"; container.appendChild(input); // Append a line break container.appendChild(document.createElement("br")); } } </script> <script> function getdistrict(val) { $.ajax({ type: "POST", url: "get_district.php", data:'company_id='+val, success: function(data){ $("#comp_area").html(data); } }); } function getdepartment(val) { $.ajax({ type: "POST", url: "get_department.php", data:'comp_area_id='+val, success: function(data){ $("#department").html(data); } }); } function getposition(val) { $.ajax({ type: "POST", url: "get_position.php", data:'department_id='+val, success: function(data){ $("#poslevel").html(data); } }); } </script> <title>Employee Registration</title> </head> <body> <div class="container"> <div class="col-md-12"> <form class="row g-3" method="POST" id="regForm" enctype="multipart/form-data" style="background: transparent;"> <div class="col-md-12"> <div class="card" style="background: white; border-style: solid; border-color: #EB5353; border-width: 10px; border-radius: 10px; box-shadow:10px 10px 80px #000;"> <h5 class="card-header" style="background: #EB5353; color: white; "> <center><b>Employee Registration Form</b></center><br> <div class="card"> <div class="card-header"> </div> </div> </h5> <div class="card-body"> <!-- One "tab" for each step in the form: --> <div class="text-center fs-6"> <a href="index.php">< Back to Login</a></div> <div class="tab"> <h5><center><b>Personal Information</b></center></h5> <!-- <div class="col-md-12"> <label class="input-group-text" for="inputGroupFile01">Your Profile Picture</label> <input type="file" class="form-control" id="postimage" name="postimage"> </div> --> <div class="col-md-12"> <div><span id="empid-availability" style="font-size:12px;"></span></div> <label for="empcode" class="form-label">Bio Code <b style="color: red;">*</b></label> <input class="form-control" id="empcode" name="empcode" onBlur="checkAvailabilityEmpid()" oninput="this.value = this.value.replace(/[^0-9-]/g, '').replace(/(\..*)\./g, '$1');" maxlength="10" type="text" placeholder=" Your current Biometric Code" required> </div> <div class="col-md-12"> <label for="nickname" class="form-label">Nickname <b style="color: red;">*</b></label> <input class="form-control" id="nickname" name="nickname" oninput="this.value = this.value.replace(/[^A-z \u00d1 \u00f1]/g, '').replace(/(\..*)\./g, '$1');" autocomplete="on" type="text" placeholder="Nickname Given by the Company" required> </div> <div class="col-md-12"> <label class="form-label">Full Name<b style="color:blue;">(On Middle Name type N/A if none)</b> <b style="color: red;">*</b></label> <div class="input-group mb-1"> <input type="text" aria-label="First name" placeholder="First Name" id="firstName" name="firstName" class="form-control" oninput="this.value = this.value.replace(/[^A-z \u00d1 \u00f1]/g, '').replace(/(\..*)\./g, '$1');" required> <input type="text" aria-label="Middle name" placeholder="Middle Name" id="middlename" name="middlename" class="form-control" oninput="this.value = this.value.replace(/[^A-z / \u00d1 \u00f1]/g, '').replace(/(\..*)\./g, '$1');" required> <input type="text" aria-label="Last name" placeholder="Last Name" id="lastName" name="lastName" class="form-control" oninput="this.value = this.value.replace(/[^A-z \u00d1 \u00f1]/g, '').replace(/(\..*)\./g, '$1');" required> </div> </div> <div class="col-md-12"> <label class="form-label">Suffix/Extn. Ex: Jr) <b style="color:blue;">(Optional)</b></label> <input type="text" aria-label="Suffix" placeholder="Suffix" id="suffix" name="suffix" maxlength="6" min="2" oninput="this.value = this.value.replace(/[^A-z/.]/g, '').replace(/(\..*)\./g, '$1');"> </div> <div class="col-md-12"> <label class="form-label" for="gender" >Gender <b style="color: red;">*</b></label> <select class="form-select" id="gender" name="gender" > <option selected disabled>Choose your Gender</option> <option value="Male">Male</option> <option value="Female">Female</option> </select> </div> <div class="col-md-12"> <label class="form-label" for="civilstats" >Civil Status <b style="color: red;">*</b></label> <select class="form-select" id="civilstats" name="civilstats" > <option selected disabled>Choose your Status</option> <option value="Single">Single</option> <option value="Married">Married</option> <option value="Separated">Separated</option> <option value="Widowed">Widowed</option> </select> </div> <div class="col-md-12"> <label for="dob" class="form-label">Birthdate <b style="color: red;">*</b></label> <input class="form-control" id="dob" name="dob" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="date" oninput="this.className = ''"> </div> <div class="col-md-12"> <label for="phone" class="form-label">Phone Number 1 <b style="color: red;">*</b></label> <input class="form-control" id="phone" name="phone" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" oninput="this.value = this.value.replace(/[^0-9]/g, '').replace(/(\..*)\./g, '$1');" maxlength="11" type="text" placeholder="Ex: 09121234567" > </div> <div class="col-md-12"> <label for="phone" class="form-label">Phone Number 2<b style="color:blue;"> (Optional)</b></label> <input id="phone2" name="phone2" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" oninput="this.value = this.value.replace(/[^0-9]/g, '').replace(/(\..*)\./g, '$1');" maxlength="11" type="text" placeholder="Ex: 09121234567" > </div> <div class="col-md-12"> <label for="height" class="form-label">Height <b style="color: red;">*</b></label> <input class="form-control" id="height" name="height" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" oninput="this.value = this.value.replace(/[^0-9]/g, '').replace(/(\..*)\./g, '$1');" maxlength="3" type="text" placeholder="Height by cm"> </div> <div class="col-md-12"> <label for="weight" class="form-label">Weight <b style="color: red;">*</b></label> <input class="form-control" id="weight" name="weight" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" oninput="this.value = this.value.replace(/[^0-9]/g, '').replace(/(\..*)\./g, '$1');" maxlength="3" type="text" placeholder="Weight by kg"> </div> <div class="col-md-12"> <label for="religion" class="form-label">Religion <b style="color: red;">*</b></label> <input class="form-control" id="religion" name="religion" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" placeholder="Your Religion" onkeypress='return onlyAlphabets(event,this);'> </div> <div class="col-md-12"> <label for="address" class="form-label">Present Address <b style="color: red;">*</b></label> <input class="form-control" id="address" name="address" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" placeholder="Your Current Address" > </div> <div class="col-md-12"> <label for="address" class="form-label">Permanent Address <b style="color: red;">*</b></label> <input class="form-control" id="address2" name="address2" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" placeholder="Your Permanent Address" > </div> <div class="col-md-12"> <label for="sss" class="form-label">SSS Number Ex: <b style="color: red;">*</b></label> <input class="masked" id="sss" name="sss" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" data-charset="XX-XXXXXXX-X" pattern="[0-9]{2}-[0-9]{7}-[0-9]{1}" maxlength="12" type="tel" placeholder=" 31-1234567-0"> </div> <div class="col-md-12"> <label for="pagibig" class="form-label">Pag-ibig Number Ex: <b style="color: red;">*</b></label> <input class="masked" id="pagibig" name="pagibig" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" pattern="[0-9]{4}-[0-9]{4}-[0-9]{4}" data-charset="XXXX-XXXX-XXXX" maxlength="14" type="tel" placeholder=" 1234-5678-9000" > </div> <div class="col-md-12"> <label for="philhealth" class="form-label">Phil Health Number Ex: <b style="color: red;">*</b></label> <input class="masked" id="philhealth" name="philhealth" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" pattern="[0-9]{2}-[0-9]{9}-[0-9]{1}" maxlength="14" type="tel" data-charset="XX-XXXXXXXXX-X" placeholder="11-123456789-0"> </div> <div class="col-md-12"> <label for="tin" class="form-label">Tin Number Ex: <b style="color: red;">*</b></label> <input class="masked" id="tin" name="tin" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" pattern="[0-9]{3}-[0-9]{3}-[0-9]{3}-[0-9]{3}" data-charset="XXX-XXX-XXX-XXX" maxlength="15" type="text" placeholder="123-456-789-000" > </div> </div> <div class="tab"> <h5><center><b>Educational Attainment</b></center></h5> <div class="col-md-12"> <label for="schoolname" class="form-label">Primary Education<b style="color: red;">*</b></label> <input class="form-control" id="schoolname" name="schoolname" placeholder="School Name" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" required> </div> <div class="col-md-12"> <label class="form-label">School Year <b style="color: red;">*</b></label> <div class="input-group mb-1"> <input class="form-control" id="datefrom" name="datefrom" placeholder="Year Attended" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" maxlength="4" required> <input class="form-control" id="dateto" name="dateto" placeholder="Year Graduated" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" maxlength="4" required> </div> </div> <div class="col-md-12"> <label for="secschoolname" class="form-label">Lower Secondary Education(Junior High(1st - 4th year))<b style="color:blue;">(N/A if None)</b><b style="color: red;">*</b></label> <input class="form-control" id="secschoolname" name="secschoolname" placeholder="School Name" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" required> </div> <div class="col-md-12"> <label class="form-label">School Year<b style="color:blue;">(Leave blank if None)</b> <b style="color: red;">*</b></label> <div class="input-group mb-1"> <input id="secdatefrom" name="secdatefrom" placeholder="Year Attended" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" maxlength="4" > <input id="secdateto" name="secdateto" placeholder="Year Graduated" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" maxlength="4" > </div> </div> <div class="col-md-12"> <label for="secschoolname" class="form-label">Higher Secondary Education(Senior High)<b style="color: blue;">(Optional)</b></label> <input id="hsecschoolname" name="hsecschoolname"placeholder="School Name" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" oninput="this.value = this.value.replace(/[^A-z,.'' ]/g, '').replace(/(..*)\./g, '$1');"> </div> <div class="col-md-12"> <label for="strand" class="form-label">Strand<b style="color: blue;">(Optional)</b></label> <select id="strand" class="form-select" name="strand"> <option value="N/A">Choose...</option> <option value="Business, Accountancy, Management(BAM)">Business, Accountancy, Management(BAM)</option> <option value="Humanities, Education, Social Sciences(HESS)">Humanities, Education, Social Sciences(HESS)</option> <option value="Science, Technology, Engineering, Mathematics(STEM)">Science, Technology, Engineering, Mathematics(STEM)</option> <option value="General Academic Strand">General Academic Strand(GAS)</option> <option value="Technical-Vocational Livelihood">Technical-Vocational Livelihood(TVL)</option> </select> </div> <div class="col-md-12"> <label class="form-label">School Year<b style="color: blue;">(Optional)</b></label> <div class="input-group mb-1"> <input id="hsecdatefrom" name="hsecdatefrom" placeholder="Year Attended" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" maxlength="4"> <input id="hsecdateto" name="hsecdateto" placeholder="Year Graduated" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" maxlength="4"> </div> </div> <div class="col-md-12"> <label for="terschoolname" class="form-label">Tertiary Education/College Level Education</b><b style="color: blue;">(N/A if None)</b><b style="color: red;">*</b></label> <input id="terschoolname" name="terschoolname" placeholder="School Name" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" class="form-control" required> </div> <div class="col-md-12"> <label for="degree" class="form-label">Degree</b><b style="color: blue;">(N/A if None)</b><b style="color: red;">*</b></label> <input id="degree" name="degree" placeholder="Degree" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" oninput="this.value = this.value.replace(/[^A-z,.'' ]/g, '').replace(/(..*)\./g, '$1');" class="form-control" required> </div> <div class="col-md-12"> <label class="form-label">School Year</b><b style="color: blue;">(Leave blank if None)</b><b style="color: red;">*</b></label> <div class="input-group mb-1"> <input id="terdatefrom" name="terdatefrom" placeholder="Year Attended" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" maxlength="4"> <input id="terdateto" name="terdateto" placeholder="Year Graduated" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" maxlength="4"> </div> </div> <div class="col-md-12"> <label for="otherschoolname" class="form-label">Other Educational Attainment<b style="color: blue;">(Optional)</b></label> <input id="otherschoolname" name="otherschoolname" placeholder="School Name" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" oninput="this.value = this.value.replace(/[^A-z,.'' ]/g, '').replace(/(..*)\./g, '$1');"> </div> <div class="col-md-12"> <label for="degree" class="form-label">Degree<b style="color: blue;">(Optional)</b></label> <input id="otherdegree" name="otherdegree"placeholder="Degree" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" oninput="this.value = this.value.replace(/[^A-z,.'' ]/g, '').replace(/(..*)\./g, '$1');"> </div> <div class="col-md-12"> <label class="form-label">School Year<b style="color: blue;">(Optional)</b></label> <div class="input-group mb-1"> <input id="otherdatefrom" name="otherdatefrom" oninput="this.className = ''" placeholder="Year Attended" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" maxlength="4"> <input id="otherdateto" name="otherdateto" placeholder="Year Graduated" oninput="this.className = ''" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" maxlength="4"> </div> </div> </div> <div class="tab"> <h5><center><b>Family Information</b></center></h5> <div class="col-md-12"> <label for="fathername" class="form-label">Father's Full Name<b style="color:blue;">(N/A if None)</b><b style="color: red;">*</b></label> <input type="text" placeholder="Surname, First Name, Middle Name" id="fathername" name="fathername" class="form-control" oninput="this.value = this.value.replace(/[^A-z.,'' /. \u00d1 \u00f1]/g, '').replace(/(..*)\./g, '$1');" required> </div> <div class="col-md-12"> <label for="fbirthday" class="form-label">Birthday<b style="color:blue;">(Leave blank if None)</b><b style="color: red;">*</b></label> <input type="date" placeholder="Birthdate" id="fbirthday" name="fbirthday"> </div> <div class="col-md-12"> <label for="ftelnum" class="form-label">Phone Number<b style="color:blue;">(Leave blank if None)</b><b style="color: red;">*</b></label> <input type="text" placeholder="Ex.09698685452" id="ftelnum" name="ftelnum" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" maxlength="11"> </div> <div class="col-md-12"> <label for="foccupation" class="form-label">Occupation <b style="color:blue;">(Type N/A for Deceased, Impaired Individual and None)</b><b style="color: red;">*</b></label> <input type="text" aria-label="Father's Occupation" placeholder="Father's Occupation" id="foccupation" name="foccupation" class="form-control" oninput="this.value = this.value.replace(/[^A-z,.''./ ]/g, '').replace(/(..*)\./g, '$1');" required> </div> <div class="col-md-12"> <label for="mothername" class="form-label">Mother's Maiden Name<b style="color:blue;">(N/A if None)</b><b style="color: red;">*</b></label> <input type="text" aria-label="Mother's Full Name" placeholder="Surname, First Name, Middle Name" id="mothername" name="mothername" class="form-control" oninput="this.value = this.value.replace(/[^A-z,'' /. \u00d1 \u00f1]/g, '').replace(/(..*)\./g, '$1');" required> </div> <div class="col-md-12"> <label for="mbirthday" class="form-label">Birthday<b style="color:blue;">(Leave blank if None)</b><b style="color: red;">*</b></label> <input type="date" aria-label="Mother's Birthday" placeholder="Birthdate" id="mbirthday" name="mbirthday"> </div> <div class="col-md-12"> <label for="mtelnum" class="form-label">Phone Number<b style="color:blue;">(Leave blank if None)</b><b style="color: red;">*</b></label> <input type="text" aria-label="Mother's Phone Number" placeholder="Ex.09698685452" id="mtelnum" name="mtelnum" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" maxlength="11"> </div> <div class="col-md-12"> <label for="moccupation" class="form-label">Occupation <b style="color:blue;">(Type N/A for Deceased, Impaired Individual and None)</b> <b style="color:red;">*</b></label> <input type="text" aria-label="Mother's Occupation" placeholder="Mother's Occupation" id="moccupation" name="moccupation" oninput="this.value = this.value.replace(/[^A-z,.''. /]/g, '').replace(/(..*)\./g, '$1');" class="form-control" required> </div> <div class="col-md-12"> <label for="spousename" class="form-label">Spouse Full Name<b style="color:blue;">(Type N/A if None)</b><b style="color: red;">*</b></label> <input type="text" class="form-control" aria-label="Spouse Full Name" placeholder="Surname, First Name, Middle Name" id="spousename" name="spousename"oninput="this.value = this.value.replace(/[^A-z,'' /. \u00d1 \u00f1]/g, '').replace(/(..*)\./g, '$1');"required> </div> <label for="sbirthday" class="form-label">Birthday<b style="color:blue;">(Leave blank if None)</b><b style="color: red;">*</b></label> <div class="col-md-12"> <input type="date" aria-label="Birthday" placeholder="Birthday" id="sbirthday" name="sbirthday"> </div> <div class="col-md-12"> <label for="stelnum" class="form-label">Phone Number <b style="color:blue;">(Leave blank if None)</b><b style="color: red;">*</b></label> <input type="text" aria-label="Spouse Phonenumber" placeholder="Spouse Phone #" id="stelnum" name="stelnum" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" maxlength="11"> </div> <div class="col-md-12"> <label for="soccupation" class="form-label">Occupation <b style="color:blue;">(Type N/A for Deceased, Impaired Individual or None)</b><b style="color: red;">*</b></label> <input type="text" aria-label="Spouse Occupation" placeholder="Spouse Occupation" id="soccupation" name="soccupation" oninput="this.value = this.value.replace(/[^A-z,.''. / ]/g, '').replace(/(..*)\./g, '$1');"> </div> <div class="col-md-12"> <label for="scompany" class="form-label">Spouse Company<b style="color:blue;">(Type N/A if None)</b><b style="color: red;">*</b></label> <input type="text" class="form-control" aria-label="Spouse Company" placeholder="Spouse Company" id="scompany" name="scompany" oninput="this.value = this.value.replace(/[^A-z,.''./ ]/g, '').replace(/(..*)\./g, '$1');" required=""> </div> <div class="col-md-12"> <label for="memberno" class="form-label">Child Count<b style="color:blue;">(Leave blank if None)</b><b style="color: red;">*</b></label> <input type="text" id="member" name="memberno" value="" oninput="this.value = this.value.replace(/[^0-9-]/g, '').replace(/(\..*)\./g, '$1');" maxlength="2" placeholder="Input Number of Child"><br /> <button type="button" class="btn btn-primary" id="filldetails" onclick="addFields()">Add Child Information</button> <div id="container"/></div> </div> <h4 style="color:red;"><center>Contact Person In case of Emergency<center></h4> <div class="col-md-12"> <label for="incasename" class="form-label">Full Name<b style="color:red;">*</b></label> <input type="text" aria-label="Full Name" placeholder="Full Name" id="incasename" name="incasename" class="form-control" oninput="this.value = this.value.replace(/[^A-z,.''. \u00d1 \u00f1]/g, '').replace(/(..*)\./g, '$1');" required> </div> <div class="col-md-12"> <label for="incasetelnum" class="form-label">Contact Number <b style="color:red;">*</b></label> <input type="text" aria-label="Contact Number" placeholder="Contact Number" id="incasetelnum" name="incasetelnum" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" maxlength="11" class="form-control" required> </div> <div class="col-md-12"> <label for="incaseaddress" class="form-label">Address <b style="color:red;">*</b></label> <input type="text" aria-label="Contact Address" placeholder="Contact Address" id="incaseaddress" name="incaseaddress" class="form-control" required> </div> <div class="col-md-12"> <label for="incaserelation" class="form-label">Relationship <b style="color:red;">*</b></label> <input type="text" aria-label="Contact relation" placeholder="Contact Relationship" id="incaserelation" name="incaserelation" class="form-control" onkeypress='return onlyAlphabets(event,this);' required> </div> </div> <div class="tab"> <h5><center><b>Company Information</b></center></h5> <h6><center>(Ask HR Department for Company Information)</center></h6> <div class="col-md-12"> <label for="company" class="form-label">List of Companies <b style="color:red;">*</b></label> <select onChange="getdistrict(this.value);" name="company" id="company" class="form-select" required> <option value="">Select</option> <!--- Fetching States---> <?php $sql="SELECT * FROM tblcompany"; $stmt=$dbh->query($sql); $stmt->setFetchMode(PDO::FETCH_ASSOC); while($row =$stmt->fetch()) { ?> <option value="<?php echo $row['StCode'];?>"><?php echo $row['CompanyName'];?></option> <?php }?> </select> <input type="hidden" id="comp" name="comp" class="form-control"> </div> <div class="col-md-12"> <label for="comp_area" class="form-label">Sales Offices/Branches/Buildings <b style="color:red;">*</b></label> <select onChange="getdepartment(this.value);" name="comp_area" id="comp_area" class="form-select" required> <option value="">Select</option> </select> </div> <input type="hidden" id="area" name="area" class="form-control"> <div class="col-md-12"> <label for="comp_area" class="form-label">Department <b style="color:red;">*</b></label> <select onChange="getposition(this.value);" name="department" id="department" class="form-select" required> <option value="">Select</option> </select> </div> <input type="hidden" id="dept" name="dept" class="form-control"> <div class="col-md-12"> <label for="poslevel" class="form-label">Current Position <b style="color:red;">*</b></label> <select name="poslevel" id="poslevel" class="form-select" required> <option value="">Select</option> </select> </div> <div class="col-md-12"> <label for="emplevel" class="form-label">Nature of Employment <b style="color:red;">*</b></label> <select class="form-select" name="emplevel" id="emplevel" autocomplete="off" required> <option selected disabled>Choose...</option><br> <?php $sql = "SELECT * from tblnemployment"; $query = $dbh -> prepare($sql); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt=1; if($query->rowCount() > 0) { foreach($results as $result) { ?> <option value="<?php echo htmlentities($result->Employment_Level);?>"><?php echo htmlentities($result->nemployment);?></option> <?php }} ?> </select> </div> <!-- <div class="col-md-12"> <label for="datehired" class="form-label">Date Hired <b style="color:blue;">(Date of Employment to the Company)</b> <b style="color:red;">*</b></label> <input type="date" aria-label="Date Hired" placeholder="Date Hired" id="datehired" name="datehired" class="form-control" required> </div> <div class="col-md-12"> <label for="dateregistered" class="form-label">Date Registered <b style="color:blue;">(Date registered to the Company) (Leave blank for newly hired)</b> <b style="color:red;">*</b></label> <input type="date" aria-label="Date Registered" placeholder="Date Registered to the Company" id="dateregistered" name="dateregistered"> </div> --> </div> <div class="tab"> <h5><center><b>Please Register a Login Details</b></center></h5> <h6><center>(This will serve as your Login Access for Human Resources Information System(HRIS)</center> <div class="col-md-12"> <span id="emailid-availability" style="font-size:12px;"></span> </div> <br> <center> <div class="col-md-12"> <label for="email" class="form-label">Email <b style="color:red;">*</b></label> <input type="email" name="email" id="email" placeholder="Please input a valid email" onBlur="checkAvailabilityEmailid()" class="form-control" required /> </div> </center> <br> <div class="col-md-12"> <center> <label for="email" class="form-label">New Password <b style="color:red;">*</b></label> <input type="password" aria-label="New password" id="password" name="password" class="form-control" placeholder="New Password to use for this system" required> </center> </div> <br> <div class="col-md-12"> <input class="form-check-input" type="checkbox" id="checkboxNoLabel" value="" aria-label="..." required> By filling out and submitting this form, I allow Human Resources Department to collect, process, store and access my personal information in compliance with the Data Privacy Act of 2012. I hereby certify that all entries are true and correct. </div> <div class="col-md-12"> <button class="btn btn-primary" type="submit" id="update" name="update">Finish Registration</button> </div> </div> <div style="overflow:auto;"> <div style="float:right;"> <button type="button" id="prevBtn" onclick="nextPrev(-1) ">Previous</button> <button type="button" id="nextBtn" onclick="nextPrev(1)">Next</button> </div> </div> <div style="text-align:center;margin-top:40px;"> <span class="step"></span> <span class="step"></span> <span class="step"></span> <span class="step"></span> </div> </div> </div> </div> <input type="hidden" id="position" name="position" class="form-control"> <input type="hidden" id="natureofemployment" name="natureofemployment" class="form-control"> </form> </div> </div> <script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/masking-input.js" data-autoinit="true"></script> <!-- Optional JavaScript; choose one of the two! --> <!-- Option 1: Bootstrap Bundle with Popper --> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> <!-- Option 2: Separate Popper and Bootstrap JS --> <!-- <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script> --> <script> var currentTab = 0; // Current tab is set to be the first tab (0) showTab(currentTab); // Display the current tab function showTab(n) { // This function will display the specified tab of the form... var x = document.getElementsByClassName("tab"); x[n].style.display = "block"; //... and fix the Previous/Next buttons: if (n == 0) { document.getElementById("prevBtn").style.display = "none"; } else { document.getElementById("prevBtn").style.display = "inline"; } if (n == 4) { document.getElementById("nextBtn").style.display = "none"; } else { document.getElementById("nextBtn").style.display = "inline"; } //... and run a function that will display the correct step indicator: fixStepIndicator(n) } function nextPrev(n) { // This function will figure out which tab to display var x = document.getElementsByClassName("tab"); // Exit the function if any field in the current tab is invalid: if (n == 1 && !validateForm()) return false; // Hide the current tab: x[currentTab].style.display = "none"; // Increase or decrease the current tab by 1: currentTab = currentTab + n; // if you have reached the end of the form... if (currentTab >= x.length) { // ... the form gets submitted: document.getElementById("regForm").submit(); return false; } // Otherwise, display the correct tab: showTab(currentTab); } function validateForm() { // This function deals with validation of the form fields var x, y, i, valid = true; x = document.getElementsByClassName("tab"); y = x[currentTab].getElementsByClassName("form-control"); z = x[currentTab].getElementsByClassName("masked"); v = x[currentTab].getElementsByTagName("select"); // A loop that checks every input field in the current tab: for (i = 0; i < y.length; i++) { // If a field is empty... if (y[i].value == "") { // add an "invalid" class to the field: y[i].className = "invalid"; // and set the current valid status to false valid = false; } } for (i = 0; i < z.length; i++) { // If a field is empty... if (z[i].value == "") { // add an "invalid" class to the field: z[i].className = "invalid"; // and set the current valid status to false valid = false; } } for (i = 0; i < v.length; i++) { // If a field is empty... if (v[i].value == "") { // add an "invalid" class to the field: v[i].className = "invalid"; // and set the current valid status to false valid = false; } } if (valid) { document.getElementsByClassName("step")[currentTab].className += " finish"; return valid; } // If the valid status is true, mark the step as finished and valid: } function onlyAlphabets(e, t) { try { if (window.event) { var charCode = window.event.keyCode; } else if (e) { var charCode = e.which; } else { return true; } if ((charCode > 64 && charCode < 91) || (charCode > 96 && charCode < 123) || (charCode == 32)) return true; else return false; } catch (err) { alert(err.Description); } } function isNumber(evt) { evt = (evt) ? evt : window.event; var charCode = (evt.which) ? evt.which : evt.keyCode; if(charCode > 47 && charCode < 58) { return true; } return false; } </script> <!-- <script type="text/javascript"> const el = document.getElementById("sss"), pattern = "__-_______-_", prev = [1, 2, 2, 4, 5, 5, 7, 8, 8, 10, 11, 12, 13], accept = /\w/g, clean = input => { input = input.match(accept) || []; return Array.from(pattern, c => input[0] === c || c == "_" ? input.shift() || c : c ); }, format = () => { const [i, j] = [el.selectionStart, el.selectionEnd].map(i => { i = clean(el.value.slice(0, i)).indexOf("_"); return i<0? prev[prev.length-1]: back? prev[i-1] || 0: i; }); let s = clean(el.value).join``.toUpperCase(); el.value = s.slice(0, (s+"_").indexOf("_")); el.setSelectionRange(i, j); back = false; }; let back = false; el.addEventListener("keydown", (e) => back = e.key === "Backspace"); el.addEventListener("input", format); </script> <script> function myFunction(input) { const format = "xxxx-xxxx-xxxx"; var value = ""; // new value for (let i = 0; i < input.value.length; ++i) { switch (format[i]) { case "-": value += "-"; break; case "x": value += input.value[i]; break; } } input.value = value.toUpperCase(); } document .getElementById("pagibig") .addEventListener("input", event => myFunction(event.target)); </script> --> <script type="text/javascript"> $('select[id=company]').change(function(){ $('input[id=comp]').val($('option:selected',this).text()); }); $('select[id=comp_area]').change(function(){ $('input[id=area]').val($('option:selected',this).text()); }); $('select[id=department]').change(function(){ $('input[id=dept]').val($('option:selected',this).text()); }); </script> </body> </html>
Copyright ©2021 || Defacer Indonesia