2016-05-16 15:43:49 -06:00
|
|
|
<?php
|
2016-05-19 00:41:51 -06:00
|
|
|
/**
|
|
|
|
* Dump a database row for a given asset/accessory/consumable
|
|
|
|
*/
|
2016-05-16 15:43:49 -06:00
|
|
|
require 'required.php';
|
|
|
|
require 'dieifnotloggedin.php';
|
|
|
|
|
2016-05-17 03:23:46 -06:00
|
|
|
$from = $_GET['from'];
|
2016-05-16 15:43:49 -06:00
|
|
|
require 'readfrom.php';
|
|
|
|
|
|
|
|
$id = $_GET['id'];
|
|
|
|
if (is_empty($id)) {
|
|
|
|
sendError('Missing item ID!');
|
|
|
|
}
|
|
|
|
|
|
|
|
$results = $database->select($from, '*', ['id' => $id])[0];
|
|
|
|
die(json_encode(['status' => 'OK', 'results' => $results]));
|