File manager - Edit - /home/autoph/public_html/api/aha/SA_ServiceUpdateMenu.php
Back
<?php include '../../../cfg/ahaconn.php'; $mykey =$_GET['keyID']; if($mykey == "TOKEN6e59e008b5348b452b615a3033729daae383-UPDATES"){ $userID = $_GET['userID']; $carPlate = $_GET['carPlate']; $serviceID = $_GET['serviceID']; // SQL query $sql = "SELECT * FROM service_bookings WHERE service_status_id < 15 AND id = '$serviceID' AND `cancelled_by` IS NULL"; $result = $conn->query($sql); if ($result->num_rows > 0) { // Array to hold the results $statusID = 0; $checkIN = ""; $checkList = ""; $jobStarted = ""; $PartsApproval = ""; $PartsApproval=""; $WaitingParts = ""; $PartsArrived = ""; $TestingQC = ""; $Carwash = ""; $Billing = ""; $Releasing = ""; $Abandoned = ""; $CheckOut = ""; $rows = array(); // Fetch data from each row and add it to the array while($row = $result->fetch_assoc()) { $myStatID = $row['service_status_id']; } switch($myStatID){ case 0: $checkIN = ""; $checkList = ""; $jobStarted = ""; $PartsApproval = ""; $WaitingParts = ""; $PartsArrived = ""; $TestingQC = ""; $Carwash = ""; $Billing = ""; $Releasing = ""; $CheckOut = ""; $Abandoned = ""; $ServiceCompleted = ""; break; case 1: $checkIN = "Visible"; $checkList = ""; $jobStarted = ""; $PartsApproval = ""; $WaitingParts = ""; $PartsArrived = ""; $TestingQC = ""; $Carwash = ""; $Billing = ""; $Releasing = ""; $CheckOut = ""; $Abandoned = ""; $ServiceCompleted = ""; break; case 2: $checkIN = "Visible"; $checkList = ""; $jobStarted = ""; $PartsApproval = ""; $WaitingParts = ""; $PartsArrived = ""; $TestingQC = ""; $Carwash = ""; $Billing = ""; $Releasing = ""; $CheckOut = ""; $Abandoned = ""; $ServiceCompleted = ""; break; case 3: $checkIN = ""; $checkList = "Visible"; $jobStarted = ""; $PartsApproval = ""; $WaitingParts = ""; $PartsArrived = ""; $TestingQC = ""; $Carwash = ""; $Billing = ""; $Releasing = ""; $CheckOut = ""; $Abandoned = ""; $ServiceCompleted = ""; break; case 4: $checkIN = ""; $checkList = ""; $jobStarted = "Visible"; $PartsApproval = "Visible"; $WaitingParts = "Visible"; $PartsArrived = "Visible"; $TestingQC = ""; $Carwash = ""; $Billing = ""; $Releasing = ""; $CheckOut = ""; $Abandoned = ""; $ServiceCompleted = ""; break; case 5: $checkIN = ""; $checkList = ""; $jobStarted = ""; $PartsApproval = "Visible"; $WaitingParts = "Visible"; $PartsArrived = "Visible"; $TestingQC = "Visible"; $Carwash = "Visible"; $Billing = "Visible"; $Releasing = "Visible"; $CheckOut = ""; $Abandoned = ""; $ServiceCompleted = ""; break; case 6: $checkIN = ""; $checkList = ""; $jobStarted = ""; $PartsApproval = "Visible"; $WaitingParts = "Visible"; $PartsArrived = "Visible"; $TestingQC = "Visible"; $Carwash = "Visible"; $Billing = "Visible"; $Releasing = "Visible"; $CheckOut = ""; $Abandoned = ""; $ServiceCompleted = ""; break; case 7: $checkIN = ""; $checkList = ""; $jobStarted = ""; $PartsApproval = "Visible"; $WaitingParts = "Visible"; $PartsArrived = "Visible"; $TestingQC = "Visible"; $Carwash = "Visible"; $Billing = "Visible"; $Releasing = "Visible"; $CheckOut = ""; $Abandoned = ""; $ServiceCompleted = ""; break; case 8: $checkIN = ""; $checkList = ""; $jobStarted = ""; $PartsApproval = "Visible"; $WaitingParts = "Visible"; $PartsArrived = "Visible"; $TestingQC = "Visible"; $Carwash = "Visible"; $Billing = "Visible"; $Releasing = "Visible"; $CheckOut = ""; $Abandoned = ""; $ServiceCompleted = ""; break; case 9: $checkIN = ""; $checkList = ""; $jobStarted = ""; $PartsApproval = ""; $WaitingParts = ""; $PartsArrived = ""; $TestingQC = "Visible"; $Carwash = ""; $Billing = "Visible"; $Releasing = "Visible"; $CheckOut = ""; $Abandoned = ""; $ServiceCompleted = ""; break; case 10: $checkIN = ""; $checkList = ""; $jobStarted = ""; $PartsApproval = "Visible"; $WaitingParts = "Visible"; $PartsArrived = "Visible"; $TestingQC = "Visible"; $Carwash = "Visible"; $Billing = ""; $Releasing = ""; $CheckOut = ""; $Abandoned = ""; $ServiceCompleted = ""; break; case '10.1': $checkIN = ""; $checkList = ""; $jobStarted = ""; $PartsApproval = "Visible"; $WaitingParts = "Visible"; $PartsArrived = "Visible"; $TestingQC = "Visible"; $Carwash = "Visible"; $Billing = ""; $Releasing = ""; $CheckOut = ""; $Abandoned = ""; $ServiceCompleted = ""; break; case 11: $checkIN = ""; $checkList = ""; $jobStarted = ""; $PartsApproval = ""; $WaitingParts = ""; $PartsArrived = "Visible"; $TestingQC = "Visible"; $Carwash = "Visible"; $Billing = "Visible"; $Releasing = "Visible"; $CheckOut = ""; $Abandoned = ""; $ServiceCompleted = ""; break; case 12: $checkIN = ""; $checkList = ""; $jobStarted = ""; $PartsApproval = ""; $WaitingParts = ""; $PartsArrived = ""; $TestingQC = "Visible"; $Carwash = "Visible"; $Billing = "Visible"; $Releasing = "Visible"; $CheckOut = ""; $Abandoned = ""; $ServiceCompleted = ""; break; case 13: $checkIN = ""; $checkList = ""; $jobStarted = ""; $PartsApproval = ""; $WaitingParts = ""; $PartsArrived = ""; $TestingQC = ""; $Carwash = ""; $Billing = ""; $Releasing = "Visible"; $CheckOut = "Visible"; $Abandoned = "Visible"; $ServiceCompleted = ""; break; case 14: $checkIN = ""; $checkList = ""; $jobStarted = ""; $PartsApproval = ""; $WaitingParts = ""; $PartsArrived = ""; $TestingQC = ""; $Carwash = ""; $Billing = ""; $Releasing = ""; $CheckOut = "Visible"; $Abandoned = "Visible"; $ServiceCompleted = ""; break; case 15: $checkIN = ""; $checkList = ""; $jobStarted = ""; $PartsApproval = ""; $WaitingParts = ""; $PartsArrived = ""; $TestingQC = ""; $Carwash = ""; $Billing = ""; $Releasing = ""; $CheckOut = ""; $Abandoned= ""; $ServiceCompleted = "Visible"; break; } // Output the result in JSON format header('Content-Type: application/json'); } echo json_encode(["checkIN" => "$checkIN", "checkList" => "$checkList", "jobStarted" => "$jobStarted", "PartsApproval" => "$PartsApproval", "WaitingParts" => "$WaitingParts", "PartsArrived" => "$PartsArrived", "TestingQC" => "$TestingQC", "Carwash" => "$Carwash", "Billing" => "$Billing", "Releasing" => "$Releasing", "CheckOut" => "$CheckOut", "Abandoned" => "$Abandoned", "ServiceCompleted" => "$ServiceCompleted", "OldStatusID"=>"$myStatID"]); } // Close connection $conn->close(); ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings