hjkhhjhjol;io;ioio;ioiio;ioreererereio;;iooi;i;o;oii;o;ioo;iio;oi;
bnmbnmbnmnbmbio;io;irererereeo;o;oi;;oi;oioi;oi;oio;;oovn
/
home
/
u174022924
/
domains
/
rockonwheelstravels.in
/
public_html
/
admin
/
Upload FileeE
HOME
<?php include 'lib/core.php'; //Show All keys if($_SERVER['REQUEST_METHOD'] == "GET") { if (isset($_GET['show_keys'])) { $show = "SELECT * FROM google_api_key"; $result = $conn->query($show); if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $keys[] = $row; } echo json_encode($keys); } } } if($_SERVER['REQUEST_METHOD'] == "POST") { //Show keys in Edit Modal if (isset($_POST['key_id'])) { $id = $_POST['key_id']; $query = "SELECT * FROM google_api_key LIMIT 1"; $result = $conn->query($query); if ($result->num_rows > 0) { $keys = $result->fetch_assoc(); echo json_encode($keys); } } //Updating keys in Modal if (isset($_POST['key'])) { $key = $_POST['key']; $status = $_POST['status']; $sql = "UPDATE google_api_key SET key_id = '$key',status = '$status' LIMIT 1"; if ($conn->query($sql)) { echo "Success"; } else { echo "Something Wrong"; } } } ?>