items.php

main 31 lines · 775 bytes Raw
Alex Alex Commit Initial commit 01/10/2026 09:20
1<?php require_once 'engine/init.php'; theme_open();
2
3/**
4 * Equipable items browser.
5 *
6 * items.xml is uploaded and parsed in the admin panel, under Server Info. This
7 * page only reads the result:
8 * $itemsEnabled the page is turned on in config.php
9 * $items the item list, or false when nothing was published
10 * $itemsAdmin, $itemsUpdated, $itemsFailed kept at false for older themes
11 */
12
13$itemsEnabled = ($config['items'] == true);
14$itemsAdmin = false;
15$itemsUpdated = false;
16$itemsFailed = false;
17$items = false;
18
19if ($itemsEnabled) {
20 $items = serverdata_load('items');
21
22 if ($items === false && is_file(serverdata_file('items.xml'))) {
23 serverdata_rebuild('items');
24 $items = serverdata_load('items');
25 }
26}
27
28view('items');
29
30theme_close();
31
Top