من هذا الكود <?php
// Start session
session_start();

header('Content-Type: application/json');

$submit = "";
$status = "OK";
$msg = "";

if ($_SERVER["REQUEST_METHOD"] == "POST") {

    $email = $_POST['email'];
    $password = $_POST['password'];

    if (empty($email)) {
        $msg .= "Please Enter Valid Phone Number.";
        $status = "NOTOK";
    }

    if (empty($password)) {
        $msg .= "Please Enter Your password.";
        $status = "NOTOK";
    }

    if ($status == "OK") {
        include('db_connect.php');

        $result = mysqli_query($con, "SELECT * FROM admin WHERE admin_email='$email' and admin_password='$password'");
        $count = mysqli_num_rows($result);

        $result2 = mysqli_query($con, "SELECT * FROM owner WHERE owner_email='$email' and owner_password='$password' AND owner_status=1");
        $count2 = mysqli_num_rows($result2);

        if ($count == 1) {
            $row = mysqli_fetch_array($result);
            $_SESSION['email'] = $row['admin_email'];
            $_SESSION['key']=(rand(1000,9999));
            http_response_code(200);
            echo json_encode(array('success' => 'true', 'message' => 'Login Successful', 'user_type' => 'admin', 'key' => $_SESSION['key']));
        }
        else if ($count2 == 1) {
            $row = mysqli_fetch_array($result2);
            $_SESSION['owner_id'] = $row['owner_id'];
            $_SESSION['owner_email'] = $row['owner_email'];
            $_SESSION['status'] = $row['owner_status'];
            $_SESSION['user_type'] = $row['owner_type'];
            $_SESSION['key']=mt_rand(1000,9999);
            http_response_code(200);
            echo json_encode(array('success' => 'true', 'message' => 'Login Successful', 'user_type' => $_SESSION['user_type'], 'key' => $_SESSION['key'], 'owner_name' => $row['owner_name']));
        } else {
            http_response_code(401);
            echo json_encode(array('success' => 'false', 'message' => 'Wrong Email or Password !!!.'));
        }
    }
} else {
    http_response_code(400);
    echo json_encode(array('success' => 'false', 'message' => 'Invalid Request.'));
}

// Connect to database
include('db_connect.php');

// Set content type to JSON
header('Content-Type: application/json');

// Handle GET request
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
  // Check if user is logged in
  if (isset($_SESSION['owner_email']) && isset($_SESSION['key'])) {
    $owner_id = $_SESSION['owner_id'];
    // Get shop information from database
    $result = mysqli_query($con, "SELECT * FROM shop WHERE shop_owner_id='$owner_id'");
    // Check if any shops were found
    if (mysqli_num_rows($result) > 0) {
      // Create array of shops
      $shops = array();
      while ($row = mysqli_fetch_assoc($result)) {
        $shops[] = $row;
      }
      // Return array of shops in JSON format
      echo json_encode($shops);
    } else {
      // No shops found
      echo json_encode(array('message' => 'No shops found'));
    }
  } else {
    // User is not logged in
    echo json_encode(array('message' => 'User not logged in'));
  }
}

// Handle POST request
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
  // Check if user is logged in
  if (isset($_SESSION['owner_email']) && isset($_SESSION['key'])) {
    $owner_id = $_SESSION['owner_id'];
    // Get form data
    $shop_name = $_POST['shop_name'];
    $shop_email = $_POST['shop_email'];
    $shop_phone = $_POST['shop_phone'];
    $shop_address = $_POST['shop_address'];
    $shop_currency = $_POST['shop_currency'];
    $shop_status = $_POST['shop_status'];
    // Check if shop already exists
    $result = mysqli_query($con, "SELECT * FROM shop WHERE shop_name='$shop_name' OR shop_email='$shop_email' OR shop_contact='$shop_phone' AND shop_owner_id='$owner_id'");
    $num_rows = mysqli_num_rows($result);
    if ($num_rows > 0) {
      // Shop already exists
      echo json_encode(array('message' => 'Shop already exists'));
    } else {
      // Add new shop to database
      if (mysqli_query($con, "INSERT INTO shop (`shop_name`,`shop_email`,`shop_contact`,`shop_address`,`currency_symbol`,`shop_status`,`shop_owner_id`) VALUE ('$shop_name','$shop_email','$shop_phone','$shop_address','$shop_currency','$shop_status','$owner_id')")) {
        // Shop added successfully
        echo json_encode(array('message' => 'Shop added successfully'));
      } else {
        // Error adding shop
        echo json_encode(array('message' => 'Error adding shop'));
      }
    }
  } else {
    // User is not logged in
    echo json_encode(array('message' => 'User not logged in'));
  }
}
?> اكتب كود تطبيق الاندرويد المرتبط به مع كتابة xml  الخاص به