connect_error) { die("Kapcsolódási hiba: " . $conn->connect_error); } $sql = "SELECT is_boss FROM workers WHERE userid = ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("i", $userid); $stmt->execute(); $stmt->store_result(); $is_boss = null; if ($stmt->num_rows > 0) { $stmt->bind_result($is_boss); $stmt->fetch(); } $stmt->close(); $file_path = 'https://api.gymoneglobal.com/latest/version.txt'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $file_path); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $latest_version = curl_exec($ch); curl_close($ch); $current_version = $version; $is_new_version_available = version_compare($latest_version, $current_version) > 0; $query = "SELECT type FROM shop_gateway WHERE type IN ('paypal', 'stripe')"; $result = $conn->query($query); $existing_types = array(); if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $existing_types[] = $row['type']; } } $sql = "SELECT * FROM `shop_gateway`"; $result = $conn->query($sql); if (isset($_POST['delete_id'])) { $delete_id = $_POST['delete_id']; $sql = "DELETE FROM shop_gateway WHERE id = ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("i", $delete_id); if ($stmt->execute()) { header("Refresh:0"); } $stmt->close(); } $conn->close(); ?>