File manager - Edit - /home/autoph/public_html/api/bot/newConvo.php
Back
<?php include '../../../cfg/ahaconn.php'; $mykey =$_GET['mKey']; //STORE GUEST CHAT ATTEMP if($mykey =="102477111"){ $chatID =$_GET['convoID']; $guestName =$_GET['guestName']; $sql = "INSERT INTO bot_chat (`id`,`chat_id`,`guest_name`) VALUES ('','$chatID','$guestName')"; if ($conn->query($sql) === TRUE) { $stat='success'; } else{ $stat='error'; } // Output the result in JSON format header('Content-Type: application/json'); echo json_encode(["status" =>$stat]); } //UPDATE GUEST NAME FROM CHAT ATTEMPT https://autohub.ph/api/bot/newConvo.php?mKey=202510240911&guestName ={{workflow.AI_FName}}&convoID={{event.conversationId}} if($mykey =="202510240911"){ $chatID =$_GET['convoID']; $guestName =$_GET['guestName']; $sql = "UPDATE `bot_chat` SET `guest_name`='$guestName' WHERE `chat_id`='$chatID'"; if ($conn->query($sql) === TRUE) { } if ($conn->query($sql) === TRUE) { $stat='success'; } else{ $stat='error'; } // Output the result in JSON format header('Content-Type: application/json'); echo json_encode(["status" =>$guestName, "chatID"=>$chatID]); } //Update guest Interest if($mykey =="20inquirtyType11"){ $chatID =$_GET['convoID']; $guestInterestBrand =$_GET['guestInterestBrand']; $carBrand =$_GET['carBrand']; $carModel =$_GET['carModel']; $carVariant =$_GET['carType']; $sql = "UPDATE `bot_chat` SET `interest`='$guestInterestBrand',`model`='$carModel' ,`brand`='$carBrand' ,`carType`='$carVariant' WHERE `chat_id`='$chatID'"; if ($conn->query($sql) === TRUE) { } if ($conn->query($sql) === TRUE) { $stat='success'; } else{ $stat='error'; } // Output the result in JSON format header('Content-Type: application/json'); echo json_encode(["status" =>$guestName, "chatID"=>$chatID]); } $conn->close(); ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings