ini_set('error_reporting', E_ALL && ~E_NOTICE);
require_once '../../init.vars.php';
if (!is_writeable(ROOT))
{
echo "The installer will not be able to create necessary files. Please allow write access to ".ROOT;
exit;
}
$installxml = simplexml_load_file("install.xml");
if ($_POST['action'] == 'runscripts')
{
require_once ROOT.'config.php';
$xpath = $installxml->xpath("//item[@type='script']");
echo '
The following scripts have run:
';
echo "
";
foreach($xpath as $item)
{
require_once(ROOT.$item['source']);
eval("\$result = $item[name];");
if (is_array($result))
{
foreach ($result as $res)
{
echo "