76 lines
2.0 KiB
PHP
76 lines
2.0 KiB
PHP
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>TechSyneric</title>
|
|
<!-- Required meta tags -->
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
|
<style>
|
|
|
|
.btn{
|
|
border: solid red 3px;
|
|
}
|
|
body{
|
|
background-color: powderblue;
|
|
}
|
|
#parent {
|
|
display: table;
|
|
width: 100%;
|
|
}
|
|
#form {
|
|
display: table-cell;
|
|
text-align: center;
|
|
vertical-align: middle;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<br><br>
|
|
<div class="container" id="parent">
|
|
|
|
<div id="form">
|
|
<form method="post" id="formdata">
|
|
<h2>ENTER QUERY</h2>
|
|
<br>
|
|
<textarea name="query" id="query" cols="175" rows="17" required></textarea>
|
|
<br>
|
|
<br>
|
|
<input type="submit" id="btn" value="Execute" class="btn btn-outline-danger">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
|
<script>
|
|
$("#btn").on('click' , function(e) {
|
|
e.preventDefault();
|
|
var query = $("#query").val();
|
|
console.log(query);
|
|
if (query =="") {
|
|
Swal.fire("Please Enter Query");
|
|
}else{
|
|
|
|
$.ajax({
|
|
url : "dev_dbutil_execute.php",
|
|
method:"POST",
|
|
data: {query:query},
|
|
success: function(e){
|
|
if(e == "yes"){
|
|
Swal.fire("Execute Successfully");
|
|
$('#formdata').trigger("reset");
|
|
}else{
|
|
Swal.fire(e);
|
|
}
|
|
}
|
|
})
|
|
}
|
|
})
|
|
</script>
|
|
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
|
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
|
</body>
|
|
</html> |