File manager - Edit - /home/autoph/public_html/connect/home/clearance_body.php
Back
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <?php $userID=$user_data['u_id']; $toDate = date_create() ->format("Y/m/d"); ?> <script type="text/javascript"> $(function () { $('.showMenu').click(function () { $('.DivToHide').show(); }); $('.showMenu').click(function () { $('.DivToHide').hide(); }); }); function showAddNewForm(){ var diva=document.getElementById("addNewClearance"); if (diva.style.display == 'none') { diva.style.display = ''; } else { diva.style.display = 'none'; } } function hideAssignMsg(){ $("#saveMessage").fadeOut(10000); }; function showAssignMsg(){ $("#saveMessage").fadeIn(); }; </script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <div id="wait" style="display:none;width:400px;height:100px;border:0px solid red;position:absolute;top:50%;left:45%;padding:2px;z-index:999999999999999999"> <img src='images/demo_wait.gif' width="64" height="64" /><br>Scanning. Please wait....</div> <!-- add jquery --> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(document).ajaxStart(function(){ $("#wait").css("display", "block"); }); $(document).ajaxComplete(function(){ $("#wait").css("display", "none"); }); $("#SaveClearanceForm").click(function(){ var myUser = $("#myUser").val(); var myDate = $("#myDate").val(); var empName = $("#empName").val(); var empSharedServices = $("#empSharedServices").val(); var empIDNO = $("#empIDNO").val(); var empEmploymentStatus = $("#empEmploymentStatus").val(); var empDateHired = $("#empDateHired").val(); var empPositionTitle = $("#empPositionTitle").val(); var empDesignation = $("#empDesignation").val(); var empUnitAssignment = $("#empUnitAssignment").val(); var empCompany = $("#empCompany").val(); var reasonOfClearance = $("#reasonOfClearance").val(); var empOtherComment = $("#empOtherComment").val(); var empFROM = $("#empFROM").val(); var empTO = $("#empTO").val(); var empInclusive = $("#empInclusive").val(); var positionType = $("input[name='positionType']:checked").val(); //alert(positionType); //return false; if (empIDNO == "") { $('#empIDNO').focus(); $('#empIDNO').css({'border':'1px solid red'}); $('#empIDNO').css({'color':'red'}); $('#empIDNO').attr("placeholder","Required filed*"); return false; } if (empName == "") { $('#empName').focus(); $('#empName').css({'border':'1px solid red'}); $('#empName').css({'color':'red'}); $('#empName').attr("placeholder","Required filed*"); return false; } $.ajax({ url: "save_new_clearance_form.php", type: "POST", async: false, data: { "positionType":positionType, "myUser":myUser, "myDate":myDate, "empName":empName, "empIDNO":empIDNO, "empDateHired":empDateHired, "empEmploymentStatus":empEmploymentStatus, "empPositionTitle":empPositionTitle, "empDesignation":empDesignation, "empUnitAssignment":empUnitAssignment, "empSharedServices":empSharedServices, "empCompany":empCompany, "reasonOfClearance":reasonOfClearance, "empOtherComment":empOtherComment, "empFROM":empFROM, "empTO":empTO, "empInclusive":empInclusive, "done": 1 }, success: function(d){ showAssignMsg(); $("#saveMessage").html(d); hideAssignMsg(); $('#empIDNO').val(''); $('#empName').val(''); $('#empEmploymentStatus').val(''); $('#empDesignation').val(''); $('#empSharedServices').val(''); $('#empDateHired').val(''); $('#empPositionTitle').val(''); $('#empOtherComment').val(''); $('#empFROM').val(''); $('#empTO').val(''); $('#empInclusive').val(''); $('#reasonOfClearance').val(''); } }) }); }); </script> <div class='bodyTitle'>LIST OF OPEN CLEARANCE FORM</div> <div class='bodyMenu'> <input type='text' id='searchText' style='margin:0px;height:35px; float:left;;width:50%'> <button style='height:35px; float:left;;width:20%'>Search...</button> <button style='height:35px; float:left;width:15%;min-width:100px' onclick="showAddNewForm()" >Create New </button> </div> </div> <div style="padding:5px;width:80%;margin:0px;background:white;height:550px;overflow:auto;float:left;position:absolute;"> <?php $getNewC = mysql_query("SELECT * FROM emp_clearance WHERE closed=0 ORDER BY e_id DESC"); echo "<table style='width:100%'>"; echo "<thead>"; echo "<th style='width:5%'>NO</th>"; echo "<th style='width:13%'>DATE CREATED</th>"; echo "<th style='width:10%'>COMPANY</th>"; echo "<th style='width:10%'>NAME</th>"; echo "<th style='width:10%'>POSITION</th>"; echo "<th style='width:10%'>DEPARTMENT</th>"; echo "<th style='width:15%'>REASON</th>"; echo "<th style='width:5%'>STATUS</th>"; echo "<th style'min-width:240px;border-left:0px solid red'>COMPLETION</th>"; echo "<th style='width:10%'>ACTION</th>"; echo "</thead>"; while($row=mysql_fetch_array($getNewC)){ $empID = $row['emp_id']; $checkClearingDept = mysql_result(mysql_query("SELECT COUNT(id) FROM emp_clearance_data WHERE `emp_id`='$empID'"),0); $checkApproved = mysql_result(mysql_query("SELECT COUNT(id) FROM emp_clearance_data WHERE `emp_id`='$empID' AND `approved_by`!=0 AND `date_approved`!=''"),0); $comRate =($checkApproved / $checkClearingDept) * 100; $comRate=number_format($comRate,1,'.','').'%' ; $dateC = $row['date_created']; $dc = explode(".",$dateC); $dateCreated = $dc[0]; $isPosted = $row['posted']; if ($isPosted == 1){ $tColor='black'; $posted = "POSTED"; }else{ $posted = "UNPOSTED"; $tColor='red'; } $count=$count + 1; ?><tr><?php echo "<td style='text-align:center;padding:3px'>".$count."</td>"; echo "<td style='text-align:left;padding:3px'>".$dateCreated."</td>"; echo "<td style='text-align:left;padding:3px'>".$row['comp_id']."</td>"; echo "<td style='text-align:left;padding:3px'>".$row['emp_name']."</td>"; echo "<td style='text-align:left;padding:3px'>".$row['position_title']."</td>"; echo "<td style='text-align:left;padding:3px'>".$row['department']."</td>"; echo "<td style='text-align:left;padding:3px'>".$row['reason_of_clearance']."</td>"; echo "<td style='text-align:center;padding:3px;font-family:Arial;color:$tColor'>".$posted."</td>"; echo "<td style='text-align:left;padding:1px;'><div style='width:100%;background:white;border:1px solid orange;padding:1px'> <div style='height:15px;text-align:center;padding:2px; border:1px solid orange;background:#f8e482;width:$comRate;font-family:Arial;font-size:10px;color:blue'>".$comRate."</div> </div></td>"; echo "<td style='text-align:left;padding:3px;text-align:center'>View Edit Post</td>"; echo "</tr>"; } echo "</table>"; ?> </div> <div id="addNewClearance" style="position:absolute;top:5px;left:5px;display:none;width:70%;height:580px;border:1px solid black;background:#fef4bc;z-index:99999;min-width:1100px"> <div class='bgColor' style='vertical-align:top;height:35px;margin:0px;width:100%;border-bottom:1px solid gray;padding:5px;font-family:Verdana;font-weight:normal;font-size:18px;color:#043062;text-align:left'>CREATE NEW CLEARANCE FORM <div style='float:right;font-family:Verdana;font-size:15px;'> <a href='#' onclick="showAddNewForm()" style='font-weight:bold;padding:9px;border:1px solid red;padding-top:3px;margin-top:2px;padding-bottom:3px;background:#fca678;font-family:Arial;font-weight:bold;color:white'> ✕ </a> </div> </div> <div style="width:100%;padding:5px;border:0px solid blue;height:543px;background:white;padding-top:1px;"> <input type='hidden' id="myDate" value="<?php echo $toDate;?>"> <input type='hidden' id="myUser" value="<?php echo $userID;?>"> <p style="padding:5px;font-family:Arial;font-size:18px;color:black;text-align:left;padding-left:50px;background:#fef4bc;margin:10px;margin-bottom:20px;border-bottom:1px solid gray">NEW CLREANCE FORM</p> <div style="float:left;width:25%;border:0px solid red;color:black;padding:3px;text-align:right;margin:2px"> NAME/SIGNATURE OF EMPLOYEE:</div> <div style="float:left;width:40%;border:0px solid red;color:black;margin:2px"> <input type="text" id="empName" placeholder="Name of Employee" style="border:0px;width:100%;padding:3px;font-family:Arial;font-size:14px;color:blue;font-weight:bold;;border-bottom:1px solid gray;margin:0px"></div> <div style="float:left;width:10%;border:0px solid red;color:black;padding:3px;text-align:right;margin:2px">ID NO:</div> <div style="float:left;width:20%;border:0px solid red;color:black;margin:2px"> <input type="text" id="empIDNO" placeholder="" style="border:0px;width:100%;padding:3px;font-family:Arial;font-size:14px;color:blue;font-weight:bold;;border-bottom:1px solid gray;margin:0px"></div> <div style="float:left;width:25%;border:0px solid red;color:black;padding:3px;text-align:right;margin:2px"> EMPLOYMENT STATUS:</div> <div style="float:left;width:40%;border:0px solid red;color:black;margin:2px"> <input type="text" id="empEmploymentStatus" placeholder="" style="border:0px;width:100%;padding:3px;font-family:Arial;font-size:14px;color:blue;font-weight:bold;;border-bottom:1px solid gray;margin:0px"> </div> <div style="float:left;width:10%;border:0px solid red;color:black;padding:3px;text-align:right;margin:2px">DATE HIRED :</div> <div style="float:left;width:20%;border:0px solid red;color:black;margin:2px;"> <input type="date" id="empDateHired" placeholder="" style="border:0px;width:100%;padding:3px;font-family:Arial;font-size:14px;color:blue;font-weight:bold;;border-bottom:1px solid gray;margin:0px"></div> <div style="float:left;width:25%;border:0px solid red;color:black;padding:3px;text-align:right;margin:2px"> POSITION TITLE:</div> <div style="float:left;width:25%;border:0px solid red;color:black;margin:2px"> <input type="text" id="empPositionTitle" placeholder="" style="border:0px;width:100%;padding:3px;font-family:Arial;font-size:14px;color:blue;font-weight:bold;;border-bottom:1px solid gray;margin:0px"></div> <div style="float:left;width:20%;border:0px solid red;color:black;padding:3px;text-align:right;margin:2px">DESIGNATED/WORKING TITLE :</div> <div style="float:left;width:25%;border:0px solid red;color:black;margin:2px;"> <input type="text" id="empDesignation" placeholder="" style="border:0px;width:100%;padding:3px;font-family:Arial;font-size:14px;color:blue;font-weight:bold;;border-bottom:1px solid gray;margin:0px"></div> <div style="float:left;width:25%;border:0px solid red;color:black;padding:3px;text-align:right;margin:2px"> CURRENT UNIT ASSIGNMENT :</div> <div style="float:left;width:30%;border:0px solid red;color:black;margin:2px"> <input type="text" id="empUnitAssignment" placeholder="" style="border:0px;width:100%;padding:3px;font-family:Arial;font-size:14px;color:blue;font-weight:bold;;border-bottom:1px solid gray;margin:0px"></div> <div style="float:left;width:10%;border:0px solid red;color:black;padding:3px;text-align:right;margin:2px">COMPANY:</div> <div style="float:left;width:30%;border:0px solid red;color:black;margin:2px;"> <select id="empCompany" style="width:100%;margin:0px;font-family:Arial;font-size:14px;color:blue;font-weight:bold;border:0px solid red;border-bottom:1px solid gray"> <?php $gtCom = mysql_query("SELECT * FROM vts_company WHERE comp_status=1 ORDER BY comp_name ASC"); while($row=mysql_fetch_array($gtCom)){ echo "<option value='".$row['comp_code']."'>".$row['comp_name']."</option>"; } ?> </select> </div> <div style="float:left;width:25%;border:0px solid red;color:black;padding:3px;text-align:right;margin:2px"> SHARED SERVICES :</div> <div style="float:left;width:70%;border:0px solid red;color:black;margin:2px"> <input type="text" id="empSharedServices" placeholder="" style="border:0px;width:100%;padding:3px;font-family:Arial;font-size:14px;color:blue;font-weight:bold;;border-bottom:1px solid gray;margin:0px"></div> <div style="float:left;width:25%;border:0px solid red;color:black;padding:3px;text-align:right;margin:2px"> REASON FOR SECURING CLEARANCE :</div> <div style="float:left;width:70%;padding-left:0px;border:0px solid red;color:black;padding:3px;text-align:left;margin:2px"> <select id="reasonOfClearance" style="width:50%;margin:0px;font-family:Arial;font-size:14px;color:blue;font-weight:bold;border:0px solid red;border-bottom:1px solid gray"> <option value="LOA">Leave of absence</option> <option value="Reassignment">Reassignment </option> <option value="Transfer">Transfer</option> <option value="Detail">Detail</option> <option value="Suspension">Suspension</option> <option value="Reemployment">Reemployment </option> <option value="Resignation">Resignation</option> <option value="Involuntary">Involuntary Separation</option> <option value="Retirement">Retirement</option> </select> </div> <div style="float:left;width:25%;border:0px solid red;color:black;padding:3px;text-align:right;margin:2px"> OTHER COMMENTS:</div> <div style="float:left;width:70%;border:0px solid red;color:black;margin:2px"> <input type="text" id="empOtherComment" placeholder="" style="border:0px;width:100%;padding:3px;font-family:Arial;font-size:14px;color:blue;font-weight:bold;;border-bottom:1px solid gray;margin:0px"></div> <div style="float:left;width:25%;border:0px solid red;color:black;padding:3px;text-align:right;margin:2px"> FROM:</div> <div style="float:left;width:20%;border:0px solid red;color:black;margin:2px"> <input type="text" id="empFROM" placeholder="" style="border:0px;width:100%;padding:3px;font-family:Arial;font-size:14px;color:blue;font-weight:bold;border-bottom:1px solid gray;margin:0px"></div> <div style="float:left;width:5%;border:0px solid red;color:black;padding:3px;text-align:right;margin:2px">TO:</div> <div style="float:left;width:40%;border:0px solid red;color:black;margin:2px;text-align:left"> <input type="text" id="empTO" placeholder="" style="border:0px;width:62%;padding:3px;font-family:Arial;font-size:14px;color:blue;font-weight:bold;;border-bottom:1px solid gray;margin:0px"></div> <div style="float:left;width:25%;border:0px solid red;color:black;padding:3px;text-align:right;margin:2px"> INCLUSIVE PERIOD/EFFECTIVITY DATE:</div> <div style="float:left;width:70%;border:0px solid red;color:black;margin:2px"> <input type="text" id="empInclusive" placeholder="" style="float:left;border:0px;width:100%;padding:3px;font-family:Arial;font-size:14px;color:blue;font-weight:bold;;border-bottom:1px solid gray;margin:0px"> <br><label for="RanKNFile" style="float:left;margin:10px;font-family:Arial;font-size:120%;font-weight:normal;width:200px"> <input type="radio" checked id="RanKNFile" name="positionType" value="RNF"> Rank & File Employee </label> <label for="Manager" style="float:left;margin:10px;font-family:Arial;font-size:120%;font-weight:normal;width:150px"> <input type="radio" id="Manager" name="positionType" value="MGR"> Manager </label> <label for="Executive" style="float:left;margin:10px;font-family:Arial;font-size:120%;font-weight:normal;width:150px"> <input type="radio" id="Executive" name="positionType" value="EXE"> Executive </label> </div> <div style="float:left;width:97%;border:0px solid red;border-top:1px solid gray;color:black;padding:10px;text-align:center;margin:10px;margin-top:40px;background:#fbf4ca;"> <div id="saveMessage" style="display:none;width:100%;padding:10px;font-family:Arial;font-size:18px;background:yellow;float:left;text-align:center;margin:5px;"></div> <input type="submit" id="SaveClearanceForm" value="CREATE CLEARANCE" style="float:center;padding:10px;font-family:Arial;font-size:18px;color:black;width:30%"> </div> </div> </div>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings