*
* Source Code: https://github.com/cornernote/minetest-gamewiki
* License: GPLv3
*/
require('globals.php');
?>
query('SELECT id, output, mod, quantity, type, data FROM "craft" WHERE id = "' . $id . '"');
$row = $q->fetchArray();
$data = json_decode($row['data']);
echo '
Craft ' . ($row['type'] ? $row['type'] : 'unknown') . '
';
echo '
Output
';
echo gamewiki::item($row['output'], $row['quantity']);
if (isset($data->options) && isset($data->options->recipe)) {
echo '
Recipe
';
echo gamewiki::craft_recipe($data->options->recipe, $row['type']);
echo '
Pasteable
';
debug(gamewiki::craft_recipe_paste($row['output'] . ' ' . $row['quantity'], $data->options->recipe, $row['type']));
}
echo '
Data
';
echo '
mod:' . $row['mod'] . '
';
print '
';
print_r($data);
print '
';
?>