<?php
$loadConfigs = array(
'ajax' => array('loadDatabase' => true, 'loadLogin' => true, 'loadLayout' => false, 'showErrors' => false), // for AJAX scripts
'ajaxNODB' => array('loadDatabase' => false, 'loadLogin' => false, 'loadLayout' => false, 'showErrors' => false), // for AJAX scripts that load file contents
'default' => array('loadDatabase' => true, 'loadLogin' => true, 'loadLayout' => true, 'showErrors' => true)
);
//START
include_once('./system/load.init.php');
// LOAD LAST SESSION DATA [forms content etc.]
include_once('./system/load.session_data.php');
// LOAD LAST SESSION DATA END
// DEFINE PARAMS AND PAGE
include_once('./system/load.page_parameters.php');
// DEFINE PARAMS AND PAGE END
if(isset($loadConfigs[Website::getPage()]))
$loadConfig = $loadConfigs[Website::getPage()];
else
$loadConfig = $loadConfigs['default'];
// DATABASE
if($loadConfig['loadDatabase'])
include_once('./system/load.database.php');
// DATABASE END
// LOGIN
if($loadConfig['loadLogin'])
include_once('./system/load.login.php');
// LOGIN END
// LOAD LAYOUT
if($loadConfig['loadLayout'])
include_once('./system/load.layout.php');
// LOAD LAYOUT END
// LOAD PAGE
include_once('./system/load.page.php');
// LOAD PAGE END
if($loadConfig['showErrors'])
Display::printErrors(WebsiteErrors::getErrorsList());
echo new Display();
?>
I meant that few days ago all classes were in one file and now they are where they should be...>My face when people stilll think that less file size means better.
<?xml version="1.0" encoding="UTF-8"?>
<configmanager formatVersion="1.0" fileVersion="1.0" author="Gesior" name="character_create">
<worldconfig>
<param type="integer" key="formSize" defaultValue="25" />
<param type="bool" key="useVerifyImage" defaultValue="false" />
<param type="integer" key="newPlayerGroupId" defaultValue="1" />
<param type="bool" key="copyItems" defaultValue="true" />
<param type="bool" key="copySkills" defaultValue="true" />
<param type="integer" key="maximumNumberOfCharacters" defaultValue="15" />
<param type="list" key="townsAllowed" multiselect="true" configs="config:towns" defaultValue="" />
<param type="bool" key="townsUserSelect" defaultValue="true" />
<param type="bool" key="townsSpawnInTemple" defaultValue="true" />
<param type="list" key="sexAllowed" multiselect="true" configs="config:sex" defaultValue="" />
<param type="bool" key="sexUserSelect" defaultValue="true" />
<param type="bool" key="vocationsShowInfo" defaultValue="true" />
<param type="bool" key="vocationsShowDescription" defaultValue="true" />
<param type="array" key="vocationsAllowed" keytype="iterator" childtype="array" defaultValue="" >
<param type="string" key="characterToCopy" defaultValue="" />
<param type="string" key="name" defaultValue="" />
<param type="string" key="description" defaultValue="" />
</param>
</worldconfig>
</configmanager>
<?xml version="1.0" encoding="UTF-8"?>
<configmanager formatVersion="1.0" fileVersion="1.0" author="Gesior" name="account_password_change">
<pageconfig>
<param type="integer" key="formSize" defaultValue="25" />
<param type="bool" key="useVerifyImage" defaultValue="false" />
<param type="bool" key="sendMailWithNewPassword" defaultValue="false" />
</pageconfig>
</configmanager>