File manager - Edit - /home/autoph/public_html/pms_v1/config/loadEmployeeData.php
Back
<?php include_once("../../../cfg/conn.php"); //error_reporting(0); if(isset($_POST['find'])){ $find = $_POST['find']; $myUserID = $_POST['myUserID']; $searchText = $_POST['searchText']; if($searchText !=""){ $getEmp = "SELECT * FROM `pms_employee_data` WHERE deleted=0 AND `employee_id` LIKE '%$searchText%' || deleted=0 AND `last_name` LIKE '%$searchText%' || deleted=0 AND `first_name` LIKE '%$searchText%' ORDER BY last_name ASC LIMIT 20"; } else{ $getEmp = "SELECT * FROM `pms_employee_data` WHERE deleted=0 ORDER BY last_name ASC LIMIT 50"; } ?> <table class='table w-100'> <thead> <th>ID</th> <th>EMP. ID</th> <th>EMPLOYEE NAME</th> <th>COMPANY</th> <th>POSITION</th> <th>CURRENT ACCESS</th> <th></th> </thead> <?php $qEmp = mysqli_query($conn,$getEmp); $statRow = mysqli_num_rows($qEmp); if($statRow > 0){ while($row = mysqli_fetch_array($qEmp)){ $myCompID = $row['comp_id']; $myDealID = $row['branch_id']; $myPosID = $row['position']; $role = $row['access_role']; $accSta = $row['account_status']; if($accSta==0){ $textColor = '#A09E9E'; }else{ $textColor = '#494A4B'; } ?><tr onclick="javascript:getInfo(this);"><?php echo "<td style='width:5%;color:$textColor'>".$row['id']."</td>"; echo "<td style='width:8%;color:$textColor'>".$row['emp_id']."</td>"; echo "<td style='width:23%;color:$textColor'>".$row['last_name'].", ".$row['first_name']."</td>"; echo "<td style='width:8%;color:$textColor'>"; $getCompany = "SELECT `comp_code` FROM `vts_company` WHERE `comp_id`='$myCompID'"; $getC = mysqli_query($conn,$getCompany); while($rowX = mysqli_fetch_array($getC)){ echo $rowX['comp_code']; } echo "</td>"; echo "<td style='width:16%;color:$textColor'>"; $getPos = "SELECT `position_name` FROM `pms_positions_tbl` WHERE `id`='$myPosID'"; $getP = mysqli_query($conn,$getPos); while($rowP = mysqli_fetch_array($getP)){ echo $rowP['position_name']; } echo "</td>"; echo "<td style='width:16%;color:$textColor'>"; if($accSta == 0){ echo "Inactive"; }else{ echo "Active"; } echo "</td>"; echo "<td style='width:3%;color:$textColor'>";?> <!--<abbr title='View KRA'><i class='fa fa-plus-circle' aria-hidden='true' style='cursor:pointer;color:green;float:right;font-size:18px'></i> </abbr>--> <i data-toggle="modal" data-target="#myModal" class="fa fa-list-ol" style='cursor:pointer;float:right;font-size:14px;color:$textColor'></i> <?php echo "</td>"; echo "<tr>"; } } ?> </table> <?php $conn->close(); } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings