File manager - Edit - /home/autoph/public_html/pms_v1/ajaxSave/saveNewCompany.php
Back
<?php include_once("../../../cfg/conn.php"); if(isset($_POST['pmsAction'])){ $count = 0; $compCode = $_POST['compCode']; $grpName = $_POST['compName']; $groupCode = $_POST['groupCode']; $areaCode = $_POST['areaCode']; $compAddress = $_POST['compAddress']; $sql = "INSERT INTO vts_company (`comp_id`, `comp_code`, `comp_name`,`comp_address`,`comp_group_code`,`comp_area_code`) VALUES ('', '$compCode', '$grpName','$compAddress','$groupCode','$areaCode')"; if ($conn->query($sql) === TRUE) { //echo "New record created successfully"; } else { //echo "Error: " . $sql . "<br>" . $conn->error; } echo '<table style="width:100%;border-collapse:collapse">'; /* <thead> <th style="width:10%">REC.ID</thd> <th style="width:10%">GROUP</th> <th style="width:10%">AREA</th> <th style="width:10%">CODE</th> <th style="width:30%">COMPANY NAME</th> <th style="width:10%">KRA COUNT</th> <th style="width:10%">KPI COUNT</th> <th style="width:5%"></th> <th style="width:5%"></th> </thead>'; */ $getAreaList = "SELECT * FROM `vts_company` WHERE comp_status ='1'"; $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 style='width:10%'>".$row['comp_id']."</td>"; echo "<td style='width:10%'>".$row['comp_group_code']."</td>"; echo "<td style='width:10%'>".$row['comp_area_code']."</td>"; echo "<td style='width:10%'>".$row['comp_code']."</td>"; echo "<td style='width:40%'>".$row['comp_name']."</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-plus-circle" 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>"; } } echo "</table>"; $conn->close(); } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings