File manager - Edit - /home/autoph/public_html/pms_v1/chatGPTv1/askGPT.php
Back
<?php if(isset($_POST['gpt'])){ ?> <div class="shadow-sm mb-3 pageHeaderContainer content-justify-right pt-2 pb-3 h-auto"> <h4 class="ml-3 mt-1"><i class="fa fa-question-circle-o text-dark text-bold p-3"> ChatGPT </i></h4> <input class="form-control border p-3 ml-4" type="search" placeholder="search" id="searchText" style="margin:0px;min-width:250px;width:75%;float:left"> <button type="button" class="btn btn-info" id="askGPTNow" style="float:rigth;width:20%;margin-left:3px">ASK ChatGPT</button> </div> <div class="row fluid m-0 w-100 p-3 bg-white h-auto pageBodyMenu"> <div class="col bg-white m-1 col-sm-12 col-sx-12 p-3 border h-auto w-100" style='min-height:650px;max-height:650px;overflow:auto'> <h6 class="form-label text-info m-2" for="gptSays">Result from ChatGPT</h6> <p id="gptSays" class="form-control p-2 h-100" style='border:0px solid white'> Ask me anything... </p> </div> </div> <?php } ?> <script language="javascript" type="text/javascript"> // Get the input field var input = document.getElementById("searchText"); // Execute a function when the user presses a key on the keyboard input.addEventListener("keypress", function(event) { // If the user presses the "Enter" key on the keyboard if (event.key === "Enter") { // Cancel the default action, if needed event.preventDefault(); // Trigger the button element with a click document.getElementById("askGPTNow").click(); } }); $("#askGPTNow").click(function(){ //alert('test'); searchGPTNow(); }); function searchGPTNow(){ var myQue = $("#searchText").val(); ShowUploadBar(); //alert(myQue); $.ajax({ url: "./chatGPTv1/chatGPT.php", type: "POST", async: true, data: { "myQue":myQue, "myQue": 1 }, success: function(d){ $("#gptSays").html(d); ShowUploadBar(); } }) } </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings