myaac/system/pages/admin/items.php
slawkens 913b4297cf * added new tooltip to view characters equipment item name
* this requires loaded items - go to admin panel and select Items menu, then reload
* added items.xml loader class and weapons.xml loader class
* load also runes into spells table
* (internal) changed spells.vocations database field to store json data instead of comma separated
* (internal) renamed existing Items class to Items_Images
2017-10-19 17:11:49 +02:00

31 lines
672 B
PHP

<?php
/**
* Load items.xml
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.6.1
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Load items.xml';
require(LIBS . 'items.php');
require(LIBS . 'weapons.php');
echo $twig->render('admin.items.html.twig');
$reload = isset($_REQUEST['reload']) && (int)$_REQUEST['reload'] == 1;
if($reload) {
if(Items::loadFromXML(true))
success('Successfully loaded items.');
else
error(Items::getError());
if(Weapons::loadFromXML(true))
success('Successfully loaded weapons.');
else
error(Weapons::getError());
}