File manager - Edit - /home/autoph/tmp/public_html/pms_v1/pcpDocuments/postPCPHeader_Employee.php
Back
<?php include_once("../../../cfg/conn.php"); if(isset($_POST['postIt'])){ $pcpHeaderID = $_POST['pcpHeaderID']; $status = $_POST['status']; $opsHeaderStatus = $_POST['opsHeaderStatus']; $SelectedRecordID = $_POST['SelectedRecordID']; $userID = $_POST['userID']; $postIt = $_POST['postIt']; switch($postIt){ case '1': $sql = "UPDATE pcp_headers SET `status` = '$status',`date_posted`='$myTimeStamp',`posted_by`='$userID' WHERE `id`='$pcpHeaderID'"; break; case '2': $sql = "UPDATE pcp_headers SET `status` = '$status',`approved_head_a_date`='$myTimeStamp',`approved_head_a`='$userID' WHERE `id`='$pcpHeaderID'"; break; case '3': $sql = "UPDATE pcp_headers SET `status` = '$status',`approved_head_b_date`='$myTimeStamp',`approved_head_b`='$userID' WHERE `id`='$pcpHeaderID'"; break; } if ($conn->query($sql) === TRUE) { //echo "New record created successfully"; } else { //echo "Error: " . $sql . "<br>" . $conn->error; } $getKRAList = "SELECT * FROM `pcp_headers` WHERE `deleted`=0 AND `employee_id` ='$SelectedRecordID' ORDER BY `year` DESC"; //$getAreaList = "SELECT * FROM `pms_area_tbl` WHERE deleted ='0'"; $getKRA = mysqli_query($conn,$getKRAList); $statRow = mysqli_num_rows($getKRA); if($statRow > 0){ while($row = mysqli_fetch_array($getKRA)){ ?><tr onclick="javascript:getKRAinfo(this);" ><?php echo "<td style='width:10%;'>".$row['id']."</td>"; echo "<td style='width:10%;'>".$row['year']."</td>"; echo "<td style='width:10%;'>".$row['period']."</td>"; echo "<td style='width:10%;'>".$row['status']."</td>"; echo "<td style='width:27%;'>".$row['pcp_name']."</td>"; echo "<td style='width:30%;'>".$row['pcp_description']."</td>"; echo "<td style='width:3%'>";?> <!--<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="#kpiModal" class="fa fa-pencil" style='cursor:pointer;color:green;float:right;font-size:14px'></i> <?php echo "</td>"; echo "<td style='width:3%'>";?> <i data-toggle="modal" class="fa fa-times" style='cursor:pointer;color:red;float:right;font-size:14px'></i> <?php echo "</td>"; echo "<tr>"; } } $conn->close(); } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings