public function __construct() { $this->lng = language::getinstance()->GetLngBlock('ownuniverse'); foreach (DataEngine::a_ressources() as $v) { $this->ressourcesnames[$v['Field']] = $v['Nom']; } $this->BatimentsName = DataEngine::a_batiments(); $this->parser = parser::getinstance(); }
public function __construct() { $this->reset(); $this->lng = language::getinstance()->GetLngBlock('cartographie'); $this->lngmain = language::getinstance()->GetLngBlock('dataengine'); $this->allys = DataEngine::config('EmpireAllys'); $this->wars = DataEngine::config('EmpireEnnemy'); if (!is_array($this->allys) && $this->allys != '') { $this->allys = array($this->allys); } if (!is_array($this->wars) && $this->wars != '') { $this->wars = array($this->wars); } if (!is_array($this->allys) && $this->allys == '') { $this->allys = array(); } if (!is_array($this->wars) && $this->wars == '') { $this->wars = array(); } if (is_array($this->allys)) { $this->allys = parser::getinstance()->cleaning_array($this->allys); } if (is_array($this->wars)) { $this->wars = parser::getinstance()->cleaning_array($this->wars); } $this->detelespooler = array(); }
/** * @author Alex10336 * Dernière modification: $Id$ * @license GNU Public License 3.0 ( http://www.gnu.org/licenses/gpl-3.0.txt ) * @license Creative Commons 3.0 BY-SA ( http://creativecommons.org/licenses/by-sa/3.0/deed.fr ) * **/ require_once './init.php'; require_once INCLUDE_PATH . 'Script.php'; require_once CLASS_PATH . 'parser.class.php'; Members::CheckPermsOrDie('PERSO'); $lng = language::getinstance()->GetLngBlock('personal'); if (isset($_POST['importation'])) { // $data = file_get_contents('./test/data/mafiche_ff.txt'); $data = gpc_esc($_POST['importation']); $parser = parser::getinstance(); // simple détection... if (p_stripos($parser->GetValueByLabel($data, $lng['ident']), $_SESSION['_login'], 0) !== false) { $matrix = explode("\n", trim($data)); $info = array(); $info['GameGrade'] = trim($matrix[0]); $info['Race'] = $parser->GetValueByLabel($data, $lng['Race']); $info['Titre'] = $parser->GetValueByLabel($data, $lng['Titre']); $info['Commerce'] = $parser->GetValueByLabel($data, $lng['Commerce']); $info['Recherche'] = $parser->GetValueByLabel($data, $lng['Recherche']); $info['Combat'] = $parser->GetValueByLabel($data, $lng['Combat']); $info['Construction'] = $parser->GetValueByLabel($data, $lng['Construction']); $info['Economie'] = $parser->GetValueByLabel($data, $lng['Economie']); $info['Navigation'] = $parser->GetValueByLabel($data, $lng['Navigation']); $info['POINTS'] = DataEngine::strip_number($parser->GetValueByLabel($data, $lng['POINTS'])); $info['pts_architecte'] = DataEngine::strip_number($parser->GetValueByLabel($data, $lng['pts_architecte']));