<?php
include("../db.php");
header('Content-Type: application/json');

$status = 0;
$mid = "";
$key = "";

$result = $db->getRow("SELECT mid,pay_key,salt FROM tbl_info WHERE id = '1'");

if ($result && $result['mid'] != '' && $result['pay_key'] != '') {
    $status = 1;
    $mid = $result['mid'];
    $key = $result['pay_key'];
}

echo json_encode(array("status" => $status, "mid" => $mid, "key" => $key, "salt" => $result['salt']));