File manager - Edit - /home/autoph/public_html/pms_v1/ajaxDelete/deleteEmployee.php
Back
<?php include_once("../../../cfg/conn.php"); if(isset($_POST['deptEmployee'])){ $count = 0; $SelectedRecordID = $_POST['SelectedRecordID']; $sql = "UPDATE pms_employee_data SET deleted = 1 WHERE `id`='$SelectedRecordID'";; if ($conn->query($sql) === TRUE) { //echo "New record created successfully"; } else { //echo "Error: " . $sql . "<br>" . $conn->error; } ?> <thead> <th class="col-1">REC.ID</thd> <th class="col-1">EMP. ID</th> <th class="col-1">COMPANY</th> <th class="col-1">BRANCH</th> <th class="col-3">FIRST NAME</th> <th class="col-3">LAST NAME</th> <th class="col-2">POSITION</th> <th style="width:2%"></th> <th style="width:2%"></th> <th style="width:2%"></th> </thead> <?php $getEmployeeList = "SELECT * FROM `pms_employee_data` WHERE deleted ='0' ORDER BY id DESC limit 35"; $getEmp = mysqli_query($conn,$getEmployeeList); $statRow = mysqli_num_rows($getEmp); if($statRow > 0){ while($row = mysqli_fetch_array($getEmp)){ $myCompID = $row['comp_id']; $myDealID = $row['branch_id']; $myPosID = $row['position']; ?><tr onclick="javascript:getInfo(this);"><?php echo "<td>".$row['id']."</td>"; echo "<td>".$row['emp_id']."</td>"; echo "<td>"; $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>"; $getDealer = "SELECT `deal_code` FROM `vts_dealerships` WHERE `deal_id`='$myDealID'"; $getD = mysqli_query($conn,$getDealer); while($rowD = mysqli_fetch_array($getD)){ echo strtoupper($rowD['deal_code']); } echo "</td>"; echo "<td>".strtoupper($row['first_name'])."</td>"; echo "<td>".strtoupper($row['last_name'])."</td>"; echo "<td>"; $getPos = "SELECT `position_name` FROM `pms_positions_tbl` WHERE `id`='$myPosID'"; $getP = mysqli_query($conn,$getPos); while($rowP = mysqli_fetch_array($getP)){ echo strtoupper($rowP['position_name']); } echo "</td>"; echo "<td style='width:2%'>";?> <!--<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="#kraModal" class="fa fa-ellipsis-h" style='cursor:pointer;color:green;float:right;font-size:14px'></i> <?php echo "</td>"; echo "<td style='width:2%'>";?> <!--<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="#editPMSModal" class="fa fa-pencil" style='cursor:pointer;color:green;float:right;font-size:14px'></i> <?php echo "</td>"; echo "<td style='width:2%'> <abbr title='Delete record'><i class='fa fa-trash ' aria-hidden='true' style='color:#FF0800;float:left;font-size:14px'></i></abbr> </td>"; echo "<tr>"; } } $conn->close(); } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings