|
<?php
|
|
session_start();
|
|
require "../../bootstrap.php";
|
|
|
|
use Backend\Model\User;
|
|
|
|
header('Content-Type: application/json;charset=UTF-8');
|
|
|
|
if(isset($_POST['id']))
|
|
$data = User::find($_POST['id']);
|
|
else
|
|
$data = User::all('id', 'name');
|
|
echo json_encode(array($data, $_SESSION['id']));
|
|
|
|
|
|
|
|
|