File manager - Edit - /home/autoph/public_html/pms_v1/mancom/readSynergySalesByModel.php
Back
<?php include_once("../../../cfg/conn.php"); include ("../functions/users.php"); //error_reporting(0); if(isset($_POST['readMe'])){ $year = $_POST['year']; $userID = $_POST['userID']; $dealerID = $_POST['dealerID']; $companyID = $_POST['companyID']; $manHeadercomID = $_POST['manHeadercomID']; $selMonth = $_POST['selMonth']; echo "<input type='text' id='tempVarHolder'>"; echo "<input type='text' id='modelID'>"; ?> <table id="synTable" class='table w-100'> <tr> <td class='text-center bg-dark text-light' style='width:10%;border:1px solid gray'>ID</td> <td class='text-center bg-dark text-light' style='width:50%;border:1px solid gray'>MODEL/VARIANT</td> <td class='text-center bg-dark text-light' style='width:20%;border:1px solid gray'>ACTUAL</td> </tr> <?php $variant = "SELECT * FROM `pms_car_models` WHERE `deleted`=0 AND `dealer_id`='$dealerID' ORDER BY `model_code` ASC"; $qVar = mysqli_query($conn,$variant); $qvCount = mysqli_num_rows($qVar); if($qvCount > 0){ while($row = mysqli_fetch_array($qVar)){ $actualValue=0; $modelID = $row['id']; $fieldID = $row['model_code'] .$selMonth; $getDataFromTable = "SELECT SUM(sales_count) AS 'actualDataCount' FROM `mancom_synergy_by_model` WHERE `model_id`='$modelID' AND comp_id='$companyID' AND `month_id` ='$selMonth'"; $qGet = mysqli_query($conn,$getDataFromTable); while($get = mysqli_fetch_array($qGet)){ $actualValue = $get['actualDataCount']; } ?><tr onclick="javascript:getModelActualData(this);" style="width:100%"><?php echo "<td class='text-left text-center text-dark border'>".$row['id']."</td>"; echo "<td class='text-left text-dark border'>".$row['model_code']."</td>"; echo "<td class='text-center text-dark border p-1'>"; echo "<input class='w-100 p-2 text-center display-5' type='text' id='$fieldID' value='$fieldID'>"; echo "</td>"; echo "</tr>"; } }else{ echo "<p class='text-center text-danger p-5 m-5>No variant detected</p>"; } $conn->close(); } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings