File manager - Edit - /home/autoph/public_html/pms_v1/ajaxSave/saveNewPosition.php
Back
<?php include_once("../../../cfg/conn.php"); if(isset($_POST['pmsAction'])){ $count = 0; $divisionID = $_POST['divisionID']; $departmentID = $_POST['departmentID']; $unitID = $_POST['unitID']; $positionCode = $_POST['positionCode']; $positionName = $_POST['positionName']; $positionDesc = $_POST['positionDesc']; $userID = $_POST['userID']; $sql = "INSERT INTO pms_positions_tbl (`id`, `division_id`, `department_id`,`unit_id`,`position_code`,`position_name`,`position_desc`,`created_by`) VALUES ('', '$divisionID', '$departmentID','$unitID','$positionCode','$positionName','$positionDesc','$userID')"; 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">UNIT. ID</th> <th class="col-1">CODE</th> <th class="col-4">POSITION NAME</th> <th class="col-4">POSITION DESCRIPTION</th> <!-- <th style="width:7%;padding-left:2px">KRA</th> <th style="width:7%;padding-left:2px">KPI</th> --> <th style="width:2%"></th> <th style="width:2%"></th> <th style="width:2%"></th> </thead> <?php $getAreaList = "SELECT * FROM `pms_positions_tbl` WHERE `deleted`='0' ORDER BY `position_code` ASC LIMIT 50"; $getArea = mysqli_query($conn,$getAreaList); $statRow = mysqli_num_rows($getArea); if($statRow > 0){ while($row = mysqli_fetch_array($getArea)){ $count = $count + 1; ?><tr onclick="javascript:getInfo(this);" ><?php echo "<td>".$row['id']."</td>"; echo "<td>".$row['unit_id']."</td>"; echo "<td>".$row['position_code']."</td>"; echo "<td>".$row['position_name']."</td>"; echo "<td>".$row['position_desc']."</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-list-ol" style='cursor:pointer;color:green;float:right;font-size:18px'></i> <?php echo "</td>"; echo "<td style='width:2%'> <abbr title='Edit record'><i class='fa fa-pencil-square-o' pencilButton aria-hidden='true' style='color:#04559f;float:right;font-size:18px'></i></abbr> </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:18px'></i></abbr> </td>"; echo "<tr>"; } } $conn->close(); } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings