diff --git a/.htaccess b/.htaccess deleted file mode 100644 index 5eb217c..0000000 --- a/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -SetEnv DEBUG On -SetEnv DEPRECATION Off \ No newline at end of file diff --git a/application/code/core/Generations/Empire.php b/application/code/core/Generations/Empire.php deleted file mode 100644 index 9b70a49..0000000 --- a/application/code/core/Generations/Empire.php +++ /dev/null @@ -1,159 +0,0 @@ - - * All rights reserved. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - * --> NOTICE <-- - * This file is part of the core development branch, changing its contents will - * make you unable to use the automatic updates manager. Please refer to the - * documentation for further information about customizing Wootook. - * - */ - -/** - * - * Enter description here ... - * @author Greg - * - */ - -class Generations_Empire -{ - const TYPE_BUILDING = 'building'; - const TYPE_RESEARCH = 'technology'; - const TYPE_SHIP = 'fleet'; - const TYPE_DEFENSE = 'defense'; - const TYPE_SPECIAL = 'special'; - const TYPE_PRODUCTION = 'prodution'; - const TYPE_FLEET_MISSION = 'mission'; - - const RESOURCE_GOLD = 'gold'; - const RESOURCE_TITANIUM = 'titanium'; - const RESOURCE_ZIRCONIUM = 'zirconium'; - const RESOURCE_TRITIUM = 'tritium'; - const RESOURCE_POPULATION = 'population'; - const RESOURCE_ENERGY = 'energy'; - - const RESOURCE_MULTIPLIER = 'multiplier'; - const RESOURCE_CLASS = 'class'; - const BASE_BUILDING_TIME = 'base_time'; - - const SHIPS_CONSUMPTION_PRIMARY = 'primary_consumption'; - const SHIPS_CELERITY_PRIMARY = 'primary_speed'; - const SHIPS_CONSUMPTION_SECONDARY = 'secondary_consumption'; - const SHIPS_CELERITY_SECONDARY = 'secondary_speed'; - const SHIPS_CAPACITY_PRIMARY = 'primary_capacity'; - const SHIPS_CAPACITY_SECONDARY = 'secondary_capacity'; - - const ID_BUILDING_GOLD_MINE = 1; - const ID_BUILDING_GERMANUIM_MINE = 2; - const ID_BUILDING_DEUTERIUM_SYNTHETISER = 3; - const ID_BUILDING_SOLAR_PLANT = 4; - const ID_BUILDING_FUSION_REACTOR = 12; - const ID_BUILDING_ROBOTIC_FACTORY = 14; - const ID_BUILDING_NANITE_FACTORY = 15; - const ID_BUILDING_SHIPYARD = 21; - const ID_BUILDING_METAL_STORAGE = 22; - const ID_BUILDING_CRISTAL_STORAGE = 23; - const ID_BUILDING_DEUTERIUM_TANK = 24; - const ID_BUILDING_RESEARCH_LAB = 31; - const ID_BUILDING_TERRAFORMER = 33; - const ID_BUILDING_ALLIANCE_DEPOT = 34; - const ID_BUILDING_LUNAR_BASE = 41; - const ID_BUILDING_SENSOR_PHALANX = 42; - const ID_BUILDING_JUMP_GATE = 43; - const ID_BUILDING_MISSILE_SILO = 44; - - const ID_RESEARCH_ESPIONAGE_TECHNOLOGY = 106; - const ID_RESEARCH_COMPUTER_TECHNOLOGY = 108; - const ID_RESEARCH_WEAPON_TECHNOLOGY = 109; - const ID_RESEARCH_SHIELDING_TECHNOLOGY = 110; - const ID_RESEARCH_ARMOUR_TECHNOLOGY = 111; - const ID_RESEARCH_ENERGY_TECHNOLOGY = 113; - const ID_RESEARCH_HYPERSPACE_TECHNOLOGY = 114; - const ID_RESEARCH_COMBUSTION_DRIVE = 115; - const ID_RESEARCH_IMPULSE_DRIVE = 117; - const ID_RESEARCH_HYPERSPACE_DRIVE = 118; - const ID_RESEARCH_LASER_TECHNOLOGY = 120; - const ID_RESEARCH_ION_TECHNOLOGY = 121; - const ID_RESEARCH_PLASMA_TECHNOLOGY = 122; - const ID_RESEARCH_INTERGALACTIC_RESEARCH_NETWORK = 123; - const ID_RESEARCH_EXPEDITION_TECHNOLOGY = 124; - const ID_RESEARCH_ASTROPHYSICS = 124; - const ID_RESEARCH_GRAVITON_TECHNOLOGY = 199; - - const ID_SHIP_LIGHT_TRANSPORT = 202; - const ID_SHIP_LARGE_TRANSPORT = 203; - const ID_SHIP_LIGHT_FIGHTER = 204; - const ID_SHIP_HEAVY_FIGHTER = 205; - const ID_SHIP_CRUISER = 206; - const ID_SHIP_BATTLESHIP = 207; - const ID_SHIP_COLONY_SHIP = 208; - const ID_SHIP_RECYCLER = 209; - const ID_SHIP_SPY_DRONE = 210; - const ID_SHIP_BOMBER = 211; - const ID_SHIP_SOLAR_SATELLITE = 212; - const ID_SHIP_DESTRUCTOR = 213; - const ID_SHIP_DEATH_STAR = 214; - const ID_SHIP_BATTLECRUISER = 215; - const ID_SHIP_SUPERNOVA = 216; - - const ID_DEFENSE_ROCKET_LAUNCHER = 401; - const ID_DEFENSE_LIGHT_LASER = 402; - const ID_DEFENSE_HEAVY_LASER = 403; - const ID_DEFENSE_ION_CANNON = 404; - const ID_DEFENSE_GAUSS_CANNON = 405; - const ID_DEFENSE_PLASMA_TURRET = 406; - const ID_DEFENSE_SMALL_SHIELD_DOME = 407; - const ID_DEFENSE_LARGE_SHIELD_DOME = 408; - - const ID_SPECIAL_ANTIBALLISTIC_MISSILE = 502; - const ID_SPECIAL_INTERPLANETARY_MISSILE = 503; - - const ID_COMBAT_SHIELDS = 'shield'; - const ID_COMBAT_FIREPOWER = 'attack'; - const ID_COMBAT_RAPID_FIRE = 'rapidfire'; - - const ID_MISSION_ATTACK = 1; - const ID_MISSION_GROUP_ATTACK = 2; - const ID_MISSION_TRANSPORT = 3; - const ID_MISSION_STATION = 4; - const ID_MISSION_STATION_ALLY = 5; - const ID_MISSION_SPY = 6; - const ID_MISSION_SETTLE_COLONY = 7; - const ID_MISSION_RECYCLE = 8; - const ID_MISSION_DESTROY = 9; - const ID_MISSION_MISSILES = 10; - const ID_MISSION_BLOCUS = 11; - const ID_MISSION_BLOCUS = 11; - const ID_MISSION_EXPEDITION = 15; - - public static function getFieldName($id) - { - $fieldsAlias = Wootook_Empire_Model_Game_FieldsAlias::getSingleton(); - - if (!isset($fieldsAlias[$id])) { - return null; - } - - return $fieldsAlias[$id]; - } -} \ No newline at end of file diff --git a/application/code/core/Legacies/Officers/Model/Observer.php b/application/code/core/Legacies/Officers/Model/Observer.php deleted file mode 100644 index eaf0b17..0000000 --- a/application/code/core/Legacies/Officers/Model/Observer.php +++ /dev/null @@ -1,70 +0,0 @@ - - * All rights reserved. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - * --> NOTICE <-- - * This file is part of the core development branch, changing its contents will - * make you unable to use the automatic updates manager. Please refer to the - * documentation for further information about customizing Wootook. - * - */ -/** - * - * Enter description here ... - * @author Greg - * - */ -class Legacies_Officers_Model_Observer -{ - public static function planetUpdateListener($eventData) - { - if (isset($eventData['planet'])) { - $planet = $eventData['planet']; - - $user = $planet->getUser(); - - $level = floor(sqrt($user->getData('xpminier') / 500)); - if ($user->getData('lvl_minier') < $level) { - $difference = $level - $user->getData('lvl_minier'); - if ($difference == 1) { - Wootook::getSession(Wootook_Empire_Model_User::SESSION_KEY) - ->addInfo('You gained 1 miner level.'); - } else { - Wootook::getSession(Wootook_Empire_Model_User::SESSION_KEY) - ->addInfo('You gained %1$d miner level.', (int) $difference); - } - } - - $level = floor(sqrt($user->getData('xpraid'))); - if ($user->getData('lvl_raid') < $level) { - $difference = $level - $user->getData('lvl_raid'); - if ($difference == 1) { - Wootook::getSession(Wootook_Empire_Model_User::SESSION_KEY) - ->addInfo('You gained 1 raider level.'); - } else { - Wootook::getSession(Wootook_Empire_Model_User::SESSION_KEY) - ->addInfo('You gained %1$d raider level.', (int) $difference); - } - } - } - } -} \ No newline at end of file diff --git a/application/code/core/Wootook/Admin/Controller/Front/Action.php b/application/code/core/Wootook/Admin/Controller/Front/Action.php deleted file mode 100644 index 0e85ea2..0000000 --- a/application/code/core/Wootook/Admin/Controller/Front/Action.php +++ /dev/null @@ -1,13 +0,0 @@ -registerBlockNamespace('admin', 'Wootook_Admin_Block_', 'Wootook/Admin/Block'); - - return $layout; - } -} \ No newline at end of file diff --git a/application/code/core/Wootook/Admin/controllers/IndexController.php b/application/code/core/Wootook/Admin/controllers/IndexController.php deleted file mode 100644 index dfb88e1..0000000 --- a/application/code/core/Wootook/Admin/controllers/IndexController.php +++ /dev/null @@ -1,10 +0,0 @@ -_forward('index', 'user'); - } -} \ No newline at end of file diff --git a/application/code/core/Wootook/Admin/controllers/UserController.php b/application/code/core/Wootook/Admin/controllers/UserController.php deleted file mode 100644 index a960525..0000000 --- a/application/code/core/Wootook/Admin/controllers/UserController.php +++ /dev/null @@ -1,40 +0,0 @@ -_forward('grid'); - } - - public function gridAction() - { - $this->loadLayout(); - $this->renderLayout(); - } - - public function newAction() - { - } - - public function editAction() - { - } - - public function saveAction() - { - } - - public function saveMassAction() - { - } - - public function deleteAction() - { - } - - public function deleteMassAction() - { - } -} \ No newline at end of file diff --git a/application/code/core/Wootook/Core/Collection.php b/application/code/core/Wootook/Core/Collection.php deleted file mode 100644 index 90d3f7b..0000000 --- a/application/code/core/Wootook/Core/Collection.php +++ /dev/null @@ -1,356 +0,0 @@ -setTableName($tableName); - } - if ($entityClassName != null) { - $this->setEntityClassName($entityClassName); - } - } - - protected function _init() - { - return $this; - } - - public function setTableName($tableName) - { - if (!is_array($tableName)) { - $this->_tableName = $tableName; - } else { - $this->_tableName = current($tableName); - $this->_tableAlias = key($tableName); - } - - return $this; - } - - public function getTableName() - { - return $this->_tableName; - } - - public function setEntityClassName($entityClassName) - { - $this->_entityClassName = $entityClassName; - - return $this; - } - - public function getEntityClassName() - { - return $this->_entityClassName; - } - - public function quote($data) - { - return $this->getReadConnection()->quote($data); - } - - public function column($column = '*', $alias = null) - { - if (is_array($column)) { - foreach ($column as $alias => $field) { - if (is_int($alias)) { - $this->_columns[] = array($field); - } else { - $this->_columns[] = array($alias => $field); - } - } - } else if ($alias === null || is_int($alias)) { - $this->_columns[] = array($column); - } else { - $this->_columns[] = array($alias => $column); - } - - return $this; - } - - public function where($condition) - { - $this->_where[] = $condition; - - return $this; - } - - public function join($table, $condition, $fields = array('*'), $mode = 'INNER') - { - $database = $this->getReadConnection(); - - if (is_array($table)) { - $alias = key($table); - $table = current($table); - - foreach ($fields as $fieldAlias => $fieldName) { - $this->column("{$alias}.{$field}", $fieldAlias); - } - - $this->_join[] = "{$mode} JOIN {$database->getTable($table)} AS {$alias} ON {$condition}"; - } else { - foreach ($fields as $field) { - $this->column("{$field}"); - } - - $this->_join[] = "{$mode} JOIN {$database->getTable($table)} ON {$condition}"; - } - - return $this; - } - - public function order($field, $direction = 'ASC') - { - $this->_order[] = "{$field} {$direction}"; - - return $this; - } - - public function union($collection) - { - $this->_union[] = $collection; - - return $this; - } - - public function limit($limit, $offset = null) - { - $this->_limit = intval($limit); - $this->_offset = $offset; - - return $this; - } - - public function group($groupField) - { - $this->_group[] = $groupField; - - return $this; - } - - protected function _prepareSql() - { - if (empty($this->_union)) { - $database = $this->getReadConnection(); - - $fields = array(); - foreach ($this->_columns as $field) { - $fieldName = current($field); - $fieldAlias = key($field); - if (is_string($fieldAlias)) { - $fields[] = "{$fieldName} AS {$fieldAlias}"; - } else { - $fields[] = $fieldName; - } - } - if (!empty($fields)) { - $fields = implode(", ", $fields); - } else { - $fields = '*'; - } - if (!empty($this->_where)) { - $where = 'WHERE (' . implode(") AND (", $this->_where) . ')'; - } else { - $where = ''; - } - $joinedTables = implode("\n ", $this->_join); - - $order = ''; - if (!empty($this->_order)) { - $order = 'ORDER BY ' . implode(", ", $this->_order); - } - $alias = ''; - if ($this->_tableAlias !== null) { - $alias = " AS {$this->_tableAlias}"; - } - $limit = ''; - if ($this->_limit) { - if ($this->_offset) { - $limit = "LIMIT {$this->_limit}, {$this->_offset}"; - } else { - $limit = "LIMIT {$this->_limit}"; - } - } - $group = ''; - if (!empty($this->_group)) { - $group = 'GROUP BY ' . implode(', ', $this->_group); - } - - return <<getTable($this->getTableName())}{$alias} - {$joinedTables} - {$where} - {$group} - {$order} - {$limit} -SQL_EOF; - } else { - $statements = array(); - foreach ($this->_union as $statement) { - $statements[] = $statement->_prepareSql(); - } - - $statements = '(' . implode(') UNION (', $statements) . ')'; - if (!empty($where)) { - $where = 'WHERE ' . implode(" AND ", $this->_where); - } else { - $where = ''; - } - $where = implode(" AND ", $this->_where); - - $limit = ''; - if ($this->_limit) { - if ($this->_offset) { - $limit = "LIMIT {$this->_limit}, {$this->_offset}"; - } else { - $limit = "LIMIT {$this->_limit}"; - } - } - - return <<_prepareSql(); - } - - protected function _load() - { - $sql = $this->_prepareSql(); - - $database = $this->getReadConnection(); - $statement = $database->prepare($sql); - - $args = func_get_args(); - $statement->execute(array_shift($args)); - - $this->_items = array(); - if (func_num_args() > 1) { - $reflection = new ReflectionClass(array_shift($args)); - } else { - $reflection = new ReflectionClass($this->getEntityClassName()); - } - - while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { - $params = array_merge(array($row), $args); - $this->_items[] = $reflection->newInstanceArgs($params); - } - - return $this; - } - - protected function _save() - { - foreach ($this->_items as $child) { - $child->save(); - } - - return $this; - } - - protected function _delete() - { - foreach ($this->_items as $child) { - $child->delete(); - } - - return $this; - } - - public function getSize() - { - $clone = clone $this; - $clone->_fields = array(); - $clone->column('1'); - - $sql = $clone->_prepareSql(); - - $database = $this->getReadConnection(); - $statement = $database->prepare($sql); - - $args = func_get_args(); - $statement->execute(array_shift($args)); - $count = $statement->rowCount(); - $statement->closeCursor(); - - return $count; - } - - public function count() - { - return count($this->_items); - } - - public function current() - { - return current($this->_items); - } - - public function next() - { - next($this->_items); - - return $this; - } - - public function rewind() - { - reset($this->_items); - - return $this; - } - - public function key() - { - return key($this->_items); - } - - public function valid() - { - return current($this->_items) !== false; - } - - public function getFirstItem() - { - if (!$this->_) - if (count($this->_items) > 0) { - return $this->_items[0]; - } - return null; - } - - public function getLastItem() - { - $size = count($this->_items); - if ($size > 0) { - return $this->_items[$size - 1]; - } - return null; - } -} \ No newline at end of file diff --git a/application/code/core/Wootook/Core/Controller/Response/Abstract.php b/application/code/core/Wootook/Core/Controller/Response/Abstract.php deleted file mode 100644 index a8f77b2..0000000 --- a/application/code/core/Wootook/Core/Controller/Response/Abstract.php +++ /dev/null @@ -1,18 +0,0 @@ -setData($key, $value); - } - - public function getParam($key, $default = null) - { - if ($this->hasData($key)) { - return $this->getData($key); - } - return $default; - } -} diff --git a/application/code/core/Wootook/Core/Event.php b/application/code/core/Wootook/Core/Event.php deleted file mode 100644 index 42d5c92..0000000 --- a/application/code/core/Wootook/Core/Event.php +++ /dev/null @@ -1,6 +0,0 @@ -getPlanet()->getElement($this->getItemId()); - } - - public function getResourcesNeeded($level) - { - return $this->getPlanet()->getResourcesNeeded($this->getItemId(), $this->getQueuedLevel() + 1); - } - - public function getItemQueuedLevel() - { - return $this->getItem()->getData('level'); - } - - public function getQueuedLevel() - { - return $this->getPlanet()->getBuildingLevelQueued($this->getItemId()); - } - - public function getBuildingTime($level) - { - return $this->getPlanet()->getBuildingTime($this->getItemId(), $level); - } - - public function getResourcesConfigForLevel($level) - { - $resources = $this->getResourcesNeeded($level); - - $resourceConfig = array(); - foreach ($resources as $resourceId => $resourceValue) { - $resourceConfig[$resourceId] = new Wootook_Object(array( - 'resource_id' => $resourceId, - 'value' => $resourceValue - )); - - $amount = $this->getPlanet()->getResourceAmount($resourceId); - if (Math::comp($amount, $resourceValue) < 0) { - $resourceConfig[$resourceId]->setData('requirement', Math::sub($amount, $resourceValue)); - } else { - $resourceConfig[$resourceId]->setData('overflow', Math::sub($amount, $resourceValue)); - } - } - return $resourceConfig; - } - - public function getResourcesConfigForNextLevel() - { - return $this->getResourcesConfigForLevel($this->getNextLevel()); - } - - public function getBuildingTimeForNextLevel() - { - return $this->getBuildingTime($this->getNextLevel()); - } -} \ No newline at end of file diff --git a/application/code/core/Wootook/Empire/Exception.php b/application/code/core/Wootook/Empire/Exception.php deleted file mode 100644 index 73de227..0000000 --- a/application/code/core/Wootook/Empire/Exception.php +++ /dev/null @@ -1,3 +0,0 @@ -getElement(Legacies_Empire::ID_RESEARCH_COMBUSTION_DRIVE)); - } - - public function getActualSpeed(Wootook_Empire_Model_User $user) - { - return $this->getBaseSpeed($user) * $this->getSpeedMultiplier($user); - } - - public function getActualConsumption(Wootook_Empire_Model_User $user, $speed) - { - return $this->getBaseConsumption($user) * ($speed / 100) * $this->getSpeedMultiplier($user); - } -} \ No newline at end of file diff --git a/application/code/core/Wootook/Empire/Model/Planet/ShipInterface.php b/application/code/core/Wootook/Empire/Model/Planet/ShipInterface.php deleted file mode 100644 index 81c54cc..0000000 --- a/application/code/core/Wootook/Empire/Model/Planet/ShipInterface.php +++ /dev/null @@ -1,11 +0,0 @@ -markTestIncomplete(); - /* - $layoutDir = vfsStreamWrapper::getContent(''); - vfsStream::addStructure(array()); - - $this->_object = new Legacies_Core_Layout(); - */ - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - public function testEmpty() - { - - } -} diff --git a/application/code/test/Legacies/Empire/Model/BuilderTest.php b/application/code/test/Legacies/Empire/Model/BuilderTest.php deleted file mode 100644 index 45b7013..0000000 --- a/application/code/test/Legacies/Empire/Model/BuilderTest.php +++ /dev/null @@ -1,237 +0,0 @@ -_planet = new Legacies_Empire_Model_Planet(array( - 'id' => 1, - 'id_owner' => 1 - )); - - $this->_user = new Legacies_Empire_Model_User(array( - 'id' => 1 - )); - - $this->_planet->setUser($this->_user); - - $this->_user->setCurrentPlanet($this->_planet); - $this->_user->setHomePlanet($this->_planet); - - $this->_queueItemsData = array( - 'IDX0001' => array( - 'item_id' => 1, - 'level' => 1, - 'created_at' => 0, - 'updated_at' => 0 - ), - 'IDX0002' => array( - 'item_id' => 1, - 'level' => 2, - 'created_at' => 100, - 'updated_at' => 100 - ), - 'IDX0003' => array( - 'item_id' => 1, - 'level' => 3, - 'created_at' => 150, - 'updated_at' => 150 - ) - ); - } - - protected function _getMockedInstance($planet, $user, $methods = array()) - { - $reflector = new ReflectionClass($this->_class); - - foreach ($reflector->getMethods() as $method) { - if ($method->isAbstract()) { - $methods[] = $method->getName(); - } - } - - if (empty($methods)) { - $methods = null; - } - - return $this->getMock($this->_class, $methods, array($planet, $user)); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - public function testInit() - { - $stub = $this->getMockBuilder('Legacies_Empire_Model_BuilderAbstract') - ->disableOriginalConstructor() - ->setMethods(array('init', '_initItem', 'updateQueue', 'appendQueue', 'getResourcesNeeded', 'getBuildingTime')) - ->getMock(); - - $stub->expects($this->once()) - ->method('init') - ->will($this->returnValue($stub)); - - $stub->expects($this->never()) - ->method('_serializeQueue') - ->will($this->returnValue($stub)); - - $stub->expects($this->never()) - ->method('_unserializeQueue') - ->will($this->returnValue($stub)); - - $stub->__construct($this->_planet, $this->_user); - } - - public function testSerializingQueue() - { - $items = array( - 'IDX0001' => array( - 'item_id' => 1, - 'level' => 1, - 'created_at' => 0, - 'updated_at' => 0 - ), - 'IDX0002' => array( - 'item_id' => 1, - 'level' => 2, - 'created_at' => 100, - 'updated_at' => 100 - ), - 'IDX0003' => array( - 'item_id' => 1, - 'level' => 3, - 'created_at' => 150, - 'updated_at' => 150 - ) - ); - - $stub = $this->_getMockedInstance($this->_planet, $this->_user, array('_generateIndex')); - - $stub->expects($this->exactly(3)) - ->method('_initItem') - ->will($this->onConsecutiveCalls( - new Legacies_Empire_Model_Builder_Item($this->_queueItemsData['IDX0001']), - new Legacies_Empire_Model_Builder_Item($this->_queueItemsData['IDX0002']), - new Legacies_Empire_Model_Builder_Item($this->_queueItemsData['IDX0003']) - )); - - $stub->expects($this->exactly(3)) - ->method('_generateIndex') - ->will($this->onConsecutiveCalls( - 'IDX0001', - 'IDX0002', - 'IDX0003' - )); - - $stub->enqueue($this->_queueItemsData['IDX0001']); - $stub->enqueue($this->_queueItemsData['IDX0002']); - $stub->enqueue($this->_queueItemsData['IDX0003']); - - $this->assertEquals(serialize($this->_queueItemsData), $stub->serialize()); - } - - public function testUnSerializingQueue() - { - $serializedData = serialize($this->_queueItemsData); - - $stub = $this->_getMockedInstance($this->_planet, $this->_user, array('_generateIndex')); - - $stub->expects($this->exactly(3)) - ->method('_initItem') - ->will($this->onConsecutiveCalls( - new Legacies_Empire_Model_Builder_Item($this->_queueItemsData['IDX0001']), - new Legacies_Empire_Model_Builder_Item($this->_queueItemsData['IDX0002']), - new Legacies_Empire_Model_Builder_Item($this->_queueItemsData['IDX0003']) - )); - - $stub->expects($this->never()) - ->method('_generateIndex'); - - $stub->unserialize($serializedData); - - $this->assertAttributeNotEmpty('_queue', $stub); - - $this->assertEquals(serialize($this->_queueItemsData), $stub->serialize()); - } - - public function testUnSerializingQueueWithInvalidData() - { - $serializedData = ''; - - $stub = $this->_getMockedInstance($this->_planet, $this->_user, array('_generateIndex')); - - $stub->expects($this->never()) - ->method('_initItem'); - - $stub->expects($this->never()) - ->method('_generateIndex'); - - $stub->unserialize($serializedData); - - $this->assertAttributeEmpty('_queue', $stub); - - $this->assertEquals('a:0:{}', $stub->serialize()); - } - - public function testInitItemReturningNull() - { - $serializedData = serialize($this->_queueItemsData); - - $stub = $this->_getMockedInstance($this->_planet, $this->_user, array('_generateIndex')); - - $stub->expects($this->exactly(3)) - ->method('_initItem') - ->will($this->returnValue(null)); - - $stub->unserialize($serializedData); - - $this->assertAttributeEmpty('_queue', $stub); - - $this->assertEquals('a:0:{}', $stub->serialize()); - } - - public function testCheckAvailability() - { - $serializedData = serialize($this->_queueItemsData); - - $stub = $this->_getMockedInstance($this->_planet, $this->_user, array('_generateIndex')); - - $stub->expects($this->any()) - ->method('_initItem') - ->will($this->onConsecutiveCalls( - new Legacies_Empire_Model_Builder_Item($this->_queueItemsData['IDX0001']) - )); - - $this->assertTrue($stub->checkAvailability(Legacies_Empire::ID_BUILDING_METAL_MINE)); - $this->assertTrue($stub->checkAvailability(Legacies_Empire::ID_BUILDING_CRISTAL_MINE)); - $this->assertTrue($stub->checkAvailability(Legacies_Empire::ID_BUILDING_DEUTERIUM_SYNTHETISER)); - $this->assertTrue($stub->checkAvailability(Legacies_Empire::ID_BUILDING_FUSION_REACTOR)); - } -} diff --git a/application/code/test/Legacies/ObjectTest.php b/application/code/test/Legacies/ObjectTest.php deleted file mode 100644 index 234f744..0000000 --- a/application/code/test/Legacies/ObjectTest.php +++ /dev/null @@ -1,205 +0,0 @@ -_object = new Wootook_Object(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } - - /** - * @todo Implement testSetData(). - */ - public function testSetData() - { - $this->assertAttributeEmpty('_data', $this->_object); - - $this->_object->setData('test', true); - $expected = array('test' => true); - $this->assertAttributeEquals($expected, '_data', $this->_object); - - $this->_object->setData('test', 'testing'); - $expected = array('test' => 'testing'); - $this->assertAttributeEquals($expected, '_data', $this->_object); - } - - /** - * @requires testSetData - */ - public function testGetData() - { - $this->_object->setData('test', 'testing'); - - $this->assertEquals('testing', $this->_object->getData('test')); - - $this->_object->setData('test', true); - $this->assertTrue($this->_object->getData('test')); - - $this->assertNull($this->_object->getData('testing')); - } - - /** - * @requires testSetData - * @requires testGetData - */ - public function testGetAllDatas() - { - $this->_object->setData('test', 'testing'); - - $expected = array('test' => 'testing'); - $this->assertEquals($expected, $this->_object->getAllDatas()); - - $this->_object->setData('test', true); - $expected = array('test' => true); - $this->assertEquals($expected, $this->_object->getAllDatas()); - } - - /** - * @requires testSetData - * @requires testGetData - */ - public function testHasData() - { - $this->_object->setData('test', 'testing'); - - $this->assertTrue($this->_object->hasData('test')); - $this->assertFalse($this->_object->hasData('testing')); - } - - /** - * @requires testSetData - */ - public function testAddData() - { - $this->_object->setData('test', 'testing'); - - $expected = array( - 'test' => 'testing', - 'testing' => true, - 'legacies' => false - ); - - $this->_object->addData(array( - 'testing' => true, - 'legacies' => false - )); - $this->assertAttributeEquals($expected, '_data', $this->_object); - - $expected = array( - 'test' => 'legacies', - 'testing' => false, - 'legacies' => 'Wootook_Object' - ); - - $this->_object->addData($expected); - $this->assertAttributeEquals($expected, '_data', $this->_object); - } - - /** - * @requires testSetData - */ - public function testUnsetData() - { - $this->_object->setData('test', 'testing'); - $this->_object->setData('testing', true); - $this->_object->setData('removed', 'me!'); - $this->_object->setData('legacies', false); - - $expected = array( - 'test' => 'testing', - 'testing' => true, - 'legacies' => false - ); - - $this->_object->unsetData('removed'); - $this->assertAttributeEquals($expected, '_data', $this->_object); - } - - /** - * @todo Implement testClearData(). - */ - public function testClearData() - { - $this->_object->setData('test', 'testing'); - $this->_object->setData('testing', true); - $this->_object->setData('removed', 'me!'); - $this->_object->setData('legacies', false); - - $expected = array( - 'test' => 'testing', - 'testing' => true, - 'legacies' => false - ); - - $this->_object->clearData(); - $this->assertAttributeEmpty('_data', $this->_object); - } - - /** - * @requires testSetData - * @requires testHasData - */ - public function testOffsetExists() - { - $this->_object->setData('test', 'testing'); - - $this->assertTrue(isset($this->_object['test'])); - } - - /** - * @requires testSetData - * @requires testGetData - */ - public function testOffsetGet() - { - $this->_object->setData('test', 'testing'); - - $this->assertEquals('testing', $this->_object['test']); - } - - /** - * @requires testGetData - * @requires testSetData - */ - public function testOffsetSet() - { - $this->_object['test'] = 'testing'; - - $this->assertEquals('testing', $this->_object->getData('test')); - } - - /** - * @requires testSetData - * @requires testGetData - */ - public function testOffsetUnset() - { - $this->_object->setData('test', 'testing'); - - unset($this->_object['test']); - - $this->assertAttributeEmpty('_data', $this->_object); - $this->assertNull($this->_object->getData('test')); - } -} diff --git a/application/code/test/WootookTest.php b/application/code/test/WootookTest.php deleted file mode 100644 index 8962684..0000000 --- a/application/code/test/WootookTest.php +++ /dev/null @@ -1,119 +0,0 @@ -setData('success', true); - } - - public static function staticListener($observer) - { - $observer->setData('success', true); - } - - public function testRegisteringNonStaticEvent() - { - Wootook::registerListener('testing', array($this, 'nonStaticListener')); - - $observer = Wootook::dispatchEvent('testing', array('success' => false)); - - $this->assertInstanceOf('Legacies_Core_Event', $observer); - $this->assertTrue($observer->getData('success')); - } - - public function testRegisteringStaticEvent() - { - Wootook::registerListener('testing', array(get_class($this), 'staticListener')); - - $observer = Wootook::dispatchEvent('testing', array('success' => false)); - - $this->assertInstanceOf('Legacies_Core_Event', $observer); - $this->assertTrue($observer->getData('success')); - } - - public function testDispatchNonExistingEvent() - { - $observer = Wootook::dispatchEvent('testing', array('success' => true)); - - $this->assertInstanceOf('Legacies_Core_Event', $observer); - $this->assertTrue($observer->getData('success')); - } - - /** - * @depends testRegisteringNonStaticEvent - */ - public function testUnregisteringNonStaticEvent() - { - Wootook::registerListener('testing', array($this, 'nonStaticListener')); - - Wootook::clearEventListeners('testing'); - - $observer = Wootook::dispatchEvent('testing', array('success' => false)); - - $this->assertInstanceOf('Legacies_Core_Event', $observer); - $this->assertFalse($observer->getData('success')); - } - - /** - * @depends testRegisteringStaticEvent - */ - public function testUnregisteringStaticEvent() - { - Wootook::registerListener('testing', array(get_class($this), 'staticListener')); - - Wootook::clearEventListeners('testing'); - - $observer = Wootook::dispatchEvent('testing', array('success' => false)); - - $this->assertInstanceOf('Legacies_Core_Event', $observer); - $this->assertFalse($observer->getData('success')); - } - - public function testGetSession() - { - $this->markTestSkipped('Sessions could not be tested in CLI.'); - $this->assertInstanceOf('Legacies_Core_Model_Session', Wootook::getSession('test')); - } - - public function testGetTranslator() - { - $this->assertInstanceOf('Legacies_Core_Model_Translator', Wootook::getTranslator('test')); - - $this->assertInstanceOf('Legacies_Core_Model_Translator', Wootook::getTranslator()); - } - - public function testTranslate() - { - $this->assertEquals('My testing message!', Wootook::translate('test', 'My %s message!', array('testing'))); - } - - public function testTranslateGettextStyle() - { - $this->assertEquals('My testing message!', Wootook::__('My %s message!', 'testing')); - } - - public function testSetDefaultLocale() - { - Wootook::setDefaultLocale('test'); - - $this->assertAttributeEquals('test', '_defaultLocale', 'Beyond'); - } - - /** - * - * @requires testSetDefaultLocale - */ - public function testGetDefaultLocale() - { - Wootook::setDefaultLocale('test'); - - $this->assertEquals('test', Wootook::getDefaultLocale()); - } -} diff --git a/application/code/test/bootstrap.php b/application/code/test/bootstrap.php deleted file mode 100644 index b304533..0000000 --- a/application/code/test/bootstrap.php +++ /dev/null @@ -1,66 +0,0 @@ - array( - 'application' => array( - 'code' => array( - 'community' => array(), - 'core' => array(), - 'libraries' => array(), - 'local' => array(), - ), - 'design' => array( - 'layouts' => array(), - 'scripts' => array() - ) - ), - 'data' => array( - 'combat.php' => ' ' ' ' ' ' ' ' ' array( - 'date' => array( - 'timezone' => 'Europe/Paris' - ), - 'database' => array( - 'engine' => 'mysql', - 'options' => array( - 'hostname' => 'localhost', - 'username' => 'root', - 'password' => '', - 'database' => 'db_xnova' - ), - 'table_prefix' => 'game_', - ), - 'layout' => array( - 'page' => 'page.php', - 'empire' => 'empire.php' - ) - ) - ), true) . ';' - ), 'root', 644); - -define('ROOT_PATH', vfsStream::url('')); -define('APPLICATION_PATH', vfsStream::url('includes/application')); - diff --git a/application/design/frontend/base/default/layouts/empire.php b/application/design/frontend/base/default/layouts/empire.php deleted file mode 100644 index ab3d160..0000000 --- a/application/design/frontend/base/default/layouts/empire.php +++ /dev/null @@ -1,524 +0,0 @@ - array( - 'update' => '1column', - 'reference' => array( - 'header' => array( - 'children' => array( - 'navigation' => array( - 'type' => 'core/html.navigation', - 'template' => 'page/html/navigation.phtml', - 'actions' => array( - array( - 'method' => 'setNodeTitle', - 'params' => array( - 'path' => 'planet', - 'title' => 'Planet' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'planet/overview', - 'label' => 'Overview', - 'title' => 'Overview', - 'uri' => 'overview.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'planet/buildings', - 'label' => 'Buildings', - 'title' => 'Buildings', - 'uri' => 'buildings.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'planet/research-lab', - 'label' => 'Research Lab', - 'title' => 'Research Lab', - 'uri' => 'buildings.php', - 'params' => array( - 'mode' => 'research' - ) - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'planet/shipyard', - 'label' => 'Shipyard', - 'title' => 'Shipyard', - 'uri' => 'buildings.php', - 'params' => array( - 'mode' => 'fleet' - ) - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'planet/defenses', - 'label' => 'Defenses', - 'title' => 'Defenses', - 'uri' => 'buildings.php', - 'params' => array( - 'mode' => 'defense' - ) - ) - ), - array( - 'method' => 'setNodeTitle', - 'params' => array( - 'path' => 'universe', - 'title' => 'Universe' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'universe/galaxy', - 'label' => 'Check out the Galaxy', - 'title' => 'Check out the Galaxy', - 'uri' => 'galaxy.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'universe/fleet', - 'label' => 'Send a Fleet', - 'title' => 'Send a Fleet', - 'uri' => 'fleet.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'universe/retailer', - 'label' => 'Retailer', - 'title' => 'Retailer', - 'uri' => 'marchand.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'universe/records', - 'label' => 'All Records', - 'title' => 'All Records', - 'uri' => 'records.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'universe/statistics', - 'label' => 'My Stats', - 'title' => 'My Stats', - 'uri' => 'stat.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'universe/search-player', - 'label' => 'Search a Player', - 'title' => 'Search a Player', - 'uri' => 'search.php' - ) - ), - array( - 'method' => 'setNodeTitle', - 'params' => array( - 'path' => 'account', - 'title' => 'My Account' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'account/empire', - 'label' => 'Empire', - 'title' => 'Empire', - 'uri' => 'imperium.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'account/officers', - 'label' => 'Officers', - 'title' => 'Officers', - 'uri' => 'officier.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'account/alliance', - 'label' => 'My Alliance', - 'title' => 'My Alliance', - 'uri' => 'alliance.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'account/messages', - 'label' => 'My Messages', - 'title' => 'My Messages', - 'uri' => 'messages.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'account/resources', - 'label' => 'My Resources Production', - 'title' => 'My Resources Production', - 'uri' => 'resources.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'account/tech-tree', - 'label' => 'Technology Tree', - 'title' => 'Technology Tree', - 'uri' => 'techtree.php' - ) - ), - array( - 'method' => 'setNodeTitle', - 'params' => array( - 'path' => 'tools', - 'title' => 'Tools' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'tools/notes', - 'label' => 'Note Pad', - 'title' => 'Note Pad', - 'uri' => 'notes.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'tools/options', - 'label' => 'Account Options', - 'title' => 'Account Options', - 'uri' => 'options.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'tools/logout', - 'label' => 'Log Out', - 'title' => 'Log Out', - 'uri' => 'logout.php' - ) - ), - array( - 'method' => 'setNodeTitle', - 'params' => array( - 'path' => 'community', - 'title' => 'Community' - ) - ), - array( - 'method' => 'addExternalLink', - 'params' => array( - 'name' => 'community/board', - 'label' => 'Forum board', - 'title' => 'Forum board', - 'url' => 'http://www.wootook.org/' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'community/chat', - 'label' => 'Chat', - 'title' => 'Chat', - 'uri' => 'chat.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'community/announcement', - 'label' => 'Announcements', - 'title' => 'Announcements', - 'uri' => 'annonce.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'community/multi', - 'label' => 'Declare Multi-account', - 'title' => 'Declare Multi-account', - 'uri' => 'delclare_multi.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'community/rules', - 'label' => 'Rules', - 'title' => 'Rules', - 'uri' => 'rules.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'community/contact', - 'label' => 'Contact Admin', - 'title' => 'Contact Admin', - 'uri' => 'contact.php' - ) - ), - array( - 'method' => 'addLink', - 'params' => array( - 'name' => 'community/banned', - 'label' => 'Banned Players', - 'title' => 'Banned Players', - 'uri' => 'banned.php' - ) - ) - ) - ), - 'topnav' => array( - 'type' => 'empire/topnav', - 'template' => 'empire/topnav.phtml', - ), - ) - ) - ) - ), - - 'overview' => array( - 'update' => 'empire', - 'reference' => array( - 'content' => array( - 'children' => array( - 'overview.forms' => array( - 'type' => 'core/concat' - ), - 'overview' => array( - 'type' => 'empire/overview', - 'template' => 'empire/overview.phtml' - ), - ) - ), - 'left' => array( - ) - ) - ), - - 'overview.rename-planet' => array( - 'update' => 'overview', - 'reference' => array( - 'overview.forms' => array( - 'children' => array( - 'rename-planet' => array( - 'type' => 'empire/overview.rename-planet', - 'template' => 'empire/overview/form/rename-planet.phtml' - ), - ) - ) - ) - ), - - 'overview.destroy-planet' => array( - 'update' => 'overview', - 'reference' => array( - 'overview.forms' => array( - 'children' => array( - 'destroy-planet' => array( - 'type' => 'empire/overview.destroy-planet', - 'template' => 'empire/overview/form/destroy-planet.phtml' - ), - ) - ) - ) - ), - - 'planet.buildings' => array( - 'update' => 'empire', - 'reference' => array( - 'content' => array( - 'children' => array( - 'queue' => array( - 'type' => 'empire/planet.buildings.queue', - 'template' => 'empire/planet/buildings/queue.phtml', - 'actions' => array( - array( - 'method' => 'setItemTemplate', - 'params' => array( - 'template' => 'empire/planet/buildings/queue/item.phtml' - ) - ), - array( - 'method' => 'setItemBlockType', - 'params' => array( - 'blockType' => 'empire/planet.buildings.queue.item' - ) - ) - ) - ), - 'item-list' => array( - 'type' => 'empire/planet.buildings', - 'template' => 'empire/planet/buildings.phtml', - 'children' => array( - 'item-list.items' => array( - 'type' => 'core/concat' - ), - ), - 'actions' => array( - array( - 'method' => 'setItemTemplate', - 'params' => array( - 'template' => 'empire/planet/buildings/item.phtml' - ) - ), - array( - 'method' => 'setItemBlockType', - 'params' => array( - 'blockType' => 'empire/planet.buildings.item' - ) - ) - ) - ), - ) - ) - ) - ), - - 'planet.shipyard' => array( - 'update' => 'empire', - 'reference' => array( - 'content' => array( - 'children' => array( - 'item-list' => array( - 'type' => 'legacies_empire/planet.shipyard', - 'template' => 'empire/planet/shipyard.phtml', - 'children' => array( - 'item-list.items' => array( - 'type' => 'core/concat' - ), - ), - 'actions' => array( - array( - 'method' => 'setItemTemplate', - 'params' => array( - 'template' => 'empire/planet/shipyard/item.phtml' - ) - ), - array( - 'method' => 'setItemBlockType', - 'params' => array( - 'blockType' => 'legacies_empire/planet.shipyard.item' - ) - ), - ) - ), - 'queue' => array( - 'type' => 'legacies_empire/planet.shipyard.queue', - 'template' => 'empire/planet/shipyard/queue.phtml', - 'actions' => array( - array( - 'method' => 'setItemTemplate', - 'params' => array( - 'template' => 'empire/planet/shipyard/queue/item.phtml' - ) - ), - array( - 'method' => 'setItemBlockType', - 'params' => array( - 'blockType' => 'legacies_empire/planet.shipyard.queue.item' - ) - ) - ) - ), - ) - ) - ) - ), - - 'planet.defense' => array( - 'update' => 'planet.shipyard', - 'reference' => array( - 'item-list' => array( - 'actions' => array( - array( - 'method' => 'setType', - 'params' => array( - 'type' => Legacies_Empire::TYPE_DEFENSE - ) - ) - ) - ) - ) - ), - - 'planet.research-lab' => array( - 'update' => 'empire', - 'reference' => array( - 'content' => array( - 'children' => array( - 'item-list' => array( - 'type' => 'legacies_empire/planet.research-lab', - 'template' => 'empire/planet/research-lab.phtml', - 'children' => array( - 'item-list.items' => array( - 'type' => 'core/concat' - ), - ), - 'actions' => array( - array( - 'method' => 'setItemTemplate', - 'params' => array( - 'template' => 'empire/planet/research-lab/item.phtml' - ) - ), - array( - 'method' => 'setItemBlockType', - 'params' => array( - 'blockType' => 'legacies_empire/planet.research-lab.item' - ) - ), - ) - ), - 'queue' => array( - 'type' => 'legacies_empire/planet.research-lab.queue', - 'template' => 'empire/planet/research-lab/queue.phtml', - 'actions' => array( - array( - 'method' => 'setItemTemplate', - 'params' => array( - 'template' => 'empire/planet/research-lab/queue/item.phtml' - ) - ), - array( - 'method' => 'setItemBlockType', - 'params' => array( - 'blockType' => 'legacies_empire/planet.research-lab.queue.item' - ) - ) - ) - ) - ) - ) - ) - ) - ); diff --git a/application/design/frontend/base/default/layouts/user.xml b/application/design/frontend/base/default/layouts/user.xml deleted file mode 100644 index 43521f8..0000000 --- a/application/design/frontend/base/default/layouts/user.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - css/deprecated/styles.css - - - - - css/deprecated/about.css - - - - - - - - - - - - - - - - css/deprecated/styles.css - - - - - css/deprecated/about.css - - - - - \ No newline at end of file diff --git a/application/design/frontend/base/default/scripts/empire/overview/planet/view.phtml b/application/design/frontend/base/default/scripts/empire/overview/planet/view.phtml deleted file mode 100644 index 8230a16..0000000 --- a/application/design/frontend/base/default/scripts/empire/overview/planet/view.phtml +++ /dev/null @@ -1 +0,0 @@ -planetList->render() ?> diff --git a/application/design/frontend/base/default/scripts/empire/planet/buildings/queue/item.phtml b/application/design/frontend/base/default/scripts/empire/planet/buildings/queue/item.phtml deleted file mode 100644 index 0825de3..0000000 --- a/application/design/frontend/base/default/scripts/empire/planet/buildings/queue/item.phtml +++ /dev/null @@ -1,8 +0,0 @@ - -
- - escape($this->getName())?> (renderNumber($this->getItemQueuedLevel())?>) - -
\ No newline at end of file diff --git a/application/design/frontend/base/default/scripts/empire/planet/research-lab/queue/item.phtml b/application/design/frontend/base/default/scripts/empire/planet/research-lab/queue/item.phtml deleted file mode 100644 index 0825de3..0000000 --- a/application/design/frontend/base/default/scripts/empire/planet/research-lab/queue/item.phtml +++ /dev/null @@ -1,8 +0,0 @@ - -
- - escape($this->getName())?> (renderNumber($this->getItemQueuedLevel())?>) - -
\ No newline at end of file diff --git a/application/design/frontend/base/default/scripts/user/login.phtml b/application/design/frontend/base/default/scripts/user/login.phtml deleted file mode 100644 index 4e51e00..0000000 --- a/application/design/frontend/base/default/scripts/user/login.phtml +++ /dev/null @@ -1,54 +0,0 @@ -
-
-
-
- - - - - - - - - - -
- __('Username')?> - __('Password')?> -
- __('Remember me')?> - -
- __('I have lost my password.')?> -
-
-
-
- -
-
__('Welcome on %s!', $this->escape($this->getData('server_name')))?>
-
-
-
-
__('%1$s make you an emperor. Conquer outer space and master other players on %1$s.', $this->getData('server_name'))?>
-
-
__('Register now!')?>
-
-
-
- - __('Player count: ')?>getData('user_count')?> - - __('Latest player: ')?>getData('latest_player')?> - - __('Online players: ')?> getData('online_players')?> - -
-
-
-
-
-
-
\ No newline at end of file diff --git a/application/gamedata/legacies/default/modules.php b/application/gamedata/legacies/default/modules.php deleted file mode 100644 index 5a2bd48..0000000 --- a/application/gamedata/legacies/default/modules.php +++ /dev/null @@ -1,9 +0,0 @@ - array( - 'core' => array('Wootook_Core_Block_' => 'Wootook/Core/Block'), - 'empire' => array('Wootook_Empire_Block_' => 'Wootook/Empire/Block'), - 'legacies_core' => array('Legacies_Core_Block_' => 'Legacies/Core/Block'), - 'legacies_empire' => array('Legacies_Empire_Block_' => 'Legacies/Empire/Block'), - 'legacies_officers' => array('Legacies_Officers_Block_' => 'Legacies/Officers/Block') - ) - ); \ No newline at end of file diff --git a/application/scripts/legacies/client.js b/application/scripts/legacies/client.js deleted file mode 100644 index 203285c..0000000 --- a/application/scripts/legacies/client.js +++ /dev/null @@ -1,265 +0,0 @@ -/** - * This file is part of Wootook - * - * @license http://www.gnu.org/licenses/gpl-3.0.txt -* @see http://www.wootook.com/ - * - * Copyright (c) 2009-Present, XNova Support Team - * All rights reserved. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * --> NOTICE <-- - * This file is part of the core development branch, changing its contents will - * make you unable to use the automatic updates manager. Please refer to the - * documentation for further information about customizing XNova. - * - */ -/** - * Main application script execution class - * - * @param string responder - * @param int messageOffset - */ - -function Legacies_Client(responder, messageOffset) { - if (!document.querySelectorAll) { - alert("Your browser is not compatible with CSS selectors API.\n\nCould not continue."); - return; - } - this.responder = responder; - this.messages = []; - this.messageId = messageOffset || 1; - this.callbacks = {}; - this.recurrentMessages = []; - - this.send = (function() { - if (this.messages.length == 0) { - return this; - } - var request = new XMLHttpRequest(); - request.open('POST', this.responder, false); - request.send(JSON.stringify(this.messages)); - this.messages = []; - for (var i in this.recurrentMessages) { - this.enqueue(this.recurrentMessages[i].action, this.recurrentMessages[i].params, this.recurrentMessages[i].callback); - } - if(request.status == 404) { - alert('Request failed, responder not found.'); - return this; - } - try { - var response = JSON.parse(request.responseText); - } catch (e) { - alert('Invalid response.'); - return this; - } - if(request.status == 200) { - for (var i in response) { - this._callback(response[i]); - } - } - return this; - }).bind(this); - - this.main = (function(interval) { - setInterval(this.send, interval || 30000); - }).bind(this); - - this.enqueue = (function(action, params){ - this.messages.push({'uid':this.messageId++,'action':action,'params':params}); - return this; - }).bind(this); - - this.enqueueRecurrent = (function(action, params, callback) { - this.recurrentMessages.push({'callback':callback,'action':action,'params':params}); - this.enqueue(action, params, callback); - }).bind(this); - - this._callback = (function(message){ - if (message.error === undefined || message.payload === undefined) { - return this; - } - if (message.error === true) { - if (typeof(message.payload.messages) == 'string') { - alert(message.payload.messages); - } else { - var info = ''; - for (var i in message.payload.messages) { - info = info + "\n[" + i + "]:\n" + message.payload.messages[i].join("\n") + "\n"; - } - alert("Errors were returned:\n" + info); - } - return this; - } - if (message.callback && this.CallbackType[message.callback]) { - (this.CallbackType[message.callback]).bind(this)(message.payload); - } - return this; - }).bind(this); - - this.login = (function(username, password, rememberme) { - var params = { - 'username': username, - 'password': password, - 'rememberme': rememberme || false - }; - this.enqueue('user.account.login', params).send(); - return this; - }).bind(this); - - this.logout = (function() { - this.enqueue('user.account.logout', {}).send(); - return this; - }).bind(this); - - this.form = (function(event) { - event.preventDefault(); - var form = event.target; - var params = {}; - for (var i = 0; i < form.length; i++) { - if (!form[i].name || !form[i].type) { - continue; - } - if (form[i].type == 'checkbox') { - if (form[i].checked) { - params[form[i].name] = true; - } else { - params[form[i].name] = false; - } - } else if (form[i].type == 'radio') { - params[form[i].name] = form[i].value; - } else if (form[i].value !== undefined) { - params[form[i].name] = form[i].value; - } - } - var action = form.action.slice(form.action.indexOf('#') + 1); - this.enqueue(action, params, this.CallbackType.updater).send(); - }).bind(this); - - this.CallbackType = { - redirector: function(payload) { - if (payload.redirect) { - document.location.href = payload.redirect; - } - }, - updater: function(payload) { - if (payload.html && payload.selector) { - var parent = $$(payload.selector); - var handler = document.createElement("div"); - handler.innerHTML = payload.html; - - var fragment = document.createDocumentFragment(); - for (var i = 0; i < handler.childNodes.length; i++) { - fragment.appendChild(handler.childNodes[i]); - } - - for (var i = 0; i < parent.length; i++) { - parent[i].appendChild(fragment.cloneNode(true)); - } - } - }, - script: function(payload) { - if (payload.script) { - eval(payload.script); - } - }, - error: function(payload) { - if (payload.messages) { - alert(payload.messages.join(', ')); - } - }, - show: function(payload) { - if (payload.selector) { - var elementList = $$(payload.selector); - for (var i = 0; i < elementList.length; i++) { - elementList[i].style.display = 'block'; - } - } - }, - hide: function(payload) { - if (payload.selector) { - var elementList = $$(payload.selector); - for (var i = 0; i < elementList.length; i++) { - elementList[i].style.display = 'none'; - } - } - }, - callback: function(payload) { - if (payload.callback) { - payload.callback.apply(this, payload.params); - } - }, - enqueueRecurrent: function(payload) { - if (payload.action && payload.params && payload.callback) { - this.enqueueRecurrent(payload.action, payload.params, payload.callback); - } - } - }; -} - -function Legacies_Element(object) { - object.listen = (function(event, callback) { - this.addEventListener(event, callback, false); - return this; - }).bind(object); - - return object; -} - -function Legacies_List(object) { - object.listen = (function(event, callback) { - for (var i in this) { - Legacies_Element(Legacies_Element[i]); - this[i].listen(event, callback); - } - return this; - }).bind(object); - - return object; -} - -function $A(object) { - return Array.prototype.slice.call(object); -} - -function $(element) { - if (typeof(element) == 'string') { - element = document.getElementById(element); - } - Legacies_Element(element); - return element; -} - -function $$(selector, context) { - context = context || document; - var nodeList = context.querySelectorAll(selector); - Legacies_List(nodeList); - return nodeList; -} - -function $E(element, methods) { - for (var i in methods) { - if (methods[i] === undefined) { - continue; - } - element[i] = function(){ - var args = $A(arguments); - args.unshift(element); - methods[i].apply(element, args); - } - element[i].bind(element); - } - return element; -} \ No newline at end of file diff --git a/application/scripts/sizzle.js b/application/scripts/sizzle.js deleted file mode 100644 index 07654d5..0000000 --- a/application/scripts/sizzle.js +++ /dev/null @@ -1,1413 +0,0 @@ -/*! - * Sizzle CSS Selector Engine - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){ - -var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, - done = 0, - toString = Object.prototype.toString, - hasDuplicate = false, - baseHasDuplicate = true, - rBackslash = /\\/g, - rNonWord = /\W/; - -// Here we check if the JavaScript engine is using some sort of -// optimization where it does not always call our comparision -// function. If that is the case, discard the hasDuplicate value. -// Thus far that includes Google Chrome. -[0, 0].sort(function() { - baseHasDuplicate = false; - return 0; -}); - -var Sizzle = function( selector, context, results, seed ) { - results = results || []; - context = context || document; - - var origContext = context; - - if ( context.nodeType !== 1 && context.nodeType !== 9 ) { - return []; - } - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - var m, set, checkSet, extra, ret, cur, pop, i, - prune = true, - contextXML = Sizzle.isXML( context ), - parts = [], - soFar = selector; - - // Reset the position of the chunker regexp (start from head) - do { - chunker.exec( "" ); - m = chunker.exec( soFar ); - - if ( m ) { - soFar = m[3]; - - parts.push( m[1] ); - - if ( m[2] ) { - extra = m[3]; - break; - } - } - } while ( m ); - - if ( parts.length > 1 && origPOS.exec( selector ) ) { - - if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { - set = posProcess( parts[0] + parts[1], context ); - - } else { - set = Expr.relative[ parts[0] ] ? - [ context ] : - Sizzle( parts.shift(), context ); - - while ( parts.length ) { - selector = parts.shift(); - - if ( Expr.relative[ selector ] ) { - selector += parts.shift(); - } - - set = posProcess( selector, set ); - } - } - - } else { - // Take a shortcut and set the context if the root selector is an ID - // (but not if it'll be faster if the inner selector is an ID) - if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && - Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { - - ret = Sizzle.find( parts.shift(), context, contextXML ); - context = ret.expr ? - Sizzle.filter( ret.expr, ret.set )[0] : - ret.set[0]; - } - - if ( context ) { - ret = seed ? - { expr: parts.pop(), set: makeArray(seed) } : - Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); - - set = ret.expr ? - Sizzle.filter( ret.expr, ret.set ) : - ret.set; - - if ( parts.length > 0 ) { - checkSet = makeArray( set ); - - } else { - prune = false; - } - - while ( parts.length ) { - cur = parts.pop(); - pop = cur; - - if ( !Expr.relative[ cur ] ) { - cur = ""; - } else { - pop = parts.pop(); - } - - if ( pop == null ) { - pop = context; - } - - Expr.relative[ cur ]( checkSet, pop, contextXML ); - } - - } else { - checkSet = parts = []; - } - } - - if ( !checkSet ) { - checkSet = set; - } - - if ( !checkSet ) { - Sizzle.error( cur || selector ); - } - - if ( toString.call(checkSet) === "[object Array]" ) { - if ( !prune ) { - results.push.apply( results, checkSet ); - - } else if ( context && context.nodeType === 1 ) { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { - results.push( set[i] ); - } - } - - } else { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && checkSet[i].nodeType === 1 ) { - results.push( set[i] ); - } - } - } - - } else { - makeArray( checkSet, results ); - } - - if ( extra ) { - Sizzle( extra, origContext, results, seed ); - Sizzle.uniqueSort( results ); - } - - return results; -}; - -Sizzle.uniqueSort = function( results ) { - if ( sortOrder ) { - hasDuplicate = baseHasDuplicate; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( var i = 1; i < results.length; i++ ) { - if ( results[i] === results[ i - 1 ] ) { - results.splice( i--, 1 ); - } - } - } - } - - return results; -}; - -Sizzle.matches = function( expr, set ) { - return Sizzle( expr, null, null, set ); -}; - -Sizzle.matchesSelector = function( node, expr ) { - return Sizzle( expr, null, null, [node] ).length > 0; -}; - -Sizzle.find = function( expr, context, isXML ) { - var set; - - if ( !expr ) { - return []; - } - - for ( var i = 0, l = Expr.order.length; i < l; i++ ) { - var match, - type = Expr.order[i]; - - if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { - var left = match[1]; - match.splice( 1, 1 ); - - if ( left.substr( left.length - 1 ) !== "\\" ) { - match[1] = (match[1] || "").replace( rBackslash, "" ); - set = Expr.find[ type ]( match, context, isXML ); - - if ( set != null ) { - expr = expr.replace( Expr.match[ type ], "" ); - break; - } - } - } - } - - if ( !set ) { - set = typeof context.getElementsByTagName !== "undefined" ? - context.getElementsByTagName( "*" ) : - []; - } - - return { set: set, expr: expr }; -}; - -Sizzle.filter = function( expr, set, inplace, not ) { - var match, anyFound, - old = expr, - result = [], - curLoop = set, - isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); - - while ( expr && set.length ) { - for ( var type in Expr.filter ) { - if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { - var found, item, - filter = Expr.filter[ type ], - left = match[1]; - - anyFound = false; - - match.splice(1,1); - - if ( left.substr( left.length - 1 ) === "\\" ) { - continue; - } - - if ( curLoop === result ) { - result = []; - } - - if ( Expr.preFilter[ type ] ) { - match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); - - if ( !match ) { - anyFound = found = true; - - } else if ( match === true ) { - continue; - } - } - - if ( match ) { - for ( var i = 0; (item = curLoop[i]) != null; i++ ) { - if ( item ) { - found = filter( item, match, i, curLoop ); - var pass = not ^ !!found; - - if ( inplace && found != null ) { - if ( pass ) { - anyFound = true; - - } else { - curLoop[i] = false; - } - - } else if ( pass ) { - result.push( item ); - anyFound = true; - } - } - } - } - - if ( found !== undefined ) { - if ( !inplace ) { - curLoop = result; - } - - expr = expr.replace( Expr.match[ type ], "" ); - - if ( !anyFound ) { - return []; - } - - break; - } - } - } - - // Improper expression - if ( expr === old ) { - if ( anyFound == null ) { - Sizzle.error( expr ); - - } else { - break; - } - } - - old = expr; - } - - return curLoop; -}; - -Sizzle.error = function( msg ) { - throw "Syntax error, unrecognized expression: " + msg; -}; - -var Expr = Sizzle.selectors = { - order: [ "ID", "NAME", "TAG" ], - - match: { - ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, - ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, - TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, - CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, - POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, - PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ - }, - - leftMatch: {}, - - attrMap: { - "class": "className", - "for": "htmlFor" - }, - - attrHandle: { - href: function( elem ) { - return elem.getAttribute( "href" ); - }, - type: function( elem ) { - return elem.getAttribute( "type" ); - } - }, - - relative: { - "+": function(checkSet, part){ - var isPartStr = typeof part === "string", - isTag = isPartStr && !rNonWord.test( part ), - isPartStrNotTag = isPartStr && !isTag; - - if ( isTag ) { - part = part.toLowerCase(); - } - - for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { - if ( (elem = checkSet[i]) ) { - while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} - - checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? - elem || false : - elem === part; - } - } - - if ( isPartStrNotTag ) { - Sizzle.filter( part, checkSet, true ); - } - }, - - ">": function( checkSet, part ) { - var elem, - isPartStr = typeof part === "string", - i = 0, - l = checkSet.length; - - if ( isPartStr && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - var parent = elem.parentNode; - checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; - } - } - - } else { - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - checkSet[i] = isPartStr ? - elem.parentNode : - elem.parentNode === part; - } - } - - if ( isPartStr ) { - Sizzle.filter( part, checkSet, true ); - } - } - }, - - "": function(checkSet, part, isXML){ - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); - }, - - "~": function( checkSet, part, isXML ) { - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); - } - }, - - find: { - ID: function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }, - - NAME: function( match, context ) { - if ( typeof context.getElementsByName !== "undefined" ) { - var ret = [], - results = context.getElementsByName( match[1] ); - - for ( var i = 0, l = results.length; i < l; i++ ) { - if ( results[i].getAttribute("name") === match[1] ) { - ret.push( results[i] ); - } - } - - return ret.length === 0 ? null : ret; - } - }, - - TAG: function( match, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( match[1] ); - } - } - }, - preFilter: { - CLASS: function( match, curLoop, inplace, result, not, isXML ) { - match = " " + match[1].replace( rBackslash, "" ) + " "; - - if ( isXML ) { - return match; - } - - for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { - if ( elem ) { - if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { - if ( !inplace ) { - result.push( elem ); - } - - } else if ( inplace ) { - curLoop[i] = false; - } - } - } - - return false; - }, - - ID: function( match ) { - return match[1].replace( rBackslash, "" ); - }, - - TAG: function( match, curLoop ) { - return match[1].replace( rBackslash, "" ).toLowerCase(); - }, - - CHILD: function( match ) { - if ( match[1] === "nth" ) { - if ( !match[2] ) { - Sizzle.error( match[0] ); - } - - match[2] = match[2].replace(/^\+|\s*/g, ''); - - // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' - var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( - match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || - !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); - - // calculate the numbers (first)n+(last) including if they are negative - match[2] = (test[1] + (test[2] || 1)) - 0; - match[3] = test[3] - 0; - } - else if ( match[2] ) { - Sizzle.error( match[0] ); - } - - // TODO: Move to normal caching system - match[0] = done++; - - return match; - }, - - ATTR: function( match, curLoop, inplace, result, not, isXML ) { - var name = match[1] = match[1].replace( rBackslash, "" ); - - if ( !isXML && Expr.attrMap[name] ) { - match[1] = Expr.attrMap[name]; - } - - // Handle if an un-quoted value was used - match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); - - if ( match[2] === "~=" ) { - match[4] = " " + match[4] + " "; - } - - return match; - }, - - PSEUDO: function( match, curLoop, inplace, result, not ) { - if ( match[1] === "not" ) { - // If we're dealing with a complex expression, or a simple one - if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { - match[3] = Sizzle(match[3], null, null, curLoop); - - } else { - var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); - - if ( !inplace ) { - result.push.apply( result, ret ); - } - - return false; - } - - } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { - return true; - } - - return match; - }, - - POS: function( match ) { - match.unshift( true ); - - return match; - } - }, - - filters: { - enabled: function( elem ) { - return elem.disabled === false && elem.type !== "hidden"; - }, - - disabled: function( elem ) { - return elem.disabled === true; - }, - - checked: function( elem ) { - return elem.checked === true; - }, - - selected: function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - parent: function( elem ) { - return !!elem.firstChild; - }, - - empty: function( elem ) { - return !elem.firstChild; - }, - - has: function( elem, i, match ) { - return !!Sizzle( match[3], elem ).length; - }, - - header: function( elem ) { - return (/h\d/i).test( elem.nodeName ); - }, - - text: function( elem ) { - var attr = elem.getAttribute( "type" ), type = elem.type; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); - }, - - radio: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; - }, - - checkbox: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; - }, - - file: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; - }, - - password: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; - }, - - submit: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "submit" === elem.type; - }, - - image: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; - }, - - reset: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "reset" === elem.type; - }, - - button: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && "button" === elem.type || name === "button"; - }, - - input: function( elem ) { - return (/input|select|textarea|button/i).test( elem.nodeName ); - }, - - focus: function( elem ) { - return elem === elem.ownerDocument.activeElement; - } - }, - setFilters: { - first: function( elem, i ) { - return i === 0; - }, - - last: function( elem, i, match, array ) { - return i === array.length - 1; - }, - - even: function( elem, i ) { - return i % 2 === 0; - }, - - odd: function( elem, i ) { - return i % 2 === 1; - }, - - lt: function( elem, i, match ) { - return i < match[3] - 0; - }, - - gt: function( elem, i, match ) { - return i > match[3] - 0; - }, - - nth: function( elem, i, match ) { - return match[3] - 0 === i; - }, - - eq: function( elem, i, match ) { - return match[3] - 0 === i; - } - }, - filter: { - PSEUDO: function( elem, match, i, array ) { - var name = match[1], - filter = Expr.filters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - - } else if ( name === "contains" ) { - return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0; - - } else if ( name === "not" ) { - var not = match[3]; - - for ( var j = 0, l = not.length; j < l; j++ ) { - if ( not[j] === elem ) { - return false; - } - } - - return true; - - } else { - Sizzle.error( name ); - } - }, - - CHILD: function( elem, match ) { - var type = match[1], - node = elem; - - switch ( type ) { - case "only": - case "first": - while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - if ( type === "first" ) { - return true; - } - - node = elem; - - case "last": - while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - return true; - - case "nth": - var first = match[2], - last = match[3]; - - if ( first === 1 && last === 0 ) { - return true; - } - - var doneName = match[0], - parent = elem.parentNode; - - if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { - var count = 0; - - for ( node = parent.firstChild; node; node = node.nextSibling ) { - if ( node.nodeType === 1 ) { - node.nodeIndex = ++count; - } - } - - parent.sizcache = doneName; - } - - var diff = elem.nodeIndex - last; - - if ( first === 0 ) { - return diff === 0; - - } else { - return ( diff % first === 0 && diff / first >= 0 ); - } - } - }, - - ID: function( elem, match ) { - return elem.nodeType === 1 && elem.getAttribute("id") === match; - }, - - TAG: function( elem, match ) { - return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; - }, - - CLASS: function( elem, match ) { - return (" " + (elem.className || elem.getAttribute("class")) + " ") - .indexOf( match ) > -1; - }, - - ATTR: function( elem, match ) { - var name = match[1], - result = Expr.attrHandle[ name ] ? - Expr.attrHandle[ name ]( elem ) : - elem[ name ] != null ? - elem[ name ] : - elem.getAttribute( name ), - value = result + "", - type = match[2], - check = match[4]; - - return result == null ? - type === "!=" : - type === "=" ? - value === check : - type === "*=" ? - value.indexOf(check) >= 0 : - type === "~=" ? - (" " + value + " ").indexOf(check) >= 0 : - !check ? - value && result !== false : - type === "!=" ? - value !== check : - type === "^=" ? - value.indexOf(check) === 0 : - type === "$=" ? - value.substr(value.length - check.length) === check : - type === "|=" ? - value === check || value.substr(0, check.length + 1) === check + "-" : - false; - }, - - POS: function( elem, match, i, array ) { - var name = match[2], - filter = Expr.setFilters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - } - } - } -}; - -var origPOS = Expr.match.POS, - fescape = function(all, num){ - return "\\" + (num - 0 + 1); - }; - -for ( var type in Expr.match ) { - Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); - Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); -} - -var makeArray = function( array, results ) { - array = Array.prototype.slice.call( array, 0 ); - - if ( results ) { - results.push.apply( results, array ); - return results; - } - - return array; -}; - -// Perform a simple check to determine if the browser is capable of -// converting a NodeList to an array using builtin methods. -// Also verifies that the returned array holds DOM nodes -// (which is not the case in the Blackberry browser) -try { - Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; - -// Provide a fallback method if it does not work -} catch( e ) { - makeArray = function( array, results ) { - var i = 0, - ret = results || []; - - if ( toString.call(array) === "[object Array]" ) { - Array.prototype.push.apply( ret, array ); - - } else { - if ( typeof array.length === "number" ) { - for ( var l = array.length; i < l; i++ ) { - ret.push( array[i] ); - } - - } else { - for ( ; array[i]; i++ ) { - ret.push( array[i] ); - } - } - } - - return ret; - }; -} - -var sortOrder, siblingCheck; - -if ( document.documentElement.compareDocumentPosition ) { - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { - return a.compareDocumentPosition ? -1 : 1; - } - - return a.compareDocumentPosition(b) & 4 ? -1 : 1; - }; - -} else { - sortOrder = function( a, b ) { - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return a.sourceIndex - b.sourceIndex; - } - - var al, bl, - ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - - // If the nodes are siblings (or identical) we can do a quick check - if ( aup === bup ) { - return siblingCheck( a, b ); - - // If no parents were found then the nodes are disconnected - } else if ( !aup ) { - return -1; - - } else if ( !bup ) { - return 1; - } - - // Otherwise they're somewhere else in the tree so we need - // to build up a full list of the parentNodes for comparison - while ( cur ) { - ap.unshift( cur ); - cur = cur.parentNode; - } - - cur = bup; - - while ( cur ) { - bp.unshift( cur ); - cur = cur.parentNode; - } - - al = ap.length; - bl = bp.length; - - // Start walking down the tree looking for a discrepancy - for ( var i = 0; i < al && i < bl; i++ ) { - if ( ap[i] !== bp[i] ) { - return siblingCheck( ap[i], bp[i] ); - } - } - - // We ended someplace up the tree so do a sibling check - return i === al ? - siblingCheck( a, bp[i], -1 ) : - siblingCheck( ap[i], b, 1 ); - }; - - siblingCheck = function( a, b, ret ) { - if ( a === b ) { - return ret; - } - - var cur = a.nextSibling; - - while ( cur ) { - if ( cur === b ) { - return -1; - } - - cur = cur.nextSibling; - } - - return 1; - }; -} - -// Utility function for retreiving the text value of an array of DOM nodes -Sizzle.getText = function( elems ) { - var ret = "", elem; - - for ( var i = 0; elems[i]; i++ ) { - elem = elems[i]; - - // Get the text from text nodes and CDATA nodes - if ( elem.nodeType === 3 || elem.nodeType === 4 ) { - ret += elem.nodeValue; - - // Traverse everything else, except comment nodes - } else if ( elem.nodeType !== 8 ) { - ret += Sizzle.getText( elem.childNodes ); - } - } - - return ret; -}; - -// Check to see if the browser returns elements by name when -// querying by getElementById (and provide a workaround) -(function(){ - // We're going to inject a fake input element with a specified name - var form = document.createElement("div"), - id = "script" + (new Date()).getTime(), - root = document.documentElement; - - form.innerHTML = ""; - - // Inject it into the root element, check its status, and remove it quickly - root.insertBefore( form, root.firstChild ); - - // The workaround has to do additional checks after a getElementById - // Which slows things down for other browsers (hence the branching) - if ( document.getElementById( id ) ) { - Expr.find.ID = function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - - return m ? - m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? - [m] : - undefined : - []; - } - }; - - Expr.filter.ID = function( elem, match ) { - var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); - - return elem.nodeType === 1 && node && node.nodeValue === match; - }; - } - - root.removeChild( form ); - - // release memory in IE - root = form = null; -})(); - -(function(){ - // Check to see if the browser returns only elements - // when doing getElementsByTagName("*") - - // Create a fake element - var div = document.createElement("div"); - div.appendChild( document.createComment("") ); - - // Make sure no comments are found - if ( div.getElementsByTagName("*").length > 0 ) { - Expr.find.TAG = function( match, context ) { - var results = context.getElementsByTagName( match[1] ); - - // Filter out possible comments - if ( match[1] === "*" ) { - var tmp = []; - - for ( var i = 0; results[i]; i++ ) { - if ( results[i].nodeType === 1 ) { - tmp.push( results[i] ); - } - } - - results = tmp; - } - - return results; - }; - } - - // Check to see if an attribute returns normalized href attributes - div.innerHTML = ""; - - if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && - div.firstChild.getAttribute("href") !== "#" ) { - - Expr.attrHandle.href = function( elem ) { - return elem.getAttribute( "href", 2 ); - }; - } - - // release memory in IE - div = null; -})(); - -if ( document.querySelectorAll ) { - (function(){ - var oldSizzle = Sizzle, - div = document.createElement("div"), - id = "__sizzle__"; - - div.innerHTML = "

"; - - // Safari can't handle uppercase or unicode characters when - // in quirks mode. - if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { - return; - } - - Sizzle = function( query, context, extra, seed ) { - context = context || document; - - // Only use querySelectorAll on non-XML documents - // (ID selectors don't work in non-HTML documents) - if ( !seed && !Sizzle.isXML(context) ) { - // See if we find a selector to speed up - var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); - - if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { - // Speed-up: Sizzle("TAG") - if ( match[1] ) { - return makeArray( context.getElementsByTagName( query ), extra ); - - // Speed-up: Sizzle(".CLASS") - } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { - return makeArray( context.getElementsByClassName( match[2] ), extra ); - } - } - - if ( context.nodeType === 9 ) { - // Speed-up: Sizzle("body") - // The body element only exists once, optimize finding it - if ( query === "body" && context.body ) { - return makeArray( [ context.body ], extra ); - - // Speed-up: Sizzle("#ID") - } else if ( match && match[3] ) { - var elem = context.getElementById( match[3] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id === match[3] ) { - return makeArray( [ elem ], extra ); - } - - } else { - return makeArray( [], extra ); - } - } - - try { - return makeArray( context.querySelectorAll(query), extra ); - } catch(qsaError) {} - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - var oldContext = context, - old = context.getAttribute( "id" ), - nid = old || id, - hasParent = context.parentNode, - relativeHierarchySelector = /^\s*[+~]/.test( query ); - - if ( !old ) { - context.setAttribute( "id", nid ); - } else { - nid = nid.replace( /'/g, "\\$&" ); - } - if ( relativeHierarchySelector && hasParent ) { - context = context.parentNode; - } - - try { - if ( !relativeHierarchySelector || hasParent ) { - return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); - } - - } catch(pseudoError) { - } finally { - if ( !old ) { - oldContext.removeAttribute( "id" ); - } - } - } - } - - return oldSizzle(query, context, extra, seed); - }; - - for ( var prop in oldSizzle ) { - Sizzle[ prop ] = oldSizzle[ prop ]; - } - - // release memory in IE - div = null; - })(); -} - -(function(){ - var html = document.documentElement, - matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; - - if ( matches ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9 fails this) - var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), - pseudoWorks = false; - - try { - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( document.documentElement, "[test!='']:sizzle" ); - - } catch( pseudoError ) { - pseudoWorks = true; - } - - Sizzle.matchesSelector = function( node, expr ) { - // Make sure that attribute selectors are quoted - expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); - - if ( !Sizzle.isXML( node ) ) { - try { - if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { - var ret = matches.call( node, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || !disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9, so check for that - node.document && node.document.nodeType !== 11 ) { - return ret; - } - } - } catch(e) {} - } - - return Sizzle(expr, null, null, [node]).length > 0; - }; - } -})(); - -(function(){ - var div = document.createElement("div"); - - div.innerHTML = "
"; - - // Opera can't find a second classname (in 9.6) - // Also, make sure that getElementsByClassName actually exists - if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { - return; - } - - // Safari caches class attributes, doesn't catch changes (in 3.2) - div.lastChild.className = "e"; - - if ( div.getElementsByClassName("e").length === 1 ) { - return; - } - - Expr.order.splice(1, 0, "CLASS"); - Expr.find.CLASS = function( match, context, isXML ) { - if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { - return context.getElementsByClassName(match[1]); - } - }; - - // release memory in IE - div = null; -})(); - -function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem.sizcache === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 && !isXML ){ - elem.sizcache = doneName; - elem.sizset = i; - } - - if ( elem.nodeName.toLowerCase() === cur ) { - match = elem; - break; - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem.sizcache === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 ) { - if ( !isXML ) { - elem.sizcache = doneName; - elem.sizset = i; - } - - if ( typeof cur !== "string" ) { - if ( elem === cur ) { - match = true; - break; - } - - } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { - match = elem; - break; - } - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -if ( document.documentElement.contains ) { - Sizzle.contains = function( a, b ) { - return a !== b && (a.contains ? a.contains(b) : true); - }; - -} else if ( document.documentElement.compareDocumentPosition ) { - Sizzle.contains = function( a, b ) { - return !!(a.compareDocumentPosition(b) & 16); - }; - -} else { - Sizzle.contains = function() { - return false; - }; -} - -Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; - - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -var posProcess = function( selector, context ) { - var match, - tmpSet = [], - later = "", - root = context.nodeType ? [context] : context; - - // Position selectors must be done after the filter - // And so must :not(positional) so we move all PSEUDOs to the end - while ( (match = Expr.match.PSEUDO.exec( selector )) ) { - later += match[0]; - selector = selector.replace( Expr.match.PSEUDO, "" ); - } - - selector = Expr.relative[selector] ? selector + "*" : selector; - - for ( var i = 0, l = root.length; i < l; i++ ) { - Sizzle( selector, root[i], tmpSet ); - } - - return Sizzle.filter( later, tmpSet ); -}; - -// EXPOSE - -window.Sizzle = Sizzle; - -})(); diff --git a/application/test/UpdatePlanet.php b/application/test/UpdatePlanet.php deleted file mode 100644 index f91e5af..0000000 --- a/application/test/UpdatePlanet.php +++ /dev/null @@ -1,163 +0,0 @@ - 0, - - 'b_laboratory' => 0, - 'b_laboratory_id' => serialize(array()), - - "spy_tech" => 12, - "computer_tech" => 8, - "military_tech" => 10, - "defence_tech" => 10, - "shield_tech" => 10, - "energy_tech" => 8, - "hyperspace_tech" => 8, - "combustion_tech" => 6, - "impulse_motor_tech" => 6, - "hyperspace_motor_tech" => 6, - "laser_tech" => 6, - "ionic_tech" => 6, - "buster_tech" => 6, - "intergalactic_tech" => 0, - "expedition_tech" => 0, - "graviton_tech" => 0, - )); - -$data = array( - 'last_update' => 0, - 'planet_type' => 1, - - 'b_building_id' => '', - 'b_hangar_id' => serialize(array(/*array( - 'ship_id' => Legacies_Empire::ID_SHIP_LIGHT_TRANSPORT, - 'qty' => 10, - 'created_at' => 0, - 'updated_at' => 0 - ), array( - 'ship_id' => Legacies_Empire::ID_SHIP_LARGE_TRANSPORT, - 'qty' => 20, - 'created_at' => 600, - 'updated_at' => 600 - ), array( - 'ship_id' => Legacies_Empire::ID_SHIP_LARGE_TRANSPORT, - 'qty' => 30, - 'created_at' => 650, - 'updated_at' => 650 - ), array( - 'ship_id' => Legacies_Empire::ID_SHIP_LARGE_TRANSPORT, - 'qty' => 40, - 'created_at' => 700, - 'updated_at' => 700 - )*/)), - - 'metal' => 500000, - 'metal_perhour' => 20, - 'cristal' => 500000, - 'cristal_perhour' => 10, - 'deuterium' => 300000, - 'deuterium_perhour' => 0, - 'energy_max' => 0, - 'energy_used' => 0, - - 'metal_mine_porcent' => 10, - 'cristal_mine_porcent' => 10, - 'solar_plant_porcent' => 10, - 'fusion_plant_porcent' => 10, - 'solar_satelit_porcent' => 10, - 'deuterium_sintetizer_porcent' => 10, - - 'metal_mine' => 20, - 'cristal_mine' => 19, - 'deuterium_sintetizer' => 0, - 'solar_plant' => 20, - 'fusion_plant' => 0, - 'robot_factory' => 0, - 'nano_factory' => 0, - 'hangar' => 12, - 'metal_store' => 10, - 'cristal_store' => 10, - 'deuterium_store' => 10, - - 'rpg_stockeur' => 0 - ); -$planet = new Legacies_Empire_Model_Planet($data); - -$planet->setUser($user); -//var_dump(array('$planet->setUser($user)', array_diff($planet->getAllDatas(), $data))); -$data = $planet->getAllDatas(); - -$planet->updateStorages(0); -//var_dump(array('$planet->updateStorages(0)', array_diff($planet->getAllDatas(), $data))); -$data = $planet->getAllDatas(); - -$planet->updateResourceProduction(0); -//var_dump(array('$planet->updateResourceProduction(0)', array_diff($planet->getAllDatas(), $data))); -$data = $planet->getAllDatas(); - -$planet->getShipyard()->appendQueue(Legacies_Empire::ID_SHIP_LIGHT_FIGHTER, 10, 0); -//var_dump(array('$planet->getShipyard()->appendQueue(Legacies_Empire::ID_SHIP_LIGHT_FIGHTER, 10, 0)', array_diff($planet->getAllDatas(), $data))); -$data = $planet->getAllDatas(); - -$planet->appendBuildingQueue(Legacies_Empire::ID_BUILDING_CRISTAL_MINE, false, 0); -//var_dump(array('$planet->appendBuildingQueue(Legacies_Empire::ID_BUILDING_CRISTAL_MINE, false, 0)', array_diff($planet->getAllDatas(), $data))); -$data = $planet->getAllDatas(); - -$userData = $user->getAllDatas(); -$planet->getResearchLab()->appendQueue(Legacies_Empire::ID_RESEARCH_ENERGY_TECHNOLOGY, false, 0); -var_dump(array('$planet->getResearchLab()->appendQueue(Legacies_Empire::ID_RESEARCH_ENERGY_TECHNOLOGY, false, 0)', array_diff($planet->getAllDatas(), $data), array_diff($user->getAllDatas(), $userData))); -$data = $planet->getAllDatas(); - -var_dump(array_diff($planet->getAllDatas(), $data)); -$data = $planet->getAllDatas(); - -Wootook::dispatchEvent('planet.update', array( - 'planet' => $planet, - 'time' => 5400 - )); - -var_dump(array_diff($planet->getAllDatas(), $data)); -$data = $planet->getAllDatas(); - -Wootook::dispatchEvent('planet.update', array( - 'planet' => $planet, - 'time' => (3600 * 20) - )); - -$planet->appendBuildingQueue(Legacies_Empire::ID_BUILDING_CRISTAL_MINE, false, 3600); - -var_dump(array_diff($planet->getAllDatas(), $data)); -$data = $planet->getAllDatas(); - -Wootook::dispatchEvent('planet.update', array( - 'planet' => $planet, - 'time' => (3600 * 30) - )); - -var_dump(array_diff($planet->getAllDatas(), $data)); -$data = $planet->getAllDatas(); - -Wootook::dispatchEvent('planet.update', array( - 'planet' => $planet, - 'time' => (3600 * 5000) - )); - -var_dump(array_diff($planet->getAllDatas(), $data)); -$data = $planet->getAllDatas(); - -$planet->appendBuildingQueue(Legacies_Empire::ID_BUILDING_CRISTAL_MINE, false, 0); -$planet->appendBuildingQueue(Legacies_Empire::ID_BUILDING_SOLAR_PLANT, false, 0); - -Wootook::dispatchEvent('planet.update', array( - 'planet' => $planet, - 'time' => (3600 * 10000) - )); - -var_dump(array_diff($planet->getAllDatas(), $data)); -$data = $planet->getAllDatas(); \ No newline at end of file diff --git a/application/test/bootstrap.php b/application/test/bootstrap.php deleted file mode 100644 index a51c644..0000000 --- a/application/test/bootstrap.php +++ /dev/null @@ -1,42 +0,0 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/phpcs.xml b/build/phpcs.xml new file mode 100644 index 0000000..b2c5440 --- /dev/null +++ b/build/phpcs.xml @@ -0,0 +1,36 @@ + + + Default coding standard + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/phpmd.xml b/build/phpmd.xml new file mode 100644 index 0000000..6a8b260 --- /dev/null +++ b/build/phpmd.xml @@ -0,0 +1,26 @@ + + + + Default coding standard + + + + + + + + + + + + + + + + + + diff --git a/login.php b/login.php deleted file mode 100644 index 0f80096..0000000 --- a/login.php +++ /dev/null @@ -1,87 +0,0 @@ - - * All rights reserved. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * --> NOTICE <-- - * This file is part of the core development branch, changing its contents will - * make you unable to use the automatic updates manager. Please refer to the - * documentation for further information about customizing Wootook. - * - */ - -define('INSIDE', true); -define('INSTALL', false); -define('DISABLE_IDENTITY_CHECK', true); -require_once dirname(__FILE__) . '/application/bootstrap.php'; - -includeLang('login'); - -$request = Wootook::getRequest(); - -if ($request->isPost() && $request->getPost('username') !== null && $request->getPost('password') !== null) { - $user = Wootook_Empire_Model_User::login($request->getPost('username'), $request->getPost('password'), (bool) $request->getPost('rememberme')); - - $session = Wootook::getSession(Wootook_Empire_Model_User::SESSION_KEY); - if ($user !== null && $user->getId()) { - $url = Wootook::getUrl('overview.php'); - header("Location: $url"); - } else { - $url = Wootook::getUrl('login.php'); - header("Location: $url"); - } - Wootook_Core_ErrorProfiler::unregister(true); - exit(0); -} - -$db = Wootook_Database::getSingleton(); -$displayedPlayerLevels = implode(',', array( - //LEVEL_ADMIN, - LEVEL_OPERATOR, - LEVEL_MODERATOR, - LEVEL_PLAYER - )); -$userCountStatement = $db->prepare("SELECT COUNT(DISTINCT user.id) AS `user_count` FROM {$db->getTable('users')} AS user WHERE user.authlevel IN({$displayedPlayerLevels})"); -$userCountStatement->execute(); -$userCount = $userCountStatement->fetch(Wootook_Database::FETCH_COLUMN, 0); - -$latestPlayerStatement = $db->prepare("SELECT user.username AS `latest_player` FROM {$db->getTable('users')} AS user WHERE user.authlevel IN({$displayedPlayerLevels}) ORDER BY user.`register_time` DESC LIMIT 1"); -$latestPlayerStatement->execute(); -$latestPlayer = $latestPlayerStatement->fetch(Wootook_Database::FETCH_COLUMN, 0); - -$onlinePlayersStatement = $db->prepare("SELECT COUNT(DISTINCT user.id) AS `online_players` FROM {$db->getTable('users')} AS user WHERE user.authlevel IN({$displayedPlayerLevels}) AND user.`onlinetime` > (UNIX_TIMESTAMP() - 900)"); -$onlinePlayersStatement->execute(); -$onlinePlayers = $onlinePlayersStatement->fetch(Wootook_Database::FETCH_COLUMN, 0); - -$layout = new Wootook_Core_Layout(); -$layout->getMessagesBlock()->prepareMessages(Wootook_Empire_Model_User::SESSION_KEY); -$layout->load('login'); -$block = $layout->getBlock('login'); - -$block['user_count'] = $userCount; -$block['latest_player'] = $latestPlayer; -$block['online_players'] = $onlinePlayers; - -$block['server_name'] = Wootook::getWebsiteConfig('game/general/name'); -$block['board_url'] = Wootook::getWebsiteConfig('game/general/boards-url'); - -echo $layout->render(); - diff --git a/logout.php b/logout.php deleted file mode 100644 index dc08e7e..0000000 --- a/logout.php +++ /dev/null @@ -1,39 +0,0 @@ - - * All rights reserved. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * --> NOTICE <-- - * This file is part of the core development branch, changing its contents will - * make you unable to use the automatic updates manager. Please refer to the - * documentation for further information about customizing Wootook. - * - */ - -define('INSIDE' , true); -define('INSTALL' , false); -require_once dirname(__FILE__) . '/application/bootstrap.php'; - -includeLang('logout'); - -Wootook_Empire_Model_User::getSingleton()->logout(); - -message($lang['see_you'], $lang['session_closed'], 'login.php'); diff --git a/overview.php b/overview.php deleted file mode 100644 index 7e6cd21..0000000 --- a/overview.php +++ /dev/null @@ -1,358 +0,0 @@ - - * All rights reserved. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * --> NOTICE <-- - * This file is part of the core development branch, changing its contents will - * make you unable to use the automatic updates manager. Please refer to the - * documentation for further information about customizing Wootook. - * - */ - -define('INSTALL' , false); -require_once dirname(__FILE__) .'/application/bootstrap.php'; - -$user = Wootook_Empire_Model_User::getSingleton(); -$planet = $user->getCurrentPlanet(); -$moon = $planet->getMoon(); - -$action = isset($_GET['action']) ? $_GET['action'] : null; - -if (isset($_POST) && !empty($_POST)) { - $action = isset($_POST['action']) && !empty($_POST['action']) ? $_POST['action'] : $action; - $formKey = isset($_POST['form_key']) && !empty($_POST['form_key']) ? $_POST['form_key'] : null; - - if ($formKey == Wootook::getSession('security')->getData('form_key')) { - if ($action == 'rename' && isset($_POST['name']) && !empty($_POST['name'])) { - $planet->setData('name', $_POST['name'])->save(); - } else if ($action == 'destroy' && isset($_POST['password']) && !empty($_POST['password']) && isset($_POST['confirm'])) { - if (!$user->checkPassword($_POST['password'])) { - Wootook::getSession('user') - ->addError(Wootook::__('Password was not correct.')); - } - - try { - $user->getCurrentPlanet()->destroy(); - - Wootook::getSession('user') - ->addSucces(Wootook::__('Planet has been successfully destroyed.')); - } catch (Wootook_Empire_Model_Planet_Exception $e) { - Wootook::getSession('user') - ->addError($e->getMessage()); - } - } - } else { - Wootook::getSession('user') - ->addError(Wootook::__('Invalid security key.')); - } - - header('HTTP/1.1 302 Found'); - header('Location: ' . Wootook::getUrl(basename(__FILE__))); - exit(0); -} else if ($action == 'rename') { - $layout = new Wootook_Core_Layout(); - $layout->load('overview.rename-planet'); - - echo $layout->render(); - exit(0); -} else if ($action == 'destroy') { - $layout = new Wootook_Core_Layout(); - $layout->load('overview.destroy-planet'); - - echo $layout->render(); - exit(0); -} else { - includeLang('resources'); - includeLang('overview'); - - $layout = new Wootook_Core_Layout(); - $layout->load('overview'); - - if ($user->getId()) { - $planetCollection = $user->getPlanetCollection(); - $planetBlock = $layout->createBlock('core/deprecated', 'planet.view'); - $planetBlock->setTemplate('empire/overview/planet/view.phtml'); - - $planetList = $layout->createBlock('core/concat', 'planet.list'); - $planetBlock->planetList = $planetList; - - $i = 0; - foreach ($planetCollection as $userPlanet) { - if ($userPlanet->getId() == $planet->getId()) { - continue; - } - - /* - * Update planet resources and constructions - */ - Wootook::dispatchEvent('planet.update', array( - 'planet' => $userPlanet - )); - $userPlanet->save(); - - if ($userPlanet->getId() != $user->getCurrentPlanet()->getId() && $userPlanet->isPlanet()) { - $id = uniqid(); - $block = $layout->createBlock('core/deprecated', "planet.list.item.{$id}"); - $block->setTemplate('empire/overview/planet/list/item.phtml'); - $block['planet'] = $userPlanet; - - $buildingQueue = $userPlanet->getBuildingQueue(); - $buildingQueue->rewind(); - $currentItem = $buildingQueue->current(); - $block['queue_item'] = $currentItem; - $block['even'] = (($i++ % 4) == 3); - - $planetList->$id = $block; - } - } - - /** - * Missile attack management - * Refactoring needed - * {{{ - */ - $iraks_query = doquery("SELECT * FROM {{table}} WHERE owner = '" . $user['id'] . "'", 'iraks'); - $Record = 4000; - while ($irak = $iraks_query->fetch(PDO::FETCH_ASSOC)) { - $Record++; - $fpage[$irak['zeit']] = ''; - - if ($irak['zeit'] > time()) { - $time = $irak['zeit'] - time(); - - $fpage[$irak['zeit']] .= InsertJavaScriptChronoApplet ("fm", $Record, $time, true); - - $planet_start = doquery("SELECT * FROM {{table}} WHERE - galaxy = '" . $irak['galaxy'] . "' AND - system = '" . $irak['system'] . "' AND - planet = '" . $irak['planet'] . "' AND - planet_type = '1'", 'planets'); - - $user_planet = doquery("SELECT * FROM {{table}} WHERE - galaxy = '" . $irak['galaxy_angreifer'] . "' AND - system = '" . $irak['system_angreifer'] . "' AND - planet = '" . $irak['planet_angreifer'] . "' AND - planet_type = '1'", 'planets', true); - - if ($planet_start->rowCount() == 1) { - $planet = mysql_fetch_array($planet_start); - } - - $fpage[$irak['zeit']] .= "
" . gmdate("H:i:s", $irak['zeit'] + 1 * 60 * 60) . " Une attaque de missiles (" . $irak['anzahl'] . ") de " . $user_planet['name'] . " "; - $fpage[$irak['zeit']] .= '[' . $irak["galaxy_angreifer"] . ':' . $irak["system_angreifer"] . ':' . $irak["planet_angreifer"] . ']'; - $fpage[$irak['zeit']] .= ' arrive sur la planète' . $planet["name"] . ' '; - $fpage[$irak['zeit']] .= '[' . $irak["galaxy"] . ':' . $irak["system"] . ':' . $irak["planet"] . ']'; - $fpage[$irak['zeit']] .= ''; - $fpage[$irak['zeit']] .= InsertJavaScriptChronoApplet ("fm", $Record, $time, false); - $fpage[$irak['zeit']] .= ""; - } - } - /** - * }}} - */ - - /* - * Update fleet list - */ - Wootook::dispatchEvent('fleet.update', array( - 'user' => $user - )); - - $fleetList = $layout->createBlock('core/concat', 'fleet.list'); - $fleetCollection = $user->getFleetCollection(); - foreach ($fleetCollection as $fleet) { - $id = uniqid(); - $block = $layout->createBlock('core/deprecated', "fleet.list.item.{$id}"); - $block->setTemplate('empire/overview/fleet/item.phtml'); - - $block['class'] = $fleet->getRowClass(); - $block['fleet'] = $fleet; - $block['user'] = $user; - - $fleetList->setPartial($id, $block); - } - - $messageCollection = new Wootook_Core_Collection('messages'); - $messageCollection->where('message_owner=:user'); - $messageCollection->where('message_read_at<=0'); - - $count = $messageCollection->getSize(array('user' => $user->getId())); - $newMessages = $layout->createBlock('core/deprecated', 'overview.messages'); - $newMessages->setTemplate('empire/overview/messages.phtml'); - $newMessages['count'] = (int) $count; - - /** - * Page display - * Refactoring needed - * {{{ - */ - // ----------------------------------------------------------------------------------------------- - $parse = $lang; - // ----------------------------------------------------------------------------------------------- - // News Frame ... - // External Chat Frame ... - // Banner ADS Google (meme si je suis contre cela) - if (Wootook::getGameConfig('game/news/active')) { - $parse['NewsFrame'] = "" . $lang['ov_news_title'] . "" . htmlentities(Wootook::getGameConfig('game/news/content'), ENT_QUOTES, 'UTF-8') . ""; - } - if (Wootook::getGameConfig('engine/options/chat')) { - $parse['ExternalTchatFrame'] = "" . Wootook::__('Open the chat.') . ""; - } - if (Wootook::getGameConfig('engine/options/banner')) { - $bannerUrl = Wootook::getUrl('scripts/createbanner.php', array('id' => $user['id'])); - - $parse['bannerframe'] = "
".$lang['InfoBanner']."
"; - } - // --- Gestion de l'affichage d'une lune --------------------------------------------------------- - if ($moon['id']) { - if ($planet->isPlanet()) { - $lune = doquery ("SELECT * FROM {{table}} WHERE `galaxy` = '" . $planet['galaxy'] . "' AND `system` = '" . $planet['system'] . "' AND `planet` = '" . $planet['planet'] . "' AND `planet_type` = '3'", 'planets', true); - $parse['moon_img'] = "'; - $parse['moon'] = $planet->getMoon()->getName(); - } else { - $parse['moon_img'] = ""; - $parse['moon'] = ""; - } - } else { - $parse['moon_img'] = ""; - $parse['moon'] = ""; - } - // Moon END - $parse['planet_name'] = $planet['name']; - $parse['planet_diameter'] = Math::render($planet['diameter']); - $parse['planet_field_current'] = Math::render($planet->getUsedFields()); - $parse['planet_field_max'] = Math::render($planet->getBuildingFields()); - $parse['planet_temp_min'] = $planet['temp_min']; - $parse['planet_temp_max'] = $planet['temp_max']; - $parse['galaxy_galaxy'] = $planet['galaxy']; - $parse['galaxy_planet'] = $planet['planet']; - $parse['galaxy_system'] = $planet['system']; - $StatRecord = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '" . $user['id'] . "';", 'statpoints', true); - - $parse['user_points'] = Math::render($StatRecord['build_points']); - $parse['user_fleet'] = Math::render($StatRecord['fleet_points']); - $parse['player_points_tech'] = Math::render($StatRecord['tech_points']); - $parse['total_points'] = Math::render($StatRecord['total_points']);; - - $parse['user_rank'] = $StatRecord['total_rank']; - $ile = $StatRecord['total_old_rank'] - $StatRecord['total_rank']; - if ($ile >= 1) { - $parse['ile'] = "+" . $ile . ""; - } elseif ($ile < 0) { - $parse['ile'] = "-" . $ile . ""; - } elseif ($ile == 0) { - $parse['ile'] = "" . $ile . ""; - } - $parse['u_user_rank'] = $StatRecord['total_rank']; - $parse['user_username'] = $user['username']; - - $parse['fleet_list'] = $fleetList->render(); - $parse['energy_used'] = $planet["energy_max"] - $planet["energy_used"]; - - $parse['Have_new_message'] = $newMessages->render(); - $parse['time'] = "
"; - $parse['planet_image'] = $planet['image']; - $parse['anothers_planets'] = $planetBlock->render(); - - $db = Wootook_Database::getConnection('default'); - $displayedPlayerLevels = implode(',', array( - //LEVEL_ADMIN, - LEVEL_OPERATOR, - LEVEL_MODERATOR, - LEVEL_PLAYER - )); - $userCountStatement = $db->prepare("SELECT COUNT(DISTINCT user.id) AS `user_count` FROM {$db->getTable('users')} AS user WHERE user.authlevel IN({$displayedPlayerLevels})"); - $userCountStatement->execute(); - $userCount = $userCountStatement->fetch(Wootook_Database::FETCH_COLUMN, 0); - $parse['max_users'] = $userCount; - - $galaxyData = $planet->getGalaxyData(); - $parse['metal_debris'] = Math::render($galaxyData['metal']); - $parse['crystal_debris'] = Math::render($galaxyData['crystal']); - if (($galaxyData['metal'] != 0 || $galaxyData['crystal'] != 0) && Math::isPositive($planet->getElement(Legacies_Empire::ID_SHIP_RECYCLER))) { - $parse['get_link'] = " (" . $lang['type_mission'][Legacies_Empire::ID_MISSION_RECYCLE] . ")"; - } else { - $parse['get_link'] = ''; - } - - $latestPlayerStatement = $db->prepare("SELECT user.username AS `latest_player` FROM {$db->getTable('users')} AS user WHERE user.authlevel IN({$displayedPlayerLevels}) ORDER BY user.`register_time` DESC LIMIT 1"); - $latestPlayerStatement->execute(); - $latestPlayer = $latestPlayerStatement->fetch(Wootook_Database::FETCH_COLUMN, 0); - - $onlinePlayersStatement = $db->prepare("SELECT COUNT(DISTINCT user.id) AS `online_players` FROM {$db->getTable('users')} AS user WHERE user.authlevel IN({$displayedPlayerLevels}) AND user.`onlinetime` > (UNIX_TIMESTAMP() - 900)"); - $onlinePlayersStatement->execute(); - $onlinePlayers = $onlinePlayersStatement->fetch(Wootook_Database::FETCH_COLUMN, 0); - - $query = doquery('SELECT username FROM {{table}} ORDER BY register_time DESC', 'users', true); - $parse['last_user'] = $latestPlayer; - $query = doquery("SELECT COUNT(DISTINCT(id)) FROM {{table}} WHERE onlinetime>" . (time()-900), 'users', true); - $parse['online_users'] = $onlinePlayers; - $parse['users_amount'] = $userCount; - - // Rajout d'une barre pourcentage - // Calcul du pourcentage de remplissage - // Barre de remplissage - $size = Math::floor(Math::div($planet->getUsedFields(), $planet->getBuildingFields()) * 100); - // Couleur de la barre de remplissage - $parse['case_pourcentage'] = $size . $lang['o/o']; - if (Math::comp($size, 100) > 0) { - $size = 100; - $parse['case_barre_barcolor'] = '#C00000'; - } elseif (Math::comp($size, 80) > 0) { - $parse['case_barre_barcolor'] = '#C0C000'; - } else { - $parse['case_barre_barcolor'] = '#00C000'; - } - $parse['case_barre'] = $size; - - // Mode Améliorations - $parse['xpminier'] = $user['xpminier']; - $parse['xpraid'] = $user['xpraid']; - $parse['lvl_minier'] = $user['lvl_minier']; - $parse['lvl_raid'] = $user['lvl_raid']; - - $LvlMinier = $user['lvl_minier']; - $LvlRaid = $user['lvl_raid']; - - $parse['lvl_up_minier'] = $LvlMinier * 5000; - $parse['lvl_up_raid'] = $LvlRaid * 10; - // Nombre de raids, pertes, etc ... - $parse['Raids'] = $lang['Raids']; - $parse['NumberOfRaids'] = $lang['NumberOfRaids']; - $parse['RaidsWin'] = $lang['RaidsWin']; - $parse['RaidsLoose'] = $lang['RaidsLoose']; - - $parse['raids'] = $user['raids']; - $parse['raidswin'] = $user['raidswin']; - $parse['raidsloose'] = $user['raidsloose']; - // Compteur de Membres en ligne - $OnlineUsers = doquery("SELECT COUNT(*) FROM {{table}} WHERE onlinetime>='" . (time()-15 * 60) . "'", 'users', 'true'); - $parse['NumberMembersOnline'] = $OnlineUsers[0]; - - $page = parsetemplate(gettemplate('overview_body'), $parse); - - display($page); - /** - * }}} - */ - } -} \ No newline at end of file diff --git a/skin/frontend/base/default/graphics/background.jpg b/skin/frontend/base/default/graphics/background.jpg deleted file mode 100644 index 0001c41..0000000 Binary files a/skin/frontend/base/default/graphics/background.jpg and /dev/null differ diff --git a/src/.htaccess b/src/.htaccess new file mode 100644 index 0000000..c37a643 --- /dev/null +++ b/src/.htaccess @@ -0,0 +1,18 @@ +SetEnv DEBUG On +SetEnv DEPRECATION On + + + Options +FollowSymLinks + RewriteEngine On + + RewriteBase / + +## workaround for HTTP authorization in CGI environment + #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + + RewriteCond %{REQUEST_URI} !^/(skin|js)/ + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-l + RewriteRule .* index.php [L] + \ No newline at end of file diff --git a/LICENCE b/src/LICENCE similarity index 100% rename from LICENCE rename to src/LICENCE diff --git a/add_declare.php b/src/add_declare.php similarity index 98% rename from add_declare.php rename to src/add_declare.php index 29a0909..a968ce6 100644 --- a/add_declare.php +++ b/src/add_declare.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/ElementQueueFixer.php b/src/admin/ElementQueueFixer.php similarity index 98% rename from admin/ElementQueueFixer.php rename to src/admin/ElementQueueFixer.php index 542b7f9..8469f4d 100644 --- a/admin/ElementQueueFixer.php +++ b/src/admin/ElementQueueFixer.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/QueryExecute.php b/src/admin/QueryExecute.php similarity index 98% rename from admin/QueryExecute.php rename to src/admin/QueryExecute.php index 6ec9889..081e1d5 100644 --- a/admin/QueryExecute.php +++ b/src/admin/QueryExecute.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/ShowFlyingFleets.php b/src/admin/ShowFlyingFleets.php similarity index 98% rename from admin/ShowFlyingFleets.php rename to src/admin/ShowFlyingFleets.php index 828246e..8db9271 100644 --- a/admin/ShowFlyingFleets.php +++ b/src/admin/ShowFlyingFleets.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/XNovaResetUnivers.php b/src/admin/XNovaResetUnivers.php similarity index 99% rename from admin/XNovaResetUnivers.php rename to src/admin/XNovaResetUnivers.php index e8d1026..890e2d4 100644 --- a/admin/XNovaResetUnivers.php +++ b/src/admin/XNovaResetUnivers.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/activeplanet.php b/src/admin/activeplanet.php similarity index 96% rename from admin/activeplanet.php rename to src/admin/activeplanet.php index 5a5245a..13a76ca 100644 --- a/admin/activeplanet.php +++ b/src/admin/activeplanet.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -33,7 +33,7 @@ define('INSTALL' , false); define('IN_ADMIN', true); require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php'; -$user = Wootook_Empire_Model_User::getSingleton(); +$user = Wootook_Player_Model_Session::getSingleton()->getPlayer(); if (!in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR))) { message( $lang['sys_noalloaw'], $lang['sys_noaccess'] ); diff --git a/admin/add_fleet.php b/src/admin/add_fleet.php similarity index 97% rename from admin/add_fleet.php rename to src/admin/add_fleet.php index 3bdb738..006f963 100644 --- a/admin/add_fleet.php +++ b/src/admin/add_fleet.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -34,7 +34,7 @@ define('IN_ADMIN', true); require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php'; -$user = Wootook_Empire_Model_User::getSingleton(); +$user = Wootook_Player_Model_Session::getSingleton()->getPlayer(); if (!in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR))) { message( $lang['sys_noalloaw'], $lang['sys_noaccess'] ); diff --git a/admin/add_money.php b/src/admin/add_money.php similarity index 95% rename from admin/add_money.php rename to src/admin/add_money.php index 41e7de2..656baae 100644 --- a/admin/add_money.php +++ b/src/admin/add_money.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -33,7 +33,7 @@ define('INSTALL' , false); define('IN_ADMIN', true); require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php'; -$user = Wootook_Empire_Model_User::getSingleton(); +$user = Wootook_Player_Model_Session::getSingleton()->getPlayer(); if (!in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR))) { message( $lang['sys_noalloaw'], $lang['sys_noaccess'] ); diff --git a/admin/add_moon.php b/src/admin/add_moon.php similarity index 98% rename from admin/add_moon.php rename to src/admin/add_moon.php index 6607d27..cd243a3 100644 --- a/admin/add_moon.php +++ b/src/admin/add_moon.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/autounban.php b/src/admin/autounban.php similarity index 94% rename from admin/autounban.php rename to src/admin/autounban.php index 6968da3..1de335d 100644 --- a/admin/autounban.php +++ b/src/admin/autounban.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -38,7 +38,7 @@ if (in_array($user['authlevel'], array(LEVEL_ADMIN))) { doquery("UPDATE {{table}} SET `bana` = '0' WHERE `banaday` < '1';",'users'); $response = Wootook::getResponse() - ->setRedirect(Wootook::getUrl('admin/overview.php')) + ->setRedirect(Wootook::getStaticUrl('admin/overview.php')) ->sendHeaders(); exit(0); } else { diff --git a/admin/banned.php b/src/admin/banned.php similarity index 98% rename from admin/banned.php rename to src/admin/banned.php index f053aa8..56b50d1 100644 --- a/admin/banned.php +++ b/src/admin/banned.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/changelog.php b/src/admin/changelog.php similarity index 98% rename from admin/changelog.php rename to src/admin/changelog.php index 5b63eaa..645e68c 100644 --- a/admin/changelog.php +++ b/src/admin/changelog.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/chat.php b/src/admin/chat.php similarity index 98% rename from admin/chat.php rename to src/admin/chat.php index 3618898..a6f5ace 100644 --- a/admin/chat.php +++ b/src/admin/chat.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/credit.php b/src/admin/credit.php similarity index 98% rename from admin/credit.php rename to src/admin/credit.php index bccba11..18dddea 100644 --- a/admin/credit.php +++ b/src/admin/credit.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/declare_list.php b/src/admin/declare_list.php similarity index 98% rename from admin/declare_list.php rename to src/admin/declare_list.php index 961bf04..6271f4b 100644 --- a/admin/declare_list.php +++ b/src/admin/declare_list.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/deletuser.php b/src/admin/deletuser.php similarity index 98% rename from admin/deletuser.php rename to src/admin/deletuser.php index 70b9966..3477d53 100644 --- a/admin/deletuser.php +++ b/src/admin/deletuser.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/errors.php b/src/admin/errors.php similarity index 98% rename from admin/errors.php rename to src/admin/errors.php index c57083c..0fd2c6f 100644 --- a/admin/errors.php +++ b/src/admin/errors.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/leftmenu.php b/src/admin/leftmenu.php similarity index 98% rename from admin/leftmenu.php rename to src/admin/leftmenu.php index 40c0a0d..3c3579c 100644 --- a/admin/leftmenu.php +++ b/src/admin/leftmenu.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/md5changepass.php b/src/admin/md5changepass.php similarity index 98% rename from admin/md5changepass.php rename to src/admin/md5changepass.php index 46c43d5..1bbe6c4 100644 --- a/admin/md5changepass.php +++ b/src/admin/md5changepass.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/md5enc.php b/src/admin/md5enc.php similarity index 98% rename from admin/md5enc.php rename to src/admin/md5enc.php index b4a96b7..3117944 100644 --- a/admin/md5enc.php +++ b/src/admin/md5enc.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/messagelist.php b/src/admin/messagelist.php similarity index 99% rename from admin/messagelist.php rename to src/admin/messagelist.php index 49c207c..640eb86 100644 --- a/admin/messagelist.php +++ b/src/admin/messagelist.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/messall.php b/src/admin/messall.php similarity index 98% rename from admin/messall.php rename to src/admin/messall.php index 3997635..c9101cb 100644 --- a/admin/messall.php +++ b/src/admin/messall.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/moonlist.php b/src/admin/moonlist.php similarity index 98% rename from admin/moonlist.php rename to src/admin/moonlist.php index 645d086..6a8a54e 100644 --- a/admin/moonlist.php +++ b/src/admin/moonlist.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/multi.php b/src/admin/multi.php similarity index 98% rename from admin/multi.php rename to src/admin/multi.php index e174971..d314f2e 100644 --- a/admin/multi.php +++ b/src/admin/multi.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/overview.php b/src/admin/overview.php similarity index 99% rename from admin/overview.php rename to src/admin/overview.php index 354d083..90a136e 100644 --- a/admin/overview.php +++ b/src/admin/overview.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/paneladmina.php b/src/admin/paneladmina.php similarity index 99% rename from admin/paneladmina.php rename to src/admin/paneladmina.php index f4097b7..62202c6 100644 --- a/admin/paneladmina.php +++ b/src/admin/paneladmina.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/planetlist.php b/src/admin/planetlist.php similarity index 98% rename from admin/planetlist.php rename to src/admin/planetlist.php index 0d3eacc..d1213de 100644 --- a/admin/planetlist.php +++ b/src/admin/planetlist.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/settings.php b/src/admin/settings.php similarity index 99% rename from admin/settings.php rename to src/admin/settings.php index d6e665f..36f3bef 100644 --- a/admin/settings.php +++ b/src/admin/settings.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/statbuilder.php b/src/admin/statbuilder.php similarity index 99% rename from admin/statbuilder.php rename to src/admin/statbuilder.php index a141504..28e670d 100644 --- a/admin/statbuilder.php +++ b/src/admin/statbuilder.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/statfunctions.php b/src/admin/statfunctions.php similarity index 99% rename from admin/statfunctions.php rename to src/admin/statfunctions.php index de527b9..2d18b06 100644 --- a/admin/statfunctions.php +++ b/src/admin/statfunctions.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/unbanned.php b/src/admin/unbanned.php similarity index 98% rename from admin/unbanned.php rename to src/admin/unbanned.php index cfc9027..2100029 100644 --- a/admin/unbanned.php +++ b/src/admin/unbanned.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/userlist.php b/src/admin/userlist.php similarity index 99% rename from admin/userlist.php rename to src/admin/userlist.php index ecb19df..bc0c391 100644 --- a/admin/userlist.php +++ b/src/admin/userlist.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/admin/variables.php b/src/admin/variables.php similarity index 98% rename from admin/variables.php rename to src/admin/variables.php index 527af4c..54d6b2e 100644 --- a/admin/variables.php +++ b/src/admin/variables.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/alliance.php b/src/alliance.php similarity index 99% rename from alliance.php rename to src/alliance.php index 253527c..5ac6f75 100644 --- a/alliance.php +++ b/src/alliance.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -32,8 +32,8 @@ define('INSTALL' , false); define('INSIDE' , true); require_once dirname(__FILE__) .'/application/bootstrap.php'; -$user = Wootook_Empire_Model_User::getSingleton(); -$db = Wootook_Database::getSingleton(); +$user = Wootook_Player_Model_Session::getSingleton()->getPlayer(); +$db = Wootook_Core_Database::getSingleton(); if(!$user->getId()){ echo ' HTML_EOF; diff --git a/application/code/core/Wootook/Core/Block/Html/Navigation.php b/src/application/code/core/Wootook/Core/Block/Html/Navigation.php similarity index 98% rename from application/code/core/Wootook/Core/Block/Html/Navigation.php rename to src/application/code/core/Wootook/Core/Block/Html/Navigation.php index 64fb59b..8c07368 100644 --- a/application/code/core/Wootook/Core/Block/Html/Navigation.php +++ b/src/application/code/core/Wootook/Core/Block/Html/Navigation.php @@ -54,7 +54,7 @@ class Wootook_Core_Block_Html_Navigation public function addPopupLink($name, $label, $title, $uri, Array $params = array(), Array $classes = array(), $template = null, Array $attributes = array()) { - $uri = $this->getUrl($uri, $params); + $uri = $this->getStaticUrl($uri, $params); $attributes['onclick'] = "f('{$params}', '{$label}');return false;"; diff --git a/application/code/core/Wootook/Core/Block/Html/Navigation/Link.php b/src/application/code/core/Wootook/Core/Block/Html/Navigation/Link.php similarity index 97% rename from application/code/core/Wootook/Core/Block/Html/Navigation/Link.php rename to src/application/code/core/Wootook/Core/Block/Html/Navigation/Link.php index 44e373f..4405d65 100644 --- a/application/code/core/Wootook/Core/Block/Html/Navigation/Link.php +++ b/src/application/code/core/Wootook/Core/Block/Html/Navigation/Link.php @@ -51,7 +51,7 @@ class Wootook_Core_Block_Html_Navigation_Link $this->_uri = $uri; $this->_params = $params; - $this->_url = $this->getUrl($uri, $params); + $this->_url = $this->getStaticUrl($uri, $params); return $this; } @@ -71,7 +71,7 @@ class Wootook_Core_Block_Html_Navigation_Link return $this->_url; } $params = array_merge($this->_params, $moreParams); - return $this->getUrl($this->_uri, $params); + return $this->getStaticUrl($this->_uri, $params); } public function setAttribute($attributeName, $attributeValue) diff --git a/application/code/core/Wootook/Core/Block/Html/Navigation/Node.php b/src/application/code/core/Wootook/Core/Block/Html/Navigation/Node.php similarity index 100% rename from application/code/core/Wootook/Core/Block/Html/Navigation/Node.php rename to src/application/code/core/Wootook/Core/Block/Html/Navigation/Node.php diff --git a/application/code/core/Wootook/Core/Block/Html/Page.php b/src/application/code/core/Wootook/Core/Block/Html/Page.php similarity index 100% rename from application/code/core/Wootook/Core/Block/Html/Page.php rename to src/application/code/core/Wootook/Core/Block/Html/Page.php diff --git a/application/code/core/Wootook/Core/Block/Messages.php b/src/application/code/core/Wootook/Core/Block/Messages.php similarity index 100% rename from application/code/core/Wootook/Core/Block/Messages.php rename to src/application/code/core/Wootook/Core/Block/Messages.php diff --git a/application/code/core/Wootook/Core/Block/Template.php b/src/application/code/core/Wootook/Core/Block/Template.php similarity index 70% rename from application/code/core/Wootook/Core/Block/Template.php rename to src/application/code/core/Wootook/Core/Block/Template.php index 130f183..7e7d982 100644 --- a/application/code/core/Wootook/Core/Block/Template.php +++ b/src/application/code/core/Wootook/Core/Block/Template.php @@ -6,7 +6,8 @@ class Wootook_Core_Block_Template protected function _getTemplatePath($file) { if ($this->getScriptPath() == '') { - trigger_error("No script path defined in block {$this->getNameInLayout()}.", E_USER_NOTICE); + Wootook_Core_ErrorProfiler::getSingleton() + ->addException(new Wootook_Core_Exception_RuntimeException("No script path defined in block {$this->getNameInLayout()}.")); return null; } @@ -29,7 +30,8 @@ class Wootook_Core_Block_Template } } } else { - trigger_error("No layout defined.", E_USER_NOTICE); + Wootook_Core_ErrorProfiler::getSingleton() + ->addException(new Wootook_Core_Exception_RuntimeException("No layout defined.")); } $path = sprintf($pattern, Wootook_Core_Layout::DEFAULT_PACKAGE, Wootook_Core_Layout::DEFAULT_THEME); @@ -37,7 +39,8 @@ class Wootook_Core_Block_Template return $path; } - trigger_error("Template '{$file}' could not be found.", E_USER_ERROR); + Wootook_Core_ErrorProfiler::getSingleton() + ->addException(new Wootook_Core_Exception_RuntimeException("Template '{$file}' could not be found.")); return null; } } \ No newline at end of file diff --git a/application/code/core/Wootook/Core/Block/Text.php b/src/application/code/core/Wootook/Core/Block/Text.php similarity index 100% rename from application/code/core/Wootook/Core/Block/Text.php rename to src/application/code/core/Wootook/Core/Block/Text.php diff --git a/application/code/core/Wootook/Core/Config/Adapter/Abstract.php b/src/application/code/core/Wootook/Core/Config/Adapter/Abstract.php similarity index 100% rename from application/code/core/Wootook/Core/Config/Adapter/Abstract.php rename to src/application/code/core/Wootook/Core/Config/Adapter/Abstract.php diff --git a/application/code/core/Wootook/Core/Config/Adapter/Array.php b/src/application/code/core/Wootook/Core/Config/Adapter/Array.php similarity index 100% rename from application/code/core/Wootook/Core/Config/Adapter/Array.php rename to src/application/code/core/Wootook/Core/Config/Adapter/Array.php diff --git a/application/code/core/Wootook/Core/Config/Node.php b/src/application/code/core/Wootook/Core/Config/Node.php similarity index 97% rename from application/code/core/Wootook/Core/Config/Node.php rename to src/application/code/core/Wootook/Core/Config/Node.php index 77d2210..c35b58b 100644 --- a/application/code/core/Wootook/Core/Config/Node.php +++ b/src/application/code/core/Wootook/Core/Config/Node.php @@ -140,7 +140,7 @@ class Wootook_Core_Config_Node return $key; } if (!isset(self::$_attributeNameCache[$key])) { - self::$_attributeNameCache[$key] = str_replace(' ', '-', strtolower(preg_replace('#[A-Z]#', ' \\1', $key))); + self::$_attributeNameCache[$key] = strtolower(preg_replace('#([A-Z])#', '-\\1', $key)); } return self::$_attributeNameCache[$key]; } diff --git a/application/code/core/Wootook/Core/Controller/Front/Action.php b/src/application/code/core/Wootook/Core/Controller/Action.php similarity index 92% rename from application/code/core/Wootook/Core/Controller/Front/Action.php rename to src/application/code/core/Wootook/Core/Controller/Action.php index 06f2b1a..e7862f2 100644 --- a/application/code/core/Wootook/Core/Controller/Front/Action.php +++ b/src/application/code/core/Wootook/Core/Controller/Action.php @@ -1,6 +1,6 @@ setModuleName($module); } } - $request->setIsDispatched(false); + $this->getResponse()->setIsDispatched(false); } protected function _redirect($uri, Array $params = array(), $code = Wootook_Core_Controller_Response_Http::REDIRECT_FOUND) { $this->getResponse() + ->setIsDispatched(false) ->setRedirect(Wootook::getUrl($uri, $params), $code); + Wootook_Core_ErrorProfiler::unregister(true); + return $this; } @@ -116,6 +119,10 @@ abstract class Wootook_Core_Controller_Front_Action return new Wootook_Core_Layout(Wootook_Core_Layout::DOMAIN_FRONTEND); } + /** + * + * @return Wootook_Core_Layout + */ public function getLayout() { return $this->_layout; diff --git a/src/application/code/core/Wootook/Core/Controller/Front.php b/src/application/code/core/Wootook/Core/Controller/Front.php new file mode 100644 index 0000000..62f4bf4 --- /dev/null +++ b/src/application/code/core/Wootook/Core/Controller/Front.php @@ -0,0 +1,190 @@ + array( + 'modules' => array( + 'core' => array( + 'class' => 'Wootook_Core_', + 'path' => 'Wootook/Core' + ) + ), + 'defaults' => array( + 'module' => 'core', + 'controller' => 'error', + 'action' => 'no-route' + ) + ), + self::ROUTE_DEFAULT => array( + 'modules' => array( + 'core' => array( + 'class' => 'Wootook_Core_', + 'path' => 'Wootook/Core' + ), + 'admin' => array( + 'class' => 'Wootook_Admin_', + 'path' => 'Wootook/Admin' + ), + 'player' => array( + 'class' => 'Wootook_Player_', + 'path' => 'Wootook/Player' + ), + 'empire' => array( + 'class' => 'Wootook_Empire_', + 'path' => 'Wootook/Empire' + ) + ), + 'defaults' => array( + 'module' => 'core', + 'controller' => 'index', + 'action' => 'index' + ) + ) + ); + + protected $_request = null; + protected $_response = null; + + public function __construct(Wootook_Core_Controller_Request_Abstract $request, + Wootook_Core_Controller_Response_Abstract $response) + { + $this->_request = $request; + $this->_response = $response; + } + + protected function _setNoRouteAction(&$route, &$moduleKey, &$controllerKey, &$actionKey) + { + $route = self::ROUTE_ERROR; + $moduleKey = $this->_routes[self::ROUTE_ERROR]['defaults']['module']; + $controllerKey = $this->_routes[self::ROUTE_ERROR]['defaults']['controller']; + $actionKey = $this->_routes[self::ROUTE_ERROR]['defaults']['action']; + + return $this; + } + + protected function _setDefaultRouteAction(&$route, &$moduleKey, &$controllerKey, &$actionKey) + { + $route = self::ROUTE_DEFAULT; + $moduleKey = $this->_routes[self::ROUTE_DEFAULT]['defaults']['module']; + $controllerKey = $this->_routes[self::ROUTE_DEFAULT]['defaults']['controller']; + $actionKey = $this->_routes[self::ROUTE_DEFAULT]['defaults']['action']; + + return $this; + } + + protected function _camelizeClass($string) + { + return str_replace(' ', '_', ucwords(str_replace('-', ' ', $string))); + } + + protected function _camelizeMethod($string) + { + return lcfirst(str_replace(' ', '', ucwords(str_replace('-', ' ', $string)))); + } + + protected function _getControllerClass($modulePrefix, $controllerKey) + { + return $modulePrefix . $this->_camelizeClass($controllerKey) . 'Controller'; + } + + protected function _getControllerPath($modulePath, $controllerKey) + { + return $modulePath . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR + . $this->_camelizeClass($controllerKey) . 'Controller.php'; + } + + protected function _getActionMethod($actionKey) + { + return $this->_camelizeMethod($actionKey) . 'Action'; + } + + public function dispatch($route = null) + { + if ($route == null) { + $route = self::ROUTE_DEFAULT; + } + + if (!isset($this->_routes[$route])) { + $route = self::ROUTE_DEFAULT; + } + + $loop = 0; + while ($loop++ < 100) { + $moduleKey = $this->_request->getModuleName(); + $controllerKey = $this->_request->getControllerName(); + $actionKey = $this->_request->getActionName(); + + if (empty($moduleKey)) { + $this->_setDefaultRouteAction($route, $moduleKey, $controllerKey, $actionKey); + } + + if (!isset($this->_routes[$route]['modules'][$moduleKey])) { + $this->_setNoRouteAction($route, $moduleKey, $controllerKey, $actionKey); + } + + if (empty($controllerKey)) { + $controllerKey = $this->_routes[$route]['defaults']['controller']; + } + + $controllerClass = $this->_getControllerClass($this->_routes[$route]['modules'][$moduleKey]['class'], $controllerKey); + $controllerPath = $this->_getControllerPath($this->_routes[$route]['modules'][$moduleKey]['path'], $controllerKey); + + if (!class_exists($controllerClass, false) && Wootook::fileExists($controllerPath)) { + include_once $controllerPath; + } + + if (!class_exists($controllerClass, false)) { + $this->_setNoRouteAction($route, $moduleKey, $controllerKey, $actionKey); + + $controllerClass = $this->_getControllerClass($this->_routes[$route]['modules'][$moduleKey]['class'], $controllerKey); + $controllerPath = $this->_getControllerPath($this->_routes[$route]['modules'][$moduleKey]['path'], $controllerKey); + + include_once $controllerPath; + } + + if (empty($actionKey)) { + $actionKey = $this->_routes[$route]['defaults']['action']; + } + + $actionMethod = $this->_getActionMethod($actionKey); + if (!method_exists($controllerClass, $actionMethod)) { + $this->_setNoRouteAction($route, $moduleKey, $controllerKey, $actionKey); + + $controllerClass = $this->_getControllerClass($this->_routes[$route]['modules'][$moduleKey]['class'], $controllerKey); + $controllerPath = $this->_getControllerPath($this->_routes[$route]['modules'][$moduleKey]['path'], $controllerKey); + + include_once $controllerPath; + + $actionMethod = $this->_getActionMethod($actionKey); + } + + $controller = new $controllerClass($this->_request, $this->_response); + $controller->init(); + + $this->_response->setIsDispatched(); + + $controller->preDispatch(); + if (!$this->_response->isDispatched()) { + continue; + } + + $controller->$actionMethod(); + $controller->postDispatch(); + + if ($this->_response->isDispatched()) { + break; + } + } + + return $this; + } + + public function send() + { + $this->_response->render(); + } +} \ No newline at end of file diff --git a/application/code/core/Wootook/Core/Controller/Request/Abstract.php b/src/application/code/core/Wootook/Core/Controller/Request/Abstract.php similarity index 100% rename from application/code/core/Wootook/Core/Controller/Request/Abstract.php rename to src/application/code/core/Wootook/Core/Controller/Request/Abstract.php diff --git a/application/code/core/Wootook/Core/Controller/Request/Http.php b/src/application/code/core/Wootook/Core/Controller/Request/Http.php similarity index 59% rename from application/code/core/Wootook/Core/Controller/Request/Http.php rename to src/application/code/core/Wootook/Core/Controller/Request/Http.php index 3a787e8..8e76042 100644 --- a/application/code/core/Wootook/Core/Controller/Request/Http.php +++ b/src/application/code/core/Wootook/Core/Controller/Request/Http.php @@ -3,11 +3,66 @@ class Wootook_Core_Controller_Request_Http extends Wootook_Core_Controller_Request_Abstract { + protected $_baseUrl = null; + protected $_actionKey = 'action'; protected $_controllerKey = 'controller'; protected $_moduleKey = 'module'; - protected $_isDispatched = false; + public function __construct(Array $options = array()) + { + parent::__construct($options); + + $this->_baseUrl = Wootook::getBaseUrl(); + $baseUri = substr($this->_baseUrl, strpos($this->_baseUrl, '/', 8)); // Get the path from the DocumentRoot + + $params = ''; + if (($offset = strpos($this->getServer('REQUEST_URI'), $baseUri)) !== false) { + $path = substr($this->getServer('REQUEST_URI'), $offset + strlen($baseUri)); + + $moduleOffset = strpos($path, '/'); + if ($moduleOffset !== false) { + $this->setModuleName(substr($path, 0, $moduleOffset)); + + $controllerOffset = strpos($path, '/', $moduleOffset + 1); + if ($controllerOffset !== false) { + $this->setControllerName(substr($path, $moduleOffset + 1, $controllerOffset - $moduleOffset - 1)); + + $actionOffset = strpos($path, '/', $controllerOffset + 1); + if ($actionOffset !== false) { + $this->setActionName(substr($path, $controllerOffset + 1, $actionOffset - $controllerOffset - 1)); + + $params = substr($path, $actionOffset); + } else if ($controllerOffset !== false) { + $this->setActionName(substr($path, $controllerOffset + 1)); + } + } else if ($moduleOffset !== false) { + $this->setControllerName(substr($path, $moduleOffset + 1)); + } + } else { + $this->setModuleName($path); + } + } + + if (!empty($params)) { + $paramOffset = 0; + $valueOffset = 0; + while (true) { + $paramOffset = strpos($params, '/', $valueOffset + 1); + if ($paramOffset === false) { + break; + } + $paramKey = substr($params, $valueOffset + 1, $paramOffset - $valueOffset - 1); + + $valueOffset = strpos($params, '/', $paramOffset + 1); + if ($valueOffset === false) { + $this->setParam($paramKey, substr($params, $paramOffset + 1)); + break; + } + $this->setParam($paramKey, substr($params, $paramOffset + 1, $valueOffset - $paramOffset - 1)); + } + } + } public function setParam($key, $value) { @@ -170,7 +225,9 @@ class Wootook_Core_Controller_Request_Http public function setModuleName($name) { - return $this->setParam($this->getModuleKey(), $name); + if ($name === null || is_string($name)) { + return $this->setParam($this->getModuleKey(), $name); + } } public function getControllerKey() @@ -187,12 +244,14 @@ class Wootook_Core_Controller_Request_Http public function getControllerName() { - return $this->getParam($this->getControllerKey(), 'index'); + return $this->getParam($this->getControllerKey()); } public function setControllerName($name) { - return $this->setParam($this->getControllerKey(), $name); + if ($name === null || is_string($name)) { + return $this->setParam($this->getControllerKey(), $name); + } } public function getActionKey() @@ -209,23 +268,13 @@ class Wootook_Core_Controller_Request_Http public function getActionName() { - return $this->getParam($this->getActionKey(), 'index'); + return $this->getParam($this->getActionKey()); } public function setActionName($name) { - return $this->setParam($this->getActionKey(), $name); - } - - public function setIsDispatched($dispatched = true) - { - $this->_isDispatched = $dispatched; - - return $this; - } - - public function isDispatched() - { - return $this->_isDispatched; + if ($name === null || is_string($name)) { + return $this->setParam($this->getActionKey(), $name); + } } } \ No newline at end of file diff --git a/src/application/code/core/Wootook/Core/Controller/Response/Abstract.php b/src/application/code/core/Wootook/Core/Controller/Response/Abstract.php new file mode 100644 index 0000000..2bd8441 --- /dev/null +++ b/src/application/code/core/Wootook/Core/Controller/Response/Abstract.php @@ -0,0 +1,21 @@ +_isDispatched = $dispatched; + + return $this; + } + + public function isDispatched() + { + return $this->_isDispatched; + } + + abstract public function render($send = true); +} diff --git a/application/code/core/Wootook/Core/Controller/Response/Http.php b/src/application/code/core/Wootook/Core/Controller/Response/Http.php similarity index 91% rename from application/code/core/Wootook/Core/Controller/Response/Http.php rename to src/application/code/core/Wootook/Core/Controller/Response/Http.php index e856c37..29c92c6 100644 --- a/application/code/core/Wootook/Core/Controller/Response/Http.php +++ b/src/application/code/core/Wootook/Core/Controller/Response/Http.php @@ -114,16 +114,6 @@ class Wootook_Core_Controller_Response_Http return $this->_data['is_redirect']; } - public function setIsDispatched($dispatched = true) - { - return $this->setData('id_dispatched', $dispatched); - } - - public function getIsDispatched() - { - return $this->getData('id_dispatched'); - } - public function setCookie($name, $value, $lifetime = null, $path = null, $domain = null) { return $this->setRawCookie($name, serialize($value), $lifetime, $path, $domain); @@ -136,7 +126,10 @@ class Wootook_Core_Controller_Response_Http public function setRawCookie($name, $value, $lifetime = null, $path = null, $domain = null) { - setcookie($name, $value, time() + $lifetime, $path, $domain); + $date = new Wootook_Core_DateTime(); + $date->add($lifetime); + + setcookie($name, $value, $date->getTimestamp(), $path, $domain); return $this; } @@ -153,4 +146,14 @@ class Wootook_Core_Controller_Response_Http return $this; } + + public function render($send = true) + { + if ($send) { + $this->sendHeaders(); + echo $this->sendBody(); + } else { + return $this->sendBody(); + } + } } \ No newline at end of file diff --git a/application/code/core/Wootook/Database.php b/src/application/code/core/Wootook/Core/Database.php similarity index 92% rename from application/code/core/Wootook/Database.php rename to src/application/code/core/Wootook/Core/Database.php index 6dcd646..6cbdbac 100644 --- a/application/code/core/Wootook/Database.php +++ b/src/application/code/core/Wootook/Core/Database.php @@ -1,6 +1,6 @@ PDO::ERRMODE_EXCEPTION ); + /** + * + * @deprecated + */ public static function getSingleton() { return self::getConnection(self::DEFAULT_CONNECTION_NAME); @@ -39,6 +43,9 @@ class Wootook_Database } $connectionConfig = Wootook::getConfig("resource/database/{$connectionName}"); + if ($connectionConfig === null) { + return null; + } if ($alias = $connectionConfig->use) { self::$_connectionAliases[$connectionName] = self::getConnection($alias); @@ -123,4 +130,9 @@ class Wootook_Database { return $this->getTablePrefix() . $name; } + + public function select($tableName = null) + { + return new Wootook_Core_Database_Sql_Mysql_Select($this, $tableName); + } } \ No newline at end of file diff --git a/src/application/code/core/Wootook/Core/Database/Orm/DataMapper.php b/src/application/code/core/Wootook/Core/Database/Orm/DataMapper.php new file mode 100644 index 0000000..77b84d8 --- /dev/null +++ b/src/application/code/core/Wootook/Core/Database/Orm/DataMapper.php @@ -0,0 +1,115 @@ +registerNamespace('Wootook_Core_Database_Orm_DataMapper_'); + + if (!is_array($config) || !$config instanceof Wootook_Core_Config_Node) { + return; + } + + foreach ($config as $field => $typeConfig) { + if (is_string($typeConfig)) { + $this->addRule($field, $typeConfig); + } else if (is_array($typeConfig) && isset($typeConfig['type'])) { + if (isset($typeConfig['alias'])) { + $this->addRule($field, $typeConfig['type'], $typeConfig['alias']); + } else { + $this->addRule($field, $typeConfig['type']); + } + } + } + } + + public function addRule($field, $type, $alias = null) + { + if (($instance = $this->load($type)) !== null) { + $this->_rules[$field] = $instance; + } + + if ($alias === null) { + $alias = $field; + } + + $this->_alias[$field] = $alias; + + return $this; + } + + public function removeRule($field) + { + unset($this->_rules[$field]); + unset($this->_alias[$field]); + + return $this; + } + + protected function _load($className, $useSingleton) + { + $reflection = new ReflectionClass($className); + if ($useSingleton && $reflection->implementsInterface('Wootook_Core_Singleton')) { + $method = $reflection->getMethod('getSingleton'); + return $method->invoke(null); + } + + try { + return $reflection->newInstance(); + } catch (ReflectionException $e) { + Wootook_Core_ErrorProfiler::getSingleton() + ->addException($e); + return null; + } + } + + /** + * + * @param Wootook_Core_Database_Resource $entity + * @param Array $datas + * @return Array + */ + public function encode(Wootook_Core_Database_Resource $entity, Array $datas = array()) + { + $aliasTable = array_flip($this->_alias); + foreach ($entity->getAllDatas() as $aliasedField => $decodedValue) { + if (!isset($aliasTable[$aliasedField])) { + $field = $aliasedField; + } else { + $field = $aliasTable[$aliasedField]; + } + + if (isset($this->_rules[$field])) { + $datas[$field] = $this->_rules[$field]->encode($decodedValue); + } else { + $datas[$field] = $decodedValue; + } + } + + return $datas; + } + + /** + * + * @param Wootook_Core_Database_Resource $entity + * @param Array $datas + * @return Wootook_Core_Database_Resource + */ + public function decode(Wootook_Core_Database_Resource $entity, Array $datas = array()) + { + foreach ($datas as $field => $encodedValue) { + if (isset($this->_rules[$field])) { + $entity->setData($this->_alias[$field], $this->_rules[$field]->decode($encodedValue)); + } else { + $entity->setData($field, $encodedValue); + } + } + + return $entity; + } +} \ No newline at end of file diff --git a/src/application/code/core/Wootook/Core/Database/Orm/DataMapper/Array.php b/src/application/code/core/Wootook/Core/Database/Orm/DataMapper/Array.php new file mode 100644 index 0000000..ab43a62 --- /dev/null +++ b/src/application/code/core/Wootook/Core/Database/Orm/DataMapper/Array.php @@ -0,0 +1,15 @@ +toArray()); + } + + public function decode($value) + { + return new Wootook_Core_Config_Node(parent::decode($value)); + } +} \ No newline at end of file diff --git a/src/application/code/core/Wootook/Core/Database/Orm/DataMapper/DateTime.php b/src/application/code/core/Wootook/Core/Database/Orm/DataMapper/DateTime.php new file mode 100644 index 0000000..d2663e3 --- /dev/null +++ b/src/application/code/core/Wootook/Core/Database/Orm/DataMapper/DateTime.php @@ -0,0 +1,38 @@ +_format = self::DATE_FORMAT_MYSQL; + } else { + $this->_format = $format; + } + return $this; + } + + public function getFormat() + { + return $this->_format; + } + + public function encode($value) + { + if (!$value instanceof Wootook_Core_DateTime) { + $value = new Wootook_Core_DateTime($value); + } + + return $value->toString($this->getFormat()); + } + + public function decode($value) + { + return new Wootook_Core_DateTime($value, $this->getFormat()); + } +} \ No newline at end of file diff --git a/src/application/code/core/Wootook/Core/Database/Orm/DataMapper/FieldAbstract.php b/src/application/code/core/Wootook/Core/Database/Orm/DataMapper/FieldAbstract.php new file mode 100644 index 0000000..e404aea --- /dev/null +++ b/src/application/code/core/Wootook/Core/Database/Orm/DataMapper/FieldAbstract.php @@ -0,0 +1,8 @@ +_entityClass = $class; + + return $this; + } + + public function getEntityClass() + { + return $this->_entityClass; + } + + protected function _newInstance(Array $args = array()) + { + if ($this->_reflectionClass === null && $this->_entityClass !== null) { + $this->_reflectionClass = new ReflectionClass($this->_entityClass); + } + + return $this->newInstanceArgs($args); + } + + public function encode($value) + { + return parent::encode($value->getAllDatas()); + } + + public function decode($value) + { + $object = $this->_newInstance(); + $object->addData(parent::decode($value)); + + return $object; + } +} \ No newline at end of file diff --git a/application/code/core/Wootook/Core/Database/Resource.php b/src/application/code/core/Wootook/Core/Database/Resource.php similarity index 64% rename from application/code/core/Wootook/Core/Database/Resource.php rename to src/application/code/core/Wootook/Core/Database/Resource.php index 002f5bd..0ac7c57 100644 --- a/application/code/core/Wootook/Core/Database/Resource.php +++ b/src/application/code/core/Wootook/Core/Database/Resource.php @@ -8,6 +8,20 @@ abstract class Wootook_Core_Database_Resource protected $_tableName = null; + protected $_dataMapper = null; + + /** + * + * @return Wootook_Core_Database_Orm_DataMapper + */ + public function getDataMapper() + { + if ($this->_dataMapper === null) { + $this->_dataMapper = new Wootook_Core_Database_Orm_DataMapper(); + } + return $this->_dataMapper; + } + public function setTableName($tableName) { $this->_tableName = $tableName; @@ -23,7 +37,7 @@ abstract class Wootook_Core_Database_Resource public function getReadConnection() { if ($this->_readConnection === null) { - $this->_readConnection = Wootook_Database::getConnection('core_read'); + $this->_readConnection = Wootook_Core_Database::getConnection('core_read'); } return $this->_readConnection; @@ -31,10 +45,10 @@ abstract class Wootook_Core_Database_Resource public function setReadConnection($connection) { - if ($connection instanceof Wootook_Database) { + if ($connection instanceof Wootook_Core_Database) { $this->_readConnection = $connection; } else if (is_string($connection)) { - $this->_readConnection = Wootook_Database::getConnection($connection); + $this->_readConnection = Wootook_Core_Database::getConnection($connection); } else { throw new Wootook_Core_Exception_RuntimeException( 'First parameter should be either a database connection object or a string identifier.'); @@ -46,17 +60,17 @@ abstract class Wootook_Core_Database_Resource public function getWriteConnection() { if ($this->_writeConnection === null) { - $this->_writeConnection = Wootook_Database::getConnection('core_write'); + $this->_writeConnection = Wootook_Core_Database::getConnection('core_write'); } return $this->_writeConnection; } public function setWriteConnection($connection) { - if ($connection instanceof Wootook_Database) { + if ($connection instanceof Wootook_Core_Database) { $this->_readConnection = $connection; } else if (is_string($connection)) { - $this->_readConnection = Wootook_Database::getConnection($connection); + $this->_readConnection = Wootook_Core_Database::getConnection($connection); } else { throw new Wootook_Core_Exception_RuntimeException( 'First parameter should be either a database connection object or a string identifier.'); diff --git a/src/application/code/core/Wootook/Core/Database/Sql/Mysql/Select.php b/src/application/code/core/Wootook/Core/Database/Sql/Mysql/Select.php new file mode 100644 index 0000000..512f18e --- /dev/null +++ b/src/application/code/core/Wootook/Core/Database/Sql/Mysql/Select.php @@ -0,0 +1,105 @@ +_parts[self::UNION])) { + $fields = array(); + foreach ($this->_parts[self::COLUMNS] as $field) { + $fieldName = current($field); + $fieldAlias = key($field); + if (is_string($fieldAlias)) { + $fields[] = "{$fieldName} AS {$fieldAlias}"; + } else { + $fields[] = $fieldName; + } + } + if (!empty($fields)) { + $fields = implode(", ", $fields); + } else { + $fields = '*'; + } + if (!empty($this->_parts[self::WHERE])) { + $where = 'WHERE (' . implode(") AND (", $this->_parts[self::WHERE]) . ')'; + } else { + $where = ''; + } + $joinedTables = implode("\n ", $this->_parts[self::JOIN]); + + $order = ''; + if (!empty($this->_parts[self::ORDER])) { + $order = 'ORDER BY ' . implode(", ", $this->_parts[self::ORDER]); + } + $limit = ''; + if ($this->_parts[self::LIMIT]) { + if ($this->_parts[self::OFFSET]) { + $limit = "LIMIT {$this->_parts[self::LIMIT]}, {$this->_parts[self::OFFSET]}"; + } else { + $limit = "LIMIT {$this->_parts[self::LIMIT]}"; + } + } + $group = ''; + if (!empty($this->_parts[self::GROUP])) { + foreach ($this->_parts[self::GROUP] as &$groupedField) { + $groupedField = $this->_connection->quoteIdentifier($groupedField); + } + unset($groupedField); + $group = 'GROUP BY ' . implode(', ', $this->_parts[self::GROUP]); + } + + $tableList = array(); + foreach ($this->_parts[self::FROM] as $table) { + if ($table['schema'] !== null) { + $tableString = "{$this->_connection->quoteIdentifier($table['schema'])}.{$this->_connection->quoteIdentifier($this->_connection->getTable($table['table']))}"; + } else { + $tableString = $this->_connection->quoteIdentifier($this->_connection->getTable($table['table'])); + } + if ($table['alias'] !== null) { + $tableString .= " AS {$this->_connection->quoteIdentifier($table['alias'])}"; + } + + $tableList[] = $tableString; + } + $tableList = implode(', ', $tableList); + + return <<_parts[self::UNION] as $statement) { + $statements[] = $statement->_prepareSql(); + } + + $statements = '(' . implode(') UNION (', $statements) . ')'; + if (!empty($where)) { + $where = 'WHERE (' . implode(") AND (", $this->_parts[self::WHERE]) . ')'; + } else { + $where = ''; + } + + $limit = ''; + if ($this->_parts[self::LIMIT]) { + if ($this->_parts[self::OFFSET]) { + $limit = "LIMIT {$this->_parts[self::LIMIT]}, {$this->_parts[self::OFFSET]}"; + } else { + $limit = "LIMIT {$this->_parts[self::LIMIT]}"; + } + } + + return << array(), + self::FROM => array(), + self::JOIN => array(), + self::WHERE => array(), + self::ORDER => array(), + self::UNION => array(), + self::LIMIT => array(), + self::OFFSET => array(), + self::GROUP => array(), + ); + + protected $_connection = null; + + public function __construct(Wootook_Core_Database $connection, $tableName = null) + { + $this->_connection = $connection; + + if ($tableName !== null) { + $this->from($tableName); + } + } + + public function getConnection() + { + return $this->_connection; + } + + public function setConnection(Wootook_Core_Database $connection) + { + $this->_connection = $connection; + + return $this; + } + + protected function _init() + { + return $this; + } + + public function setTableName($tableName) + { + $this->from($tableName); + + return $this; + } + + public function getTableName() + { + $table = $this->_parts[self::FROM]; + + return $table['table']; + } + + public function quote($data) + { + return $this->getConnection()->quote($data); + } + + public function column($column = '*', $alias = null) + { + if (is_array($column)) { + foreach ($column as $alias => $field) { + if (is_int($alias)) { + $this->_parts[self::COLUMNS][] = array($field); + } else { + $this->_parts[self::COLUMNS][] = array($alias => $field); + } + } + } else if ($alias === null || is_int($alias)) { + $this->_parts[self::COLUMNS][] = array($column); + } else { + $this->_parts[self::COLUMNS][] = array($alias => $column); + } + + return $this; + } + + public function from($table, $schema = null) + { + if (is_array($table)) { + $alias = key($table); + $table = current($table); + } else { + $alias = null; + } + + $this->_parts[self::FROM][] = array( + 'table' => $table, + 'alias' => $alias, + 'schema' => $schema + ); + + return $this; + } + + public function where($condition) + { + $this->_parts[self::WHERE][] = $condition; + + return $this; + } + + public function join($table, $condition, $fields = array('*'), $mode = self::JOIN_INNER) + { + $database = $this->getConnection(); + + if (is_array($table)) { + $alias = key($table); + $table = current($table); + + foreach ($fields as $fieldAlias => $fieldName) { + $this->column("{$alias}.{$field}", $fieldAlias); + } + + $this->_parts[self::JOIN][] = "{$mode} JOIN {$database->getTable($table)} AS {$alias} ON {$condition}"; + } else { + foreach ($fields as $field) { + $this->column("{$field}"); + } + + $this->_parts[self::JOIN][] = "{$mode} JOIN {$database->getTable($table)} ON {$condition}"; + } + + return $this; + } + + public function joinLeft($table, $condition, $fields = array('*')) + { + return $this->join($table, $condition, $fields, self::JOIN_LEFT); + } + + public function joinRight($table, $condition, $fields = array('*')) + { + return $this->join($table, $condition, $fields, self::JOIN_RIGHT); + } + + public function joinInner($table, $condition, $fields = array('*')) + { + return $this->join($table, $condition, $fields, self::JOIN_INNER); + } + + public function joinOuter($table, $condition, $fields = array('*')) + { + return $this->join($table, $condition, $fields, self::JOIN_OUTER); + } + + public function order($field, $direction = 'ASC') + { + $this->_parts[self::ORDER][] = "{$field} {$direction}"; + + return $this; + } + + public function union($collection) + { + $this->_parts[self::UNION][] = $collection; + + return $this; + } + + public function limit($limit, $offset = null) + { + $this->_parts[self::LIMIT] = intval($limit); + $this->_parts[self::OFFSET] = $offset; + + return $this; + } + + public function group($groupField) + { + $this->_parts[self::GROUP][] = $groupField; + + return $this; + } + + abstract protected function _prepareSql(); + + public function __toString() + { + return $this->_prepareSql(); + } + + public function toString() + { + return $this->_prepareSql(); + } +} \ No newline at end of file diff --git a/src/application/code/core/Wootook/Core/DateTime.php b/src/application/code/core/Wootook/Core/DateTime.php new file mode 100644 index 0000000..bb4256d --- /dev/null +++ b/src/application/code/core/Wootook/Core/DateTime.php @@ -0,0 +1,296 @@ + array(self::DAY => '#(0[1-9]|[12][0-9]|3[01])#'), + 'j' => array(self::DAY => '#([1-9]|[12][0-9]|3[01])#'), + 'D' => array(self::WEEKDAY => '#(Mon|Tue|Wed|Thu|Fri|Sat|Sun)#i', self::PARSER => '_parseShortWeekday'), + 'N' => array(self::WEEKDAY => '#([1-7])#', self::PARSER => '_parseWeekday'), + 'w' => array(self::WEEKDAY => '#([0-6])#'), + 'm' => array(self::MONTH => '#(0[1-9]|1[0-2])#'), + 'M' => array(self::MONTH => '#(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)#i', self::PARSER => '_parseShortMonth'), + 'n' => array(self::MONTH => '#([1-9]|1[0-2])#'), + 'o' => array(self::YEAR_ISO => '#([0-9]{4})#'), + 'Y' => array(self::YEAR => '#([0-9]{4})#'), + 'y' => array(self::YEAR => '#([0-9]{2})#', self::PARSER => '_parseShortYear'), + + 'a' => array(self::MERIDIEM => '#(am|pm)#', self::PARSER => '_parseMeridiem'), + 'A' => array(self::MERIDIEM => '#(AM|PM)#', self::PARSER => '_parseMeridiem'), + 'g' => array(self::HOUR => '#([0-9]{1,2})#'), + 'G' => array(self::HOUR => '#([0-9]{1,2})#'), + 'h' => array(self::HOUR => '#([0-9]{2})#'), + 'H' => array(self::HOUR => '#([0-9]{2})#'), + 'i' => array(self::MINUTE => '#([0-9]{2})#'), + 's' => array(self::SECOND => '#([0-9]{2})#'), + 'u' => array(self::MICROSECOND => '#([0-9]{6})#'), + 'I' => array(self::DAYLIGHT => '#(0|1)#'), + + // Unimplemented and ignored modifiers + 'l' => array(null => '#.#'), + 'S' => array(null => '#.#'), + 'z' => array(null => '#.#'), + 'W' => array(null => '#.#'), + 'f' => array(null => '#.#'), + 't' => array(null => '#.#'), + 'L' => array(null => '#.#'), + 'O' => array(null => '#.#'), + 'P' => array(null => '#.#'), + 'T' => array(null => '#.#'), + 'Z' => array(null => '#.#'), + 'c' => array(null => '#.#'), + 'r' => array(null => '#.#'), + 'U' => array(null => '#.#') + ); + + protected $_datetime = null; + + public static function init($timezone = null, $force = false) + { + static $init = false; + + if ($init === false || $force === true) { + if ($timezone === null) { + //$timezone = Wootook::getConfig('system/date/timezone'); + } + if ($timezone === null) { + $timezone = 'GMT'; + } + + date_default_timezone_set($timezone); + $init = true; + } + } + + public function __construct($timestamp = null, $format = null) + { + self::init(); + + if ($timestamp === null) { + $this->_datetime = time(); + } else if ($format === null) { + $this->_datetime = intval($timestamp); + } else { + $this->_datetime = $this->_parse($timestamp, $format); + } + } + + public function getIso($useTimezone = false) + { + return $this->toString(self::ISO_8601, $useTimezone); + } + + public function getTimestamp() + { + return $this->_datetime; + } + + public function now() + { + return $this->calc(time(), self::TIMESTAMP, self::OPERATOR_SET); + } + + public function set($value, $part = self::TIMESTAMP) + { + return $this->calc($value, $part, self::OPERATOR_SET); + } + + public function add($value, $part = self::TIMESTAMP) + { + return $this->calc($value, $part, self::OPERATOR_ADD); + } + + public function sub($value, $part = self::TIMESTAMP) + { + return $this->calc($value, $part, self::OPERATOR_SUB); + } + + public function calc($value, $part = self::TIMESTAMP, $type = self::OPERATOR_ADD) + { + switch ($part) { + case self::YEAR: + case self::MONTH: + case self::WEEK: + case self::DAY: + case self::HOUR: + case self::MINUTE: + case self::SECOND: + $current = getdate($this->_datetime); + if ($type === self::OPERATOR_ADD) { + $parts = $current[$part] += $value; + } else if ($type === self::OPERATOR_SUB) { + $parts = $current[$part] -= $value; + } else if ($type === self::OPERATOR_SET) { + $parts = $current[$part] = $value; + } + + $this->_datetime = $this->_mktime($parts); + break; + + case self::TIMESTAMP: + if ($type === self::OPERATOR_ADD) { + $this->_datetime += intval($value); + } else if ($type === self::OPERATOR_SUB) { + $this->_datetime -= intval($value); + } else if ($type === self::OPERATOR_SET) { + $this->_datetime = intval($value); + } + break; + // default: break; // omitted + } + + return $this; + } + + public function diff(self $date) + { + return $this->_datetime - $date->_datetime; + } + + protected function _mktime(Array $parts) + { + return mktime($parts[self::HOUR], $parts[self::MINUTE], $parts[self::SECOND], + $parts[self::MONTH], $parts[self::DAY], $parts[self::YEAR]); + } + + public function toString($format, $useTimezone = true) + { + if ($useTimezone) { + return date($format, $this->_datetime); + } else { + return gmdate($format, $this->_datetime); + } + } + + public function __toString() + { + return $this->toString(self::ISO_8601, false); + } + + protected function _parseShortYear($match) + { + $year = intval($match); + if ($year < 70) { + $year += 2000; + } else if ($year < 100) { + $year += 1900; + } + return $year; + } + + protected function _parseShortMonth($match) + { + if ($key = array_search(strtolower($match), array('jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'))) { + return $key + 1; + } + return false; + } + + protected function _parseShortWeekday($match) + { + if ($key = array_search(strtolower($match), array('mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'))) { + return $key; + } + return false; + } + + protected function _parseWeekday($match) + { + return intval($match) % 7; + } + + protected function _parseMeridiem($match) + { + if (in_array(strtolower($match), array(self::MERIDIEM_AM, self::MERIDIEM_PM))) { + return strtolower($match); + } + return false; + } + + protected function _parse($datetime, $format) + { + $parts = array( + self::YEAR => false, + self::YEAR_ISO => false, + self::MONTH => false, + self::DAY => false, + self::WEEKDAY => false, + self::HOUR => false, + self::MINUTE => false, + self::SECOND => false, + self::MICROSECOND => false, + self::DAYLIGHT => false, + self::MERIDIEM => false, + ); + + $offset = 0; + + $length = strlen($format); + for ($i = 0; $i < $length; $i++) { + $modifier = $format[$i]; + if (!isset(self::$_rules[$modifier])) { + $offset = (strpos($datetime, $format[$i], $offset)) + 1; + continue; + } + + $rule = self::$_rules[$modifier]; + $callback = null; + if (isset($rule[self::PARSER])) { + $callback = $rule[self::PARSER]; + unset($rule[self::PARSER]); + } + + foreach ($rule as $part => $regex) { + if (!preg_match($regex, $datetime, $matches, null, $offset)) { + var_dump($datetime); + continue; + } + + if ($callback === null) { + $parts[$part] = intval($matches[1]); + } else if (is_callable($callback)) { + $parts[$part] = call_user_func($callback, $matches[1]); + } else { + $parts[$part] = $this->$callback($matches[1]); + } + $offset += strlen($matches[1]); + } + } + + if ($parts[self::MERIDIEM] !== false && $parts[self::MERIDIEM] === self::MERIDIEM_PM) { + $parts[self::HOUR] = ($parts[self::HOUR] + 12) % 24; + } + + if ($parts[self::YEAR] !== false || $parts[self::YEAR_ISO] === false) { + return $this->_mktime($parts); + } else { + return $this->_mktime($parts); + } + } +} \ No newline at end of file diff --git a/application/code/core/Wootook/Core/Email.php b/src/application/code/core/Wootook/Core/Email.php similarity index 100% rename from application/code/core/Wootook/Core/Email.php rename to src/application/code/core/Wootook/Core/Email.php diff --git a/application/code/core/Wootook/Core/Entity.php b/src/application/code/core/Wootook/Core/Entity.php similarity index 89% rename from application/code/core/Wootook/Core/Entity.php rename to src/application/code/core/Wootook/Core/Entity.php index 5f7ca7d..7fe89c9 100644 --- a/application/code/core/Wootook/Core/Entity.php +++ b/src/application/code/core/Wootook/Core/Entity.php @@ -59,9 +59,10 @@ SQL_EOF; if (!is_array($datas) || empty($datas)) { throw new Wootook_Core_Exception_DataAccessException('Could not load data: this id could not be found.'); } - unset($datas[self::getIdFieldName()]); + unset($datas[$this->getIdFieldName()]); - $this->_data = $datas; + $this->_data = array(); + $this->getDataMapper()->decode($this, $datas); $this->setId($id); return $this; @@ -74,8 +75,9 @@ SQL_EOF; if ($this->getId() !== null) { $fields = array(); $values = array(); - foreach ($this->getAllDatas() as $field => $value) { - if ($field == self::getIdFieldName()) { + $datas = $this->getDataMapper()->encode($this, $this->getAllDatas()); + foreach ($datas as $field => $value) { + if ($field == $this->getIdFieldName()) { continue; } $fields[] = "{$database->quoteIdentifier($field)}=:{$field}"; @@ -83,7 +85,7 @@ SQL_EOF; } $fieldsImploded = implode(', ', $fields); - $idFieldName = self::getIdFieldName(); + $idFieldName = $this->getIdFieldName(); $values[$idFieldName] = $this->getId(); if ($database === null) { @@ -105,7 +107,7 @@ SQL_EOF; $tokens = array(); $values = array(); foreach ($datas as $field => $value) { - if ($field == self::getIdFieldName()) { + if ($field == $this->getIdFieldName()) { continue; } $tokens[] = ":{$field}"; @@ -139,14 +141,14 @@ SQL_EOF; { $fields = array(); foreach ($this->getAllDatas() as $field => $value) { - if ($field == self::getIdFieldName()) { + if ($field == $this->getIdFieldName()) { continue; } $fields[] = "{$field}=:{$field}"; } $fieldsImploded = implod(', ', $fields); - $idFieldName = self::getIdFieldName(); + $idFieldName = $this->getIdFieldName(); $database = $this->getWriteConnection(); if ($database === null) { throw new Wootook_Core_Exception_DataAccessException('Could not load data: no write connection configured.'); diff --git a/application/code/core/Wootook/Core/Entity/SubTable.php b/src/application/code/core/Wootook/Core/Entity/SubTable.php similarity index 92% rename from application/code/core/Wootook/Core/Entity/SubTable.php rename to src/application/code/core/Wootook/Core/Entity/SubTable.php index 0eaa9bc..b512222 100644 --- a/application/code/core/Wootook/Core/Entity/SubTable.php +++ b/src/application/code/core/Wootook/Core/Entity/SubTable.php @@ -4,7 +4,7 @@ * * @uses Wootook_Object * @uses Legacies_Empire - * @uses Wootook_Empire_Model_User + * @uses Wootook_Player_Model_Entity */ abstract class Wootook_Core_Entity_SubTable extends Wootook_Core_Database_Resource @@ -31,7 +31,7 @@ abstract class Wootook_Core_Entity_SubTable $idFields = '(' . implode(') AND (', $idFields) . ')'; $fields = implode(', ', $fields); - $database = Wootook_Database::getSingleton(); + $database = $this->getWriteConnection(); $sql =<<getTable(self::getTableName())} SET {$fields} @@ -50,7 +50,7 @@ SQL_EOF; } $tokens = implode(', ', $tokens); - $database = Wootook_Database::getSingleton(); + $database = $this->getWriteConnection(); $sql =<<getTable(self::getTableName())} ($fields) VALUES ({$tokens}) @@ -65,7 +65,7 @@ SQL_EOF; protected function _load() { $idValues = func_get_arg(0); - $database = Wootook_Database::getSingleton(); + $database = $this->getReadConnection(); $idFields = array(); foreach ($this->_idFieldNames as $field) { @@ -94,7 +94,7 @@ SQL_EOF; protected function _delete() { - $database = Wootook_Database::getSingleton(); + $database = $this->getWriteConnection(); $idFields = array(); $idValues = array(); diff --git a/application/code/core/Wootook/Core/EntityInterface.php b/src/application/code/core/Wootook/Core/EntityInterface.php similarity index 97% rename from application/code/core/Wootook/Core/EntityInterface.php rename to src/application/code/core/Wootook/Core/EntityInterface.php index a26e219..0ed3eb7 100644 --- a/application/code/core/Wootook/Core/EntityInterface.php +++ b/src/application/code/core/Wootook/Core/EntityInterface.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/agpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2011-Present, Grégory PLANCHAT * All rights reserved. diff --git a/application/code/core/Wootook/Core/ErrorProfiler.php b/src/application/code/core/Wootook/Core/ErrorProfiler.php similarity index 87% rename from application/code/core/Wootook/Core/ErrorProfiler.php rename to src/application/code/core/Wootook/Core/ErrorProfiler.php index bf0412f..4e729e1 100644 --- a/application/code/core/Wootook/Core/ErrorProfiler.php +++ b/src/application/code/core/Wootook/Core/ErrorProfiler.php @@ -1,5 +1,39 @@ + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + * --> NOTICE <-- + * This file is part of the core development branch, changing its contents will + * make you unable to use the automatic updates manager. Please refer to the + * documentation for further information about customizing Wootook. + * + */ +/** + * + * Enter description here ... + * @author Greg + * + */ class Wootook_Core_ErrorProfiler { private static $_singleton = null; diff --git a/application/code/core/Legacies/Officers/Exception.php b/src/application/code/core/Wootook/Core/Event.php similarity index 93% rename from application/code/core/Legacies/Officers/Exception.php rename to src/application/code/core/Wootook/Core/Event.php index a389e3b..42b4de7 100644 --- a/application/code/core/Legacies/Officers/Exception.php +++ b/src/application/code/core/Wootook/Core/Event.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/agpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2011-Present, Grégory PLANCHAT * All rights reserved. @@ -27,11 +27,14 @@ * documentation for further information about customizing Wootook. * */ + /** * * Enter description here ... * @author Greg * */ - -interface Legacies_Officers_Exception {} \ No newline at end of file +class Wootook_Core_Event + extends Wootook_Object +{ +} \ No newline at end of file diff --git a/application/code/core/Wootook/Core/Event/Break.php b/src/application/code/core/Wootook/Core/Event/Break.php similarity index 100% rename from application/code/core/Wootook/Core/Event/Break.php rename to src/application/code/core/Wootook/Core/Event/Break.php diff --git a/src/application/code/core/Wootook/Core/Exception.php b/src/application/code/core/Wootook/Core/Exception.php new file mode 100644 index 0000000..7a9030d --- /dev/null +++ b/src/application/code/core/Wootook/Core/Exception.php @@ -0,0 +1,37 @@ + + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + * --> NOTICE <-- + * This file is part of the core development branch, changing its contents will + * make you unable to use the automatic updates manager. Please refer to the + * documentation for further information about customizing Wootook. + * + */ + +/** + * + * Enter description here ... + * @author Greg + * + */ +interface Wootook_Core_Exception extends Wootook_Exception {} \ No newline at end of file diff --git a/application/code/core/Wootook/Core/Exception/DataAccessException.php b/src/application/code/core/Wootook/Core/Exception/DataAccessException.php similarity index 100% rename from application/code/core/Wootook/Core/Exception/DataAccessException.php rename to src/application/code/core/Wootook/Core/Exception/DataAccessException.php diff --git a/application/code/core/Wootook/Core/Exception/Deprecated.php b/src/application/code/core/Wootook/Core/Exception/Deprecated.php similarity index 100% rename from application/code/core/Wootook/Core/Exception/Deprecated.php rename to src/application/code/core/Wootook/Core/Exception/Deprecated.php diff --git a/application/code/core/Wootook/Core/Exception/Exception.php b/src/application/code/core/Wootook/Core/Exception/Exception.php similarity index 100% rename from application/code/core/Wootook/Core/Exception/Exception.php rename to src/application/code/core/Wootook/Core/Exception/Exception.php diff --git a/application/code/core/Wootook/Core/Exception/GameError.php b/src/application/code/core/Wootook/Core/Exception/GameError.php similarity index 100% rename from application/code/core/Wootook/Core/Exception/GameError.php rename to src/application/code/core/Wootook/Core/Exception/GameError.php diff --git a/application/code/core/Wootook/Core/Exception/LayoutException.php b/src/application/code/core/Wootook/Core/Exception/LayoutException.php similarity index 100% rename from application/code/core/Wootook/Core/Exception/LayoutException.php rename to src/application/code/core/Wootook/Core/Exception/LayoutException.php diff --git a/application/code/core/Wootook/Core/Exception/RuntimeException.php b/src/application/code/core/Wootook/Core/Exception/RuntimeException.php similarity index 100% rename from application/code/core/Wootook/Core/Exception/RuntimeException.php rename to src/application/code/core/Wootook/Core/Exception/RuntimeException.php diff --git a/application/code/core/Wootook/Core/Exception/WebsiteError.php b/src/application/code/core/Wootook/Core/Exception/WebsiteError.php similarity index 100% rename from application/code/core/Wootook/Core/Exception/WebsiteError.php rename to src/application/code/core/Wootook/Core/Exception/WebsiteError.php diff --git a/application/code/core/Wootook/Core/Form.php b/src/application/code/core/Wootook/Core/Form.php similarity index 81% rename from application/code/core/Wootook/Core/Form.php rename to src/application/code/core/Wootook/Core/Form.php index e124e1a..454db73 100644 --- a/application/code/core/Wootook/Core/Form.php +++ b/src/application/code/core/Wootook/Core/Form.php @@ -1,5 +1,39 @@ + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + * --> NOTICE <-- + * This file is part of the core development branch, changing its contents will + * make you unable to use the automatic updates manager. Please refer to the + * documentation for further information about customizing Wootook. + * + */ +/** + * + * Enter description here ... + * @author Greg + * + */ class Wootook_Core_Form { protected $_elements = array(); diff --git a/application/code/core/Wootook/Core/Form/Element/Button.php b/src/application/code/core/Wootook/Core/Form/Element/Button.php similarity index 100% rename from application/code/core/Wootook/Core/Form/Element/Button.php rename to src/application/code/core/Wootook/Core/Form/Element/Button.php diff --git a/application/code/core/Wootook/Core/Form/Element/Text.php b/src/application/code/core/Wootook/Core/Form/Element/Text.php similarity index 100% rename from application/code/core/Wootook/Core/Form/Element/Text.php rename to src/application/code/core/Wootook/Core/Form/Element/Text.php diff --git a/application/code/core/Wootook/Core/Form/ElementAbstract.php b/src/application/code/core/Wootook/Core/Form/ElementAbstract.php similarity index 96% rename from application/code/core/Wootook/Core/Form/ElementAbstract.php rename to src/application/code/core/Wootook/Core/Form/ElementAbstract.php index 40d9860..f718c34 100644 --- a/application/code/core/Wootook/Core/Form/ElementAbstract.php +++ b/src/application/code/core/Wootook/Core/Form/ElementAbstract.php @@ -10,7 +10,7 @@ abstract class Wootook_Core_Form_ElementAbstract protected $_validators = array(); - public function __construct($name, $params, Wootook_Core_Form $form = null) + public function __construct($name, $params = array(), Wootook_Core_Form $form = null) { if ($form !== null) { $this->setForm($form); diff --git a/application/code/core/Wootook/Core/Form/ElementLoader.php b/src/application/code/core/Wootook/Core/Form/ElementLoader.php similarity index 87% rename from application/code/core/Wootook/Core/Form/ElementLoader.php rename to src/application/code/core/Wootook/Core/Form/ElementLoader.php index e3ca41d..3c16345 100644 --- a/application/code/core/Wootook/Core/Form/ElementLoader.php +++ b/src/application/code/core/Wootook/Core/Form/ElementLoader.php @@ -1,7 +1,7 @@ newInstance($this->_form); } catch (ReflectionException $e) { - trigger_error($e->getMessage(), E_USER_WARNING); + Wootook_Core_ErrorProfiler::getSingleton() + ->addException($e); return null; } } diff --git a/application/code/core/Wootook/Core/Form/Validator/Alnum.php b/src/application/code/core/Wootook/Core/Form/Validator/Alnum.php similarity index 100% rename from application/code/core/Wootook/Core/Form/Validator/Alnum.php rename to src/application/code/core/Wootook/Core/Form/Validator/Alnum.php diff --git a/application/code/core/Wootook/Core/Form/Validator/Alpha.php b/src/application/code/core/Wootook/Core/Form/Validator/Alpha.php similarity index 100% rename from application/code/core/Wootook/Core/Form/Validator/Alpha.php rename to src/application/code/core/Wootook/Core/Form/Validator/Alpha.php diff --git a/application/code/core/Wootook/Core/Form/Validator/Email.php b/src/application/code/core/Wootook/Core/Form/Validator/Email.php similarity index 100% rename from application/code/core/Wootook/Core/Form/Validator/Email.php rename to src/application/code/core/Wootook/Core/Form/Validator/Email.php diff --git a/application/code/core/Wootook/Core/Form/Validator/FormKey.php b/src/application/code/core/Wootook/Core/Form/Validator/FormKey.php similarity index 100% rename from application/code/core/Wootook/Core/Form/Validator/FormKey.php rename to src/application/code/core/Wootook/Core/Form/Validator/FormKey.php diff --git a/application/code/core/Wootook/Core/Form/Validator/Hex.php b/src/application/code/core/Wootook/Core/Form/Validator/Hex.php similarity index 100% rename from application/code/core/Wootook/Core/Form/Validator/Hex.php rename to src/application/code/core/Wootook/Core/Form/Validator/Hex.php diff --git a/application/code/core/Wootook/Core/Form/Validator/Host.php b/src/application/code/core/Wootook/Core/Form/Validator/Host.php similarity index 100% rename from application/code/core/Wootook/Core/Form/Validator/Host.php rename to src/application/code/core/Wootook/Core/Form/Validator/Host.php diff --git a/application/code/core/Wootook/Core/Form/Validator/Numeric.php b/src/application/code/core/Wootook/Core/Form/Validator/Numeric.php similarity index 100% rename from application/code/core/Wootook/Core/Form/Validator/Numeric.php rename to src/application/code/core/Wootook/Core/Form/Validator/Numeric.php diff --git a/application/code/core/Wootook/Core/Form/Validator/Regex.php b/src/application/code/core/Wootook/Core/Form/Validator/Regex.php similarity index 100% rename from application/code/core/Wootook/Core/Form/Validator/Regex.php rename to src/application/code/core/Wootook/Core/Form/Validator/Regex.php diff --git a/application/code/core/Wootook/Core/Form/ValidatorAbstract.php b/src/application/code/core/Wootook/Core/Form/ValidatorAbstract.php similarity index 100% rename from application/code/core/Wootook/Core/Form/ValidatorAbstract.php rename to src/application/code/core/Wootook/Core/Form/ValidatorAbstract.php diff --git a/application/code/core/Wootook/Core/Form/ValidatorLoader.php b/src/application/code/core/Wootook/Core/Form/ValidatorLoader.php similarity index 87% rename from application/code/core/Wootook/Core/Form/ValidatorLoader.php rename to src/application/code/core/Wootook/Core/Form/ValidatorLoader.php index f95d439..a81df23 100644 --- a/application/code/core/Wootook/Core/Form/ValidatorLoader.php +++ b/src/application/code/core/Wootook/Core/Form/ValidatorLoader.php @@ -1,7 +1,7 @@ newInstance(); } catch (ReflectionException $e) { - trigger_error($e->getMessage(), E_USER_WARNING); + Wootook_Core_ErrorProfiler::getSingleton() + ->addException($e); return null; } } diff --git a/application/code/core/Wootook/Core/Layout.php b/src/application/code/core/Wootook/Core/Layout.php similarity index 74% rename from application/code/core/Wootook/Core/Layout.php rename to src/application/code/core/Wootook/Core/Layout.php index 93db8e8..eae1e88 100644 --- a/application/code/core/Wootook/Core/Layout.php +++ b/src/application/code/core/Wootook/Core/Layout.php @@ -1,5 +1,44 @@ + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + * --> NOTICE <-- + * This file is part of the core development branch, changing its contents will + * make you unable to use the automatic updates manager. Please refer to the + * documentation for further information about customizing Wootook. + * + */ +/** + * Page layout class utility. + * Builds page structures from flexible layout declaration files, written in a + * user-friendly XML format. + * + * @author Greg + * @since 1.5.0 + * @package Wootook + * @subpackage Wootook_Core + * @category layout + */ class Wootook_Core_Layout extends Wootook_Core_Model { @@ -9,24 +48,45 @@ class Wootook_Core_Layout const DOMAIN_FRONTEND = 'frontend'; const DOMAIN_BACKEND = 'backend'; + /** @var array */ protected $_blocks = array(); + /** @var Wootook_Core_View */ protected $_messageBlock = null; - protected $_view = null; + /** @var Wootook_Core_View */ + protected $_rootView = null; + + /** @var string */ protected $_eventPrefix = 'layout'; + + /** @var string */ protected $_eventObject = 'layout'; + /** @var string */ protected $_domain = self::DOMAIN_FRONTEND; + + /** @var string */ protected $_package = self::DEFAULT_PACKAGE; + + /** @var string */ protected $_theme = self::DEFAULT_THEME; + /** @var array */ protected $_namespaces = array( 'core' => array( 'Wootook_Core_Block_' => 'Wootook/Core/Block' ) ); + /** + * Page layout class utility. + * + * @param string $domain + * @param string $package + * @param string $theme + * @param array $data + */ public function __construct($domain = null, $package = null, $theme = null, Array $data = array()) { if ($domain === null) { @@ -91,7 +151,17 @@ class Wootook_Core_Layout if ($this->hasData($layoutId)) { $declared = $this->getData($layoutId); - $layoutConfig = array_merge($declared, $layoutConfig); + if (isset($declared['block']) && !isset($layoutConfig['block'])) { + $layoutConfig['block'] = $declared['block']; + } + + if (isset($declared['reference'])) { + if (isset($layoutConfig['reference'])) { + $layoutConfig['reference'] = array_merge($declared['reference'], $layoutConfig['reference']); + } else { + $layoutConfig['reference'] = $declared['reference']; + } + } } $this->setData($layoutId, $layoutConfig); @@ -103,6 +173,19 @@ class Wootook_Core_Layout return $this; } + protected function _getAllParents(&$layoutConfigs, $currentHandle) + { + foreach ($currentHandle as $parent) { + $currentLayout = $this->getData($parent); + $layoutConfigs[] = $currentLayout; + + if (!isset($currentLayout['update'])) { + continue; + } + $this->_getAllParents($layoutConfigs, $currentLayout['update']); + } + } + protected function _load() { $layoutId = func_get_arg(0); @@ -113,17 +196,7 @@ class Wootook_Core_Layout $layoutConfigs = array($this->getData($layoutId)); if (isset($layoutConfigs[0]['update'])) { - $parent = $layoutConfigs[0]['update']; - - $i = 0; - while (true) { - $layoutConfigs[++$i] = $this->getData($parent); - - if (!isset($layoutConfigs[$i]['update'])) { - break; - } - $parent = $layoutConfigs[$i]['update']; - } + $this->_getAllParents($layoutConfigs, $layoutConfigs[0]['update']); } $layoutUpdates = array(); @@ -150,8 +223,8 @@ class Wootook_Core_Layout $type = $layoutConfig['type']; $name = isset($layoutConfig['name']) ? $layoutConfig['name'] : 'root'; - $this->_view = $this->_createBlock($type, $name, $layoutConfig); - } else if (!isset($this->_view)) { + $this->_rootView = $this->_createBlock($type, $name, $layoutConfig); + } else if (!isset($this->_rootView)) { return $this; } @@ -200,10 +273,12 @@ class Wootook_Core_Layout protected function _save() { + throw new Wootook_Core_Exception_LayoutException('Save not permitted for the layout manager.'); } protected function _delete() { + throw new Wootook_Core_Exception_LayoutException('Delete not permitted for the layout manager.'); } protected function _resolveBlockClassType($type) @@ -244,10 +319,20 @@ class Wootook_Core_Layout } } - trigger_error(Wootook::__('Class type "%s" could not be resolved.', $type), E_USER_NOTICE); + Wootook_Core_ErrorProfiler::getSingleton() + ->addException(new Wootook_Core_Exception_LayoutException(sprintf('Class type "%s" could not be resolved.', $type))); return null; } + /** + * Register a new block namespage for use in the layout declaration files + * + * @since 1.5.0 + * @param string $module + * @param string $namespace + * @param string|null $path + * @return Wootook_Core_Layout + */ public function registerBlockNamespace($module, $namespace, $path = null) { if ($path === null) { @@ -261,6 +346,14 @@ class Wootook_Core_Layout return $this; } + /** + * Unregister a previously declared block namespace + * + * @since 1.5.0 + * @param string $module + * @param string $namespace + * @return Wootook_Core_Layout + */ public function unregisterBlockNamespace($module, $namespace) { if (isset($this->_namespaces[$module]) && isset($this->_namespaces[$module][$namespace])) { @@ -270,6 +363,14 @@ class Wootook_Core_Layout return $this; } + /** + * Create a new block instance + * + * @param string $type + * @param string $name + * @param array $config + * @return Wootook_Core_View + */ public function createBlock($type, $name, $config = array()) { $instance = $this->_createBlock($type, $name, $config); @@ -327,7 +428,8 @@ class Wootook_Core_Layout } } } catch (ReflectionException $e) { - trigger_error($e->getMessage(), E_USER_NOTICE); + Wootook_Core_ErrorProfiler::getSingleton() + ->addException($e); return null; } @@ -356,7 +458,7 @@ class Wootook_Core_Layout $requiredParameterCount = $reflectionMethod->getNumberOfRequiredParameters(); $callParamaters = array(); foreach ($reflectionMethod->getParameters() as $parameter) { - $paramterName = $parameter->getName(); + $paramterName = strtolower(preg_replace('#([A-Z])#', '-\\1', $parameter->getName())); $paramterPosition = $parameter->getPosition(); if (isset($params[$paramterName])) { @@ -372,20 +474,35 @@ class Wootook_Core_Layout $reflectionMethod->invokeArgs($block, $callParamaters); } catch (ReflectionException $e) { - trigger_error($e->getMessage(), E_USER_NOTICE); + Wootook_Core_ErrorProfiler::getSingleton() + ->addException($e); continue; } catch (RuntimeException $e) { - trigger_error($e->getMessage(), E_USER_WARNING); + Wootook_Core_ErrorProfiler::getSingleton() + ->addException($e); continue; } } } + /** + * Get the current Layout domain (frontend or backend) + * + * @since 1.5.0 + * @return string + */ public function getDomain() { return $this->_domain; } + /** + * Set the current Layout domain (frontend or backend) + * + * @since 1.5.0 + * @param string $domain + * @return Wootook_Core_Layout + */ public function setDomain($domain) { $this->_domain = $domain; @@ -420,7 +537,12 @@ class Wootook_Core_Layout public function getScriptPath() { - return APPLICATION_PATH . 'design' . DIRECTORY_SEPARATOR . $this->getDomain(); + return Wootook::getBasePath('design') . DIRECTORY_SEPARATOR . $this->getDomain(); + } + + public function getAllBlocks() + { + return $this->_blocks; } public function getBlock($code) @@ -433,7 +555,7 @@ class Wootook_Core_Layout public function render() { - if (!$this->_view instanceof Wootook_Core_View) { + if (!$this->_rootView instanceof Wootook_Core_View) { throw new Wootook_Core_Exception_LayoutException(Wootook::__('No root view declared.')); } @@ -446,7 +568,7 @@ class Wootook_Core_Layout } unset($block); - return $this->_view->render(); + return $this->_rootView->render(); } protected function _getLayoutCachePath($file) diff --git a/application/code/core/Wootook/Core/Layout/Parser.php b/src/application/code/core/Wootook/Core/Layout/Parser.php similarity index 67% rename from application/code/core/Wootook/Core/Layout/Parser.php rename to src/application/code/core/Wootook/Core/Layout/Parser.php index d555ea9..1762e93 100644 --- a/application/code/core/Wootook/Core/Layout/Parser.php +++ b/src/application/code/core/Wootook/Core/Layout/Parser.php @@ -9,7 +9,7 @@ class Wootook_Core_Layout_Parser */ public function parse($filename, $cachePath = null, $cacheLifetime = 86400) { - if ($cachePath !== null && Wootook::fileExists($cachePath) && $cacheLifetime > 0 && (time() - filemtime($cachePath) > $cacheLifetime)) { + if ($cachePath !== null && Wootook::fileExists($cachePath) && $cacheLifetime > 0 && (time() - filemtime($cachePath) <= $cacheLifetime)) { return include $cachePath; } @@ -40,8 +40,15 @@ class Wootook_Core_Layout_Parser $handleNode = new Wootook_Core_Config_Node(array(), $result); $result->$name = $handleNode; - if (isset($handle->update) && isset($handle->update[0]['name'])) { - $handleNode->update = (string) $handle->update[0]['name']; + if (isset($handle->update)) { + $updateListNode = new Wootook_Core_Config_Node(array(), $handleNode); + $handleNode->update = $updateListNode; + + foreach ($handle->update as $update) { + if (isset($update['name'])) { + $updateListNode->__set(uniqid(), (string) $update['name']); + } + } } if (isset($handle->block)) { @@ -114,19 +121,45 @@ class Wootook_Core_Layout_Parser $actionListNode[] = $actionNode; - if (isset($action->params)) { + if (isset($action->param)) { $paramsNode = $actionNode->params; - foreach ($action->params[0]->param as $param) { + foreach ($action->param as $param) { $paramName = (string) $param['name']; if (empty($paramName)) { continue; } - $paramsNode->$paramName = (string) $param; + if (count($param)) { + if (isset($param->const) && isset($param->const['name']) && defined((string) $param->const['name'])) { + $paramsNode->$paramName = constant((string) $param->const['name']); + } else { + $paramArrayNode = new Wootook_Core_Config_Node(array(), $paramsNode); + $paramsNode->$paramName = $paramArrayNode; + + $this->_parseArrayParam($param, $paramArrayNode); + } + } else { + $paramsNode->$paramName = (string) $param; + } } } } } } + + protected function _parseArrayParam(SimpleXMLElement $element, Wootook_Core_Config_Node $parentNode) + { + foreach ($element->children() as $child) { + if (count($child)) { + $childNode = new Wootook_Core_Config_Node(array(), $parentNode); + $parentNode->{$child->getName()} = $childNode; + + $this->_parseArrayParam($child, $childNode); + continue; + } + + $parentNode->{$child->getName()} = (string) $child; + } + } } diff --git a/application/code/core/Wootook/Core/Model.php b/src/application/code/core/Wootook/Core/Model.php similarity index 79% rename from application/code/core/Wootook/Core/Model.php rename to src/application/code/core/Wootook/Core/Model.php index 1a798fe..bdd8a4e 100644 --- a/application/code/core/Wootook/Core/Model.php +++ b/src/application/code/core/Wootook/Core/Model.php @@ -1,5 +1,39 @@ + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + * --> NOTICE <-- + * This file is part of the core development branch, changing its contents will + * make you unable to use the automatic updates manager. Please refer to the + * documentation for further information about customizing Wootook. + * + */ +/** + * + * Enter description here ... + * @author Greg + * + */ abstract class Wootook_Core_Model extends Wootook_Object { diff --git a/application/code/core/Wootook/Core/Model/Config.php b/src/application/code/core/Wootook/Core/Model/Config.php similarity index 100% rename from application/code/core/Wootook/Core/Model/Config.php rename to src/application/code/core/Wootook/Core/Model/Config.php diff --git a/application/code/core/Wootook/Core/Model/Config/Abstract.php b/src/application/code/core/Wootook/Core/Model/Config/Abstract.php similarity index 100% rename from application/code/core/Wootook/Core/Model/Config/Abstract.php rename to src/application/code/core/Wootook/Core/Model/Config/Abstract.php diff --git a/application/code/core/Wootook/Core/Model/Config/Events.php b/src/application/code/core/Wootook/Core/Model/Config/Events.php similarity index 100% rename from application/code/core/Wootook/Core/Model/Config/Events.php rename to src/application/code/core/Wootook/Core/Model/Config/Events.php diff --git a/application/code/core/Wootook/Core/Model/Config/Modules.php b/src/application/code/core/Wootook/Core/Model/Config/Modules.php similarity index 100% rename from application/code/core/Wootook/Core/Model/Config/Modules.php rename to src/application/code/core/Wootook/Core/Model/Config/Modules.php diff --git a/application/code/core/Wootook/Core/Model/Game.php b/src/application/code/core/Wootook/Core/Model/Game.php similarity index 100% rename from application/code/core/Wootook/Core/Model/Game.php rename to src/application/code/core/Wootook/Core/Model/Game.php diff --git a/application/code/core/Wootook/Core/Model/Image/Png.php b/src/application/code/core/Wootook/Core/Model/Image/Png.php similarity index 100% rename from application/code/core/Wootook/Core/Model/Image/Png.php rename to src/application/code/core/Wootook/Core/Model/Image/Png.php diff --git a/application/code/core/Wootook/Core/Model/Session.php b/src/application/code/core/Wootook/Core/Model/Session.php similarity index 89% rename from application/code/core/Wootook/Core/Model/Session.php rename to src/application/code/core/Wootook/Core/Model/Session.php index e3d733a..9bc676a 100644 --- a/application/code/core/Wootook/Core/Model/Session.php +++ b/src/application/code/core/Wootook/Core/Model/Session.php @@ -32,8 +32,8 @@ class Wootook_Core_Model_Session const COOKIE_DOMAIN_CONFIG_KEY = 'web/session/domain'; const COOKIE_PATH_CONFIG_KEY = 'web/session/path'; - const IDENTIFIER_EXPIRES = '__expires'; - const IDENTIFIER_MESSAGES = '__messages'; + const IDENTIFIER_MESSAGES = 'messages'; + const IDENTIFIER_DATA = 'data'; public static function factory($namespace) { @@ -53,21 +53,26 @@ class Wootook_Core_Model_Session { if (session_id() == '') { session_set_cookie_params($this->getCookieLifetime(), $this->getCookiePath(), $this->getCookieDomain(), false, true); + + session_cache_limiter('private_no_expire'); + session_cache_expire(15); + session_start(); session_regenerate_id(true); } - if (!isset($_SESSION[$namespace]) || !isset($_SESSION[$namespace][self::IDENTIFIER_EXPIRES]) || $_SESSION[$namespace][self::IDENTIFIER_EXPIRES] < time()) { + if (!isset($_SESSION[$namespace])) { $_SESSION[$namespace] = array( - self::IDENTIFIER_EXPIRES => time() + $this->getCookieLifetime(), - self::IDENTIFIER_MESSAGES => array() + self::IDENTIFIER_MESSAGES => array(), + self::IDENTIFIER_DATA => array() ); } - $this->_data = &$_SESSION[$namespace]; - if (!isset($this->_data[self::IDENTIFIER_MESSAGES]) || !is_array($this->_data[self::IDENTIFIER_MESSAGES])) { - $this->_data[self::IDENTIFIER_MESSAGES] = array(); + if (!isset($_SESSION[$namespace][self::IDENTIFIER_MESSAGES]) || !is_array($_SESSION[$namespace][self::IDENTIFIER_MESSAGES])) { + $_SESSION[$namespace][self::IDENTIFIER_MESSAGES] = array(); } + + $this->_data = &$_SESSION[$namespace][self::IDENTIFIER_DATA]; } public function getCookieLifetime() diff --git a/application/code/core/Wootook/Core/Model/Translator.php b/src/application/code/core/Wootook/Core/Model/Translator.php similarity index 100% rename from application/code/core/Wootook/Core/Model/Translator.php rename to src/application/code/core/Wootook/Core/Model/Translator.php diff --git a/application/code/core/Wootook/Core/Model/Website.php b/src/application/code/core/Wootook/Core/Model/Website.php similarity index 100% rename from application/code/core/Wootook/Core/Model/Website.php rename to src/application/code/core/Wootook/Core/Model/Website.php diff --git a/application/code/core/Wootook/Core/Plugin/LoaderAbstract.php b/src/application/code/core/Wootook/Core/PluginLoader/Abstract.php similarity index 86% rename from application/code/core/Wootook/Core/Plugin/LoaderAbstract.php rename to src/application/code/core/Wootook/Core/PluginLoader/Abstract.php index 37b4da1..0f68367 100644 --- a/application/code/core/Wootook/Core/Plugin/LoaderAbstract.php +++ b/src/application/code/core/Wootook/Core/PluginLoader/Abstract.php @@ -1,6 +1,6 @@ _pluginInstances[$pluginName]; } + $pluginName = str_replace(' ', '', ucwords(str_replace('-', ' ', $pluginName))); + foreach ($this->_namespaces as $namespace => $path) { - $className = $namespace . ucfirst($pluginName); - $fileName = $path . DIRECTORY_SEPARATOR . ucfirst($pluginName) . '.php'; + $className = $namespace . $pluginName; + $fileName = $path . DIRECTORY_SEPARATOR . $pluginName . '.php'; if (!Wootook::fileExists($fileName)) { continue; diff --git a/src/application/code/core/Wootook/Core/Resource/CollectionAbstract.php b/src/application/code/core/Wootook/Core/Resource/CollectionAbstract.php new file mode 100644 index 0000000..6249363 --- /dev/null +++ b/src/application/code/core/Wootook/Core/Resource/CollectionAbstract.php @@ -0,0 +1,374 @@ +setReadConnection($connection); + + $this->_construct(); + } + + abstract protected function _construct(); + + protected function _init($entityTable, $entityClass) + { + $this->_entityTable = $entityTable; + $this->_entityClass = $entityClass; + } + + public function getSelect() + { + if ($this->_select === null) { + $this->_select = $this->getReadConnection()->select($this->_entityTable); + + $this->_prepareSelect($this->_select); + } + + return $this->_select; + } + + public function _prepareSelect(Wootook_Core_Database_Sql_Select $select) + { + } + + /** + * + * @return Wootook_Core_Database_Orm_DataMapper + */ + public function getDataMapper() + { + if ($this->_dataMapper === null) { + $this->_dataMapper = new Wootook_Core_Database_Orm_DataMapper(); + } + return $this->_dataMapper; + } + + public function getReadConnection() + { + if ($this->_connection === null) { + $this->_connection = Wootook_Core_Database::getConnection('core_read'); + } + + return $this->_connection; + } + + public function setReadConnection($connection) + { + if ($connection instanceof Wootook_Core_Database) { + $this->_connection = $connection; + } else if (is_string($connection)) { + $this->_connection = Wootook_Core_Database::getConnection($connection); + } else { + throw new Wootook_Core_Exception_RuntimeException( + 'First parameter should be either a database connection object or a string identifier.'); + } + + return $this; + } + + final public function load() + { + $this->_beforeLoad(); + $this->_load(); + $this->_afterLoad(); + + return $this; + } + + protected function _beforeLoad() + { + Wootook::dispatchEvent('resource.collection.before-load', array('model' => $this)); + + if ($this->_eventPrefix !== null && $this->_eventObject !== null) { + Wootook::dispatchEvent($this->_eventPrefix . '.before-load', array($this->_eventObject => $this)); + } + + return $this; + } + + protected function _afterLoad() + { + Wootook::dispatchEvent('resource.collection.after-load', array('model' => $this)); + + if ($this->_eventPrefix !== null && $this->_eventObject !== null) { + Wootook::dispatchEvent($this->_eventPrefix . '.after-load', array($this->_eventObject => $this)); + } + + return $this; + } + + protected function _load() + { + $select = clone $this->getSelect(); + + if ($this->_pageSize !== null) { + if ($this->_curPage !== null) { + $select->limit($this->_pageSize, ($this->_curPage - 1) * $this->_pageSize); + } else { + $select->limit($this->_pageSize); + } + } + + $database = $this->getReadConnection(); + $statement = $database->prepare($select); + + $args = func_get_args(); + $statement->execute(array_shift($args)); + + $this->_items = array(); + if (func_num_args() > 1) { + $reflection = new ReflectionClass(array_shift($args)); + } else { + $reflection = new ReflectionClass($this->_entityClass); + } + + while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { + $item = $reflection->newInstanceArgs(); + $item->getDataMapper()->decode($item, $row); + + $this->_items[] = $item; + } + + return $this; + } + + public function getSize() + { + $clone = clone $this->_select; + $clone->_fields = array(); + $clone->column('1'); + + $database = $this->getReadConnection(); + $statement = $database->prepare($clone); + + $statement->execute(); + $count = $statement->rowCount(); + $statement->closeCursor(); + + return $count; + } + + public function count() + { + return count($this->_items); + } + + public function current() + { + return current($this->_items); + } + + public function next() + { + next($this->_items); + + return $this; + } + + public function rewind() + { + reset($this->_items); + + return $this; + } + + public function key() + { + return key($this->_items); + } + + public function valid() + { + return current($this->_items) !== false; + } + + public function getFirstItem() + { + if (count($this->_items) > 0) { + return $this->_items[0]; + } + return null; + } + + public function getLastItem() + { + $size = count($this->_items); + if ($size > 0) { + return $this->_items[$size - 1]; + } + return null; + } + + public function addOrderBy($field, $type = 'ASC') + { + $this->getSelect()->order($field, $type); + + return $this; + } + + public function addFieldToFilter($field, $value) + { + $adapter = $this->getReadConnection(); + + if (is_array($value)) { + $where = $this->_translateSqlWhere($field, 'or', $value); + + if ($where !== null) { + $this->getSelect()->where($where); + } + } else { + $this->getSelect()->where("{$adapter->quoteIdentifier($field)}={$adapter->quote($value)}"); + } + + return $this; + } + + protected function _translateSqlWhere($field, $operator, $value) + { + if ($value === null) { + return null; + } + + $adapter = $this->getReadConnection(); + + switch (strtolower($operator)) { + case 'and': + case 'or': + $where = array(); + foreach ($value as $valueItem) { + $subOperator = key($valueItem); + $realValue = current($valueItem); + + if (is_array($realValue) && isset($realValue['field'])) { + if (!isset($realValue['value'])) { + continue; + } + + $realField = $realValue['field']; + $realValue = $realValue['value']; + } else { + $realField = $field; + } + + if ($realValue === null) { + continue; + } + $actualValue = $this->_translateSqlWhere($realField, $subOperator, $realValue); + if ($actualValue !== null) { + $where[] = $actualValue; + } + } + + if (count($where)) { + return '((' . implode(') ' . strtoupper($operator) . ' (', $where) . '))'; + } + break; + case 'eq': + return "{$adapter->quoteIdentifier($field)}={$adapter->quote($value)}"; + break; + case 'neq': + return "{$adapter->quoteIdentifier($field)}!={$adapter->quote($value)}"; + break; + case 'lt': + return "{$adapter->quoteIdentifier($field)}<{$adapter->quote($value)}"; + break; + case 'gt': + return "{$adapter->quoteIdentifier($field)}>{$adapter->quote($value)}"; + break; + case 'lteq': + return "{$adapter->quoteIdentifier($field)}<={$adapter->quote($value)}"; + break; + case 'gteq': + return "{$adapter->quoteIdentifier($field)}>={$adapter->quote($value)}"; + break; + case 'in': + $valueList = array(); + foreach ($value as $setValue) { + $valueList[] = $adapter->quote($setValue); + } + $implodedList = implode(',', $valueList); + return "{$adapter->quoteIdentifier($field)} IN({$implodedList})"; + break; + case 'nin': + $valueList = array(); + foreach ($value as $setValue) { + $valueList[] = $adapter->quote($setValue); + } + $implodedList = implode(',', $valueList); + return "{$adapter->quoteIdentifier($field)} NOT IN({$implodedList})"; + break; + case 'finset': + return "0 < FIND_IN_SET({$adapter->quote($value)}, {$adapter->quoteIdentifier($field)})"; + break; + case 'nfinset': + return "0 = FIND_IN_SET({$adapter->quote($value)}, {$adapter->quoteIdentifier($field)})"; + break; + case 'date': + $dateValues = array(); + $mapper = $this->getDataMapper()->load('DateTime'); + if (isset($value['from'])) { + if ($value['from'] instanceof Wootook_Core_DateTime) { + $dateValues['from'] = "{$adapter->quoteIdentifier($field)} >= {$adapter->quote($mapper->encode($value['from']))}"; + } else if (is_string($value['from'])) { + $dateValues['from'] = "{$adapter->quoteIdentifier($field)} >= {$adapter->quote($value['from'])}"; + } else if (is_numeric($value['from'])) { + $dateValues['from'] = "UNIX_TIMESTAMP({$adapter->quoteIdentifier($field)}) >= {$adapter->quote($value['from'])}"; + } + } + if (isset($value['to'])) { + if ($value['to'] instanceof Wootook_Core_DateTime) { + $dateValues['to'] = "{$adapter->quoteIdentifier($field)} <= {$adapter->quote($mapper->encode($value['to']))}"; + } else if (is_string($value['to'])) { + $dateValues['to'] = "{$adapter->quoteIdentifier($field)} <= {$adapter->quote($value['to'])}"; + } else if (is_numeric($value['to'])) { + $dateValues['to'] = "UNIX_TIMESTAMP({$adapter->quoteIdentifier($field)}) <= {$adapter->quote($value['to'])}"; + } + } + + return '(' . implode(' AND ', $dateValues) . ')'; + break; + } + return null; + } + + public function setPage($curPage, $pageSize) + { + $this->setCurPage($curPage)->setPageSize($pageSize); + + return $this; + } + + public function setCurPage($curPage) + { + $this->_curPage = $curPage; + + return $this; + } + + public function setPageSize($pageSize) + { + $this->_pageSize = $pageSize; + + return $this; + } +} \ No newline at end of file diff --git a/application/code/core/Wootook/Core/Setup/Exception/RuntimeException.php b/src/application/code/core/Wootook/Core/Setup/Exception/RuntimeException.php similarity index 100% rename from application/code/core/Wootook/Core/Setup/Exception/RuntimeException.php rename to src/application/code/core/Wootook/Core/Setup/Exception/RuntimeException.php diff --git a/application/code/core/Wootook/Core/Setup/Exception/VersionStageError.php b/src/application/code/core/Wootook/Core/Setup/Exception/VersionStageError.php similarity index 100% rename from application/code/core/Wootook/Core/Setup/Exception/VersionStageError.php rename to src/application/code/core/Wootook/Core/Setup/Exception/VersionStageError.php diff --git a/application/code/core/Wootook/Core/Setup/Exception/VersionValueError.php b/src/application/code/core/Wootook/Core/Setup/Exception/VersionValueError.php similarity index 100% rename from application/code/core/Wootook/Core/Setup/Exception/VersionValueError.php rename to src/application/code/core/Wootook/Core/Setup/Exception/VersionValueError.php diff --git a/application/code/core/Wootook/Core/Setup/Updater.php b/src/application/code/core/Wootook/Core/Setup/Updater.php similarity index 96% rename from application/code/core/Wootook/Core/Setup/Updater.php rename to src/application/code/core/Wootook/Core/Setup/Updater.php index 5479fc2..d419ea7 100644 --- a/application/code/core/Wootook/Core/Setup/Updater.php +++ b/src/application/code/core/Wootook/Core/Setup/Updater.php @@ -13,7 +13,7 @@ class Wootook_Core_Setup_Updater public function setSetupConnection($connection) { if (is_string($connection)) { - $this->_setupConnection = Wootook_Database::getConnection($connection); + $this->_setupConnection = Wootook_Core_Database::getConnection($connection); } else { $this->_setupConnection = $connection; } @@ -24,7 +24,7 @@ class Wootook_Core_Setup_Updater /** * * Enter description here ... - * @return Wootook_Database + * @return Wootook_Core_Database */ public function getSetupConnection() { diff --git a/application/code/core/Wootook/Core/Setup/Updater/ScriptQueue.php b/src/application/code/core/Wootook/Core/Setup/Updater/ScriptQueue.php similarity index 100% rename from application/code/core/Wootook/Core/Setup/Updater/ScriptQueue.php rename to src/application/code/core/Wootook/Core/Setup/Updater/ScriptQueue.php diff --git a/src/application/code/core/Wootook/Core/Singleton.php b/src/application/code/core/Wootook/Core/Singleton.php new file mode 100644 index 0000000..c136e82 --- /dev/null +++ b/src/application/code/core/Wootook/Core/Singleton.php @@ -0,0 +1,40 @@ + + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + * --> NOTICE <-- + * This file is part of the core development branch, changing its contents will + * make you unable to use the automatic updates manager. Please refer to the + * documentation for further information about customizing Wootook. + * + */ + +/** + * + * Enter description here ... + * @author Greg + * + */ +interface Wootook_Core_Singleton +{ + public static function getSingleton(); +} \ No newline at end of file diff --git a/application/code/core/Wootook/Core/View.php b/src/application/code/core/Wootook/Core/View.php similarity index 80% rename from application/code/core/Wootook/Core/View.php rename to src/application/code/core/Wootook/Core/View.php index 0ad7195..4dcb003 100644 --- a/application/code/core/Wootook/Core/View.php +++ b/src/application/code/core/Wootook/Core/View.php @@ -1,5 +1,39 @@ + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + * --> NOTICE <-- + * This file is part of the core development branch, changing its contents will + * make you unable to use the automatic updates manager. Please refer to the + * documentation for further information about customizing Wootook. + * + */ +/** + * + * Enter description here ... + * @author Greg + * + */ class Wootook_Core_View extends Wootook_Object { @@ -98,6 +132,14 @@ class Wootook_Core_View return ''; } + public function renderPartial($blockName) + { + if (($block = $this->getPartial($blockName)) !== null) { + return $block->render(); + } + return null; + } + protected function _getTemplatePath($file) { return $this->getScriptPath() . DIRECTORY_SEPARATOR . $file; @@ -129,11 +171,16 @@ class Wootook_Core_View return Wootook::getUrl($uri, $params); } + public function getStaticUrl($uri, Array $params = array()) + { + return Wootook::getStaticUrl($uri, $params); + } + public function getSkinUrl($uri, Array $params = array(), $theme = null, $package = null) { - $user = Wootook_Empire_Model_User::getSingleton(); - if ($user !== null && $user->getId()) { - $theme = $user->getSkinPath(); + $player = Wootook_Player_Model_Session::getSingleton()->getPlayer(); + if ($player !== null && $player->getId()) { + $theme = $player->getSkinPath(); } if ($theme === null || empty($theme)) { $theme = $this->getLayout()->getTheme(); diff --git a/src/application/code/core/Wootook/Core/configs/module.php b/src/application/code/core/Wootook/Core/configs/module.php new file mode 100644 index 0000000..9b01f6a --- /dev/null +++ b/src/application/code/core/Wootook/Core/configs/module.php @@ -0,0 +1,33 @@ + array( + 'Wootook_Core' => array( + 'version' => '1.5.0' + ) + ), + 'global' => array( + 'models' => array( + 'core' => array( + 'namespace' => 'Warner_Core_Model_', + 'connection' => array( + 'read' => 'core_read', + 'write' => 'core_write', + 'setup' => 'core_setup', + ) + ) + ), + 'blocks' => array( + 'core' => array( + 'namespace' => 'Warner_Core_Block_' + ) + ) + ), + 'frontend' => array( + 'routes' => array( + 'core' => array( + 'modules' => array( + 'core' => 'Wootook_Core' + ) + ) + ) + ) + ); \ No newline at end of file diff --git a/src/application/code/core/Wootook/Core/controllers/ErrorController.php b/src/application/code/core/Wootook/Core/controllers/ErrorController.php new file mode 100644 index 0000000..b364d42 --- /dev/null +++ b/src/application/code/core/Wootook/Core/controllers/ErrorController.php @@ -0,0 +1,11 @@ +loadLayout('no-route'); + $this->renderLayout(); + } +} \ No newline at end of file diff --git a/src/application/code/core/Wootook/Core/controllers/IndexController.php b/src/application/code/core/Wootook/Core/controllers/IndexController.php new file mode 100644 index 0000000..a341df7 --- /dev/null +++ b/src/application/code/core/Wootook/Core/controllers/IndexController.php @@ -0,0 +1,11 @@ +loadLayout('home'); + $this->renderLayout(); + } +} \ No newline at end of file diff --git a/application/code/core/Wootook/Core/install/mysql5/install-1.5.0.php b/src/application/code/core/Wootook/Core/install/mysql5/install-1.5.0.php similarity index 93% rename from application/code/core/Wootook/Core/install/mysql5/install-1.5.0.php rename to src/application/code/core/Wootook/Core/install/mysql5/install-1.5.0.php index a1dee09..44fd985 100644 --- a/application/code/core/Wootook/Core/install/mysql5/install-1.5.0.php +++ b/src/application/code/core/Wootook/Core/install/mysql5/install-1.5.0.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/agpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2011-Present, Grégory PLANCHAT * All rights reserved. @@ -126,16 +126,17 @@ $this->query($sql); $sql = <<getTableName('core_config')} (`website_id`, `game_id`, `config_path`, `config_value`) VALUES - (1, 1, 'resource/base-income/metal', '20'), - (1, 1, 'resource/base-income/cristal', '10'), - (1, 1, 'resource/base-income/deuterium', '0'), - (1, 1, 'resource/base-income/energy', '0'), + (1, 1, 'resources/base-income/metal', '20'), + (1, 1, 'resources/base-income/cristal', '10'), + (1, 1, 'resources/base-income/deuterium', '0'), + (1, 1, 'resources/base-income/energy', '0'), - (1, 1, 'resource/initial/fields', '163'), - (1, 1, 'resource/initial/metal', '500'), - (1, 1, 'resource/initial/cristal', '500'), - (1, 1, 'resource/initial/deuterium', '0'), - (1, 1, 'resource/initial/energy', '0'), + (1, 1, 'planet/initial/fields', '163'), + + (1, 1, 'resources/initial/metal', '500'), + (1, 1, 'resources/initial/cristal', '500'), + (1, 1, 'resources/initial/deuterium', '0'), + (1, 1, 'resources/initial/energy', '0'), (1, 1, 'game/general/name', 'Wootook'), (1, 1, 'game/general/boards-url', 'http://wootook.org/board/'), diff --git a/application/code/core/Wootook/Core/install/mysql5/uninstall-1.5.0.php b/src/application/code/core/Wootook/Core/install/mysql5/uninstall-1.5.0.php similarity index 100% rename from application/code/core/Wootook/Core/install/mysql5/uninstall-1.5.0.php rename to src/application/code/core/Wootook/Core/install/mysql5/uninstall-1.5.0.php diff --git a/application/code/core/Wootook/Empire/Block/Overview/DestroyPlanet.php b/src/application/code/core/Wootook/Empire/Block/Overview/DestroyPlanet.php similarity index 100% rename from application/code/core/Wootook/Empire/Block/Overview/DestroyPlanet.php rename to src/application/code/core/Wootook/Empire/Block/Overview/DestroyPlanet.php diff --git a/application/code/core/Wootook/Empire/Block/Overview/RenamePlanet.php b/src/application/code/core/Wootook/Empire/Block/Overview/RenamePlanet.php similarity index 100% rename from application/code/core/Wootook/Empire/Block/Overview/RenamePlanet.php rename to src/application/code/core/Wootook/Empire/Block/Overview/RenamePlanet.php diff --git a/application/code/core/Wootook/Empire/Block/Planet/Builder/ItemAbstract.php b/src/application/code/core/Wootook/Empire/Block/Planet/Builder/ItemAbstract.php similarity index 83% rename from application/code/core/Wootook/Empire/Block/Planet/Builder/ItemAbstract.php rename to src/application/code/core/Wootook/Empire/Block/Planet/Builder/ItemAbstract.php index e33796a..0c6c31d 100644 --- a/application/code/core/Wootook/Empire/Block/Planet/Builder/ItemAbstract.php +++ b/src/application/code/core/Wootook/Empire/Block/Planet/Builder/ItemAbstract.php @@ -3,24 +3,24 @@ abstract class Wootook_Empire_Block_Planet_Builder_ItemAbstract extends Wootook_Core_Block_Template { - protected $_user = null; + protected $_player = null; protected $_planet = null; protected $_itemId = null; - public function setUser(Wootook_Empire_Model_User $user) + public function setPlayer(Wootook_Player_Model_Entity $player) { - $this->_user = $user; + $this->_player = $player; return $this; } - public function getUser() + public function getPlayer() { - if ($this->_user === null) { - $this->_user = Wootook_Empire_Model_User::getSingleton(); + if ($this->_player === null) { + $this->_player = Wootook_Player_Model_Session::getSingleton()->getPlayer(); } - return $this->_user; + return $this->_player; } public function setPlanet(Wootook_Empire_Model_Planet $planet) @@ -33,7 +33,7 @@ abstract class Wootook_Empire_Block_Planet_Builder_ItemAbstract public function getPlanet() { if ($this->_planet === null) { - $this->_planet = $this->getUser()->getCurrentPlanet(); + $this->_planet = $this->getPlayer()->getCurrentPlanet(); } return $this->_planet; @@ -53,7 +53,7 @@ abstract class Wootook_Empire_Block_Planet_Builder_ItemAbstract public function getItemInfoUrl() { - return $this->getUrl('infos.php', array('gid' => $this->getItemId())); + return $this->getStaticUrl('infos.php', array('gid' => $this->getItemId())); } public function getItemImageUrl() diff --git a/application/code/core/Wootook/Empire/Block/Planet/Builder/Queue/ItemAbstract.php b/src/application/code/core/Wootook/Empire/Block/Planet/Builder/Queue/ItemAbstract.php similarity index 100% rename from application/code/core/Wootook/Empire/Block/Planet/Builder/Queue/ItemAbstract.php rename to src/application/code/core/Wootook/Empire/Block/Planet/Builder/Queue/ItemAbstract.php diff --git a/application/code/core/Wootook/Empire/Block/Planet/Builder/QueueAbstract.php b/src/application/code/core/Wootook/Empire/Block/Planet/Builder/QueueAbstract.php similarity index 82% rename from application/code/core/Wootook/Empire/Block/Planet/Builder/QueueAbstract.php rename to src/application/code/core/Wootook/Empire/Block/Planet/Builder/QueueAbstract.php index d6122d3..baf9c71 100644 --- a/application/code/core/Wootook/Empire/Block/Planet/Builder/QueueAbstract.php +++ b/src/application/code/core/Wootook/Empire/Block/Planet/Builder/QueueAbstract.php @@ -3,25 +3,25 @@ abstract class Wootook_Empire_Block_Planet_Builder_QueueAbstract extends Wootook_Core_Block_Template { - protected $_user = null; + protected $_player = null; protected $_planet = null; protected $_itemTemplate = null; protected $_itemBlock = null; - public function setUser(Wootook_Empire_Model_User $user) + public function setPlayer(Wootook_Player_Model_Entity $player) { - $this->_user = $user; + $this->_player = $player; return $this; } - public function getUser() + public function getPlayer() { - if ($this->_user === null) { - $this->_user = Wootook_Empire_Model_User::getSingleton(); + if ($this->_player === null) { + $this->_player = Wootook_Player_Model_Session::getSingleton()->getPlayer(); } - return $this->_user; + return $this->_player; } public function setPlanet(Wootook_Empire_Model_Planet $planet) @@ -34,7 +34,7 @@ abstract class Wootook_Empire_Block_Planet_Builder_QueueAbstract public function getPlanet() { if ($this->_planet === null) { - $this->_planet = $this->getUser()->getCurrentPlanet(); + $this->_planet = $this->getPlayer()->getCurrentPlanet(); } return $this->_planet; diff --git a/application/code/core/Wootook/Empire/Block/Planet/BuilderAbstract.php b/src/application/code/core/Wootook/Empire/Block/Planet/BuilderAbstract.php similarity index 100% rename from application/code/core/Wootook/Empire/Block/Planet/BuilderAbstract.php rename to src/application/code/core/Wootook/Empire/Block/Planet/BuilderAbstract.php diff --git a/application/code/core/Wootook/Empire/Block/Planet/Buildings.php b/src/application/code/core/Wootook/Empire/Block/Planet/Buildings.php similarity index 93% rename from application/code/core/Wootook/Empire/Block/Planet/Buildings.php rename to src/application/code/core/Wootook/Empire/Block/Planet/Buildings.php index e777cdd..3865112 100644 --- a/application/code/core/Wootook/Empire/Block/Planet/Buildings.php +++ b/src/application/code/core/Wootook/Empire/Block/Planet/Buildings.php @@ -15,7 +15,7 @@ class Wootook_Empire_Block_Planet_Buildings public function getPlanet() { if ($this->_planet === null) { - $this->_planet = Wootook_Empire_Model_User::getSingleton() + $this->_planet = Wootook_Player_Model_Session::getSingleton()->getPlayer() ->getCurrentPlanet() ; } diff --git a/application/code/core/Wootook/Empire/Block/Planet/Buildings/Item.php b/src/application/code/core/Wootook/Empire/Block/Planet/Buildings/Item.php similarity index 78% rename from application/code/core/Wootook/Empire/Block/Planet/Buildings/Item.php rename to src/application/code/core/Wootook/Empire/Block/Planet/Buildings/Item.php index b24a819..1c4a970 100644 --- a/application/code/core/Wootook/Empire/Block/Planet/Buildings/Item.php +++ b/src/application/code/core/Wootook/Empire/Block/Planet/Buildings/Item.php @@ -13,6 +13,22 @@ class Wootook_Empire_Block_Planet_Buildings_Item return $this->getPlanet()->getResourcesNeeded($this->getItemId(), $level); } + public function isBuildable($level = null) + { + if ($level === null) { + $level = $this->getNextLevel(); + } + $resources = $this->getResourcesNeeded($level); + + foreach ($resources as $resourceId => $resourceValue) { + $amount = $this->getPlanet()->getResourceAmount($resourceId); + if (Math::comp($amount, $resourceValue) < 0) { + return false; + } + } + return true; + } + public function getQueuedLevel() { return $this->getPlanet()->getBuildingLevelQueued($this->getItemId()); diff --git a/application/code/core/Wootook/Empire/Block/Planet/Buildings/Queue.php b/src/application/code/core/Wootook/Empire/Block/Planet/Buildings/Queue.php similarity index 100% rename from application/code/core/Wootook/Empire/Block/Planet/Buildings/Queue.php rename to src/application/code/core/Wootook/Empire/Block/Planet/Buildings/Queue.php diff --git a/src/application/code/core/Wootook/Empire/Block/Planet/Buildings/Queue/Item.php b/src/application/code/core/Wootook/Empire/Block/Planet/Buildings/Queue/Item.php new file mode 100644 index 0000000..6941b62 --- /dev/null +++ b/src/application/code/core/Wootook/Empire/Block/Planet/Buildings/Queue/Item.php @@ -0,0 +1,105 @@ + + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + * --> NOTICE <-- + * This file is part of the core development branch, changing its contents will + * make you unable to use the automatic updates manager. Please refer to the + * documentation for further information about customizing Wootook. + * + */ + +/** + * + * Enter description here ... + * @author Greg + * + */ +class Wootook_Empire_Block_Planet_Buildings_Queue_Item + extends Wootook_Empire_Block_Planet_Builder_Queue_ItemAbstract +{ + protected $_itemIdField = 'building_id'; + + public function getLevel() + { + return $this->getPlanet()->getElement($this->getItemId()); + } + + public function getResourcesNeeded($level) + { + return $this->getPlanet()->getResourcesNeeded($this->getItemId(), $this->getQueuedLevel() + 1); + } + + public function getItemQueuedLevel() + { + return $this->getItem()->getData('level'); + } + + public function getQueuedLevel() + { + return $this->getPlanet()->getBuildingLevelQueued($this->getItemId()); + } + + public function getBuildingTime($level) + { + return $this->getPlanet()->getBuildingTime($this->getItemId(), $level); + } + + public function getBuildingRemainingTime() + { + $totalTime = $this->getPlanet()->getBuildingTime($this->getItemId(), $this->getItemQueuedLevel()); + $item = $this->getItem(); + + return $item->getData('created_at') - $item->getData('updated_at') + $totalTime; + } + + public function getResourcesConfigForLevel($level) + { + $resources = $this->getResourcesNeeded($level); + + $resourceConfig = array(); + foreach ($resources as $resourceId => $resourceValue) { + $resourceConfig[$resourceId] = new Wootook_Object(array( + 'resource_id' => $resourceId, + 'value' => $resourceValue + )); + + $amount = $this->getPlanet()->getResourceAmount($resourceId); + if (Math::comp($amount, $resourceValue) < 0) { + $resourceConfig[$resourceId]->setData('requirement', Math::sub($amount, $resourceValue)); + } else { + $resourceConfig[$resourceId]->setData('overflow', Math::sub($amount, $resourceValue)); + } + } + return $resourceConfig; + } + + public function getResourcesConfigForNextLevel() + { + return $this->getResourcesConfigForLevel($this->getNextLevel()); + } + + public function getBuildingTimeForNextLevel() + { + return $this->getBuildingTime($this->getNextLevel()); + } +} \ No newline at end of file diff --git a/src/application/code/core/Wootook/Empire/Block/Planet/Overview.php b/src/application/code/core/Wootook/Empire/Block/Planet/Overview.php new file mode 100644 index 0000000..f24f5dc --- /dev/null +++ b/src/application/code/core/Wootook/Empire/Block/Planet/Overview.php @@ -0,0 +1,40 @@ +getPlayer(); + } + + /** + * + * @return Wootook_Empire_Model_Planet + */ + public function getPlanet() + { + if ($this->_planet === null) { + $this->_planet = $this->getPlayer()->getCurrentPlanet(); + } + return $this->_planet; + } + + public function getPlanetName() + { + return $this->getPlanet()->getName(); + } + + public function getPlanetCoords() + { + return $this->getPlanet()->getCoords(); + } + + public function getPlanetImage() + { + return $this->getPlanet()->getImage(); + } +} \ No newline at end of file diff --git a/application/code/core/Wootook/Empire/Block/PlanetList.php b/src/application/code/core/Wootook/Empire/Block/PlanetList.php similarity index 100% rename from application/code/core/Wootook/Empire/Block/PlanetList.php rename to src/application/code/core/Wootook/Empire/Block/PlanetList.php diff --git a/application/code/core/Wootook/Empire/Block/Topnav.php b/src/application/code/core/Wootook/Empire/Block/Topnav.php similarity index 51% rename from application/code/core/Wootook/Empire/Block/Topnav.php rename to src/application/code/core/Wootook/Empire/Block/Topnav.php index 152e242..72a6d5b 100644 --- a/application/code/core/Wootook/Empire/Block/Topnav.php +++ b/src/application/code/core/Wootook/Empire/Block/Topnav.php @@ -5,11 +5,11 @@ class Wootook_Empire_Block_Topnav { /** * - * @return Wootook_Empire_Model_User + * @return Wootook_Player_Model_Entity */ - public function getCurrentUser() + public function getCurrentPlayer() { - return Wootook_Empire_Model_User::getSingleton(); + return Wootook_Player_Model_Session::getSingleton()->getPlayer(); } /** @@ -18,16 +18,17 @@ class Wootook_Empire_Block_Topnav */ public function getCurrentPlanet() { - return $this->getCurrentUser()->getCurrentPlanet(); + return $this->getCurrentPlayer()->getCurrentPlanet(); } /** * - * @return Wootook_Core_Collection + * @return Wootook_Empire_Resource_Planet_Collection */ public function getPlanetCollection() { - return $this->getCurrentUser() - ->getPlanetCollection(array(Wootook_Empire_Model_Planet::TYPE_PLANET)); + return $this->getCurrentPlayer() + ->getPlanetCollection(array(Wootook_Empire_Model_Planet::TYPE_PLANET)) + ->load(); } } \ No newline at end of file diff --git a/src/application/code/core/Wootook/Empire/Exception.php b/src/application/code/core/Wootook/Empire/Exception.php new file mode 100644 index 0000000..e2bd909 --- /dev/null +++ b/src/application/code/core/Wootook/Empire/Exception.php @@ -0,0 +1,3 @@ +_currentPlanet = $currentPlanet; - $this->_currentUser = $currentUser; + $this->_currentPlayer = $currentPlayer; $this->init(); } @@ -46,7 +46,7 @@ abstract class Wootook_Empire_Model_BuilderAbstract public function enqueue($params, $index = null) { - if ($this->_currentUser->getVacation()) { + if ($this->_currentPlayer->isVacation()) { return $this; } @@ -98,7 +98,10 @@ abstract class Wootook_Empire_Model_BuilderAbstract { $this->clearQueue(); - $unserialized = @unserialize($serialized); + $unserialized = false; + if (!empty($serialized)) { + $unserialized = @unserialize($serialized); + } if ($unserialized === false) { $this->_queue = array(); return $this; @@ -126,8 +129,8 @@ abstract class Wootook_Empire_Model_BuilderAbstract $this->_queue = array(); } - abstract public function updateQueue($time); - abstract public function appendQueue($typeId, $qty, $time); + abstract public function updateQueue(Wootook_Core_DateTime $time); + abstract public function appendQueue($typeId, $qty, Wootook_Core_DateTime $time); /** * Check if an item type is actually buildable on the current @@ -148,7 +151,7 @@ abstract class Wootook_Empire_Model_BuilderAbstract foreach ($requirements[$typeId] as $requirement => $level) { if ($types->is($requirement, Legacies_Empire::TYPE_BUILDING) && $this->_currentPlanet->hasElement($requirement, $level)) { continue; - } else if ($types->is($requirement, Legacies_Empire::TYPE_RESEARCH) && $this->_currentUser->hasElement($requirement, $level)) { + } else if ($types->is($requirement, Legacies_Empire::TYPE_RESEARCH) && $this->_currentPlayer->hasElement($requirement, $level)) { continue; } else if ($types->is($requirement, Legacies_Empire::TYPE_DEFENSE) && $this->_currentPlanet->hasElement($requirement, $level)) { continue; @@ -209,9 +212,9 @@ abstract class Wootook_Empire_Model_BuilderAbstract return $this->_currentPlanet; } - public function getCurrentUser() + public function getCurrentPlayer() { - return $this->_currentUser; + return $this->_currentPlayer; } public function setCurrentPlanet(Wootook_Empire_Model_Planet $planet) @@ -221,9 +224,9 @@ abstract class Wootook_Empire_Model_BuilderAbstract return $this; } - public function setCurrentUser(Wootook_Empire_Model_User $user) + public function setCurrentPlayer(Wootook_Player_Model_Entity $player) { - $this->_currentUser = $user; + $this->_currentPlayer = $player; return $this; } diff --git a/application/code/core/Wootook/Empire/Model/Fleet.php b/src/application/code/core/Wootook/Empire/Model/Fleet.php similarity index 93% rename from application/code/core/Wootook/Empire/Model/Fleet.php rename to src/application/code/core/Wootook/Empire/Model/Fleet.php index 1ce2b7d..fcda2d8 100644 --- a/application/code/core/Wootook/Empire/Model/Fleet.php +++ b/src/application/code/core/Wootook/Empire/Model/Fleet.php @@ -40,9 +40,9 @@ class Wootook_Empire_Model_Fleet { } - public function isOwnedBy(Wootook_Empire_Model_User $user) + public function isOwnedBy(Wootook_Player_Model_Entity $player) { - if ($this->getData('fleet_owner') == $user->getId()) { + if ($this->getData('fleet_owner') == $player->getId()) { return true; } return false; @@ -51,7 +51,7 @@ class Wootook_Empire_Model_Fleet public function getOwner() { if ($id = $this->getData('fleet_owner')) { - return Wootook_Empire_Model_User::factory($id); + return Wootook_Player_Model_Entity::factory($id); } return null; } @@ -64,10 +64,10 @@ class Wootook_Empire_Model_Fleet return false; } - public function getRowClass(Wootook_Empire_Model_User $user = null) + public function getRowClass(Wootook_Player_Model_Entity $player = null) { if ($this->isMission(Legacies_Empire::ID_MISSION_ATTACK) || $this->isMission(Legacies_Empire::ID_MISSION_GROUP_ATTACK)) { - if ($user !== null && $this->isOwnedBy($user)) { + if ($player !== null && $this->isOwnedBy($player)) { return 'attack'; } else { return 'ownattack'; diff --git a/application/code/core/Wootook/Empire/Model/Galaxy/Position.php b/src/application/code/core/Wootook/Empire/Model/Galaxy/Position.php similarity index 100% rename from application/code/core/Wootook/Empire/Model/Galaxy/Position.php rename to src/application/code/core/Wootook/Empire/Model/Galaxy/Position.php diff --git a/application/code/core/Wootook/Empire/Model/Game/Combat.php b/src/application/code/core/Wootook/Empire/Model/Game/Combat.php similarity index 100% rename from application/code/core/Wootook/Empire/Model/Game/Combat.php rename to src/application/code/core/Wootook/Empire/Model/Game/Combat.php diff --git a/application/code/core/Wootook/Empire/Model/Game/FieldsAlias.php b/src/application/code/core/Wootook/Empire/Model/Game/FieldsAlias.php similarity index 100% rename from application/code/core/Wootook/Empire/Model/Game/FieldsAlias.php rename to src/application/code/core/Wootook/Empire/Model/Game/FieldsAlias.php diff --git a/application/code/core/Wootook/Empire/Model/Game/Prices.php b/src/application/code/core/Wootook/Empire/Model/Game/Prices.php similarity index 100% rename from application/code/core/Wootook/Empire/Model/Game/Prices.php rename to src/application/code/core/Wootook/Empire/Model/Game/Prices.php diff --git a/application/code/core/Wootook/Empire/Model/Game/Production.php b/src/application/code/core/Wootook/Empire/Model/Game/Production.php similarity index 100% rename from application/code/core/Wootook/Empire/Model/Game/Production.php rename to src/application/code/core/Wootook/Empire/Model/Game/Production.php diff --git a/application/code/core/Wootook/Empire/Model/Game/Requirements.php b/src/application/code/core/Wootook/Empire/Model/Game/Requirements.php similarity index 100% rename from application/code/core/Wootook/Empire/Model/Game/Requirements.php rename to src/application/code/core/Wootook/Empire/Model/Game/Requirements.php diff --git a/application/code/core/Wootook/Empire/Model/Game/Resources.php b/src/application/code/core/Wootook/Empire/Model/Game/Resources.php similarity index 100% rename from application/code/core/Wootook/Empire/Model/Game/Resources.php rename to src/application/code/core/Wootook/Empire/Model/Game/Resources.php diff --git a/application/code/core/Wootook/Empire/Model/Game/Types.php b/src/application/code/core/Wootook/Empire/Model/Game/Types.php similarity index 100% rename from application/code/core/Wootook/Empire/Model/Game/Types.php rename to src/application/code/core/Wootook/Empire/Model/Game/Types.php diff --git a/application/code/core/Wootook/Empire/Model/Planet.php b/src/application/code/core/Wootook/Empire/Model/Planet.php similarity index 78% rename from application/code/core/Wootook/Empire/Model/Planet.php rename to src/application/code/core/Wootook/Empire/Model/Planet.php index 7515769..ec9ce2e 100644 --- a/application/code/core/Wootook/Empire/Model/Planet.php +++ b/src/application/code/core/Wootook/Empire/Model/Planet.php @@ -4,7 +4,7 @@ * * @uses Wootook_Object * @uses Legacies_Empire - * @uses Legacies_Empire_User + * @uses Wootook_Player_Model_Entity */ class Wootook_Empire_Model_Planet extends Wootook_Core_Entity @@ -17,9 +17,9 @@ class Wootook_Empire_Model_Planet protected $_eventObject = 'planet'; /** - * @var Wootook_Empire_Model_User + * @var Wootook_Player_Model_Entity */ - protected $_user = null; + protected $_player = null; /** * @var Wootook_Empire_Model_Planet @@ -53,6 +53,7 @@ class Wootook_Empire_Model_Planet protected static $_productionInstances = array(); + /** @var Wootook_Empire_Model_Planet_PluginLoader */ protected $_pluginLoader = null; public static function factory($id) @@ -100,31 +101,37 @@ class Wootook_Empire_Model_Planet $coords['type'] = $type; } - $database = Wootook_Database::getSingleton(); - $collection = new Wootook_Core_Collection('planets'); - $collection + $database = $this->getReadConnection(); + $select = $database->select('planets'); + $select ->column('id') ->where('galaxy=:galaxy') ->where('system=:system') ->where('planet=:position') ->where('planet_type=:type') ->limit(1) - ->load($coords) ; + $statement = $database->prepare($select); - $planetData = $collection->getFirstItem(); - - if ($planetData === null || !$planetData->getData('id')) { + if (!$statement->execute() || $statement->rowCount() <= 0) { return new self(); } - return self::factory($planetData->getData('id')); + $planetId = $statement->fetchCol(); + + return self::factory($planetId); } public function _init() { $this->_tableName = 'planets'; $this->_idFieldName = 'id'; + + $this->getDataMapper() + ->addRule('last_update', 'date-time') + ->addRule('b_building', 'date-time') + ->addRule('b_tech', 'date-time') + ->addRule('b_hangar', 'date-time'); } public function __call($method, $params) @@ -133,39 +140,38 @@ class Wootook_Empire_Model_Planet $plugin = substr($method, 3); if ($this->_pluginLoader === null) { - $this->_pluginLoader = new Wootook_Empire_Model_Planet_PluginLoader($this, $this->getUser()); + $this->_pluginLoader = new Wootook_Empire_Model_Planet_PluginLoader($this, $this->getPlayer()); } switch ($prefix) { case 'get': - $this->_pluginLoader->getPlugin($plugin); + return $this->_pluginLoader->getPlugin($plugin); break; case 'set': - $this->_pluginLoader->setPlugin($plugin, $params[0]); + return $this->_pluginLoader->setPlugin($plugin, $params[0]); break; case 'uns': - $this->_pluginLoader->unsetPlugin($plugin); + return $this->_pluginLoader->unsetPlugin($plugin); break; case 'has': - $this->_pluginLoader->hasPlugin($plugin); - break; + return $this->_pluginLoader->hasPlugin($plugin); break; } - throw new InvalidMethodCall(Wootook::__('Undefined method %s::%s.', get_class($this), $method)); + throw new Wootook_Core_Exception_RuntimeException(Wootook::__('Undefined method %s::%s.', get_class($this), $method)); } public function getLastUpdate() { - return strtotime($this->getData('last_update')); + return $this->getData('last_update'); } public function setLastUpdate($time) { - return $this->setData('last_update', date('Y-m-d G:i:s', $time)); + return $this->setData('last_update', $time); } public function getBuildingFields() @@ -195,12 +201,12 @@ class Wootook_Empire_Model_Planet Math::setPrecision(50); $resources = Wootook_Empire_Model_Game_Resources::getSingleton(); foreach ($resources->getAllDatas() as $resource => $resourceData) { - if (!isset($resourceData['storage_field']) || $resourceData['storage_field'] === null) { + if (!isset($resourceData['storage']) || $resourceData['storage'] === null) { continue; } - if ($this->getElement($resourceData['storage_field'])) { - $storageEnhancementFactor = Math::floor(Math::pow(1.6, $this->getElement($resourceData['storage_field']))); + if ($this->getElement($resourceData['storage'])) { + $storageEnhancementFactor = Math::floor(Math::pow(1.6, $this->getElement($resourceData['storage']))); $storageEnhancement = Math::mul(BASE_STORAGE_SIZE / 2, $storageEnhancementFactor); } else { $storageEnhancement = 0; @@ -246,21 +252,17 @@ class Wootook_Empire_Model_Planet return $this; } - public function updateResourceProduction($time = null) + public function updateResourceProduction() { $types = Wootook_Empire_Model_Game_Types::getSingleton(); $resources = Wootook_Empire_Model_Game_Resources::getSingleton(); $production = Wootook_Empire_Model_Game_Production::getSingleton(); - if ($time === null) { - $time = Wootook::now(); - } - if (!$this->isPlanet()) { return $this; } - if ($this->getUser()->isVacation()) { + if ($this->getPlayer()->isVacation()) { $resourceConfig = Wootook::getGameConfig('resource/base-income'); foreach ($resources->getAllDatas() as $resource => $resourceData) { $this->setData($resourceData['production_field'], $resourceConfig[$resource]); @@ -287,7 +289,7 @@ class Wootook_Empire_Model_Planet $ratio = $this->getData($ratioField); $element = self::getProductionElementInstance($productionUnit); - $productionRatios[$productionUnit] = $element->getProductionRatios($level, $ratio, $this, $this->getUser()); + $productionRatios[$productionUnit] = $element->getProductionRatios($level, $ratio, $this, $this->getPlayer()); foreach ($productionRatios[$productionUnit] as $resourceId => $resourceProduction) { $comp = Math::comp($resourceProduction, 0); if ($comp < 0) { @@ -356,7 +358,7 @@ class Wootook_Empire_Model_Planet // Dispatch 'planet.update-production.before' event Wootook::dispatchEvent($this->_eventPrefix . '.update-production.before', array( $this->_eventObject => $this, - 'user' => $this->getUser(), + 'player' => $this->getPlayer(), 'productions' => $actualProduction )); @@ -372,27 +374,29 @@ class Wootook_Empire_Model_Planet // Dispatch 'planet.update-production.after' event Wootook::dispatchEvent($this->_eventPrefix . '.update-production.after', array( $this->_eventObject => $this, - 'user' => $this->getUser() + 'player' => $this->getPlayer() )); return $this; } - public function updateResources($time = null) + public function updateResources(Wootook_Core_DateTime $time = null) { $resources = Wootook_Empire_Model_Game_Resources::getSingleton(); if ($time === null) { - $time = Wootook::now(); + $time = new Wootook_Core_DateTime(); } - $timeDiff = ($time - $this->getLastUpdate()) / 3600; + $timeDiff = clone $time; + $timeDiff->diff($time); + foreach ($resources->getAllDatas() as $resourceId => $resourceConfig) { if (!$resourceConfig['storage_field']) { continue; } - $production = Math::mul($this->getData($resourceConfig['production_field']), $timeDiff); + $production = Math::mul($this->getData($resourceConfig['production_field']), $timeDiff->getTimestamp() / 3600); $resourceValue = Math::add($this->getData($resourceConfig['field']), $production); $this->setData($resourceConfig['field'], Math::min($resourceValue, $this->getData($resourceConfig['storage_field']))); } @@ -419,93 +423,28 @@ class Wootook_Empire_Model_Planet public function getFleetCollection($time = null) { - $firstCollection = new Wootook_Core_Collection(array('fleet' => 'fleets')); - $firstCollection - ->column('*') - ->where('fleet.fleet_start_galaxy = :galaxy') - ->where('fleet.fleet_start_system = :system') - ->where('fleet.fleet_start_planet = :position') - ->where('fleet.fleet_start_type = :planet_type') - ; - $backCollection = new Wootook_Core_Collection(array('fleet' => 'fleets')); - $backCollection - ->column('*') - ->where('fleet.fleet_end_galaxy = :galaxy') - ->where('fleet.fleet_end_system = :system') - ->where('fleet.fleet_end_planet = :position') - ->where('fleet.fleet_end_type = :planet_type') - ; - - $options = array( - 'galaxy' => $this->getGalaxy(), - 'system' => $this->getSystem(), - 'position' => $this->getPosition(), - 'planet_type' => $this->getType() - ); - - if ($time !== null) { - $options['now'] = $time; - $firstCollection->where('fleet_start_time <= :now'); - $backCollection->where('fleet_end_time <= :now'); - } - - $collection = new Wootook_Core_Collection(); - $collection - ->setEntityClassName('Wootook_Empire_Model_Fleet') - ->union($firstCollection) - ->union($backCollection) - ->load($options) - ; + $collection = new Wootook_Empire_Resource_Fleet_Collection(); + $collection->addPlanetToFilter($this, $time); return $collection; } - public function getUserId() + public function getPlayerId() { return (int) $this->getData('id_owner'); } - public function getUser() + public function getPlayer() { - if ($this->_user === null && $this->getUserId()) { - $this->_user = Wootook_Empire_Model_User::factory($this->getUserId()); + if ($this->_player === null && $this->getPlayerId()) { + $this->_player = Wootook_Player_Model_Entity::factory($this->getPlayerId()); } - return $this->_user; + return $this->_player; } - public function setUser(Wootook_Empire_Model_User $user) + public function setPlayer(Wootook_Player_Model_Entity $player) { - $this->_user = $user; - - return $this; - } - - public function getShipyard() - { - if ($this->_shipyard === null) { - $this->_shipyard = new Legacies_Empire_Model_Planet_Building_Shipyard($this, $this->getUser()); - } - return $this->_shipyard; - } - - public function setShipyard(Legacies_Empire_Model_Planet_Building_Shipyard $shipyard) - { - $this->_shipyard = $shipyard; - - return $this; - } - - public function getResearchLab() - { - if ($this->_laboratory === null) { - $this->_laboratory = new Legacies_Empire_Model_Planet_Building_ResearchLab($this, $this->getUser()); - } - return $this->_laboratory; - } - - public function setResearchLab(Legacies_Empire_Model_Planet_Building_ResearchLab $laboratory) - { - $this->_laboratory = $laboratory; + $this->_player = $player; return $this; } @@ -535,21 +474,16 @@ class Wootook_Empire_Model_Planet if ($this->_moon === null) { if ($statement === null) { - $statement = new Wootook_Core_Collection(array('planet' => 'planets'), get_class($this)); - $statement - ->where('galaxy=:galaxy') - ->where('system=:system') - ->where('planet=:position') - ->where('planet_type=' . strval(self::TYPE_MOON)) + $collection = new Wootook_Empire_Resource_Planet_Collection($this->getReadConnection()); + $collection->addFieldToFilter('galaxy', $this->getGalaxy()) + ->addFieldToFilter('system', $this->getGalaxy()) + ->addFieldToFilter('planet', $this->getPosition()) + ->addFieldToFilter('planet_type', self::TYPE_MOON) + ->load() ; } - $statement->load(array( - 'galaxy' => $this->getGalaxy(), - 'system' => $this->getSystem(), - 'position' => $this->getPosition() - )); - $this->_moon = $statement->current(); + $this->_moon = $collection->getFirstItem(); if ($this->_moon !== null && $this->_moon instanceof self) { $this->_moon->setPlanet($this); @@ -567,31 +501,17 @@ class Wootook_Empire_Model_Planet public function getPlanet() { - static $statement = null; - if ($this->isPlanet()) { return null; } if ($this->_planet === null) { - if ($statement === null) { - $statement = new Wootook_Core_Collection(array('planet' => 'planets'), get_class($this)); - $statement - ->where('galaxy=:galaxy') - ->where('system=:system') - ->where('planet=:position') - ->where('planet_type=' . strval(self::TYPE_PLANET)) - ; - } - - $statement->load(array( + $this->_planet = Wootook_Empire_Model_Planet::factoryFromCoords(array( 'galaxy' => $this->getGalaxy(), 'system' => $this->getSystem(), 'position' => $this->getPosition() )); - $this->_planet = $statement->current(); - if ($this->_planet !== null && $this->_planet instanceof self) { $this->_planet->setMoon($this); } @@ -700,16 +620,16 @@ class Wootook_Empire_Model_Planet throw new Wootook_Empire_Model_Planet_Exception(Wootook::__("Could not delete planet until fleets aten't retuned.")); } - $user = $this->getUser(); - if ($user->getHomePlanet()->getId() == $this->getId()) { + $player = $this->getPlayer(); + if ($player->getHomePlanet()->getId() == $this->getId()) { throw new Wootook_Empire_Model_Planet_Exception(Wootook::__("You can't destroy your home planet.")); } - if ($user->getCurrentPlanet()->getId() == $this->getId()) { - $homePlanet = $user->getHomePlanet(); + if ($player->getCurrentPlanet()->getId() == $this->getId()) { + $homePlanet = $player->getHomePlanet(); if ($homePlanet !== null) { - $user->updateCurrentPlanet($homePlanet); + $player->updateCurrentPlanet($homePlanet); } } @@ -746,13 +666,13 @@ class Wootook_Empire_Model_Planet return $this->hasData($fields[$elementId]) && Math::comp($this->getElement($elementId), $levelRequired) > 0; } - public function appendBuildingQueue($buildingId, $destroy = false, $time = null) + public function appendBuildingQueue($buildingId, $destroy = false, Wootook_Core_DateTime $time = null) { $types = Wootook_Empire_Model_Game_Types::getSingleton(); $prices = Wootook_Empire_Model_Game_Prices::getSingleton(); if ($time === null) { - $time = Wootook::now(); + $time = new Wootook_Core_DateTime(); } if (!$types->is($buildingId, Legacies_Empire::TYPE_BUILDING)) { @@ -768,7 +688,7 @@ class Wootook_Empire_Model_Planet 'bulding_id' => $buildingId, 'level' => $this->getElement($buildingId), $this->_eventObject => $this, - 'user' => $this->getUser(), + 'player' => $this->getPlayer(), 'destroy' => $destroy )); @@ -785,24 +705,24 @@ class Wootook_Empire_Model_Planet 'bulding_id' => $buildingId, 'level' => $this->getElement($buildingId), $this->_eventObject => $this, - 'user' => $this->getUser(), + 'player' => $this->getPlayer(), 'destroy' => $destroy )); return $this; } - public function updateBuildingQueue($time = null) + public function updateBuildingQueue(Wootook_Core_DateTime $time = null) { if ($time === null) { - $time = Wootook::now(); + $time = new Wootook_Core_DateTime(); } // Dispatch event Wootook::dispatchEvent($this->_eventPrefix . '.update-queue.before', array( 'time' => &$time, - $this->_eventObject => $this->_currentPlanet, - 'user' => $this->_currentUser + $this->_eventObject => $this, + 'player' => $this->getPlayer() )); $this->getBuildingQueue()->updateQueue($time); @@ -810,9 +730,8 @@ class Wootook_Empire_Model_Planet // Dispatch event Wootook::dispatchEvent($this->_eventPrefix . '.update-queue.after', array( 'time' => $time, - 'shipyard' => $this, - $this->_eventObject => $this->_currentPlanet, - 'user' => $this->_currentUser + $this->_eventObject => $this, + 'player' => $this->getPlayer() )); return $this; @@ -838,7 +757,7 @@ class Wootook_Empire_Model_Planet public function getBuildingQueue() { if ($this->_builder === null) { - $this->_builder = new Wootook_Empire_Model_Planet_Builder($this, $this->getUser()); + $this->_builder = new Wootook_Empire_Model_Planet_Builder($this, $this->getPlayer()); } return $this->_builder; } @@ -853,7 +772,7 @@ class Wootook_Empire_Model_Planet $this->getBuildingQueue()->rewind(); $item = $this->getBuildingQueue()->current(); - $this->getBuildingQueue()->dequeueFirstItem(Wootook::now()); + $this->getBuildingQueue()->dequeueFirstItem(new Wootook_Core_DateTime()); return $this; } @@ -879,15 +798,17 @@ class Wootook_Empire_Model_Planet */ public function checkAvailability($buildingId) { - $this->getBuildingQueue()->checkAvailability($buildingId); + if (!$this->getBuildingQueue()->checkAvailability($buildingId)) { + return false; + } try { // Dispatch event. Throw an exception to break the avaliability. Wootook::dispatchEvent($this->_eventPrefix . '.check-availability', array( 'ship_id' => $buildingId, 'shipyard' => $this, - $this->_eventObject => $this->_currentPlanet, - 'user' => $this->_currentUser + $this->_eventObject => $this, + 'player' => $this->getPlayer() )); } catch (Exception $e) { return false; @@ -920,8 +841,9 @@ class Wootook_Empire_Model_Planet public static function searchMostFreeSystems($galaxyList = null, $systemList = null) { - $collection = new Wootook_Core_Collection(array('galaxy' => 'galaxy')); - $collection + $adapter = $this->getReadConnection(); + $select = $adapter->select(array('galaxy' => 'galaxy')); + $select ->column(array( 'galaxy' => 'galaxy.galaxy', 'system' => 'galaxy.system', @@ -950,9 +872,9 @@ class Wootook_Empire_Model_Planet } $orders = array( - "COUNT(*) / {$collection->quote(Wootook::getGameConfig('engine/universe/positions'))}", - "1 + ABS(galaxy.galaxy - CEIL({$collection->quote(Wootook::getGameConfig('engine/universe/galaxies'))} / 2))", - "1 + 2 * ABS(galaxy.system - CEIL({$collection->quote(Wootook::getGameConfig('engine/universe/systems'))} / 2))", + "COUNT(*) / {$adapter->quote(Wootook::getGameConfig('engine/universe/positions'))}", + "1 + ABS(galaxy.galaxy - CEIL({$adapter->quote(Wootook::getGameConfig('engine/universe/galaxies'))} / 2))", + "1 + 2 * ABS(galaxy.system - CEIL({$adapter->quote(Wootook::getGameConfig('engine/universe/systems'))} / 2))", "RAND() / 1000", ); $collection @@ -962,7 +884,7 @@ class Wootook_Empire_Model_Planet //->order("1.5 / COUNT(*)", 'ASC') ->order('RAND()', 'ASC'); - return $collection; + return $adapter; } private static function _cleanItemRanges(&$value, $index, $userdata = null) @@ -978,7 +900,10 @@ class Wootook_Empire_Model_Planet if (isset($eventData['time'])) { $time = $eventData['time']; } else { - $time = time(); + $time = new Wootook_Core_DateTime(); + } + if (!$time instanceof Wootook_Core_DateTime) { + $time = new Wootook_Core_DateTime($time); } if ($planet === null || !$planet instanceof Wootook_Empire_Model_Planet) { @@ -987,8 +912,11 @@ class Wootook_Empire_Model_Planet $planet->updateBuildingQueue($time); $planet->updateResources($time); - $planet->getShipyard()->updateQueue($time); // FIXME + $planet->getShipyard()->updateQueue($time); // FIXME : update all plugin queues + $planet->getResearchLab()->updateQueue($time); // FIXME : update all plugin queues $planet->setLastUpdate($time); + + $planet->getPlayer()->save(); } } diff --git a/application/code/core/Wootook/Empire/Model/Planet/Builder.php b/src/application/code/core/Wootook/Empire/Model/Planet/Builder.php similarity index 70% rename from application/code/core/Wootook/Empire/Model/Planet/Builder.php rename to src/application/code/core/Wootook/Empire/Model/Planet/Builder.php index 6352386..6335aca 100644 --- a/application/code/core/Wootook/Empire/Model/Planet/Builder.php +++ b/src/application/code/core/Wootook/Empire/Model/Planet/Builder.php @@ -1,11 +1,54 @@ + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + * --> NOTICE <-- + * This file is part of the core development branch, changing its contents will + * make you unable to use the automatic updates manager. Please refer to the + * documentation for further information about customizing Wootook. + * + */ +/** + * + * Enter description here ... + * @author Greg + * + */ class Wootook_Empire_Model_Planet_Builder extends Wootook_Empire_Model_BuilderAbstract { + const FIELD_SERIALIZED = 'b_building_id'; + + /** + * @var int + */ + protected $_maxLength = 0; + public function init() { - $this->_unserializeQueue($this->_currentPlanet->getData('b_building_id')); + $this->_unserializeQueue($this->_currentPlanet->getData(self::FIELD_SERIALIZED)); + + $this->_maxLength = Wootook::getGameConfig('engine/core/buildings_queue_size'); } /** @@ -21,7 +64,7 @@ class Wootook_Empire_Model_Planet_Builder $level = $params['level']; if (!isset($params['created_at'])) { - $createdAt = time(); + $createdAt = new Wootook_Core_DateTime(); } else { $createdAt = $params['created_at']; } @@ -51,7 +94,7 @@ class Wootook_Empire_Model_Planet_Builder * Check if a building is actually buildable on the current planet, * depending on the technology and buildings requirements. * - * @param int $buildingId + * @param int|string $buildingId * @return bool */ public function checkAvailability($buildingId) @@ -62,9 +105,15 @@ class Wootook_Empire_Model_Planet_Builder return false; } - return true; + return parent::checkAvailability($buildingId); } + /** + * Returns the time needed to build $level of $buildingId + * + * @param int|string $buildingId + * @param int $level + */ public function getBuildingTime($buildingId, $level) { $prices = Wootook_Empire_Model_Game_Prices::getSingleton(); @@ -75,6 +124,9 @@ class Wootook_Empire_Model_Planet_Builder $levelTime = Math::sub($partialLevelTime, $firstLevelTime); $speedFactor = Wootook::getGameConfig('game/speed/general'); + if ($speedFactor == null) { + $speedFactor = 1; + } $baseTime = $levelTime / $speedFactor * 3600; Math::setPrecision(); @@ -83,7 +135,7 @@ class Wootook_Empire_Model_Planet_Builder 'time' => $baseTime, 'base_time' => $baseTime, 'planet' => $this->_currentPlanet, - 'user' => $this->_currentUser, + 'player' => $this->_currentPlayer, 'building_id' => $buildingId, 'level' => $level )); @@ -91,6 +143,10 @@ class Wootook_Empire_Model_Planet_Builder return $event->getData('time'); } + /** + * (non-PHPdoc) + * @see Legacies_Empire_Model_BuilderAbstract::getResourcesNeeded() + */ public function getResourcesNeeded($buildingId, $level) { $prices = Wootook_Empire_Model_Game_Prices::getSingleton(); @@ -116,54 +172,56 @@ class Wootook_Empire_Model_Planet_Builder /** * Update the contruction queue. * - * @return Wootook_Empire_Model_Planet_Building_Shipyard + * @return Wootook_Empire_Model_Planet_Builder */ - public function updateQueue($time) + public function updateQueue(Wootook_Core_DateTime $time) { $fields = Wootook_Empire_Model_Game_FieldsAlias::getSingleton(); - $startingTime = $this->_currentPlanet->getData('b_building'); + $startingTime = clone $this->_currentPlanet->getData('b_building'); foreach ($this->getQueue() as $element) { $elementTime = $element->getData('started_at'); if ($elementTime === null) { - $element->setData('started_at', $startingTime); - $elementTime = $startingTime; + $element->setData('started_at', $startingTime->getTimestamp()); + $elementTime = $startingTime->getTimestamp(); } $level = $element->getData('level'); $buildingId = $element->getData('building_id'); $buildTime = $this->getBuildingTime($buildingId, $level); - $elapsedTime = $time - $elementTime; + $elapsedTime = $time->getTimestamp() - $elementTime; if ($elapsedTime >= $buildTime) { - $this->_currentPlanet->updateResources($time - $elapsedTime); - $this->_currentPlanet->setElement($buildingId, $level); - $this->_currentPlanet->updateResourceProduction($time - $elapsedTime); - $this->_currentPlanet->updateStorages($time - $elapsedTime); - $this->_currentPlanet->updateBuildingFields(); - $this->dequeue($element); + $currentTime = clone $startingTime; + $currentTime->add($elapsedTime); + + $this->_currentPlanet->updateResources($currentTime); + $this->_currentPlanet->setElement($buildingId, $level); + $this->_currentPlanet->updateStorages($currentTime); + $this->_currentPlanet->updateResourceProduction($currentTime); + $this->_currentPlanet->updateBuildingFields(); + Wootook::dispatchEvent('planet.building.level-update', array( - 'time' => $time - $elapsedTime, + 'time' => $currentTime, 'planet' => $this->_currentPlanet, - 'user' => $this->_currentUser, + 'player' => $this->_currentPlayer, 'building_id' => $buildingId, 'level' => $level )); - $startingTime = $elementTime + $buildTime; + $startingTime->set($elementTime + $buildTime); continue; } - $element->setData('updated_at', $time); break; } $this->_currentPlanet->setData('b_building_id', $this->serialize()); - $this->_currentPlanet->setData('b_building', $startingTime); + $this->_currentPlanet->setData('b_building', $startingTime->now()); return $this; } @@ -171,14 +229,17 @@ class Wootook_Empire_Model_Planet_Builder /** * Append items to build to the construction list * - * @param int $buildingId - * @param int|string $level - * @return Wootook_Empire_Model_Planet_Building_Shipyard + * @param int|string $buildingId + * @param int $level + * @return Wootook_Empire_Model_Planet_Builder */ - public function appendQueue($buildingId, $level, $time) + public function appendQueue($buildingId, $level, Wootook_Core_DateTime $time) { + if ($this->_maxLength > 0 && $this->count() >= $this->_maxLength) { + return $this; + } + $types = Wootook_Empire_Model_Game_Types::getSingleton(); - $resources = Wootook_Empire_Model_Game_Resources::getSingleton(); if (!Math::isPositive($level)) { return $this; @@ -205,7 +266,7 @@ class Wootook_Empire_Model_Planet_Builder $this->enqueue(array( 'building_id' => $buildingId, 'level' => $level, - 'created_at' => $time + 'created_at' => $time->getTimestamp() )); $this->_currentPlanet->setData('b_building_id', $this->serialize()); diff --git a/application/code/core/Wootook/Empire/Model/Planet/Builder/Item.php b/src/application/code/core/Wootook/Empire/Model/Planet/Builder/Item.php similarity index 100% rename from application/code/core/Wootook/Empire/Model/Planet/Builder/Item.php rename to src/application/code/core/Wootook/Empire/Model/Planet/Builder/Item.php diff --git a/application/code/core/Wootook/Empire/Model/Planet/BuildingInterface.php b/src/application/code/core/Wootook/Empire/Model/Planet/BuildingInterface.php similarity index 100% rename from application/code/core/Wootook/Empire/Model/Planet/BuildingInterface.php rename to src/application/code/core/Wootook/Empire/Model/Planet/BuildingInterface.php diff --git a/application/code/core/Wootook/Empire/Model/Planet/Exception.php b/src/application/code/core/Wootook/Empire/Model/Planet/Exception.php similarity index 100% rename from application/code/core/Wootook/Empire/Model/Planet/Exception.php rename to src/application/code/core/Wootook/Empire/Model/Planet/Exception.php diff --git a/application/code/core/Wootook/Empire/Model/Planet/PluginLoader.php b/src/application/code/core/Wootook/Empire/Model/Planet/PluginLoader.php similarity index 54% rename from application/code/core/Wootook/Empire/Model/Planet/PluginLoader.php rename to src/application/code/core/Wootook/Empire/Model/Planet/PluginLoader.php index aa854a4..71e2f85 100644 --- a/application/code/core/Wootook/Empire/Model/Planet/PluginLoader.php +++ b/src/application/code/core/Wootook/Empire/Model/Planet/PluginLoader.php @@ -1,27 +1,29 @@ _currentUser = $currentUser; + $this->_currentPlayer = $currentPlayer; $this->_currentPlanet = $currentPlanet; + + $this->registerNamespace('Legacies_Empire_Model_Planet_Building_'); } protected function _load($className, $useSingleton) { - $reflection = new ClassReflection($className); + $reflection = new ReflectionClass($className); if ($useSingleton && $reflection->implementsInterface('Wootook_Core_Singleton')) { $method = $reflection->getMethod('getSingleton'); $method->invoke(); } try { - return $reflection->invoke($this->_currentPlanet, $this->_currentUser); + return $reflection->newInstance($this->_currentPlanet, $this->_currentPlayer); } catch (ReflectionException $e) { return null; } diff --git a/src/application/code/core/Wootook/Empire/Model/Planet/QueueInterface.php b/src/application/code/core/Wootook/Empire/Model/Planet/QueueInterface.php new file mode 100644 index 0000000..7bd2c42 --- /dev/null +++ b/src/application/code/core/Wootook/Empire/Model/Planet/QueueInterface.php @@ -0,0 +1,9 @@ +getElement(Legacies_Empire::ID_RESEARCH_COMBUSTION_DRIVE)); + } + + public function getActualSpeed(Wootook_Player_Model_Entity $player) + { + return $this->getBaseSpeed($player) * $this->getSpeedMultiplier($player); + } + + public function getActualConsumption(Wootook_Player_Model_Entity $player, $speed) + { + return $this->getBaseConsumption($player) * ($speed / 100) * $this->getSpeedMultiplier($player); + } +} \ No newline at end of file diff --git a/src/application/code/core/Wootook/Empire/Model/Planet/ShipInterface.php b/src/application/code/core/Wootook/Empire/Model/Planet/ShipInterface.php new file mode 100644 index 0000000..dc9863a --- /dev/null +++ b/src/application/code/core/Wootook/Empire/Model/Planet/ShipInterface.php @@ -0,0 +1,11 @@ +_init(array('fleet' => 'fleets'), 'Wootook_Empire_Model_Fleet'); + } + + public function addPlanetToFilter(Wootook_Empire_Model_Planet $planet, $time = null) + { + $this->addFieldToFilter(null, array( + array('and' => array( + array('eq' => array('field' => 'fleet_start_galaxy', 'value' => $planet->getGalaxy())), + array('eq' => array('field' => 'fleet_start_system', 'value' => $planet->getSystem())), + array('eq' => array('field' => 'fleet_start_planet', 'value' => $planet->getPosition())), + array('eq' => array('field' => 'fleet_start_type', 'value' => $planet->getType())), + array('date' => array('field' => 'fleet_start_time', 'value' => array('to' => $time))), + )), + array('and' => array( + array('eq' => array('field' => 'fleet_end_galaxy', 'value' => $planet->getGalaxy())), + array('eq' => array('field' => 'fleet_end_system', 'value' => $planet->getSystem())), + array('eq' => array('field' => 'fleet_end_planet', 'value' => $planet->getPosition())), + array('eq' => array('field' => 'fleet_end_type', 'value' => $planet->getType())), + array('date' => array('field' => 'fleet_end_time', 'value' => array('to' => $time))), + )) + )); + + return $this; + } + + public function addIsVisibleToFilter(Wootook_Player_Model_Entity $player, $time = null) + { + $this->addFieldToFilter(null, array( + array('and' => array( + array('eq' => array('field' => 'fleet_owner', 'value' => $player->getId())), + array('date' => array('field' => 'fleet_start_time', 'value' => array('to' => $time))), + )), + array('and' => array( + array('eq' => array('field' => 'fleet_owner', 'value' => $player->getId())), + array('date' => array('field' => 'fleet_end_time', 'value' => array('to' => $time))), + )) + )); + + return $this; + } +} diff --git a/src/application/code/core/Wootook/Empire/Resource/Planet/Collection.php b/src/application/code/core/Wootook/Empire/Resource/Planet/Collection.php new file mode 100644 index 0000000..9cf9d46 --- /dev/null +++ b/src/application/code/core/Wootook/Empire/Resource/Planet/Collection.php @@ -0,0 +1,24 @@ +_init(array('planet' => 'planets'), 'Wootook_Empire_Model_Planet'); + } + + public function addPlayerToFilter(Wootook_Player_Model_Entity $player) + { + $this->addFieldToFilter('id_owner', $player->getId()); + + return $this; + } + + public function addTypeToFilter($type) + { + $this->addFieldToFilter('planet_type', $type); + + return $this; + } +} diff --git a/application/code/core/Wootook/Empire/install/mysql5/.placeholder b/src/application/code/core/Wootook/Empire/install/mysql5/.placeholder similarity index 100% rename from application/code/core/Wootook/Empire/install/mysql5/.placeholder rename to src/application/code/core/Wootook/Empire/install/mysql5/.placeholder diff --git a/application/code/core/Legacies/Oficers.php b/src/application/code/core/Wootook/Exception.php similarity index 95% rename from application/code/core/Legacies/Oficers.php rename to src/application/code/core/Wootook/Exception.php index 089b825..c3b339a 100644 --- a/application/code/core/Legacies/Oficers.php +++ b/src/application/code/core/Wootook/Exception.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/agpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2011-Present, Grégory PLANCHAT * All rights reserved. @@ -27,14 +27,11 @@ * documentation for further information about customizing Wootook. * */ + /** * * Enter description here ... * @author Greg * */ - -class Legacies_Officers -{ - -} \ No newline at end of file +interface Wootook_Exception {} \ No newline at end of file diff --git a/application/code/core/Wootook/Object.php b/src/application/code/core/Wootook/Object.php similarity index 54% rename from application/code/core/Wootook/Object.php rename to src/application/code/core/Wootook/Object.php index 2f214d3..a9afd72 100644 --- a/application/code/core/Wootook/Object.php +++ b/src/application/code/core/Wootook/Object.php @@ -1,5 +1,39 @@ + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + * --> NOTICE <-- + * This file is part of the core development branch, changing its contents will + * make you unable to use the automatic updates manager. Please refer to the + * documentation for further information about customizing Wootook. + * + */ +/** + * + * Enter description here ... + * @author Greg + * + */ class Wootook_Object implements ArrayAccess { diff --git a/application/code/core/Wootook/Empire/Block/Overview.php b/src/application/code/core/Wootook/Player/Block/Overview.php similarity index 58% rename from application/code/core/Wootook/Empire/Block/Overview.php rename to src/application/code/core/Wootook/Player/Block/Overview.php index c09ec87..bf689f0 100644 --- a/application/code/core/Wootook/Empire/Block/Overview.php +++ b/src/application/code/core/Wootook/Player/Block/Overview.php @@ -1,6 +1,6 @@ getSession()->isLoggedIn(); + } + + public function getPlayer() + { + return $this->getSession()->getPlayer(); + } + + public function getPlayerCount() + { + $collection = new Wootook_Player_Resource_Entity_Collection($this->getPlayer()->getReadConnection()); + $collection->addAuthlevelToFilter(array(LEVEL_ADMIN), true); + + return $collection->getSize(); + } + + public function getOnlinePlayerCount() + { + $collection = new Wootook_Player_Resource_Entity_Collection($this->getPlayer()->getReadConnection()); + $collection->addAuthlevelToFilter(array(LEVEL_ADMIN), true); + $collection->addIsOnlineToFilter(); + + return $collection->getSize(); + } +} \ No newline at end of file diff --git a/src/application/code/core/Wootook/Player/Controller/Registered.php b/src/application/code/core/Wootook/Player/Controller/Registered.php new file mode 100644 index 0000000..49f9619 --- /dev/null +++ b/src/application/code/core/Wootook/Player/Controller/Registered.php @@ -0,0 +1,22 @@ +getSession()->isLoggedIn()) { + $this->_redirectLogin(); + } + } + + protected function _redirectLogin() + { + return $this->_redirect('player/account/login'); + } +} \ No newline at end of file diff --git a/src/application/code/core/Wootook/Player/Exception.php b/src/application/code/core/Wootook/Player/Exception.php new file mode 100644 index 0000000..6a51351 --- /dev/null +++ b/src/application/code/core/Wootook/Player/Exception.php @@ -0,0 +1,3 @@ += 50300) { + parent::__construct($message, $code, $previous); + } else { + parent::__construct($message, $code); + $this->_previous = $previous; + } + } + + public function __call($method, $params) + { + if (strtolower($method) == 'getprevious') { + return $this->_previous; + } + } +} \ No newline at end of file diff --git a/src/application/code/core/Wootook/Player/Exception/RuntimeException.php b/src/application/code/core/Wootook/Player/Exception/RuntimeException.php new file mode 100644 index 0000000..e270f3f --- /dev/null +++ b/src/application/code/core/Wootook/Player/Exception/RuntimeException.php @@ -0,0 +1,25 @@ += 50300) { + parent::__construct($message, $code, $previous); + } else { + parent::__construct($message, $code); + $this->_previous = $previous; + } + } + + public function __call($method, $params) + { + if (strtolower($method) == 'getprevious') { + return $this->_previous; + } + } +} \ No newline at end of file diff --git a/src/application/code/core/Wootook/Player/Exception/Session.php b/src/application/code/core/Wootook/Player/Exception/Session.php new file mode 100644 index 0000000..b546e5d --- /dev/null +++ b/src/application/code/core/Wootook/Player/Exception/Session.php @@ -0,0 +1,7 @@ +getData('username'); } - public static function getSingleton() - { - if (self::$_singleton === null) { - $session = Wootook::getSession(self::SESSION_KEY); - if ($session->hasData('user_id')) { - $id = intval($session->getData('user_id')); - } else if (Wootook::getRequest() !== null && ($cookieData = Wootook::getRequest()->getCookie(self::getCookieName())) !== null) { - if (is_array($cookieData)) { - $collection = new Wootook_Core_Collection(array('user' => 'users')); - $cookieData = array( - 'id' => (isset($cookieData['id']) ? intval($cookieData['id']) : 0), - 'key' => (isset($cookieData['key']) ? $collection->quote($cookieData['key']) : null) - ); - - $collection - ->column('id') - ->where('user.id=:id') - ->where(':key=CONCAT((@salt:=MID(:key, 0, 4)), SHA1(CONCAT(user.username, user.password, @salt)))') - ->load($cookieData) - ; - - if ($collection->count() > 0) { - $session->setData(self::SESSION_KEY, $cookieData['id']); - } else { - $session->addError('Your session has expired, please login.'); - return null; - } - } else { - $session->addError('Your session has expired, please login.'); - return null; - } - } else { - $session->addError('Your session has expired, please login.'); - return null; - } - - try { - self::$_singleton = self::factory($id); - } catch (Wootook_Core_Exception_DataAccessException $e) { - $session->addError('Session error.'); - return null; - } - self::$_singleton->_updateActivity(); - } - return self::$_singleton; - } - public static function hash($password, $salt = null) { if ($salt === null) { @@ -148,146 +101,72 @@ class Wootook_Empire_Model_User { $this->setIdFieldName('id'); $this->setTableName('users'); + + $this->getDataMapper() + ->addRule('onlinetime', 'date-time') + ->addRule('urlaubs_until', 'date-time') + ->addRule('register_time', 'date-time') + ; } - protected function _updateActivity() + public function updateActivity() { $this ->setData('current_page', $_SERVER['REQUEST_URI']) ->setData('user_lastip', $_SERVER['REMOTE_ADDR']) ->setData('user_agent', $_SERVER['HTTP_USER_AGENT']) - ->setData('onlinetime', time()) + ->setData('onlinetime', new Wootook_Core_DateTime()) ->save() ; return $this; } - public function logout() - { - Wootook::getResponse()->unsetCookie(self::getCookieName()); - Wootook_Core_Model_Session::destroy(); - } - - public static function login($username, $password, $remember = false) - { - $session = Wootook::getSession(self::SESSION_KEY); - - try { - $collection = new Wootook_Core_Collection(array('user' => 'users')); - - $passwordHash = md5($password); - $collection - ->column('user.id') - ->column('user.username') - ->column('user.password') - ->column('user.banaday') - ->column('CONCAT((@salt:=MID(MD5(RAND()), 0, 4)), SHA1(CONCAT(user.username, user.password, @salt))) AS login_rememberme') - ->column('(CASE WHEN user.password="' . $passwordHash . '" THEN 1 ELSE 0 END) AS login_success') - ->where('user.username=:username') - ->load(array( - 'username' => $username - )) - ; - } catch (Wootook_Core_Exception_DataAccessException $e) { - Wootook_Core_ErrorProfiler::getSingleton()->exceptionManager($e); - $session->addError('No such user.'); - return null; - } - - if ($collection->count() <= 0) { - $session->addError('No such user.'); - return null; - } - $login = $collection->current(); - - if (intval($login['login_success']) == 1) { - if ($login['banaday'] != 0) { - if($login['banaday'] <= time()) { - $user->setData('banaday', 0) - ->setData('bana', 0) - ->setData('urlaubs_modus', 0) - ->setData('urlaubs_until', null) - ->save() - ; - } else { - $session->addError('You were banned, please contact admin for more information.'); - return null; - } - } - - if (isset($_POST["rememberme"]) && Wootook::getResponse() !== null) { - Wootook::getResponse()->setCookie( - self::getCookieName(), - array('id' => $login['id'], 'key' => $login['login_rememberme']), - self::getCookieLifetime(), - self::getCookiePath(), - self::getCookieDomain() - ); - } - - return self::setLoggedIn(self::factory($login['id'])); - } - - $session->addError('Your username or credential is invalid, please check your input.'); - return null; - } - - public static function setLoggedIn(self $user) - { - $session = Wootook::getSession(self::SESSION_KEY); - - self::$_singleton = $user; - self::$_singleton->_updateActivity(); - - $session->setData('user_id', intval(self::$_singleton->getId())); - - return self::$_singleton; - } - public static function register($username, $email, $password) { try { $request = Wootook::getRequest(); - $user = new self(array( + $player = new self(array( 'username' => $username, 'password' => md5($password), 'email' => $email, 'email_2' => $email, - 'register_time' => Wootook::now(), - 'onlinetime' => Wootook::now(), + 'register_time' => new Wootook_Core_DateTime(), + 'onlinetime' => new Wootook_Core_DateTime(), 'ip_at_reg' => $request->getServer('REMOTE_ADDR'), 'user_lastip' => $request->getServer('REMOTE_ADDR'), 'user_agent' => $request->getServer('HTTP_USER_AGENT') )); - $user->getWriteConnection()->beginTransaction(); + $player->getWriteConnection()->beginTransaction(); - $user->save(); + $player->save(); - $collection = Wootook_Empire_Model_Planet::searchMostFreeSystems(); - $collection->limit(1)->load(); + $select = Wootook_Empire_Model_Planet::searchMostFreeSystems(); + $select->limit(1); - if ($collection->count() == 0) { + try { + $statement = $adapter->prepare($select); + if (!$statement->execute()) { + throw new Wootook_Empire_Exception_RuntimeException('No more planet to colonize!'); // Oops, no more free place + } + } catch (PDOException $e) { + Wootook_Core_ErrorProfiler::getSingleton()->exceptionManager($e); + $this->getWriteConnection()->rollback(); + return null; + } + + $systemInfo = $statement->fetch(); + if ($systemInfo['count'] >= Wootook::getGameConfig('engine/universe/positions')) { throw new Wootook_Empire_Exception_RuntimeException('No more planet to colonize!'); // Oops, no more free place } - $systemInfo = $collection->current(); - if ($systemInfo->getData('count') >= Wootook::getGameConfig('engine/universe/positions')) { - throw new Wootook_Empire_Exception_RuntimeException('No more planet to colonize!'); // Oops, no more free place - } - - $collection = new Wootook_Core_Collection(array('planet' => 'planets')); - $collection - ->column(array('position' => 'planet.planet')) - ->where('planet.planet_type=1') - ->where('planet.galaxy=:galaxy') - ->where('planet.system=:system') - ->load(array( - 'galaxy' => $systemInfo->getData('galaxy'), - 'system' => $systemInfo->getData('system'), - )) + $collection = new Wootook_Empire_Resource_Planet_Collection($player->getReadConneciton()); + $collection->addTypeToFilter(Wootook_Empire_Model_Planet::TYPE_PLANET) + ->addFieldToFilter('galaxy', $systemInfo['galaxy']) + ->addFieldToFilter('system', $systemInfo['system']) ; + $positions = range(1, Wootook::getGameConfig('engine/universe/positions')); foreach ($collection as $planet) { $key = array_search($planet->getData('position'), $positions); @@ -298,7 +177,7 @@ class Wootook_Empire_Model_User $key = array_rand($positions, 1); $finalPosition = $positions[$key]; - $planet = $user->createNewPlanet( + $planet = $player->createNewPlanet( $systemInfo->getData('galaxy'), $systemInfo->getData('system'), $finalPosition, @@ -307,7 +186,7 @@ class Wootook_Empire_Model_User Wootook::getGameConfig('resource/initial/fields') ); - $user + $player ->setData('id_planet', $planet->getId()) ->setData('current_planet', $planet->getId()) ->setData('galaxy', $planet->getGalaxy()) @@ -315,35 +194,37 @@ class Wootook_Empire_Model_User ->setData('planet', $planet->getPosition()) ; - Wootook::dispatchEvent('user.init', array( - 'user' => $user + Wootook::dispatchEvent('player.init', array( + 'player' => $player )); - $user->save(); + $player->save(); } catch (Wootook_Core_Exception_DataAccessException $e) { - $user->getWriteConnection()->rollback(); - $session = Wootook_Core_Model_Session::factory(Wootook_Empire_Model_User::SESSION_KEY); + $player->getWriteConnection()->rollback(); + $session = Wootook_Core_Model_Session::factory(Wootook_Player_Model_Entity::SESSION_KEY); + $this->getWriteConnection()->rollback(); Wootook_Core_ErrorProfiler::getSingleton()->exceptionManager($e); $session->addError($e->getMessage()); return null; } catch (Wootook_Empire_Exception_RuntimeException $e) { - $user->getWriteConnection()->rollback(); - $session = Wootook_Core_Model_Session::factory(Wootook_Empire_Model_User::SESSION_KEY); + $player->getWriteConnection()->rollback(); + $session = Wootook_Core_Model_Session::factory(Wootook_Player_Model_Entity::SESSION_KEY); + $this->getWriteConnection()->rollback(); Wootook_Core_ErrorProfiler::getSingleton()->exceptionManager($e); $session->addError($e->getMessage()); return null; } - $user->getWriteConnection()->commit(); + $player->getWriteConnection()->commit(); - return $user; + return $player; } public function createNewPlanet($galaxy, $system, $position, $type, $name, $size = null) { if ($size === null) { - $baseSize = Wootook::getGameConfig('resource/initial/fields'); + $baseSize = Wootook::getGameConfig('planet/initial/fields'); $factor = $position * 10 / (1 + log($position * 10)); $fuzz = 2 * $factor * pow(sin($factor), 2) / 2 + $factor / 4; @@ -351,6 +232,7 @@ class Wootook_Empire_Model_User $size = mt_rand(floor($factor / 10), ceil($factor * 5 / 4)) + mt_rand(0, $fuzz); } + $now = time(); $planet = new Wootook_Empire_Model_Planet(); $planet ->setData('id_owner', $this->getId()) @@ -362,18 +244,34 @@ class Wootook_Empire_Model_User ->setData('field_max', $size) ->setData('diameter', pow($size, 2) + mt_rand(0, $size * $position)) ->setData('field_current', 0) + ->setData('last_update', $now) + ->setData('b_tech', $now) + ->setData('b_hangar', $now) + ->setData('b_building', $now) ; $resourceList = Wootook_Empire_Model_Game_Resources::getSingleton(); - $resourceConfig = Wootook::getGameConfig('resource/initial'); + $resourceConfig = Wootook::getGameConfig('resources/initial'); foreach ($resourceList as $resource => $resourceData) { - $planet->setData($resourceData['storage_field'], $resourceConfig[$resource]); + if ($resourceData['field'] === null || !isset($resourceConfig[$resource])) { + continue; + } + $planet->setData($resourceData['field'], $resourceConfig[$resource]); } - $resourceConfig = Wootook::getGameConfig('resource/base-income'); + + $resourceConfig = Wootook::getGameConfig('resources/base-income'); foreach ($resourceList as $resource => $resourceData) { + if ($resourceData['production_field'] === null || !isset($resourceConfig[$resource])) { + continue; + } $planet->setData($resourceData['production_field'], $resourceConfig[$resource]); } + $planet->updateStorages($now); + $planet->updateBuildingQueue($now); + $planet->updateResourceProduction($now); + $planet->updateResources($now); + $planet->save(); if ($planet->isPlanet()) { @@ -389,7 +287,7 @@ class Wootook_Empire_Model_User Wootook::dispatchEvent('planet.init', array( 'planet' => $planet, - 'user' => $this + 'player' => $this )); $planet->save(); @@ -419,7 +317,7 @@ class Wootook_Empire_Model_User $planet = $planetCollection->current(); } - if ($planet->getUserId() != $this->getId() || $planet->isDestroyed()) { + if ($planet->getPlayerId() != $this->getId() || $planet->isDestroyed()) { return $this; } @@ -435,7 +333,7 @@ class Wootook_Empire_Model_User */ public function setHomePlanet(Wootook_Empire_Model_Planet $planet) { - if ($planet->getUserId() != $this->getId() || $planet->isDestroyed()) { + if ($planet->getPlayerId() != $this->getId() || $planet->isDestroyed()) { return $this; } @@ -452,7 +350,7 @@ class Wootook_Empire_Model_User */ public function setCurrentPlanet(Wootook_Empire_Model_Planet $planet) { - if ($planet->getUserId() != $this->getId() || $planet->isDestroyed()) { + if ($planet->getPlayerId() != $this->getId() || $planet->isDestroyed()) { return $this; } @@ -477,7 +375,7 @@ class Wootook_Empire_Model_User $planet = Wootook_Empire_Model_Planet::factory($planetId); - if ($planet->getUserId() != $this->getId() || $planet->isDestroyed()) { + if ($planet->getPlayerId() != $this->getId() || $planet->isDestroyed()) { return null; } @@ -506,7 +404,7 @@ class Wootook_Empire_Model_User $planet = Wootook_Empire_Model_Planet::factory($planetId); - if ($planet->getUserId() != $this->getId() || $planet->isDestroyed()) { + if ($planet->getPlayerId() != $this->getId() || $planet->isDestroyed()) { $this->_currentPlanet = $this->getHomePlanet(); $this->setData('current_planet', $this->_currentPlanet->getId())->save(); @@ -521,28 +419,28 @@ class Wootook_Empire_Model_User protected function _preparePlanetCollection() { - $planetCollection = new Wootook_Core_Collection(array('planet' => 'planets'), 'Wootook_Empire_Model_Planet'); - $planetCollection->where('id_owner=:user'); + $planetCollection = new Wootook_Empire_Resource_Planet_Collection($this->getReadConnection()); + $planetCollection->addPlayerToFilter($this); $order = ($this->getData('planet_sort_order') == 1) ? 'DESC' : 'ASC'; switch ($this->getData('planet_sort')) { case self::PLANET_SORT_POSITION: $planetCollection - ->order('planet.galaxy', $order) - ->order('planet.system', $order) - ->order('planet.planet', $order) - ->order('planet.planet_type', $order) + ->addOrderBy('galaxy', $order) + ->addOrderBy('system', $order) + ->addOrderBy('planet', $order) + ->addOrderBy('planet_type', $order) ; break; case self::PLANET_SORT_NAME: - $planetCollection->order('planet.name', $order); + $planetCollection->addOrderBy('name', $order); break; case self::PLANET_SORT_DATE: default: - $planetCollection->order('planet.id', $order); + $planetCollection->addOrderBy('id', $order); break; } return $planetCollection; @@ -553,64 +451,45 @@ class Wootook_Empire_Model_User $planetCollection = $this->_preparePlanetCollection(); if (!empty($typeFilter)) { - $planetCollection->where('planet.planet_type IN(' . implode(',', $typeFilter) . ')'); + $planetCollection->addFieldToFilter('planet_type', array(array('in' => $typeFilter))); } - $planetCollection->load(array( - 'user' => $this->getId() - )); - return $planetCollection; } - protected function _prepareFleetCollection() + protected function _prepareFleetCollection($collection) { - $collection = new Wootook_Core_Collection(array('fleet' => 'fleets')); - $collection - ->setEntityClassName('Wootook_Empire_Model_Fleet') - ->where('fleet_owner <= :user_id') - ; - return $collection; + $collection->addFieldToFilter('fleet_owner', $this->getId()); + + return $this; } public function getFleets() { - return $this->_prepareFleetCollection()->load(array('user_id' => $this->getId())); + $collection = new Wootook_Empire_Resource_Fleet_Collection($this->getReadConnection()); + + $this->_prepareFleetCollection($collection); + + return $collection; } public function getFleetCount() { - return $this->_prepareFleetCollection()->getSize(array('user_id' => $this->getId())); + $collection = new Wootook_Empire_Resource_Fleet_Collection($this->getReadConnection()); + + $this->_prepareFleetCollection($collection); + + return $collection->getSize(); } - public function getVisibleFleets() + public function getVisibleFleets($time = null) { + $collection = new Wootook_Empire_Resource_Fleet_Collection($this->getReadConnection()); - $user = Wootook_Empire_Model_User::getSingleton(); - $firstCollection = new Wootook_Core_Collection(array('fleet' => 'fleets')); - $firstCollection -// ->column('*') - ->column('fleet.fleet_start_galaxy', 'galaxy') - ->column('fleet.fleet_start_system', 'system') - ->column('fleet.fleet_start_planet', 'planet') - ->column('fleet.fleet_start_type', 'planet_type') - ->where('fleet_end_time <= :now') - ; - $backCollection = new Wootook_Core_Collection(array('fleet' => 'fleets')); - $backCollection -// ->column('*') - ->column('fleet.fleet_end_galaxy', 'galaxy') - ->column('fleet.fleet_end_system', 'system') - ->column('fleet.fleet_end_planet', 'planet') - ->column('fleet.fleet_end_type', 'planet_type') - ->where('fleet_end_time <= :now') - ; - $collection = new Wootook_Core_Collection(); - $collection - ->setEntityClassName('Wootook_Empire_Model_Fleet') - ->union($firstCollection) - ->union($backCollection) - ->load(array('now' => time())); + if ($time === null) { + $time = new Wootook_Core_DateTime(); + } + $collection->addIsVisibleToFilter($this, $time); return $collection; } @@ -661,46 +540,19 @@ class Wootook_Empire_Model_User public function getFleetCollection($time = null) { - $firstCollection = new Wootook_Core_Collection(array('fleet' => 'fleets')); - $firstCollection - ->column('*') - ->where('fleet.fleet_owner = :user') - ; - $backCollection = new Wootook_Core_Collection(array('fleet' => 'fleets')); - $backCollection - ->column('*') - ->where('fleet.fleet_target_owner = :user') - ; + $fleetCollection = new Wootook_Empire_Resource_Fleet_Collection($this->getReadConnection()); + $fleetCollection->addIsVisibleToFilter($this, $time); - $options = array( - 'user' => $this->getId() - ); - - if ($time !== null) { - $options['now'] = $time; - $firstCollection->where('fleet_start_time <= :now'); - $backCollection->where('fleet_end_time <= :now'); - } - - $collection = new Wootook_Core_Collection(); - $collection - ->setEntityClassName('Wootook_Empire_Model_Fleet') - ->union($firstCollection) - ->union($backCollection) - ->load($options) - ; - - return $collection; + return $fleetCollection; } public function getNewMessagesCount() { - $messageCollection = new Wootook_Core_Collection('messages'); - $messageCollection->where('message_owner=:user'); - $messageCollection->where('message_read_at<=0'); + $messageCollection = new Wootook_Player_Resource_Message_Collection($this->getReadConnection()); + $messageCollection->addPlayerToFilter($this)->addUnreadToFilter(); $newMessages = null; - if (($count = $messageCollection->getSize(array('user' => $this->getId()))) > 0) { + if (($count = $messageCollection->getSize()) > 0) { return $count; } return null; @@ -708,7 +560,7 @@ class Wootook_Empire_Model_User public static function layoutPrepareAfterListener($eventData) { - $player = self::getSingleton(); + $player = Wootook_Player_Model_Session::getSingleton()->getPlayer(); if ($player === null || !$player->getId() || !in_array($player->getData('authlevel'), array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERATOR))) { return; } @@ -730,7 +582,7 @@ class Wootook_Empire_Model_User } } - public function getVacation() + public function isVacation() { return $this->getData('urlaubs_modus') ? true : false; } @@ -759,4 +611,16 @@ class Wootook_Empire_Model_User return $this; } + + public function isAuthorized($levels = array(LEVEL_ADMIN)) + { + if (!is_array($levels)) { + $levels = array($levels); + } + + if (in_array($this->getData('authlevel'), $levels)) { + return true; + } + return false; + } } \ No newline at end of file diff --git a/application/code/core/Wootook/Empire/Model/User/Message.php b/src/application/code/core/Wootook/Player/Model/Message.php similarity index 74% rename from application/code/core/Wootook/Empire/Model/User/Message.php rename to src/application/code/core/Wootook/Player/Model/Message.php index 80241ef..6532b71 100644 --- a/application/code/core/Wootook/Empire/Model/User/Message.php +++ b/src/application/code/core/Wootook/Player/Model/Message.php @@ -1,10 +1,10 @@ getData('player_id'); + } + + /** + * + * Enter description here ... + * @return Wootook_Player_Model_Entity + */ + public function getPlayer() + { + if ($this->_player === null) { + $this->_player = new Wootook_Player_Model_Entity(); + + try { + if ($this->hasData('player_id')) { + $id = intval($this->getData('player_id')); + } else if (Wootook::getRequest() !== null && ($cookieData = Wootook::getRequest()->getCookie($this->_player->getCookieName())) !== null) { + if (is_array($cookieData)) { + $adapter = $this->_player->getReadConnection(); + $select = $adapter->select(array('user' => 'users')); + $cookieData = array( + 'id' => (isset($cookieData['id']) ? intval($cookieData['id']) : 0), + 'key' => (isset($cookieData['key']) ? $collection->quote($cookieData['key']) : null) + ); + + $select + ->column('id') + ->where('user.id=:id') + ->where(':key=CONCAT((@salt:=MID(:key, 0, 4)), SHA1(CONCAT(user.username, user.password, @salt)))') + ; + try { + $statement = $adapter->prepare($select); + if (!$statement->execute($cookieData) || $statement->rowCount() <= 0) { + throw new Wootook_Player_Exception_Session('Your session has expired, please login.'); + } + } catch (PDOException $e) { + throw new Wootook_Core_Exception_DataAccessException('Session error.', null, $e); + } + + $this->setData(self::SESSION_KEY, $cookieData['id']); + } else { + throw new Wootook_Player_Exception_Session('Your session has expired, please login.'); + } + } else { + throw new Wootook_Player_Exception_Session('Your session has expired, please login.'); + } + } catch (Wootook_Player_Exception_Session $e) { + $this->addError($e->getMessage()); + return $this->_player; + } + + try { + $this->_player->load($id); + } catch (Wootook_Core_Exception_DataAccessException $e) { + $this->addError('Session error.'); + return $this->_player; + } + $this->_player->updateActivity(); + } + return $this->_player; + } + + public function isLoggedIn() + { + if ($this->getPlayerId()) { + return true; + } + return false; + } + + public function logout() + { + $this->clearData(); + + return $this; + } + + public function login($username, $password, $remember = false) + { + try { + if ($this->getPlayer()->getId()) { + return $this->_player; + } + $adapter = $this->_player->getReadConnection(); + $select = $adapter->select(array('user' => 'users')); + + $passwordHash = md5($password); + $select + ->column('user.id') + ->column('user.username') + ->column('user.password') + ->column('user.banaday') + ->column('CONCAT((@salt:=MID(MD5(RAND()), 0, 4)), SHA1(CONCAT(user.username, user.password, @salt))) AS login_rememberme') + ->column('(CASE WHEN user.password="' . $passwordHash . '" THEN 1 ELSE 0 END) AS login_success') + ->where('user.username=:username'); + + $statement = $adapter->prepare($select); + if (!$statement->execute(array('username' => $username))) { + $this->addError(Wootook::__('No such user.')); + return $this->_player; + } + } catch (PDOException $e) { + Wootook_Core_ErrorProfiler::getSingleton()->exceptionManager($e); + $this->addError(Wootook::__('No such user.')); + return $this->_player; + } catch (Wootook_Core_Exception_DataAccessException $e) { + Wootook_Core_ErrorProfiler::getSingleton()->exceptionManager($e); + $this->addError(Wootook::__('No such user.')); + return $this->_player; + } + + $login = $statement->fetch(); + + if (intval($login['login_success']) == 1) { + $this->_player->load($login['id']); + + if ($login['banaday'] != 0) { + if ($login['banaday'] <= time()) { + $this->_player->setData('banaday', 0) + ->setData('bana', 0) + ->setData('urlaubs_modus', 0) + ->setData('urlaubs_until', null) + ->save() + ; + } else { + $this->addError(Wootook::__('You were banned, please contact admin for more information.')); + return $this->_player; + } + } + + if (isset($_POST["rememberme"]) && Wootook::getResponse() !== null) { + Wootook::getResponse()->setCookie( + $this->_player->getCookieName(), + array('id' => $this->_player->getId(), 'key' => $login['login_rememberme']), + $this->_player->getCookieLifetime(), + $this->_player->getCookiePath(), + $this->_player->getCookieDomain() + ); + } + + $this->setLoggedIn($this->_player); + return $this->_player; + } + + $this->addError(Wootook::__('Your username or credential is invalid, please check your input.')); + return $this->_player; + } + + public function setLoggedIn(Wootook_Player_Model_Entity $player) + { + $player->updateActivity(); + + $this->setData('player_id', intval($player->getId())); + + return $this; + } +} \ No newline at end of file diff --git a/src/application/code/core/Wootook/Player/Resource/Entity/Collection.php b/src/application/code/core/Wootook/Player/Resource/Entity/Collection.php new file mode 100644 index 0000000..56fbd0f --- /dev/null +++ b/src/application/code/core/Wootook/Player/Resource/Entity/Collection.php @@ -0,0 +1,30 @@ +_init(array('user' => 'users'), 'Wootook_Player_Model_Entity'); + } + + public function addAuthlevelToFilter(Array $levels, $exclude = false) + { + if ($exclude === true) { + $this->addFieldToFilter('authlevel', array(array('nin' => $levels))); + } else { + $this->addFieldToFilter('authlevel', array(array('in' => $levels))); + } + + return $this; + } + + public function addIsOnlineToFilter($onlineTime = 900) + { + if ($onlineTime > 0) { + $this->getSelect()->where("user.onlinetime>(UNIX_TIMESTAMP() - {$this->getReadConnection()->quote($onlineTime)}))"); + } + + return $this; + } +} \ No newline at end of file diff --git a/src/application/code/core/Wootook/Player/Resource/Message/Collection.php b/src/application/code/core/Wootook/Player/Resource/Message/Collection.php new file mode 100644 index 0000000..287b2e5 --- /dev/null +++ b/src/application/code/core/Wootook/Player/Resource/Message/Collection.php @@ -0,0 +1,24 @@ +_init(array('message' => 'messages'), 'Wootook_Player_Model_Message'); + } + + public function addPlayerToFilter(Wootook_Player_Model_Entity $player) + { + $this->addFieldToFilter('message_owner', $player->getId()); + + return $this; + } + + public function addUnreadToFilter() + { + $this->addFieldToFilter('message_read_at', array(array('lteq' => 0))); + + return $this; + } +} \ No newline at end of file diff --git a/src/application/code/core/Wootook/Player/controllers/AccountController.php b/src/application/code/core/Wootook/Player/controllers/AccountController.php new file mode 100644 index 0000000..1c98c95 --- /dev/null +++ b/src/application/code/core/Wootook/Player/controllers/AccountController.php @@ -0,0 +1,114 @@ + + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + * --> NOTICE <-- + * This file is part of the core development branch, changing its contents will + * make you unable to use the automatic updates manager. Please refer to the + * documentation for further information about customizing Wootook. + * + */ + +/** + * + * Enter description here ... + * @author Greg + * + */ +class Wootook_Player_AccountController + extends Wootook_Core_Controller_Action +{ + public function loginAction() + { + $session = new Wootook_Player_Model_Session(); + if ($session->isLoggedIn()) { + $this->_redirect('player/overview'); + return; + } + + $this->loadLayout('player.login'); + $this->renderLayout(); + } + + public function loginPostAction() + { + $request = $this->getRequest(); + + if (!$request->isPost()) { + $this->_redirect('player/account/login'); + return; + } + + if ($request->getPost('username') === null || $request->getPost('password') === null) { + $this->_redirect('player/account/login'); + return; + } + + $session = new Wootook_Player_Model_Session(); + if ($session->isLoggedIn()) { + $this->_redirect('player/overview'); + return; + } + + $session->login($request->getPost('username'), $request->getPost('password'), (bool) $request->getPost('rememberme')); + + if ($session->isLoggedIn()) { + $this->_redirect('player/overview'); + } else { + $this->_redirect('player/account/login'); + } + } + + public function logoutAction() + { + $session = Wootook_Player_Model_Session::getSingleton(); + if ($session->isLoggedIn()) { + $session->logout(); + } + + $this->_redirect(''); + } + + public function newAction() + { + $session = new Wootook_Player_Model_Session(); + if ($session->isLoggedIn()) { + $this->_redirect('player/overview'); + return; + } + + $this->loadLayout('player.registration'); + $this->renderLayout(); + } + + public function logoutSuccessAction() + { + } + + public function editAction() + { + } + + public function optionsAction() + { + } +} \ No newline at end of file diff --git a/src/application/code/core/Wootook/Player/controllers/OverviewController.php b/src/application/code/core/Wootook/Player/controllers/OverviewController.php new file mode 100644 index 0000000..fa8812e --- /dev/null +++ b/src/application/code/core/Wootook/Player/controllers/OverviewController.php @@ -0,0 +1,15 @@ +loadLayout('player.overview'); + $this->renderLayout(); + /* + $this->getResponse() + ->setRedirect(Wootook::getStaticUrl('overview.php'), Wootook_Core_Controller_Response_Http::REDIRECT_TEMPORARY); + */ + } +} \ No newline at end of file diff --git a/application/code/libraries/Math.php b/src/application/code/libraries/Math.php similarity index 99% rename from application/code/libraries/Math.php rename to src/application/code/libraries/Math.php index 7ea2d08..f429008 100644 --- a/application/code/libraries/Math.php +++ b/src/application/code/libraries/Math.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/agpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2011-Present, Grégory PLANCHAT * All rights reserved. diff --git a/application/code/libraries/Math/Bcmath.php b/src/application/code/libraries/Math/Bcmath.php similarity index 99% rename from application/code/libraries/Math/Bcmath.php rename to src/application/code/libraries/Math/Bcmath.php index bbf9b45..e5368c6 100644 --- a/application/code/libraries/Math/Bcmath.php +++ b/src/application/code/libraries/Math/Bcmath.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/agpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2011-Present, Grégory PLANCHAT * All rights reserved. diff --git a/application/code/libraries/Math/Native.php b/src/application/code/libraries/Math/Native.php similarity index 98% rename from application/code/libraries/Math/Native.php rename to src/application/code/libraries/Math/Native.php index 300d8e7..0958113 100644 --- a/application/code/libraries/Math/Native.php +++ b/src/application/code/libraries/Math/Native.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/agpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2011-Present, Grégory PLANCHAT * All rights reserved. diff --git a/application/code/local/.placeholder b/src/application/code/local/.placeholder similarity index 100% rename from application/code/local/.placeholder rename to src/application/code/local/.placeholder diff --git a/application/config/local.php.sample b/src/application/configs/local.php.sample similarity index 100% rename from application/config/local.php.sample rename to src/application/configs/local.php.sample diff --git a/application/config/system.php b/src/application/configs/system.php similarity index 95% rename from application/config/system.php rename to src/application/configs/system.php index f223774..7caeaa5 100644 --- a/application/config/system.php +++ b/src/application/configs/system.php @@ -49,8 +49,8 @@ 'frontend' => array( 'layout' => array( 'page' => 'page.xml', - 'user' => 'user.xml', - 'empire' => 'empire.php' + 'player' => 'player.xml', + 'empire' => 'empire.xml' ), ), 'backend' => array( diff --git a/application/design/backend/base/default/layouts/admin.php b/src/application/design/backend/base/default/layouts/admin.php similarity index 100% rename from application/design/backend/base/default/layouts/admin.php rename to src/application/design/backend/base/default/layouts/admin.php diff --git a/application/design/backend/base/default/layouts/page.xml b/src/application/design/backend/base/default/layouts/page.xml similarity index 77% rename from application/design/backend/base/default/layouts/page.xml rename to src/application/design/backend/base/default/layouts/page.xml index 607a517..f0dddee 100644 --- a/application/design/backend/base/default/layouts/page.xml +++ b/src/application/design/backend/base/default/layouts/page.xml @@ -8,9 +8,7 @@ - - page/2columns-left.phtml - + page/2columns-left.phtml @@ -20,9 +18,7 @@ - - page/2columns-right.phtml - + page/2columns-right.phtml @@ -32,9 +28,7 @@ - - page/3columns.phtml - + page/3columns.phtml @@ -44,14 +38,10 @@ - - css/base.css - + css/base.css - - scripts/jquery/jquery-1.6.4.js - + scripts/jquery/jquery-1.6.4.js @@ -77,4 +67,11 @@ + + + + + + + \ No newline at end of file diff --git a/application/design/backend/base/default/scripts/deprecated/admin/activeplanet_body.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/activeplanet_body.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/activeplanet_body.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/activeplanet_body.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/add_money.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/add_money.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/add_money.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/add_money.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/add_moon.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/add_moon.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/add_moon.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/add_moon.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_asw1.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_asw1.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/admin_panel_asw1.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_asw1.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_asw2.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_asw2.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/admin_panel_asw2.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_asw2.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_frm1.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_frm1.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/admin_panel_frm1.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_frm1.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_frm2.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_frm2.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/admin_panel_frm2.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_frm2.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_frm3.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_frm3.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/admin_panel_frm3.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_frm3.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_frm4.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_frm4.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/admin_panel_frm4.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_frm4.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_main.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_main.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/admin_panel_main.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/admin_panel_main.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/banadni.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/banadni.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/banadni.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/banadni.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/banned.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/banned.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/banned.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/banned.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/changepass.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/changepass.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/changepass.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/changepass.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/chat_body.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/chat_body.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/chat_body.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/chat_body.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/credit_body.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/credit_body.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/credit_body.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/credit_body.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/declarelist_body.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/declarelist_body.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/declarelist_body.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/declarelist_body.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/declarelist_rows.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/declarelist_rows.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/declarelist_rows.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/declarelist_rows.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/deletuser.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/deletuser.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/deletuser.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/deletuser.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/errors_body.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/errors_body.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/errors_body.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/errors_body.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/exec_query.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/exec_query.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/exec_query.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/exec_query.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/fleet_body.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/fleet_body.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/fleet_body.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/fleet_body.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/fleet_rows.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/fleet_rows.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/fleet_rows.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/fleet_rows.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/left_menu.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/left_menu.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/left_menu.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/left_menu.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/md5enc.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/md5enc.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/md5enc.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/md5enc.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/message_body.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/message_body.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/message_body.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/message_body.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/messagelist_body.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/messagelist_body.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/messagelist_body.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/messagelist_body.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/messagelist_table_rows.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/messagelist_table_rows.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/messagelist_table_rows.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/messagelist_table_rows.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/messall_body.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/messall_body.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/messall_body.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/messall_body.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/moonlist_body.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/moonlist_body.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/moonlist_body.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/moonlist_body.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/multi_body.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/multi_body.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/multi_body.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/multi_body.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/multi_rows.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/multi_rows.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/multi_rows.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/multi_rows.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/options_body.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/options_body.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/options_body.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/options_body.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/overview_body.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/overview_body.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/overview_body.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/overview_body.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/overview_rows.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/overview_rows.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/overview_rows.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/overview_rows.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/planetlist_body.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/planetlist_body.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/planetlist_body.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/planetlist_body.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/reset_body.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/reset_body.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/reset_body.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/reset_body.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/simple_header.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/simple_header.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/simple_header.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/simple_header.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/unbanned.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/unbanned.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/unbanned.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/unbanned.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/userlist_body.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/userlist_body.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/userlist_body.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/userlist_body.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/userlist_rows.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/userlist_rows.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/userlist_rows.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/userlist_rows.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/variables_body.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/variables_body.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/variables_body.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/variables_body.tpl diff --git a/application/design/backend/base/default/scripts/deprecated/admin/variables_rows.tpl b/src/application/design/backend/base/default/scripts/deprecated/admin/variables_rows.tpl similarity index 100% rename from application/design/backend/base/default/scripts/deprecated/admin/variables_rows.tpl rename to src/application/design/backend/base/default/scripts/deprecated/admin/variables_rows.tpl diff --git a/application/design/backend/base/default/scripts/grid/container.phtml b/src/application/design/backend/base/default/scripts/grid/container.phtml similarity index 100% rename from application/design/backend/base/default/scripts/grid/container.phtml rename to src/application/design/backend/base/default/scripts/grid/container.phtml diff --git a/application/design/backend/base/default/scripts/page/1column.phtml b/src/application/design/backend/base/default/scripts/page/1column.phtml similarity index 100% rename from application/design/backend/base/default/scripts/page/1column.phtml rename to src/application/design/backend/base/default/scripts/page/1column.phtml diff --git a/application/design/backend/base/default/scripts/page/2columns-left.phtml b/src/application/design/backend/base/default/scripts/page/2columns-left.phtml similarity index 100% rename from application/design/backend/base/default/scripts/page/2columns-left.phtml rename to src/application/design/backend/base/default/scripts/page/2columns-left.phtml diff --git a/application/design/backend/base/default/scripts/page/2columns-right.phtml b/src/application/design/backend/base/default/scripts/page/2columns-right.phtml similarity index 100% rename from application/design/backend/base/default/scripts/page/2columns-right.phtml rename to src/application/design/backend/base/default/scripts/page/2columns-right.phtml diff --git a/application/design/backend/base/default/scripts/page/3columns.phtml b/src/application/design/backend/base/default/scripts/page/3columns.phtml similarity index 100% rename from application/design/backend/base/default/scripts/page/3columns.phtml rename to src/application/design/backend/base/default/scripts/page/3columns.phtml diff --git a/application/design/backend/base/default/scripts/page/html/head.phtml b/src/application/design/backend/base/default/scripts/page/html/head.phtml similarity index 88% rename from application/design/backend/base/default/scripts/page/html/head.phtml rename to src/application/design/backend/base/default/scripts/page/html/head.phtml index 7301e63..b98b464 100644 --- a/application/design/backend/base/default/scripts/page/html/head.phtml +++ b/src/application/design/backend/base/default/scripts/page/html/head.phtml @@ -1,5 +1,5 @@ <?php echo $this->escape($this->getTitle())?> - + getCss() as $css):?> @@ -12,7 +12,7 @@ getJs() as $js):?> - + getSkinJs() as $js):?> diff --git a/application/design/backend/base/default/scripts/page/html/message.phtml b/src/application/design/backend/base/default/scripts/page/html/message.phtml similarity index 100% rename from application/design/backend/base/default/scripts/page/html/message.phtml rename to src/application/design/backend/base/default/scripts/page/html/message.phtml diff --git a/application/design/backend/base/default/scripts/page/html/navigation.phtml b/src/application/design/backend/base/default/scripts/page/html/navigation.phtml similarity index 100% rename from application/design/backend/base/default/scripts/page/html/navigation.phtml rename to src/application/design/backend/base/default/scripts/page/html/navigation.phtml diff --git a/application/design/backend/base/default/scripts/page/html/navigation/link.phtml b/src/application/design/backend/base/default/scripts/page/html/navigation/link.phtml similarity index 100% rename from application/design/backend/base/default/scripts/page/html/navigation/link.phtml rename to src/application/design/backend/base/default/scripts/page/html/navigation/link.phtml diff --git a/application/design/backend/base/default/scripts/page/html/navigation/node.phtml b/src/application/design/backend/base/default/scripts/page/html/navigation/node.phtml similarity index 100% rename from application/design/backend/base/default/scripts/page/html/navigation/node.phtml rename to src/application/design/backend/base/default/scripts/page/html/navigation/node.phtml diff --git a/src/application/design/frontend/base/default/layouts/empire.xml b/src/application/design/frontend/base/default/layouts/empire.xml new file mode 100644 index 0000000..8740373 --- /dev/null +++ b/src/application/design/frontend/base/default/layouts/empire.xml @@ -0,0 +1,310 @@ + + + + + + + + + planet + Planet + + + universe + Universe + + + account + My Account + + + tools + Tools + + + community + Community + + + planet/overview + Overview + Overview + overview.php + + + planet/buildings + Buildings + Buildings + buildings.php + + + planet/research-lab + Research Lab + Research Lab + buildings.php + research + + + planet/shipyard + Shipyard + Shipyard + buildings.php + fleet + + + planet/defenses + Defenses + Defenses + buildings.php + defense + + + universe/galaxy + Check out the Galaxy + Check out the Galaxy + galaxy.php + + + universe/fleet + Send a Fleet + Send a Fleet + fleet.php + + + universe/retailer + Retailer + Retailer + marchand.php + + + universe/records + All Records + All Records + records.php + + + universe/statistics + My Stats + My Stats + stat.php + + + universe/search-player + Search a Player + Search a Player + search.php + + + universe/empire + Empire + Empire + imperium.php + + + account/officers + Officers + Officers + officier.php + + + account/alliance + My Alliance + My Alliance + alliance.php + + + account/messages + My Messages + My Messages + messages.php + + + account/resources + My Resources Production + My Resources Production + resources.php + + + account/tech-tree + Technology Tree + Technology Tree + techtree.php + + + tools/notes + Note Pad + Note Pad + notes.php + + + tools/options + Account Options + Account Options + options.php + + + tools/logout + Log Out + Log Out + logout.php + + + community/board + Forum board + Forum board + http://wootook.org/board/ + + + community/chat + Chat + Chat + chat.php + + + community/announcement + Announcements + Announcements + annonce.php + + + community/multi + Declare Multi-account + Declare Multi-account + delclare_multi.php + + + community/rules + Rules + Rules + rules.php + + + community/contact + Contact Admin + Contact Admin + contact.php + + + community/banned + Banned Players + Banned Players + banned.php + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + empire/planet/buildings/queue/item.phtml + + + empire/planet.buildings.queue.item + + + + + + empire/planet/buildings/item.phtml + + + empire/planet.buildings.item + + + + + + + + + + + + + empire/planet/shipyard/item.phtml + + + legacies-empire/planet.shipyard.item + + + + + empire/planet/shipyard/queue/item.phtml + + + legacies-empire/planet.shipyard.queue.item + + + + + + + + + + + + + + + + + + + + + + empire/planet/research-lab/queue/item.phtml + + + legacies-empire/planet.research-lab.queue.item + + + + + + empire/planet/research-lab/item.phtml + + + legacies-empire/planet.research-lab.item + + + + + \ No newline at end of file diff --git a/application/design/frontend/base/default/layouts/page.xml b/src/application/design/frontend/base/default/layouts/page.xml similarity index 54% rename from application/design/frontend/base/default/layouts/page.xml rename to src/application/design/frontend/base/default/layouts/page.xml index ec1ea8e..d04f3b8 100644 --- a/application/design/frontend/base/default/layouts/page.xml +++ b/src/application/design/frontend/base/default/layouts/page.xml @@ -8,9 +8,7 @@ - - page/2columns-left.phtml - + page/2columns-left.phtml @@ -20,9 +18,7 @@ - - page/2columns-right.phtml - + page/2columns-right.phtml @@ -32,9 +28,7 @@ - - page/3columns.phtml - + page/3columns.phtml @@ -44,24 +38,19 @@ - - css/deprecated/default.css - + css/deprecated/default.css - - css/deprecated/formate.css - + css/deprecated/formate.css - - css/base.css - + css/base.css - - scripts/jquery/jquery-1.6.4.js - + scripts/jquery/jquery-1.6.4.js + + + Wootook! @@ -69,6 +58,19 @@ + + + + + + public + + + + + + + @@ -87,4 +89,36 @@ + + + + + + + + + + Not Found + + + + + + + + + home + + + + + + Home page + + + + + + + \ No newline at end of file diff --git a/src/application/design/frontend/base/default/layouts/player.xml b/src/application/design/frontend/base/default/layouts/player.xml new file mode 100644 index 0000000..19b1e65 --- /dev/null +++ b/src/application/design/frontend/base/default/layouts/player.xml @@ -0,0 +1,88 @@ + + + + + + + + login + + + public-form + + + + + + Log in + + + + + + + + + + + + + + registration + + + public-form + + + + + + Register + + + + + + + + + + + + + + lost-password + + + public-form + + + + + + Lost your password? + + + + + + + + + + + + + + + + + + + + + Overview + + + + \ No newline at end of file diff --git a/application/design/frontend/base/default/scripts/deprecated/add_declare.tpl b/src/application/design/frontend/base/default/scripts/deprecated/add_declare.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/add_declare.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/add_declare.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_admin.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_admin.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_admin.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_admin.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws.tpl similarity index 89% rename from application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws.tpl index 5a82f5a..b557fbf 100644 --- a/application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws.tpl +++ b/src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws.tpl @@ -8,7 +8,7 @@
-
+ @@ -23,7 +23,7 @@
getData('Range_make')?>
-
+ diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws_feet.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws_feet.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws_feet.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws_feet.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws_head.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws_head.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws_head.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws_head.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws_row.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws_row.tpl similarity index 84% rename from application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws_row.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws_row.tpl index 781b665..e1c8f57 100644 --- a/application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws_row.tpl +++ b/src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_laws_row.tpl @@ -1,7 +1,7 @@ "; + } + } + /** + * }}} + */ + + /* + * Update fleet list + */ + Wootook::dispatchEvent('fleet.update', array( + 'player' => $user + )); + + $fleetList = $layout->createBlock('core/concat', 'fleet.list'); + $fleetCollection = $user->getFleetCollection(); + foreach ($fleetCollection as $fleet) { + $id = uniqid(); + $block = $layout->createBlock('core/deprecated', "fleet.list.item.{$id}"); + $block->setTemplate('empire/overview/fleet/item.phtml'); + + $block['class'] = $fleet->getRowClass(); + $block['fleet'] = $fleet; + $block['user'] = $user; + + $fleetList->setPartial($id, $block); + } + + $messageCollection = $user->getNewMessagesCount() + + $newMessages = $layout->createBlock('core/deprecated', 'overview.messages'); + $newMessages->setTemplate('empire/overview/messages.phtml'); + $newMessages['count'] = (int) $count; + + /** + * Page display + * Refactoring needed + * {{{ + */ + // ----------------------------------------------------------------------------------------------- + $parse = $lang; + // ----------------------------------------------------------------------------------------------- + // News Frame ... + // External Chat Frame ... + // Banner ADS Google (meme si je suis contre cela) + if (Wootook::getGameConfig('game/news/active')) { + $parse['NewsFrame'] = ""; + } + if (Wootook::getGameConfig('engine/options/chat')) { + $parse['ExternalTchatFrame'] = ""; + } + if (Wootook::getGameConfig('engine/options/banner')) { + $bannerUrl = Wootook::getStaticUrl('scripts/createbanner.php', array('id' => $user['id'])); + + $parse['bannerframe'] = ""; + } + // --- Gestion de l'affichage d'une lune --------------------------------------------------------- + if ($moon['id']) { + if ($planet->isPlanet()) { + $lune = doquery ("SELECT * FROM {{table}} WHERE `galaxy` = '" . $planet['galaxy'] . "' AND `system` = '" . $planet['system'] . "' AND `planet` = '" . $planet['planet'] . "' AND `planet_type` = '3'", 'planets', true); + $parse['moon_img'] = "'; + $parse['moon'] = $planet->getMoon()->getName(); + } else { + $parse['moon_img'] = ""; + $parse['moon'] = ""; + } + } else { + $parse['moon_img'] = ""; + $parse['moon'] = ""; + } + // Moon END + $parse['planet_name'] = $planet['name']; + $parse['planet_diameter'] = Math::render($planet['diameter']); + $parse['planet_field_current'] = Math::render($planet->getUsedFields()); + $parse['planet_field_max'] = Math::render($planet->getBuildingFields()); + $parse['planet_temp_min'] = $planet['temp_min']; + $parse['planet_temp_max'] = $planet['temp_max']; + $parse['galaxy_galaxy'] = $planet['galaxy']; + $parse['galaxy_planet'] = $planet['planet']; + $parse['galaxy_system'] = $planet['system']; + $StatRecord = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '" . $user['id'] . "';", 'statpoints', true); + + $parse['user_points'] = Math::render($StatRecord['build_points']); + $parse['user_fleet'] = Math::render($StatRecord['fleet_points']); + $parse['player_points_tech'] = Math::render($StatRecord['tech_points']); + $parse['total_points'] = Math::render($StatRecord['total_points']);; + + $parse['user_rank'] = $StatRecord['total_rank']; + $ile = $StatRecord['total_old_rank'] - $StatRecord['total_rank']; + if ($ile >= 1) { + $parse['ile'] = "+" . $ile . ""; + } elseif ($ile < 0) { + $parse['ile'] = "-" . $ile . ""; + } elseif ($ile == 0) { + $parse['ile'] = "" . $ile . ""; + } + $parse['u_user_rank'] = $StatRecord['total_rank']; + $parse['user_username'] = $user['username']; + + //$parse['fleet_list'] = $fleetList->render(); + $parse['energy_used'] = $planet["energy_max"] - $planet["energy_used"]; + + //$parse['Have_new_message'] = $newMessages->render(); + $parse['time'] = "
"; + $parse['planet_image'] = $planet['image']; + //$parse['anothers_planets'] = $planetBlock->render(); + + $collection = new Wootook_Player_Resource_Entity_Collection($user->getReadConnection()); + $collection->addAuthlevelToFilter(array(LEVEL_ADMIN), true); + $parse['max_users'] = $collection->getSize(); + + $galaxyData = $planet->getGalaxyData(); + $parse['metal_debris'] = Math::render($galaxyData['metal']); + $parse['crystal_debris'] = Math::render($galaxyData['crystal']); + if (($galaxyData['metal'] != 0 || $galaxyData['crystal'] != 0) && Math::isPositive($planet->getElement(Legacies_Empire::ID_SHIP_RECYCLER))) { + $parse['get_link'] = " (" . $lang['type_mission'][Legacies_Empire::ID_MISSION_RECYCLE] . ")"; + } else { + $parse['get_link'] = ''; + } + + $latestPlayerStatement = $user->getReadConnection()->prepare("SELECT user.username AS `latest_player` FROM {$user->getReadConnection()->getTable('users')} AS user WHERE user.authlevel IN({$displayedPlayerLevels}) ORDER BY user.`register_time` DESC LIMIT 1"); + $latestPlayerStatement->execute(); + $latestPlayer = $latestPlayerStatement->fetch(Wootook_Core_Database::FETCH_COLUMN, 0); + + $collection = new Wootook_Player_Resource_Entity_Collection($user->getReadConnection()); + $collection->addAuthlevelToFilter(array(LEVEL_ADMIN), true); + $collection->addIsOnlineToFilter(); + $onlinePlayers = $collection->getSize(); + + $query = doquery('SELECT username FROM {{table}} ORDER BY register_time DESC', 'users', true); + $parse['last_user'] = $latestPlayer; + $query = doquery("SELECT COUNT(DISTINCT(id)) FROM {{table}} WHERE onlinetime>" . (time()-900), 'users', true); + $parse['online_users'] = $onlinePlayers; + $parse['users_amount'] = $userCount; + + // Rajout d'une barre pourcentage + // Calcul du pourcentage de remplissage + // Barre de remplissage + $size = floor($planet->getUsedFields() / $planet->getBuildingFields() * 100); + // Couleur de la barre de remplissage + $parse['case_pourcentage'] = $size . $lang['o/o']; + if ($size > 100) { + $size = 100; + $parse['case_barre_barcolor'] = '#C00000'; + } elseif ($size >= 80) { + $parse['case_barre_barcolor'] = '#C0C000'; + } else { + $parse['case_barre_barcolor'] = '#00C000'; + } + $parse['case_barre'] = $size; + + // Mode Améliorations + $parse['xpminier'] = $user['xpminier']; + $parse['xpraid'] = $user['xpraid']; + $parse['lvl_minier'] = $user['lvl_minier']; + $parse['lvl_raid'] = $user['lvl_raid']; + + $LvlMinier = $user['lvl_minier']; + $LvlRaid = $user['lvl_raid']; + + $parse['lvl_up_minier'] = $LvlMinier * 5000; + $parse['lvl_up_raid'] = $LvlRaid * 10; + // Nombre de raids, pertes, etc ... + $parse['Raids'] = $lang['Raids']; + $parse['NumberOfRaids'] = $lang['NumberOfRaids']; + $parse['RaidsWin'] = $lang['RaidsWin']; + $parse['RaidsLoose'] = $lang['RaidsLoose']; + + $parse['raids'] = $user['raids']; + $parse['raidswin'] = $user['raidswin']; + $parse['raidsloose'] = $user['raidsloose']; + // Compteur de Membres en ligne + $OnlineUsers = doquery("SELECT COUNT(*) FROM {{table}} WHERE onlinetime>='" . (time()-15 * 60) . "'", 'users', 'true'); + $parse['NumberMembersOnline'] = $OnlineUsers[0]; + + $page = parsetemplate(gettemplate('overview_body'), $parse); + + display($page); + /** + * }}} + */ +} diff --git a/phalanx.php b/src/phalanx.php similarity index 99% rename from phalanx.php rename to src/phalanx.php index 81fad44..bf650d6 100644 --- a/phalanx.php +++ b/src/phalanx.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/quickfleet.php b/src/quickfleet.php similarity index 99% rename from quickfleet.php rename to src/quickfleet.php index f5d9655..5f89112 100644 --- a/quickfleet.php +++ b/src/quickfleet.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/rak.php b/src/rak.php similarity index 99% rename from rak.php rename to src/rak.php index ba1e8b3..3207051 100644 --- a/rak.php +++ b/src/rak.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/raketenangriff.php b/src/raketenangriff.php similarity index 99% rename from raketenangriff.php rename to src/raketenangriff.php index d2049f2..4c7961e 100644 --- a/raketenangriff.php +++ b/src/raketenangriff.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/records.php b/src/records.php similarity index 99% rename from records.php rename to src/records.php index 9920863..c7904fc 100644 --- a/records.php +++ b/src/records.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/reg.php b/src/reg.php similarity index 92% rename from reg.php rename to src/reg.php index 0e99a98..69cfd80 100644 --- a/reg.php +++ b/src/reg.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -36,7 +36,7 @@ require_once dirname(__FILE__) .'/application/bootstrap.php'; includeLang('reg'); if (!empty($_POST) && isset($_POST['username']) && isset($_POST['planet_name']) && isset($_POST['email']) && isset($_POST['email_confirm']) && isset($_POST['password']) && isset($_POST['password_confirm'])) { - $session = Wootook::getSession(Wootook_Empire_Model_User::SESSION_KEY); + $session = Wootook::getSession(Wootook_Player_Model_Entity::SESSION_KEY); if ($_POST['password'] !== $_POST['password_confirm']) { $session->addError('Password and password confirmation does not match.'); } @@ -46,7 +46,7 @@ if (!empty($_POST) && isset($_POST['username']) && isset($_POST['planet_name']) $user = null; if (true || count($session->getMessages(false)) === 0) { - $user = Wootook_Empire_Model_User::register($_POST['username'], $_POST['email'], $_POST['password']); + $user = Wootook_Player_Model_Entity::register($_POST['username'], $_POST['email'], $_POST['password']); if ($user !== null) { $user->getHomePlanet()->setName($_POST['planet_name'])->save(); @@ -75,7 +75,7 @@ function sendpassemail($emailaddress, $password) { global $lang; - $parse['gameurl'] = Wootook::getUrl('/'); + $parse['gameurl'] = Wootook::getStaticUrl('/'); $parse['password'] = $password; $email = parsetemplate($lang['mail_welcome'], $parse); $status = mymail($emailaddress, $lang['mail_title'], $email); diff --git a/resources.php b/src/resources.php similarity index 99% rename from resources.php rename to src/resources.php index 7a4cdee..0b768b5 100644 --- a/resources.php +++ b/src/resources.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -248,7 +248,7 @@ function BuildRessourcePage($CurrentUser, $CurrentPlanet ) { return $page; } -$user = Wootook_Empire_Model_User::getSingleton(); +$user = Wootook_Player_Model_Session::getSingleton()->getPlayer(); $planet = $user->getCurrentPlanet(); $Page = BuildRessourcePage($user, $planet); diff --git a/robots.txt b/src/robots.txt similarity index 100% rename from robots.txt rename to src/robots.txt diff --git a/rules.php b/src/rules.php similarity index 97% rename from rules.php rename to src/rules.php index bad0cc7..74e49d3 100644 --- a/rules.php +++ b/src/rules.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/rw.php b/src/rw.php similarity index 98% rename from rw.php rename to src/rw.php index d1972e3..3cb7bf3 100644 --- a/rw.php +++ b/src/rw.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/scripts/7_nieaktywni.user.js b/src/scripts/7_nieaktywni.user.js similarity index 100% rename from scripts/7_nieaktywni.user.js rename to src/scripts/7_nieaktywni.user.js diff --git a/scripts/chat.js b/src/scripts/chat.js similarity index 100% rename from scripts/chat.js rename to src/scripts/chat.js diff --git a/scripts/cnt.js b/src/scripts/cnt.js similarity index 100% rename from scripts/cnt.js rename to src/scripts/cnt.js diff --git a/scripts/cntchar.js b/src/scripts/cntchar.js similarity index 100% rename from scripts/cntchar.js rename to src/scripts/cntchar.js diff --git a/scripts/cntfe.js b/src/scripts/cntfe.js similarity index 100% rename from scripts/cntfe.js rename to src/scripts/cntfe.js diff --git a/scripts/cntfs.js b/src/scripts/cntfs.js similarity index 100% rename from scripts/cntfs.js rename to src/scripts/cntfs.js diff --git a/scripts/cntneu.js b/src/scripts/cntneu.js similarity index 100% rename from scripts/cntneu.js rename to src/scripts/cntneu.js diff --git a/scripts/cntneu2.js b/src/scripts/cntneu2.js similarity index 100% rename from scripts/cntneu2.js rename to src/scripts/cntneu2.js diff --git a/scripts/createbanner.php b/src/scripts/createbanner.php similarity index 98% rename from scripts/createbanner.php rename to src/scripts/createbanner.php index 207435e..fc9f525 100644 --- a/scripts/createbanner.php +++ b/src/scripts/createbanner.php @@ -3,7 +3,7 @@ * Wootook Legacies * * @license http://www.xnova-ng.org/license-legacies - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -61,7 +61,7 @@ $textColor = array( Wootook_Core_Model_Image_Png::COLOR_BLUE => 0xEF ); -$db = Wootook_Database::getSingleton(); +$db = Wootook_Core_Database::getSingleton(); $sql = << * All rights reserved. diff --git a/skin/backend/base/default/css/base.css b/src/skin/backend/base/default/css/base.css similarity index 100% rename from skin/backend/base/default/css/base.css rename to src/skin/backend/base/default/css/base.css diff --git a/skin/backend/base/default/css/deprecated/about.css b/src/skin/backend/base/default/css/deprecated/about.css similarity index 100% rename from skin/backend/base/default/css/deprecated/about.css rename to src/skin/backend/base/default/css/deprecated/about.css diff --git a/skin/backend/base/default/css/deprecated/default.css b/src/skin/backend/base/default/css/deprecated/default.css similarity index 100% rename from skin/backend/base/default/css/deprecated/default.css rename to src/skin/backend/base/default/css/deprecated/default.css diff --git a/skin/backend/base/default/css/deprecated/formate.css b/src/skin/backend/base/default/css/deprecated/formate.css similarity index 100% rename from skin/backend/base/default/css/deprecated/formate.css rename to src/skin/backend/base/default/css/deprecated/formate.css diff --git a/skin/backend/base/default/css/deprecated/styles.css b/src/skin/backend/base/default/css/deprecated/styles.css similarity index 100% rename from skin/backend/base/default/css/deprecated/styles.css rename to src/skin/backend/base/default/css/deprecated/styles.css diff --git a/skin/backend/base/default/css/legacies.css b/src/skin/backend/base/default/css/legacies.css similarity index 100% rename from skin/backend/base/default/css/legacies.css rename to src/skin/backend/base/default/css/legacies.css diff --git a/skin/backend/base/default/graphics/background.jpg b/src/skin/backend/base/default/graphics/background.jpg similarity index 100% rename from skin/backend/base/default/graphics/background.jpg rename to src/skin/backend/base/default/graphics/background.jpg diff --git a/skin/backend/base/default/graphics/favicon-128.png b/src/skin/backend/base/default/graphics/favicon-128.png similarity index 100% rename from skin/backend/base/default/graphics/favicon-128.png rename to src/skin/backend/base/default/graphics/favicon-128.png diff --git a/skin/backend/base/default/graphics/favicon-32.png b/src/skin/backend/base/default/graphics/favicon-32.png similarity index 100% rename from skin/backend/base/default/graphics/favicon-32.png rename to src/skin/backend/base/default/graphics/favicon-32.png diff --git a/skin/backend/base/default/graphics/gebaeude/1.gif b/src/skin/backend/base/default/graphics/gebaeude/1.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/1.gif rename to src/skin/backend/base/default/graphics/gebaeude/1.gif diff --git a/skin/backend/base/default/graphics/gebaeude/106.gif b/src/skin/backend/base/default/graphics/gebaeude/106.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/106.gif rename to src/skin/backend/base/default/graphics/gebaeude/106.gif diff --git a/skin/backend/base/default/graphics/gebaeude/108.gif b/src/skin/backend/base/default/graphics/gebaeude/108.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/108.gif rename to src/skin/backend/base/default/graphics/gebaeude/108.gif diff --git a/skin/backend/base/default/graphics/gebaeude/109.gif b/src/skin/backend/base/default/graphics/gebaeude/109.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/109.gif rename to src/skin/backend/base/default/graphics/gebaeude/109.gif diff --git a/skin/backend/base/default/graphics/gebaeude/110.gif b/src/skin/backend/base/default/graphics/gebaeude/110.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/110.gif rename to src/skin/backend/base/default/graphics/gebaeude/110.gif diff --git a/skin/backend/base/default/graphics/gebaeude/111.gif b/src/skin/backend/base/default/graphics/gebaeude/111.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/111.gif rename to src/skin/backend/base/default/graphics/gebaeude/111.gif diff --git a/skin/backend/base/default/graphics/gebaeude/113.gif b/src/skin/backend/base/default/graphics/gebaeude/113.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/113.gif rename to src/skin/backend/base/default/graphics/gebaeude/113.gif diff --git a/skin/backend/base/default/graphics/gebaeude/114.gif b/src/skin/backend/base/default/graphics/gebaeude/114.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/114.gif rename to src/skin/backend/base/default/graphics/gebaeude/114.gif diff --git a/skin/backend/base/default/graphics/gebaeude/115.gif b/src/skin/backend/base/default/graphics/gebaeude/115.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/115.gif rename to src/skin/backend/base/default/graphics/gebaeude/115.gif diff --git a/skin/backend/base/default/graphics/gebaeude/117.gif b/src/skin/backend/base/default/graphics/gebaeude/117.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/117.gif rename to src/skin/backend/base/default/graphics/gebaeude/117.gif diff --git a/skin/backend/base/default/graphics/gebaeude/118.gif b/src/skin/backend/base/default/graphics/gebaeude/118.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/118.gif rename to src/skin/backend/base/default/graphics/gebaeude/118.gif diff --git a/skin/backend/base/default/graphics/gebaeude/12.gif b/src/skin/backend/base/default/graphics/gebaeude/12.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/12.gif rename to src/skin/backend/base/default/graphics/gebaeude/12.gif diff --git a/skin/backend/base/default/graphics/gebaeude/120.gif b/src/skin/backend/base/default/graphics/gebaeude/120.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/120.gif rename to src/skin/backend/base/default/graphics/gebaeude/120.gif diff --git a/skin/backend/base/default/graphics/gebaeude/121.gif b/src/skin/backend/base/default/graphics/gebaeude/121.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/121.gif rename to src/skin/backend/base/default/graphics/gebaeude/121.gif diff --git a/skin/backend/base/default/graphics/gebaeude/122.gif b/src/skin/backend/base/default/graphics/gebaeude/122.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/122.gif rename to src/skin/backend/base/default/graphics/gebaeude/122.gif diff --git a/skin/backend/base/default/graphics/gebaeude/123.gif b/src/skin/backend/base/default/graphics/gebaeude/123.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/123.gif rename to src/skin/backend/base/default/graphics/gebaeude/123.gif diff --git a/skin/backend/base/default/graphics/gebaeude/124.gif b/src/skin/backend/base/default/graphics/gebaeude/124.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/124.gif rename to src/skin/backend/base/default/graphics/gebaeude/124.gif diff --git a/skin/backend/base/default/graphics/gebaeude/14.gif b/src/skin/backend/base/default/graphics/gebaeude/14.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/14.gif rename to src/skin/backend/base/default/graphics/gebaeude/14.gif diff --git a/skin/backend/base/default/graphics/gebaeude/15.gif b/src/skin/backend/base/default/graphics/gebaeude/15.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/15.gif rename to src/skin/backend/base/default/graphics/gebaeude/15.gif diff --git a/skin/backend/base/default/graphics/gebaeude/199.gif b/src/skin/backend/base/default/graphics/gebaeude/199.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/199.gif rename to src/skin/backend/base/default/graphics/gebaeude/199.gif diff --git a/skin/backend/base/default/graphics/gebaeude/2.gif b/src/skin/backend/base/default/graphics/gebaeude/2.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/2.gif rename to src/skin/backend/base/default/graphics/gebaeude/2.gif diff --git a/skin/backend/base/default/graphics/gebaeude/202.gif b/src/skin/backend/base/default/graphics/gebaeude/202.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/202.gif rename to src/skin/backend/base/default/graphics/gebaeude/202.gif diff --git a/skin/backend/base/default/graphics/gebaeude/203.gif b/src/skin/backend/base/default/graphics/gebaeude/203.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/203.gif rename to src/skin/backend/base/default/graphics/gebaeude/203.gif diff --git a/skin/backend/base/default/graphics/gebaeude/204.gif b/src/skin/backend/base/default/graphics/gebaeude/204.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/204.gif rename to src/skin/backend/base/default/graphics/gebaeude/204.gif diff --git a/skin/backend/base/default/graphics/gebaeude/205.gif b/src/skin/backend/base/default/graphics/gebaeude/205.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/205.gif rename to src/skin/backend/base/default/graphics/gebaeude/205.gif diff --git a/skin/backend/base/default/graphics/gebaeude/206.gif b/src/skin/backend/base/default/graphics/gebaeude/206.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/206.gif rename to src/skin/backend/base/default/graphics/gebaeude/206.gif diff --git a/skin/backend/base/default/graphics/gebaeude/206.jpg b/src/skin/backend/base/default/graphics/gebaeude/206.jpg similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/206.jpg rename to src/skin/backend/base/default/graphics/gebaeude/206.jpg diff --git a/skin/backend/base/default/graphics/gebaeude/207.gif b/src/skin/backend/base/default/graphics/gebaeude/207.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/207.gif rename to src/skin/backend/base/default/graphics/gebaeude/207.gif diff --git a/skin/backend/base/default/graphics/gebaeude/208.gif b/src/skin/backend/base/default/graphics/gebaeude/208.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/208.gif rename to src/skin/backend/base/default/graphics/gebaeude/208.gif diff --git a/skin/backend/base/default/graphics/gebaeude/209.gif b/src/skin/backend/base/default/graphics/gebaeude/209.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/209.gif rename to src/skin/backend/base/default/graphics/gebaeude/209.gif diff --git a/skin/backend/base/default/graphics/gebaeude/21.gif b/src/skin/backend/base/default/graphics/gebaeude/21.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/21.gif rename to src/skin/backend/base/default/graphics/gebaeude/21.gif diff --git a/skin/backend/base/default/graphics/gebaeude/210.gif b/src/skin/backend/base/default/graphics/gebaeude/210.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/210.gif rename to src/skin/backend/base/default/graphics/gebaeude/210.gif diff --git a/skin/backend/base/default/graphics/gebaeude/211.gif b/src/skin/backend/base/default/graphics/gebaeude/211.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/211.gif rename to src/skin/backend/base/default/graphics/gebaeude/211.gif diff --git a/skin/backend/base/default/graphics/gebaeude/212.gif b/src/skin/backend/base/default/graphics/gebaeude/212.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/212.gif rename to src/skin/backend/base/default/graphics/gebaeude/212.gif diff --git a/skin/backend/base/default/graphics/gebaeude/213.gif b/src/skin/backend/base/default/graphics/gebaeude/213.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/213.gif rename to src/skin/backend/base/default/graphics/gebaeude/213.gif diff --git a/skin/backend/base/default/graphics/gebaeude/214.gif b/src/skin/backend/base/default/graphics/gebaeude/214.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/214.gif rename to src/skin/backend/base/default/graphics/gebaeude/214.gif diff --git a/skin/backend/base/default/graphics/gebaeude/215.gif b/src/skin/backend/base/default/graphics/gebaeude/215.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/215.gif rename to src/skin/backend/base/default/graphics/gebaeude/215.gif diff --git a/skin/backend/base/default/graphics/gebaeude/216.gif b/src/skin/backend/base/default/graphics/gebaeude/216.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/216.gif rename to src/skin/backend/base/default/graphics/gebaeude/216.gif diff --git a/skin/backend/base/default/graphics/gebaeude/21_a.gif b/src/skin/backend/base/default/graphics/gebaeude/21_a.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/21_a.gif rename to src/skin/backend/base/default/graphics/gebaeude/21_a.gif diff --git a/skin/backend/base/default/graphics/gebaeude/22.gif b/src/skin/backend/base/default/graphics/gebaeude/22.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/22.gif rename to src/skin/backend/base/default/graphics/gebaeude/22.gif diff --git a/skin/backend/base/default/graphics/gebaeude/23.gif b/src/skin/backend/base/default/graphics/gebaeude/23.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/23.gif rename to src/skin/backend/base/default/graphics/gebaeude/23.gif diff --git a/skin/backend/base/default/graphics/gebaeude/24.gif b/src/skin/backend/base/default/graphics/gebaeude/24.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/24.gif rename to src/skin/backend/base/default/graphics/gebaeude/24.gif diff --git a/skin/backend/base/default/graphics/gebaeude/3.gif b/src/skin/backend/base/default/graphics/gebaeude/3.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/3.gif rename to src/skin/backend/base/default/graphics/gebaeude/3.gif diff --git a/skin/backend/base/default/graphics/gebaeude/31.gif b/src/skin/backend/base/default/graphics/gebaeude/31.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/31.gif rename to src/skin/backend/base/default/graphics/gebaeude/31.gif diff --git a/skin/backend/base/default/graphics/gebaeude/33.gif b/src/skin/backend/base/default/graphics/gebaeude/33.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/33.gif rename to src/skin/backend/base/default/graphics/gebaeude/33.gif diff --git a/skin/backend/base/default/graphics/gebaeude/34.gif b/src/skin/backend/base/default/graphics/gebaeude/34.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/34.gif rename to src/skin/backend/base/default/graphics/gebaeude/34.gif diff --git a/skin/backend/base/default/graphics/gebaeude/4.gif b/src/skin/backend/base/default/graphics/gebaeude/4.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/4.gif rename to src/skin/backend/base/default/graphics/gebaeude/4.gif diff --git a/skin/backend/base/default/graphics/gebaeude/401.gif b/src/skin/backend/base/default/graphics/gebaeude/401.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/401.gif rename to src/skin/backend/base/default/graphics/gebaeude/401.gif diff --git a/skin/backend/base/default/graphics/gebaeude/402.gif b/src/skin/backend/base/default/graphics/gebaeude/402.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/402.gif rename to src/skin/backend/base/default/graphics/gebaeude/402.gif diff --git a/skin/backend/base/default/graphics/gebaeude/403.gif b/src/skin/backend/base/default/graphics/gebaeude/403.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/403.gif rename to src/skin/backend/base/default/graphics/gebaeude/403.gif diff --git a/skin/backend/base/default/graphics/gebaeude/404.gif b/src/skin/backend/base/default/graphics/gebaeude/404.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/404.gif rename to src/skin/backend/base/default/graphics/gebaeude/404.gif diff --git a/skin/backend/base/default/graphics/gebaeude/405.gif b/src/skin/backend/base/default/graphics/gebaeude/405.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/405.gif rename to src/skin/backend/base/default/graphics/gebaeude/405.gif diff --git a/skin/backend/base/default/graphics/gebaeude/406.gif b/src/skin/backend/base/default/graphics/gebaeude/406.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/406.gif rename to src/skin/backend/base/default/graphics/gebaeude/406.gif diff --git a/skin/backend/base/default/graphics/gebaeude/407.gif b/src/skin/backend/base/default/graphics/gebaeude/407.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/407.gif rename to src/skin/backend/base/default/graphics/gebaeude/407.gif diff --git a/skin/backend/base/default/graphics/gebaeude/408.gif b/src/skin/backend/base/default/graphics/gebaeude/408.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/408.gif rename to src/skin/backend/base/default/graphics/gebaeude/408.gif diff --git a/skin/backend/base/default/graphics/gebaeude/41.gif b/src/skin/backend/base/default/graphics/gebaeude/41.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/41.gif rename to src/skin/backend/base/default/graphics/gebaeude/41.gif diff --git a/skin/backend/base/default/graphics/gebaeude/42.gif b/src/skin/backend/base/default/graphics/gebaeude/42.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/42.gif rename to src/skin/backend/base/default/graphics/gebaeude/42.gif diff --git a/skin/backend/base/default/graphics/gebaeude/43.gif b/src/skin/backend/base/default/graphics/gebaeude/43.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/43.gif rename to src/skin/backend/base/default/graphics/gebaeude/43.gif diff --git a/skin/backend/base/default/graphics/gebaeude/44.gif b/src/skin/backend/base/default/graphics/gebaeude/44.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/44.gif rename to src/skin/backend/base/default/graphics/gebaeude/44.gif diff --git a/skin/backend/base/default/graphics/gebaeude/501.gif b/src/skin/backend/base/default/graphics/gebaeude/501.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/501.gif rename to src/skin/backend/base/default/graphics/gebaeude/501.gif diff --git a/skin/backend/base/default/graphics/gebaeude/502.gif b/src/skin/backend/base/default/graphics/gebaeude/502.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/502.gif rename to src/skin/backend/base/default/graphics/gebaeude/502.gif diff --git a/skin/backend/base/default/graphics/gebaeude/503.gif b/src/skin/backend/base/default/graphics/gebaeude/503.gif similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/503.gif rename to src/skin/backend/base/default/graphics/gebaeude/503.gif diff --git a/skin/backend/base/default/graphics/gebaeude/ionen.gif.1 b/src/skin/backend/base/default/graphics/gebaeude/ionen.gif.1 similarity index 100% rename from skin/backend/base/default/graphics/gebaeude/ionen.gif.1 rename to src/skin/backend/base/default/graphics/gebaeude/ionen.gif.1 diff --git a/skin/backend/base/default/graphics/gfx/info-help.jpg b/src/skin/backend/base/default/graphics/gfx/info-help.jpg similarity index 100% rename from skin/backend/base/default/graphics/gfx/info-help.jpg rename to src/skin/backend/base/default/graphics/gfx/info-help.jpg diff --git a/skin/backend/base/default/graphics/gfx/user-menu.jpg b/src/skin/backend/base/default/graphics/gfx/user-menu.jpg similarity index 100% rename from skin/backend/base/default/graphics/gfx/user-menu.jpg rename to src/skin/backend/base/default/graphics/gfx/user-menu.jpg diff --git a/skin/backend/base/default/graphics/images/abort.gif b/src/skin/backend/base/default/graphics/images/abort.gif similarity index 100% rename from skin/backend/base/default/graphics/images/abort.gif rename to src/skin/backend/base/default/graphics/images/abort.gif diff --git a/skin/backend/base/default/graphics/images/bann.png b/src/skin/backend/base/default/graphics/images/bann.png similarity index 100% rename from skin/backend/base/default/graphics/images/bann.png rename to src/skin/backend/base/default/graphics/images/bann.png diff --git a/skin/backend/base/default/graphics/images/banned.png b/src/skin/backend/base/default/graphics/images/banned.png similarity index 100% rename from skin/backend/base/default/graphics/images/banned.png rename to src/skin/backend/base/default/graphics/images/banned.png diff --git a/skin/backend/base/default/graphics/images/deuterium.gif b/src/skin/backend/base/default/graphics/images/deuterium.gif similarity index 100% rename from skin/backend/base/default/graphics/images/deuterium.gif rename to src/skin/backend/base/default/graphics/images/deuterium.gif diff --git a/skin/backend/base/default/graphics/images/energie.gif b/src/skin/backend/base/default/graphics/images/energie.gif similarity index 100% rename from skin/backend/base/default/graphics/images/energie.gif rename to src/skin/backend/base/default/graphics/images/energie.gif diff --git a/skin/backend/base/default/graphics/images/false.png b/src/skin/backend/base/default/graphics/images/false.png similarity index 100% rename from skin/backend/base/default/graphics/images/false.png rename to src/skin/backend/base/default/graphics/images/false.png diff --git a/skin/backend/base/default/graphics/images/female.gif b/src/skin/backend/base/default/graphics/images/female.gif similarity index 100% rename from skin/backend/base/default/graphics/images/female.gif rename to src/skin/backend/base/default/graphics/images/female.gif diff --git a/skin/backend/base/default/graphics/images/icon_latest_reply.gif b/src/skin/backend/base/default/graphics/images/icon_latest_reply.gif similarity index 100% rename from skin/backend/base/default/graphics/images/icon_latest_reply.gif rename to src/skin/backend/base/default/graphics/images/icon_latest_reply.gif diff --git a/skin/backend/base/default/graphics/images/kristall.gif b/src/skin/backend/base/default/graphics/images/kristall.gif similarity index 100% rename from skin/backend/base/default/graphics/images/kristall.gif rename to src/skin/backend/base/default/graphics/images/kristall.gif diff --git a/skin/backend/base/default/graphics/images/loadingAnimation.gif b/src/skin/backend/base/default/graphics/images/loadingAnimation.gif similarity index 100% rename from skin/backend/base/default/graphics/images/loadingAnimation.gif rename to src/skin/backend/base/default/graphics/images/loadingAnimation.gif diff --git a/skin/backend/base/default/graphics/images/male.gif b/src/skin/backend/base/default/graphics/images/male.gif similarity index 100% rename from skin/backend/base/default/graphics/images/male.gif rename to src/skin/backend/base/default/graphics/images/male.gif diff --git a/skin/backend/base/default/graphics/images/message.gif b/src/skin/backend/base/default/graphics/images/message.gif similarity index 100% rename from skin/backend/base/default/graphics/images/message.gif rename to src/skin/backend/base/default/graphics/images/message.gif diff --git a/skin/backend/base/default/graphics/images/metall.gif b/src/skin/backend/base/default/graphics/images/metall.gif similarity index 100% rename from skin/backend/base/default/graphics/images/metall.gif rename to src/skin/backend/base/default/graphics/images/metall.gif diff --git a/skin/backend/base/default/graphics/images/officiers/601.jpg b/src/skin/backend/base/default/graphics/images/officiers/601.jpg similarity index 100% rename from skin/backend/base/default/graphics/images/officiers/601.jpg rename to src/skin/backend/base/default/graphics/images/officiers/601.jpg diff --git a/skin/backend/base/default/graphics/images/officiers/602.jpg b/src/skin/backend/base/default/graphics/images/officiers/602.jpg similarity index 100% rename from skin/backend/base/default/graphics/images/officiers/602.jpg rename to src/skin/backend/base/default/graphics/images/officiers/602.jpg diff --git a/skin/backend/base/default/graphics/images/officiers/603.jpg b/src/skin/backend/base/default/graphics/images/officiers/603.jpg similarity index 100% rename from skin/backend/base/default/graphics/images/officiers/603.jpg rename to src/skin/backend/base/default/graphics/images/officiers/603.jpg diff --git a/skin/backend/base/default/graphics/images/officiers/604.jpg b/src/skin/backend/base/default/graphics/images/officiers/604.jpg similarity index 100% rename from skin/backend/base/default/graphics/images/officiers/604.jpg rename to src/skin/backend/base/default/graphics/images/officiers/604.jpg diff --git a/skin/backend/base/default/graphics/images/officiers/605.jpg b/src/skin/backend/base/default/graphics/images/officiers/605.jpg similarity index 100% rename from skin/backend/base/default/graphics/images/officiers/605.jpg rename to src/skin/backend/base/default/graphics/images/officiers/605.jpg diff --git a/skin/backend/base/default/graphics/images/officiers/606.jpg b/src/skin/backend/base/default/graphics/images/officiers/606.jpg similarity index 100% rename from skin/backend/base/default/graphics/images/officiers/606.jpg rename to src/skin/backend/base/default/graphics/images/officiers/606.jpg diff --git a/skin/backend/base/default/graphics/images/officiers/607.jpg b/src/skin/backend/base/default/graphics/images/officiers/607.jpg similarity index 100% rename from skin/backend/base/default/graphics/images/officiers/607.jpg rename to src/skin/backend/base/default/graphics/images/officiers/607.jpg diff --git a/skin/backend/base/default/graphics/images/officiers/608.jpg b/src/skin/backend/base/default/graphics/images/officiers/608.jpg similarity index 100% rename from skin/backend/base/default/graphics/images/officiers/608.jpg rename to src/skin/backend/base/default/graphics/images/officiers/608.jpg diff --git a/skin/backend/base/default/graphics/images/officiers/609.jpg b/src/skin/backend/base/default/graphics/images/officiers/609.jpg similarity index 100% rename from skin/backend/base/default/graphics/images/officiers/609.jpg rename to src/skin/backend/base/default/graphics/images/officiers/609.jpg diff --git a/skin/backend/base/default/graphics/images/officiers/610.jpg b/src/skin/backend/base/default/graphics/images/officiers/610.jpg similarity index 100% rename from skin/backend/base/default/graphics/images/officiers/610.jpg rename to src/skin/backend/base/default/graphics/images/officiers/610.jpg diff --git a/skin/backend/base/default/graphics/images/officiers/611.jpg b/src/skin/backend/base/default/graphics/images/officiers/611.jpg similarity index 100% rename from skin/backend/base/default/graphics/images/officiers/611.jpg rename to src/skin/backend/base/default/graphics/images/officiers/611.jpg diff --git a/skin/backend/base/default/graphics/images/officiers/612.jpg b/src/skin/backend/base/default/graphics/images/officiers/612.jpg similarity index 100% rename from skin/backend/base/default/graphics/images/officiers/612.jpg rename to src/skin/backend/base/default/graphics/images/officiers/612.jpg diff --git a/skin/backend/base/default/graphics/images/officiers/613.jpg b/src/skin/backend/base/default/graphics/images/officiers/613.jpg similarity index 100% rename from skin/backend/base/default/graphics/images/officiers/613.jpg rename to src/skin/backend/base/default/graphics/images/officiers/613.jpg diff --git a/skin/backend/base/default/graphics/images/officiers/614.jpg b/src/skin/backend/base/default/graphics/images/officiers/614.jpg similarity index 100% rename from skin/backend/base/default/graphics/images/officiers/614.jpg rename to src/skin/backend/base/default/graphics/images/officiers/614.jpg diff --git a/skin/backend/base/default/graphics/images/officiers/615.jpg b/src/skin/backend/base/default/graphics/images/officiers/615.jpg similarity index 100% rename from skin/backend/base/default/graphics/images/officiers/615.jpg rename to src/skin/backend/base/default/graphics/images/officiers/615.jpg diff --git a/skin/backend/base/default/graphics/images/progress.gif b/src/skin/backend/base/default/graphics/images/progress.gif similarity index 100% rename from skin/backend/base/default/graphics/images/progress.gif rename to src/skin/backend/base/default/graphics/images/progress.gif diff --git a/skin/backend/base/default/graphics/images/progressbar.gif b/src/skin/backend/base/default/graphics/images/progressbar.gif similarity index 100% rename from skin/backend/base/default/graphics/images/progressbar.gif rename to src/skin/backend/base/default/graphics/images/progressbar.gif diff --git a/skin/backend/base/default/graphics/images/r1.png b/src/skin/backend/base/default/graphics/images/r1.png similarity index 100% rename from skin/backend/base/default/graphics/images/r1.png rename to src/skin/backend/base/default/graphics/images/r1.png diff --git a/skin/backend/base/default/graphics/images/r2.png b/src/skin/backend/base/default/graphics/images/r2.png similarity index 100% rename from skin/backend/base/default/graphics/images/r2.png rename to src/skin/backend/base/default/graphics/images/r2.png diff --git a/skin/backend/base/default/graphics/images/r3.png b/src/skin/backend/base/default/graphics/images/r3.png similarity index 100% rename from skin/backend/base/default/graphics/images/r3.png rename to src/skin/backend/base/default/graphics/images/r3.png diff --git a/skin/backend/base/default/graphics/images/r4.png b/src/skin/backend/base/default/graphics/images/r4.png similarity index 100% rename from skin/backend/base/default/graphics/images/r4.png rename to src/skin/backend/base/default/graphics/images/r4.png diff --git a/skin/backend/base/default/graphics/images/r5.png b/src/skin/backend/base/default/graphics/images/r5.png similarity index 100% rename from skin/backend/base/default/graphics/images/r5.png rename to src/skin/backend/base/default/graphics/images/r5.png diff --git a/skin/backend/base/default/graphics/images/r6.png b/src/skin/backend/base/default/graphics/images/r6.png similarity index 100% rename from skin/backend/base/default/graphics/images/r6.png rename to src/skin/backend/base/default/graphics/images/r6.png diff --git a/skin/backend/base/default/graphics/images/r7.png b/src/skin/backend/base/default/graphics/images/r7.png similarity index 100% rename from skin/backend/base/default/graphics/images/r7.png rename to src/skin/backend/base/default/graphics/images/r7.png diff --git a/skin/backend/base/default/graphics/images/r8.png b/src/skin/backend/base/default/graphics/images/r8.png similarity index 100% rename from skin/backend/base/default/graphics/images/r8.png rename to src/skin/backend/base/default/graphics/images/r8.png diff --git a/skin/backend/base/default/graphics/images/r9.png b/src/skin/backend/base/default/graphics/images/r9.png similarity index 100% rename from skin/backend/base/default/graphics/images/r9.png rename to src/skin/backend/base/default/graphics/images/r9.png diff --git a/skin/backend/base/default/graphics/images/smileys/confused.png b/src/skin/backend/base/default/graphics/images/smileys/confused.png similarity index 100% rename from skin/backend/base/default/graphics/images/smileys/confused.png rename to src/skin/backend/base/default/graphics/images/smileys/confused.png diff --git a/skin/backend/base/default/graphics/images/smileys/cry.png b/src/skin/backend/base/default/graphics/images/smileys/cry.png similarity index 100% rename from skin/backend/base/default/graphics/images/smileys/cry.png rename to src/skin/backend/base/default/graphics/images/smileys/cry.png diff --git a/skin/backend/base/default/graphics/images/smileys/dizzy.png b/src/skin/backend/base/default/graphics/images/smileys/dizzy.png similarity index 100% rename from skin/backend/base/default/graphics/images/smileys/dizzy.png rename to src/skin/backend/base/default/graphics/images/smileys/dizzy.png diff --git a/skin/backend/base/default/graphics/images/smileys/happy.png b/src/skin/backend/base/default/graphics/images/smileys/happy.png similarity index 100% rename from skin/backend/base/default/graphics/images/smileys/happy.png rename to src/skin/backend/base/default/graphics/images/smileys/happy.png diff --git a/skin/backend/base/default/graphics/images/smileys/lol.png b/src/skin/backend/base/default/graphics/images/smileys/lol.png similarity index 100% rename from skin/backend/base/default/graphics/images/smileys/lol.png rename to src/skin/backend/base/default/graphics/images/smileys/lol.png diff --git a/skin/backend/base/default/graphics/images/smileys/neutral.png b/src/skin/backend/base/default/graphics/images/smileys/neutral.png similarity index 100% rename from skin/backend/base/default/graphics/images/smileys/neutral.png rename to src/skin/backend/base/default/graphics/images/smileys/neutral.png diff --git a/skin/backend/base/default/graphics/images/smileys/omg.png b/src/skin/backend/base/default/graphics/images/smileys/omg.png similarity index 100% rename from skin/backend/base/default/graphics/images/smileys/omg.png rename to src/skin/backend/base/default/graphics/images/smileys/omg.png diff --git a/skin/backend/base/default/graphics/images/smileys/sad.png b/src/skin/backend/base/default/graphics/images/smileys/sad.png similarity index 100% rename from skin/backend/base/default/graphics/images/smileys/sad.png rename to src/skin/backend/base/default/graphics/images/smileys/sad.png diff --git a/skin/backend/base/default/graphics/images/smileys/shit.png b/src/skin/backend/base/default/graphics/images/smileys/shit.png similarity index 100% rename from skin/backend/base/default/graphics/images/smileys/shit.png rename to src/skin/backend/base/default/graphics/images/smileys/shit.png diff --git a/skin/backend/base/default/graphics/images/smileys/smile.png b/src/skin/backend/base/default/graphics/images/smileys/smile.png similarity index 100% rename from skin/backend/base/default/graphics/images/smileys/smile.png rename to src/skin/backend/base/default/graphics/images/smileys/smile.png diff --git a/skin/backend/base/default/graphics/images/smileys/tongue.png b/src/skin/backend/base/default/graphics/images/smileys/tongue.png similarity index 100% rename from skin/backend/base/default/graphics/images/smileys/tongue.png rename to src/skin/backend/base/default/graphics/images/smileys/tongue.png diff --git a/skin/backend/base/default/graphics/images/smileys/wink.png b/src/skin/backend/base/default/graphics/images/smileys/wink.png similarity index 100% rename from skin/backend/base/default/graphics/images/smileys/wink.png rename to src/skin/backend/base/default/graphics/images/smileys/wink.png diff --git a/skin/backend/base/default/graphics/images/tlo.jpg b/src/skin/backend/base/default/graphics/images/tlo.jpg similarity index 100% rename from skin/backend/base/default/graphics/images/tlo.jpg rename to src/skin/backend/base/default/graphics/images/tlo.jpg diff --git a/skin/backend/base/default/graphics/images/true.png b/src/skin/backend/base/default/graphics/images/true.png similarity index 100% rename from skin/backend/base/default/graphics/images/true.png rename to src/skin/backend/base/default/graphics/images/true.png diff --git a/skin/backend/base/default/graphics/images/xnova.png b/src/skin/backend/base/default/graphics/images/xnova.png similarity index 100% rename from skin/backend/base/default/graphics/images/xnova.png rename to src/skin/backend/base/default/graphics/images/xnova.png diff --git a/skin/backend/base/default/graphics/img/b.gif b/src/skin/backend/base/default/graphics/img/b.gif similarity index 100% rename from skin/backend/base/default/graphics/img/b.gif rename to src/skin/backend/base/default/graphics/img/b.gif diff --git a/skin/backend/base/default/graphics/img/background1.jpg b/src/skin/backend/base/default/graphics/img/background1.jpg similarity index 100% rename from skin/backend/base/default/graphics/img/background1.jpg rename to src/skin/backend/base/default/graphics/img/background1.jpg diff --git a/skin/backend/base/default/graphics/img/background2.jpg b/src/skin/backend/base/default/graphics/img/background2.jpg similarity index 100% rename from skin/backend/base/default/graphics/img/background2.jpg rename to src/skin/backend/base/default/graphics/img/background2.jpg diff --git a/skin/backend/base/default/graphics/img/bg1.gif b/src/skin/backend/base/default/graphics/img/bg1.gif similarity index 100% rename from skin/backend/base/default/graphics/img/bg1.gif rename to src/skin/backend/base/default/graphics/img/bg1.gif diff --git a/skin/backend/base/default/graphics/img/e.gif b/src/skin/backend/base/default/graphics/img/e.gif similarity index 100% rename from skin/backend/base/default/graphics/img/e.gif rename to src/skin/backend/base/default/graphics/img/e.gif diff --git a/skin/backend/base/default/graphics/img/link.gif b/src/skin/backend/base/default/graphics/img/link.gif similarity index 100% rename from skin/backend/base/default/graphics/img/link.gif rename to src/skin/backend/base/default/graphics/img/link.gif diff --git a/skin/backend/base/default/graphics/img/m.gif b/src/skin/backend/base/default/graphics/img/m.gif similarity index 100% rename from skin/backend/base/default/graphics/img/m.gif rename to src/skin/backend/base/default/graphics/img/m.gif diff --git a/skin/backend/base/default/graphics/img/p.png b/src/skin/backend/base/default/graphics/img/p.png similarity index 100% rename from skin/backend/base/default/graphics/img/p.png rename to src/skin/backend/base/default/graphics/img/p.png diff --git a/skin/backend/base/default/graphics/img/p1z1.png b/src/skin/backend/base/default/graphics/img/p1z1.png similarity index 100% rename from skin/backend/base/default/graphics/img/p1z1.png rename to src/skin/backend/base/default/graphics/img/p1z1.png diff --git a/skin/backend/base/default/graphics/img/p2z2.png b/src/skin/backend/base/default/graphics/img/p2z2.png similarity index 100% rename from skin/backend/base/default/graphics/img/p2z2.png rename to src/skin/backend/base/default/graphics/img/p2z2.png diff --git a/skin/backend/base/default/graphics/img/p3z2.png b/src/skin/backend/base/default/graphics/img/p3z2.png similarity index 100% rename from skin/backend/base/default/graphics/img/p3z2.png rename to src/skin/backend/base/default/graphics/img/p3z2.png diff --git a/skin/backend/base/default/graphics/img/r.gif b/src/skin/backend/base/default/graphics/img/r.gif similarity index 100% rename from skin/backend/base/default/graphics/img/r.gif rename to src/skin/backend/base/default/graphics/img/r.gif diff --git a/skin/backend/base/default/graphics/img/s.gif b/src/skin/backend/base/default/graphics/img/s.gif similarity index 100% rename from skin/backend/base/default/graphics/img/s.gif rename to src/skin/backend/base/default/graphics/img/s.gif diff --git a/skin/backend/base/default/graphics/img/starz2.png b/src/skin/backend/base/default/graphics/img/starz2.png similarity index 100% rename from skin/backend/base/default/graphics/img/starz2.png rename to src/skin/backend/base/default/graphics/img/starz2.png diff --git a/skin/backend/base/default/graphics/pic/abort.gif b/src/skin/backend/base/default/graphics/pic/abort.gif similarity index 100% rename from skin/backend/base/default/graphics/pic/abort.gif rename to src/skin/backend/base/default/graphics/pic/abort.gif diff --git a/skin/backend/base/default/graphics/pic/appwiz.gif b/src/skin/backend/base/default/graphics/pic/appwiz.gif similarity index 100% rename from skin/backend/base/default/graphics/pic/appwiz.gif rename to src/skin/backend/base/default/graphics/pic/appwiz.gif diff --git a/skin/backend/base/default/graphics/pic/key.gif b/src/skin/backend/base/default/graphics/pic/key.gif similarity index 100% rename from skin/backend/base/default/graphics/pic/key.gif rename to src/skin/backend/base/default/graphics/pic/key.gif diff --git a/skin/backend/base/default/graphics/planeten/debris.jpg b/src/skin/backend/base/default/graphics/planeten/debris.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/debris.jpg rename to src/skin/backend/base/default/graphics/planeten/debris.jpg diff --git a/skin/backend/base/default/graphics/planeten/dschjungelplanet01.jpg b/src/skin/backend/base/default/graphics/planeten/dschjungelplanet01.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/dschjungelplanet01.jpg rename to src/skin/backend/base/default/graphics/planeten/dschjungelplanet01.jpg diff --git a/skin/backend/base/default/graphics/planeten/dschjungelplanet02.jpg b/src/skin/backend/base/default/graphics/planeten/dschjungelplanet02.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/dschjungelplanet02.jpg rename to src/skin/backend/base/default/graphics/planeten/dschjungelplanet02.jpg diff --git a/skin/backend/base/default/graphics/planeten/dschjungelplanet03.jpg b/src/skin/backend/base/default/graphics/planeten/dschjungelplanet03.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/dschjungelplanet03.jpg rename to src/skin/backend/base/default/graphics/planeten/dschjungelplanet03.jpg diff --git a/skin/backend/base/default/graphics/planeten/dschjungelplanet04.jpg b/src/skin/backend/base/default/graphics/planeten/dschjungelplanet04.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/dschjungelplanet04.jpg rename to src/skin/backend/base/default/graphics/planeten/dschjungelplanet04.jpg diff --git a/skin/backend/base/default/graphics/planeten/dschjungelplanet05.jpg b/src/skin/backend/base/default/graphics/planeten/dschjungelplanet05.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/dschjungelplanet05.jpg rename to src/skin/backend/base/default/graphics/planeten/dschjungelplanet05.jpg diff --git a/skin/backend/base/default/graphics/planeten/dschjungelplanet06.jpg b/src/skin/backend/base/default/graphics/planeten/dschjungelplanet06.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/dschjungelplanet06.jpg rename to src/skin/backend/base/default/graphics/planeten/dschjungelplanet06.jpg diff --git a/skin/backend/base/default/graphics/planeten/dschjungelplanet07.jpg b/src/skin/backend/base/default/graphics/planeten/dschjungelplanet07.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/dschjungelplanet07.jpg rename to src/skin/backend/base/default/graphics/planeten/dschjungelplanet07.jpg diff --git a/skin/backend/base/default/graphics/planeten/dschjungelplanet08.jpg b/src/skin/backend/base/default/graphics/planeten/dschjungelplanet08.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/dschjungelplanet08.jpg rename to src/skin/backend/base/default/graphics/planeten/dschjungelplanet08.jpg diff --git a/skin/backend/base/default/graphics/planeten/dschjungelplanet09.jpg b/src/skin/backend/base/default/graphics/planeten/dschjungelplanet09.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/dschjungelplanet09.jpg rename to src/skin/backend/base/default/graphics/planeten/dschjungelplanet09.jpg diff --git a/skin/backend/base/default/graphics/planeten/dschjungelplanet10.jpg b/src/skin/backend/base/default/graphics/planeten/dschjungelplanet10.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/dschjungelplanet10.jpg rename to src/skin/backend/base/default/graphics/planeten/dschjungelplanet10.jpg diff --git a/skin/backend/base/default/graphics/planeten/eisplanet01.jpg b/src/skin/backend/base/default/graphics/planeten/eisplanet01.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/eisplanet01.jpg rename to src/skin/backend/base/default/graphics/planeten/eisplanet01.jpg diff --git a/skin/backend/base/default/graphics/planeten/eisplanet02.jpg b/src/skin/backend/base/default/graphics/planeten/eisplanet02.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/eisplanet02.jpg rename to src/skin/backend/base/default/graphics/planeten/eisplanet02.jpg diff --git a/skin/backend/base/default/graphics/planeten/eisplanet03.jpg b/src/skin/backend/base/default/graphics/planeten/eisplanet03.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/eisplanet03.jpg rename to src/skin/backend/base/default/graphics/planeten/eisplanet03.jpg diff --git a/skin/backend/base/default/graphics/planeten/eisplanet04.jpg b/src/skin/backend/base/default/graphics/planeten/eisplanet04.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/eisplanet04.jpg rename to src/skin/backend/base/default/graphics/planeten/eisplanet04.jpg diff --git a/skin/backend/base/default/graphics/planeten/eisplanet05.jpg b/src/skin/backend/base/default/graphics/planeten/eisplanet05.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/eisplanet05.jpg rename to src/skin/backend/base/default/graphics/planeten/eisplanet05.jpg diff --git a/skin/backend/base/default/graphics/planeten/eisplanet06.jpg b/src/skin/backend/base/default/graphics/planeten/eisplanet06.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/eisplanet06.jpg rename to src/skin/backend/base/default/graphics/planeten/eisplanet06.jpg diff --git a/skin/backend/base/default/graphics/planeten/eisplanet07.jpg b/src/skin/backend/base/default/graphics/planeten/eisplanet07.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/eisplanet07.jpg rename to src/skin/backend/base/default/graphics/planeten/eisplanet07.jpg diff --git a/skin/backend/base/default/graphics/planeten/eisplanet08.jpg b/src/skin/backend/base/default/graphics/planeten/eisplanet08.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/eisplanet08.jpg rename to src/skin/backend/base/default/graphics/planeten/eisplanet08.jpg diff --git a/skin/backend/base/default/graphics/planeten/eisplanet09.jpg b/src/skin/backend/base/default/graphics/planeten/eisplanet09.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/eisplanet09.jpg rename to src/skin/backend/base/default/graphics/planeten/eisplanet09.jpg diff --git a/skin/backend/base/default/graphics/planeten/eisplanet10.jpg b/src/skin/backend/base/default/graphics/planeten/eisplanet10.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/eisplanet10.jpg rename to src/skin/backend/base/default/graphics/planeten/eisplanet10.jpg diff --git a/skin/backend/base/default/graphics/planeten/gasplanet01.jpg b/src/skin/backend/base/default/graphics/planeten/gasplanet01.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/gasplanet01.jpg rename to src/skin/backend/base/default/graphics/planeten/gasplanet01.jpg diff --git a/skin/backend/base/default/graphics/planeten/gasplanet02.jpg b/src/skin/backend/base/default/graphics/planeten/gasplanet02.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/gasplanet02.jpg rename to src/skin/backend/base/default/graphics/planeten/gasplanet02.jpg diff --git a/skin/backend/base/default/graphics/planeten/gasplanet03.jpg b/src/skin/backend/base/default/graphics/planeten/gasplanet03.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/gasplanet03.jpg rename to src/skin/backend/base/default/graphics/planeten/gasplanet03.jpg diff --git a/skin/backend/base/default/graphics/planeten/gasplanet04.jpg b/src/skin/backend/base/default/graphics/planeten/gasplanet04.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/gasplanet04.jpg rename to src/skin/backend/base/default/graphics/planeten/gasplanet04.jpg diff --git a/skin/backend/base/default/graphics/planeten/gasplanet05.jpg b/src/skin/backend/base/default/graphics/planeten/gasplanet05.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/gasplanet05.jpg rename to src/skin/backend/base/default/graphics/planeten/gasplanet05.jpg diff --git a/skin/backend/base/default/graphics/planeten/gasplanet06.jpg b/src/skin/backend/base/default/graphics/planeten/gasplanet06.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/gasplanet06.jpg rename to src/skin/backend/base/default/graphics/planeten/gasplanet06.jpg diff --git a/skin/backend/base/default/graphics/planeten/gasplanet07.jpg b/src/skin/backend/base/default/graphics/planeten/gasplanet07.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/gasplanet07.jpg rename to src/skin/backend/base/default/graphics/planeten/gasplanet07.jpg diff --git a/skin/backend/base/default/graphics/planeten/gasplanet08.jpg b/src/skin/backend/base/default/graphics/planeten/gasplanet08.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/gasplanet08.jpg rename to src/skin/backend/base/default/graphics/planeten/gasplanet08.jpg diff --git a/skin/backend/base/default/graphics/planeten/mond.jpg b/src/skin/backend/base/default/graphics/planeten/mond.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/mond.jpg rename to src/skin/backend/base/default/graphics/planeten/mond.jpg diff --git a/skin/backend/base/default/graphics/planeten/normaltempplanet01.jpg b/src/skin/backend/base/default/graphics/planeten/normaltempplanet01.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/normaltempplanet01.jpg rename to src/skin/backend/base/default/graphics/planeten/normaltempplanet01.jpg diff --git a/skin/backend/base/default/graphics/planeten/normaltempplanet02.jpg b/src/skin/backend/base/default/graphics/planeten/normaltempplanet02.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/normaltempplanet02.jpg rename to src/skin/backend/base/default/graphics/planeten/normaltempplanet02.jpg diff --git a/skin/backend/base/default/graphics/planeten/normaltempplanet03.jpg b/src/skin/backend/base/default/graphics/planeten/normaltempplanet03.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/normaltempplanet03.jpg rename to src/skin/backend/base/default/graphics/planeten/normaltempplanet03.jpg diff --git a/skin/backend/base/default/graphics/planeten/normaltempplanet04.jpg b/src/skin/backend/base/default/graphics/planeten/normaltempplanet04.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/normaltempplanet04.jpg rename to src/skin/backend/base/default/graphics/planeten/normaltempplanet04.jpg diff --git a/skin/backend/base/default/graphics/planeten/normaltempplanet05.jpg b/src/skin/backend/base/default/graphics/planeten/normaltempplanet05.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/normaltempplanet05.jpg rename to src/skin/backend/base/default/graphics/planeten/normaltempplanet05.jpg diff --git a/skin/backend/base/default/graphics/planeten/normaltempplanet06.jpg b/src/skin/backend/base/default/graphics/planeten/normaltempplanet06.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/normaltempplanet06.jpg rename to src/skin/backend/base/default/graphics/planeten/normaltempplanet06.jpg diff --git a/skin/backend/base/default/graphics/planeten/normaltempplanet07.jpg b/src/skin/backend/base/default/graphics/planeten/normaltempplanet07.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/normaltempplanet07.jpg rename to src/skin/backend/base/default/graphics/planeten/normaltempplanet07.jpg diff --git a/skin/backend/base/default/graphics/planeten/normaltempplanet08.jpg b/src/skin/backend/base/default/graphics/planeten/normaltempplanet08.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/normaltempplanet08.jpg rename to src/skin/backend/base/default/graphics/planeten/normaltempplanet08.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet01.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet01.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet01.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet01.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet02.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet02.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet02.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet02.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet03.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet03.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet03.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet03.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet04.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet04.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet04.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet04.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet05.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet05.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet05.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet05.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet06.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet06.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet06.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet06.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet07.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet07.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet07.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet07.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet08.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet08.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet08.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet08.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet09.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet09.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet09.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet09.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet10.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet10.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet10.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_dschjungelplanet10.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_eisplanet01.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_eisplanet01.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_eisplanet01.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_eisplanet01.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_eisplanet02.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_eisplanet02.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_eisplanet02.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_eisplanet02.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_eisplanet03.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_eisplanet03.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_eisplanet03.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_eisplanet03.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_eisplanet04.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_eisplanet04.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_eisplanet04.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_eisplanet04.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_eisplanet05.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_eisplanet05.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_eisplanet05.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_eisplanet05.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_eisplanet06.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_eisplanet06.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_eisplanet06.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_eisplanet06.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_eisplanet07.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_eisplanet07.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_eisplanet07.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_eisplanet07.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_eisplanet08.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_eisplanet08.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_eisplanet08.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_eisplanet08.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_eisplanet09.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_eisplanet09.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_eisplanet09.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_eisplanet09.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_eisplanet10.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_eisplanet10.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_eisplanet10.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_eisplanet10.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_gasplanet01.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_gasplanet01.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_gasplanet01.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_gasplanet01.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_gasplanet02.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_gasplanet02.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_gasplanet02.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_gasplanet02.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_gasplanet03.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_gasplanet03.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_gasplanet03.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_gasplanet03.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_gasplanet04.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_gasplanet04.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_gasplanet04.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_gasplanet04.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_gasplanet05.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_gasplanet05.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_gasplanet05.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_gasplanet05.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_gasplanet06.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_gasplanet06.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_gasplanet06.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_gasplanet06.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_gasplanet07.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_gasplanet07.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_gasplanet07.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_gasplanet07.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_gasplanet08.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_gasplanet08.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_gasplanet08.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_gasplanet08.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_mond.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_mond.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_mond.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_mond.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet01.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet01.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_normaltempplanet01.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet01.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet02.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet02.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_normaltempplanet02.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet02.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet03.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet03.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_normaltempplanet03.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet03.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet04.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet04.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_normaltempplanet04.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet04.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet05.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet05.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_normaltempplanet05.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet05.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet06.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet06.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_normaltempplanet06.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet06.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet07.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet07.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_normaltempplanet07.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet07.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet08.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet08.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_normaltempplanet08.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_normaltempplanet08.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_trockenplanet01.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet01.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_trockenplanet01.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet01.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_trockenplanet02.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet02.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_trockenplanet02.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet02.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_trockenplanet03.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet03.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_trockenplanet03.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet03.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_trockenplanet04.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet04.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_trockenplanet04.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet04.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_trockenplanet05.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet05.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_trockenplanet05.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet05.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_trockenplanet06.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet06.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_trockenplanet06.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet06.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_trockenplanet07.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet07.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_trockenplanet07.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet07.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_trockenplanet08.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet08.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_trockenplanet08.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet08.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_trockenplanet09.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet09.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_trockenplanet09.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet09.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_trockenplanet10.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet10.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_trockenplanet10.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_trockenplanet10.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_wasserplanet01.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet01.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_wasserplanet01.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet01.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_wasserplanet02.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet02.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_wasserplanet02.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet02.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_wasserplanet03.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet03.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_wasserplanet03.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet03.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_wasserplanet04.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet04.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_wasserplanet04.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet04.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_wasserplanet05.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet05.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_wasserplanet05.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet05.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_wasserplanet06.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet06.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_wasserplanet06.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet06.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_wasserplanet07.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet07.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_wasserplanet07.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet07.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_wasserplanet08.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet08.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_wasserplanet08.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet08.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_wasserplanet09.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet09.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_wasserplanet09.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_wasserplanet09.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_wuestenplanet01.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_wuestenplanet01.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_wuestenplanet01.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_wuestenplanet01.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_wuestenplanet02.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_wuestenplanet02.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_wuestenplanet02.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_wuestenplanet02.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_wuestenplanet03.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_wuestenplanet03.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_wuestenplanet03.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_wuestenplanet03.jpg diff --git a/skin/backend/base/default/graphics/planeten/small/s_wuestenplanet04.jpg b/src/skin/backend/base/default/graphics/planeten/small/s_wuestenplanet04.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/small/s_wuestenplanet04.jpg rename to src/skin/backend/base/default/graphics/planeten/small/s_wuestenplanet04.jpg diff --git a/skin/backend/base/default/graphics/planeten/trockenplanet01.jpg b/src/skin/backend/base/default/graphics/planeten/trockenplanet01.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/trockenplanet01.jpg rename to src/skin/backend/base/default/graphics/planeten/trockenplanet01.jpg diff --git a/skin/backend/base/default/graphics/planeten/trockenplanet02.jpg b/src/skin/backend/base/default/graphics/planeten/trockenplanet02.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/trockenplanet02.jpg rename to src/skin/backend/base/default/graphics/planeten/trockenplanet02.jpg diff --git a/skin/backend/base/default/graphics/planeten/trockenplanet03.jpg b/src/skin/backend/base/default/graphics/planeten/trockenplanet03.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/trockenplanet03.jpg rename to src/skin/backend/base/default/graphics/planeten/trockenplanet03.jpg diff --git a/skin/backend/base/default/graphics/planeten/trockenplanet04.jpg b/src/skin/backend/base/default/graphics/planeten/trockenplanet04.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/trockenplanet04.jpg rename to src/skin/backend/base/default/graphics/planeten/trockenplanet04.jpg diff --git a/skin/backend/base/default/graphics/planeten/trockenplanet05.jpg b/src/skin/backend/base/default/graphics/planeten/trockenplanet05.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/trockenplanet05.jpg rename to src/skin/backend/base/default/graphics/planeten/trockenplanet05.jpg diff --git a/skin/backend/base/default/graphics/planeten/trockenplanet06.jpg b/src/skin/backend/base/default/graphics/planeten/trockenplanet06.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/trockenplanet06.jpg rename to src/skin/backend/base/default/graphics/planeten/trockenplanet06.jpg diff --git a/skin/backend/base/default/graphics/planeten/trockenplanet07.jpg b/src/skin/backend/base/default/graphics/planeten/trockenplanet07.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/trockenplanet07.jpg rename to src/skin/backend/base/default/graphics/planeten/trockenplanet07.jpg diff --git a/skin/backend/base/default/graphics/planeten/trockenplanet08.jpg b/src/skin/backend/base/default/graphics/planeten/trockenplanet08.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/trockenplanet08.jpg rename to src/skin/backend/base/default/graphics/planeten/trockenplanet08.jpg diff --git a/skin/backend/base/default/graphics/planeten/trockenplanet09.jpg b/src/skin/backend/base/default/graphics/planeten/trockenplanet09.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/trockenplanet09.jpg rename to src/skin/backend/base/default/graphics/planeten/trockenplanet09.jpg diff --git a/skin/backend/base/default/graphics/planeten/trockenplanet10.jpg b/src/skin/backend/base/default/graphics/planeten/trockenplanet10.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/trockenplanet10.jpg rename to src/skin/backend/base/default/graphics/planeten/trockenplanet10.jpg diff --git a/skin/backend/base/default/graphics/planeten/wasserplanet01.jpg b/src/skin/backend/base/default/graphics/planeten/wasserplanet01.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/wasserplanet01.jpg rename to src/skin/backend/base/default/graphics/planeten/wasserplanet01.jpg diff --git a/skin/backend/base/default/graphics/planeten/wasserplanet02.jpg b/src/skin/backend/base/default/graphics/planeten/wasserplanet02.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/wasserplanet02.jpg rename to src/skin/backend/base/default/graphics/planeten/wasserplanet02.jpg diff --git a/skin/backend/base/default/graphics/planeten/wasserplanet03.jpg b/src/skin/backend/base/default/graphics/planeten/wasserplanet03.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/wasserplanet03.jpg rename to src/skin/backend/base/default/graphics/planeten/wasserplanet03.jpg diff --git a/skin/backend/base/default/graphics/planeten/wasserplanet04.jpg b/src/skin/backend/base/default/graphics/planeten/wasserplanet04.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/wasserplanet04.jpg rename to src/skin/backend/base/default/graphics/planeten/wasserplanet04.jpg diff --git a/skin/backend/base/default/graphics/planeten/wasserplanet05.jpg b/src/skin/backend/base/default/graphics/planeten/wasserplanet05.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/wasserplanet05.jpg rename to src/skin/backend/base/default/graphics/planeten/wasserplanet05.jpg diff --git a/skin/backend/base/default/graphics/planeten/wasserplanet06.jpg b/src/skin/backend/base/default/graphics/planeten/wasserplanet06.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/wasserplanet06.jpg rename to src/skin/backend/base/default/graphics/planeten/wasserplanet06.jpg diff --git a/skin/backend/base/default/graphics/planeten/wasserplanet07.jpg b/src/skin/backend/base/default/graphics/planeten/wasserplanet07.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/wasserplanet07.jpg rename to src/skin/backend/base/default/graphics/planeten/wasserplanet07.jpg diff --git a/skin/backend/base/default/graphics/planeten/wasserplanet08.jpg b/src/skin/backend/base/default/graphics/planeten/wasserplanet08.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/wasserplanet08.jpg rename to src/skin/backend/base/default/graphics/planeten/wasserplanet08.jpg diff --git a/skin/backend/base/default/graphics/planeten/wasserplanet09.jpg b/src/skin/backend/base/default/graphics/planeten/wasserplanet09.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/wasserplanet09.jpg rename to src/skin/backend/base/default/graphics/planeten/wasserplanet09.jpg diff --git a/skin/backend/base/default/graphics/planeten/wuestenplanet01.jpg b/src/skin/backend/base/default/graphics/planeten/wuestenplanet01.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/wuestenplanet01.jpg rename to src/skin/backend/base/default/graphics/planeten/wuestenplanet01.jpg diff --git a/skin/backend/base/default/graphics/planeten/wuestenplanet02.jpg b/src/skin/backend/base/default/graphics/planeten/wuestenplanet02.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/wuestenplanet02.jpg rename to src/skin/backend/base/default/graphics/planeten/wuestenplanet02.jpg diff --git a/skin/backend/base/default/graphics/planeten/wuestenplanet03.jpg b/src/skin/backend/base/default/graphics/planeten/wuestenplanet03.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/wuestenplanet03.jpg rename to src/skin/backend/base/default/graphics/planeten/wuestenplanet03.jpg diff --git a/skin/backend/base/default/graphics/planeten/wuestenplanet04.jpg b/src/skin/backend/base/default/graphics/planeten/wuestenplanet04.jpg similarity index 100% rename from skin/backend/base/default/graphics/planeten/wuestenplanet04.jpg rename to src/skin/backend/base/default/graphics/planeten/wuestenplanet04.jpg diff --git a/skin/backend/base/default/js/fleet.js b/src/skin/backend/base/default/js/fleet.js similarity index 100% rename from skin/backend/base/default/js/fleet.js rename to src/skin/backend/base/default/js/fleet.js diff --git a/skin/frontend/base/default/css/base.css b/src/skin/frontend/base/default/css/base.css similarity index 66% rename from skin/frontend/base/default/css/base.css rename to src/skin/frontend/base/default/css/base.css index bd7470b..f642e29 100644 --- a/skin/frontend/base/default/css/base.css +++ b/src/skin/frontend/base/default/css/base.css @@ -1,7 +1,8 @@ @CHARSET "UTF-8"; -* {font-size:10px;font-family:Arial,Tahoma,sans-serif;text-align:left;} -body,html {margin:0;background-color:#DEDEDE;} +* {font-size:1em;font-family:Arial,Tahoma,sans-serif;text-align:left;} +body {margin:0;font-size:10px;background:#EFEFEF;} +body.public {background:url("../graphics/background.jpg") no-repeat fixed right top;background-color:inherit;background-size:cover;} h1 {font-size:2.3em;/*border:#6AB 0 solid;border-width:1px 10px;border-radius:20px;text-align:center;color:#58939f;background:#EEE;*/} /*h1:hover {color:#6AB;background:#CCC;}*/ h2,h3 {text-decoration:underline;font-weight:bold;} @@ -51,8 +52,11 @@ input[type=submit],input[type=button] {height:2em;border:#58939f 0 solid;border- .global .header .resources-display .messages {height:22px;float:left;width:150px;} .global .header .resources-display .energy {width:200px;} -.global .content .queue {width:600px;margin:10px auto 0;background:#FFF;color:#000;border:1px solid #FFF;border-radius:5px;border-top-left-radius:20px;border-top-right-radius:20px;box-shadow:0 4px 6px #58939f inset;} -.global .content .queue h1 {color:#000;margin:10px 15px;width:570px;text-align:center;border-bottom:5px solid #9BC;} +.global .content .message {width:740px;padding:10px 30px;margin:10px auto 0;background:#FFF;color:#000;border:10px solid #58939f;border-radius:10px;border-top-left-radius:30px;border-top-right-radius:30px;} +.global .content .message h1 {border-bottom:10px solid #58939f;height:30px;margin:10px;font-size:2.3em;} + +.global .content .queue {width:740px;padding:10px 30px;margin:10px auto 0;background:#FFF;color:#000;border:10px solid #58939f;border-radius:10px;border-top-left-radius:30px;border-top-right-radius:30px;} +.global .content .queue h1 {border-bottom:10px solid #58939f;height:30px;margin:10px;font-size:2.3em;} .global .content .queue .item {width:580px;margin:0 10px;border:0;box-shadow:none;border-radius:0;} .global .content .queue .item,.global .content .queue .item * {color:#000;} @@ -74,6 +78,8 @@ input[type=submit],input[type=button] {height:2em;border:#58939f 0 solid;border- .global .content .item-list .item .buy,.global .content .item-list .item .max,.global .content .item-list .item .qty {border:1px solid #000;border-radius:3px;height:20px;margin:20px 25px;background:#666;cursor:pointer;} .global .content .item-list .item .buy p,.global .content .item-list .item .buy p *,.global .content .item-list .item .max p,.global .content .item-list .item .max p * {margin:4px 0;text-align:center;font-size:1em;color:#FFF;text-decoration:none;} .global .content .item-list .item .buy:hover,.global .content .item-list .item .buy.hover,.global .content .item-list .item .max:hover,.global .content .item-list .item .max.hover,.global .content .item-list .item .qty:hover,.global .content .item-list .item .qty.hover {background-color:#58939f;} +.global .content .item-list .item .unavailable,.global .content .item-list .item .unavailable:hover {background:#933;border-color:#D00;} +.global .content .item-list .item .unavailable p {color:#CCC;} .global .content .item-list .item .qty p {margin:0 auto;} .global .content .item-list .item .qty p input {border:none;height:20px;margin:0 10px;color:#FFF;padding:0 10px;width:128px;text-align:center;font-weight:bold;font-size:1.1em;} .global .content .item-list .item .details {padding:5px 10px;border-radius:5px;width:300px;background:#FFF;z-index:999;display:none;position:relative;left:-30px;top:-10px;border:3px solid #58939f;border-left-width:15px;} @@ -94,6 +100,51 @@ input[type=submit],input[type=button] {height:2em;border:#58939f 0 solid;border- .global .content .install {background:#FFF;width:600px;margin:10px auto;padding:20px;border-radius:20px;box-shadow:0 -4px 8px #58939f inset, 20px 20px 40px #58939f, -20px 20px 40px #58939f, 0 -20px 40px #58939f;} +/** + * Overview + */ + +.global .content .overview {width:740px;padding:10px 30px;margin:10px auto 0;background:#FFF;color:#000;border:10px solid #58939f;border-radius:10px;border-top-left-radius:30px;border-top-right-radius:30px;} +.global .content .overview h1 {border-bottom:10px solid #58939f;height:30px;margin:10px 10px 30px;font-size:2.3em;} +.global .content .overview .clear {clear:left;height:50px;} + +.global .content .overview .left {width:250px;float:left;} +.global .content .overview .left h2 {text-decoration:none;margin-bottom:0;font-size:1.3em;} +.global .content .overview .left h3 {text-decoration:none;margin-top:0;font-size:1em;color:#58939f;font-weight:bold;} +.global .content .overview .left .item-container {width:200px;padding:10px;margin:10px;height:250px;border:3px solid #58939f;background-color:#EFEFEF;} + +/** + * Public pages + */ +body.public-form {width:100%;height:100%;} +body.public-form .main-form {display:block;margin:0 auto;padding:0;width:300px;border-radius:5px;background:rgba(255,255,255,.8);border:5px solid #58939f;background-image:-moz-linear-gradient(top,#AAA 0,#FFF 100%);background-image:linear-gradient(top,#AAA 0,#FFF 100%);} +body.public-form #login-form {height:190px;} +body.public-form #lost-password-form {height:130px;} +body.public-form #register-form {height:350px;} +body.public-form .main-form fieldset {border:none;margin:0;padding:0;} +body.public-form #login-form fieldset legend, +body.public-form #lost-password-form fieldset legend {display:block;width:280px;height:30px;background:#58939f;color:#FFF;font-weight:bold;font-size:2em;padding:0 10px;margin-bottom:10px;} +body.public-form #register-form h1 {display:block;width:280px;height:30px;background:#58939f;color:#FFF;font-weight:bold;font-size:2em;padding:0 10px;margin:0 0 10px;} +body.public-form #register-form fieldset legend {display:block;width:280px;height:15px;font-weight:bold;font-size:1.5em;padding:0 10px;margin:10px 0 5px;} +body.public-form .main-form input[type="submit"], +body.public-form .main-form input[type="button"], +body.public-form .main-form input[type="text"], +body.public-form .main-form input[type="password"] {border-width:1px;} +body.public-form .main-form p.form {margin:0;padding:0;height:30px;width:300px;float:left;} +body.public-form .main-form p.lost-password {margin:0;padding:0;height:30px;width:300px;float:left;text-align:center;} +body.public-form .main-form p.form label {margin:0;padding:0 10px;text-align:right;width:150px;height:30px;float:left;display:block;} +body.public-form .main-form p.form input {margin:0;padding:0;width:120px;} +body.public-form .main-form p.checkbox input {margin:0;padding:0;width:20px;} +body.public-form .main-form p.submit input {margin:0 100px;padding:0;width:100px;text-align:center;} +body.public-form #lost-password-form p.submit input {width:150px;margin:0 75px;} + +body.public .content .public-topbar {background:#FF;border-bottom:5px solid #000;margin:0;height:30px;padding:0 10px;width:100%;background:rgba(0,0,0,.1);} +body.public .content .public-topbar .container {margin:0 auto;width:780px;} +body.public .content .public-topbar .container span {height:25px;padding:5px 15px 0;display:block;float:left;height:25px;margin:0 5px;font-size:1.5em;font-weight:bold;} +body.public .content .public-topbar .container span:hover {background:rgba(94,175,239,0.3);border-radius:8px;} +body.public .content .public-topbar .container span a:hover {color:#000;} + +body.public-form .content .public-topbar {margin-bottom:150px;} /** * Galaxy user name display colors diff --git a/skin/frontend/base/default/css/deprecated/about.css b/src/skin/frontend/base/default/css/deprecated/about.css similarity index 100% rename from skin/frontend/base/default/css/deprecated/about.css rename to src/skin/frontend/base/default/css/deprecated/about.css diff --git a/skin/frontend/base/default/css/deprecated/default.css b/src/skin/frontend/base/default/css/deprecated/default.css similarity index 100% rename from skin/frontend/base/default/css/deprecated/default.css rename to src/skin/frontend/base/default/css/deprecated/default.css diff --git a/skin/frontend/base/default/css/deprecated/formate.css b/src/skin/frontend/base/default/css/deprecated/formate.css similarity index 100% rename from skin/frontend/base/default/css/deprecated/formate.css rename to src/skin/frontend/base/default/css/deprecated/formate.css diff --git a/skin/frontend/base/default/css/deprecated/styles.css b/src/skin/frontend/base/default/css/deprecated/styles.css similarity index 100% rename from skin/frontend/base/default/css/deprecated/styles.css rename to src/skin/frontend/base/default/css/deprecated/styles.css diff --git a/skin/frontend/base/default/css/legacies.css b/src/skin/frontend/base/default/css/legacies.css similarity index 100% rename from skin/frontend/base/default/css/legacies.css rename to src/skin/frontend/base/default/css/legacies.css diff --git a/src/skin/frontend/base/default/graphics/background.jpg b/src/skin/frontend/base/default/graphics/background.jpg new file mode 100644 index 0000000..dc921a4 Binary files /dev/null and b/src/skin/frontend/base/default/graphics/background.jpg differ diff --git a/skin/frontend/base/default/graphics/favicon-128.png b/src/skin/frontend/base/default/graphics/favicon-128.png similarity index 100% rename from skin/frontend/base/default/graphics/favicon-128.png rename to src/skin/frontend/base/default/graphics/favicon-128.png diff --git a/skin/frontend/base/default/graphics/favicon-32.png b/src/skin/frontend/base/default/graphics/favicon-32.png similarity index 100% rename from skin/frontend/base/default/graphics/favicon-32.png rename to src/skin/frontend/base/default/graphics/favicon-32.png diff --git a/skin/frontend/base/default/graphics/gebaeude/1.gif b/src/skin/frontend/base/default/graphics/gebaeude/1.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/1.gif rename to src/skin/frontend/base/default/graphics/gebaeude/1.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/106.gif b/src/skin/frontend/base/default/graphics/gebaeude/106.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/106.gif rename to src/skin/frontend/base/default/graphics/gebaeude/106.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/108.gif b/src/skin/frontend/base/default/graphics/gebaeude/108.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/108.gif rename to src/skin/frontend/base/default/graphics/gebaeude/108.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/109.gif b/src/skin/frontend/base/default/graphics/gebaeude/109.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/109.gif rename to src/skin/frontend/base/default/graphics/gebaeude/109.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/110.gif b/src/skin/frontend/base/default/graphics/gebaeude/110.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/110.gif rename to src/skin/frontend/base/default/graphics/gebaeude/110.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/111.gif b/src/skin/frontend/base/default/graphics/gebaeude/111.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/111.gif rename to src/skin/frontend/base/default/graphics/gebaeude/111.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/113.gif b/src/skin/frontend/base/default/graphics/gebaeude/113.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/113.gif rename to src/skin/frontend/base/default/graphics/gebaeude/113.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/114.gif b/src/skin/frontend/base/default/graphics/gebaeude/114.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/114.gif rename to src/skin/frontend/base/default/graphics/gebaeude/114.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/115.gif b/src/skin/frontend/base/default/graphics/gebaeude/115.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/115.gif rename to src/skin/frontend/base/default/graphics/gebaeude/115.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/117.gif b/src/skin/frontend/base/default/graphics/gebaeude/117.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/117.gif rename to src/skin/frontend/base/default/graphics/gebaeude/117.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/118.gif b/src/skin/frontend/base/default/graphics/gebaeude/118.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/118.gif rename to src/skin/frontend/base/default/graphics/gebaeude/118.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/12.gif b/src/skin/frontend/base/default/graphics/gebaeude/12.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/12.gif rename to src/skin/frontend/base/default/graphics/gebaeude/12.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/120.gif b/src/skin/frontend/base/default/graphics/gebaeude/120.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/120.gif rename to src/skin/frontend/base/default/graphics/gebaeude/120.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/121.gif b/src/skin/frontend/base/default/graphics/gebaeude/121.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/121.gif rename to src/skin/frontend/base/default/graphics/gebaeude/121.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/122.gif b/src/skin/frontend/base/default/graphics/gebaeude/122.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/122.gif rename to src/skin/frontend/base/default/graphics/gebaeude/122.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/123.gif b/src/skin/frontend/base/default/graphics/gebaeude/123.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/123.gif rename to src/skin/frontend/base/default/graphics/gebaeude/123.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/124.gif b/src/skin/frontend/base/default/graphics/gebaeude/124.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/124.gif rename to src/skin/frontend/base/default/graphics/gebaeude/124.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/14.gif b/src/skin/frontend/base/default/graphics/gebaeude/14.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/14.gif rename to src/skin/frontend/base/default/graphics/gebaeude/14.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/15.gif b/src/skin/frontend/base/default/graphics/gebaeude/15.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/15.gif rename to src/skin/frontend/base/default/graphics/gebaeude/15.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/199.gif b/src/skin/frontend/base/default/graphics/gebaeude/199.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/199.gif rename to src/skin/frontend/base/default/graphics/gebaeude/199.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/2.gif b/src/skin/frontend/base/default/graphics/gebaeude/2.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/2.gif rename to src/skin/frontend/base/default/graphics/gebaeude/2.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/202.gif b/src/skin/frontend/base/default/graphics/gebaeude/202.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/202.gif rename to src/skin/frontend/base/default/graphics/gebaeude/202.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/203.gif b/src/skin/frontend/base/default/graphics/gebaeude/203.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/203.gif rename to src/skin/frontend/base/default/graphics/gebaeude/203.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/204.gif b/src/skin/frontend/base/default/graphics/gebaeude/204.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/204.gif rename to src/skin/frontend/base/default/graphics/gebaeude/204.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/205.gif b/src/skin/frontend/base/default/graphics/gebaeude/205.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/205.gif rename to src/skin/frontend/base/default/graphics/gebaeude/205.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/206.gif b/src/skin/frontend/base/default/graphics/gebaeude/206.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/206.gif rename to src/skin/frontend/base/default/graphics/gebaeude/206.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/206.jpg b/src/skin/frontend/base/default/graphics/gebaeude/206.jpg similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/206.jpg rename to src/skin/frontend/base/default/graphics/gebaeude/206.jpg diff --git a/skin/frontend/base/default/graphics/gebaeude/207.gif b/src/skin/frontend/base/default/graphics/gebaeude/207.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/207.gif rename to src/skin/frontend/base/default/graphics/gebaeude/207.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/208.gif b/src/skin/frontend/base/default/graphics/gebaeude/208.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/208.gif rename to src/skin/frontend/base/default/graphics/gebaeude/208.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/209.gif b/src/skin/frontend/base/default/graphics/gebaeude/209.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/209.gif rename to src/skin/frontend/base/default/graphics/gebaeude/209.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/21.gif b/src/skin/frontend/base/default/graphics/gebaeude/21.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/21.gif rename to src/skin/frontend/base/default/graphics/gebaeude/21.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/210.gif b/src/skin/frontend/base/default/graphics/gebaeude/210.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/210.gif rename to src/skin/frontend/base/default/graphics/gebaeude/210.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/211.gif b/src/skin/frontend/base/default/graphics/gebaeude/211.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/211.gif rename to src/skin/frontend/base/default/graphics/gebaeude/211.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/212.gif b/src/skin/frontend/base/default/graphics/gebaeude/212.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/212.gif rename to src/skin/frontend/base/default/graphics/gebaeude/212.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/213.gif b/src/skin/frontend/base/default/graphics/gebaeude/213.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/213.gif rename to src/skin/frontend/base/default/graphics/gebaeude/213.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/214.gif b/src/skin/frontend/base/default/graphics/gebaeude/214.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/214.gif rename to src/skin/frontend/base/default/graphics/gebaeude/214.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/215.gif b/src/skin/frontend/base/default/graphics/gebaeude/215.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/215.gif rename to src/skin/frontend/base/default/graphics/gebaeude/215.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/216.gif b/src/skin/frontend/base/default/graphics/gebaeude/216.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/216.gif rename to src/skin/frontend/base/default/graphics/gebaeude/216.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/21_a.gif b/src/skin/frontend/base/default/graphics/gebaeude/21_a.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/21_a.gif rename to src/skin/frontend/base/default/graphics/gebaeude/21_a.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/22.gif b/src/skin/frontend/base/default/graphics/gebaeude/22.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/22.gif rename to src/skin/frontend/base/default/graphics/gebaeude/22.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/23.gif b/src/skin/frontend/base/default/graphics/gebaeude/23.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/23.gif rename to src/skin/frontend/base/default/graphics/gebaeude/23.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/24.gif b/src/skin/frontend/base/default/graphics/gebaeude/24.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/24.gif rename to src/skin/frontend/base/default/graphics/gebaeude/24.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/3.gif b/src/skin/frontend/base/default/graphics/gebaeude/3.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/3.gif rename to src/skin/frontend/base/default/graphics/gebaeude/3.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/31.gif b/src/skin/frontend/base/default/graphics/gebaeude/31.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/31.gif rename to src/skin/frontend/base/default/graphics/gebaeude/31.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/33.gif b/src/skin/frontend/base/default/graphics/gebaeude/33.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/33.gif rename to src/skin/frontend/base/default/graphics/gebaeude/33.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/34.gif b/src/skin/frontend/base/default/graphics/gebaeude/34.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/34.gif rename to src/skin/frontend/base/default/graphics/gebaeude/34.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/4.gif b/src/skin/frontend/base/default/graphics/gebaeude/4.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/4.gif rename to src/skin/frontend/base/default/graphics/gebaeude/4.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/401.gif b/src/skin/frontend/base/default/graphics/gebaeude/401.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/401.gif rename to src/skin/frontend/base/default/graphics/gebaeude/401.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/402.gif b/src/skin/frontend/base/default/graphics/gebaeude/402.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/402.gif rename to src/skin/frontend/base/default/graphics/gebaeude/402.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/403.gif b/src/skin/frontend/base/default/graphics/gebaeude/403.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/403.gif rename to src/skin/frontend/base/default/graphics/gebaeude/403.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/404.gif b/src/skin/frontend/base/default/graphics/gebaeude/404.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/404.gif rename to src/skin/frontend/base/default/graphics/gebaeude/404.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/405.gif b/src/skin/frontend/base/default/graphics/gebaeude/405.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/405.gif rename to src/skin/frontend/base/default/graphics/gebaeude/405.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/406.gif b/src/skin/frontend/base/default/graphics/gebaeude/406.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/406.gif rename to src/skin/frontend/base/default/graphics/gebaeude/406.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/407.gif b/src/skin/frontend/base/default/graphics/gebaeude/407.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/407.gif rename to src/skin/frontend/base/default/graphics/gebaeude/407.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/408.gif b/src/skin/frontend/base/default/graphics/gebaeude/408.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/408.gif rename to src/skin/frontend/base/default/graphics/gebaeude/408.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/41.gif b/src/skin/frontend/base/default/graphics/gebaeude/41.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/41.gif rename to src/skin/frontend/base/default/graphics/gebaeude/41.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/42.gif b/src/skin/frontend/base/default/graphics/gebaeude/42.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/42.gif rename to src/skin/frontend/base/default/graphics/gebaeude/42.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/43.gif b/src/skin/frontend/base/default/graphics/gebaeude/43.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/43.gif rename to src/skin/frontend/base/default/graphics/gebaeude/43.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/44.gif b/src/skin/frontend/base/default/graphics/gebaeude/44.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/44.gif rename to src/skin/frontend/base/default/graphics/gebaeude/44.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/501.gif b/src/skin/frontend/base/default/graphics/gebaeude/501.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/501.gif rename to src/skin/frontend/base/default/graphics/gebaeude/501.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/502.gif b/src/skin/frontend/base/default/graphics/gebaeude/502.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/502.gif rename to src/skin/frontend/base/default/graphics/gebaeude/502.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/503.gif b/src/skin/frontend/base/default/graphics/gebaeude/503.gif similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/503.gif rename to src/skin/frontend/base/default/graphics/gebaeude/503.gif diff --git a/skin/frontend/base/default/graphics/gebaeude/ionen.gif.1 b/src/skin/frontend/base/default/graphics/gebaeude/ionen.gif.1 similarity index 100% rename from skin/frontend/base/default/graphics/gebaeude/ionen.gif.1 rename to src/skin/frontend/base/default/graphics/gebaeude/ionen.gif.1 diff --git a/skin/frontend/base/default/graphics/gfx/info-help.jpg b/src/skin/frontend/base/default/graphics/gfx/info-help.jpg similarity index 100% rename from skin/frontend/base/default/graphics/gfx/info-help.jpg rename to src/skin/frontend/base/default/graphics/gfx/info-help.jpg diff --git a/skin/frontend/base/default/graphics/gfx/user-menu.jpg b/src/skin/frontend/base/default/graphics/gfx/user-menu.jpg similarity index 100% rename from skin/frontend/base/default/graphics/gfx/user-menu.jpg rename to src/skin/frontend/base/default/graphics/gfx/user-menu.jpg diff --git a/skin/frontend/base/default/graphics/images/abort.gif b/src/skin/frontend/base/default/graphics/images/abort.gif similarity index 100% rename from skin/frontend/base/default/graphics/images/abort.gif rename to src/skin/frontend/base/default/graphics/images/abort.gif diff --git a/skin/frontend/base/default/graphics/images/bann.png b/src/skin/frontend/base/default/graphics/images/bann.png similarity index 100% rename from skin/frontend/base/default/graphics/images/bann.png rename to src/skin/frontend/base/default/graphics/images/bann.png diff --git a/skin/frontend/base/default/graphics/images/banned.png b/src/skin/frontend/base/default/graphics/images/banned.png similarity index 100% rename from skin/frontend/base/default/graphics/images/banned.png rename to src/skin/frontend/base/default/graphics/images/banned.png diff --git a/skin/frontend/base/default/graphics/images/deuterium.gif b/src/skin/frontend/base/default/graphics/images/deuterium.gif similarity index 100% rename from skin/frontend/base/default/graphics/images/deuterium.gif rename to src/skin/frontend/base/default/graphics/images/deuterium.gif diff --git a/skin/frontend/base/default/graphics/images/energie.gif b/src/skin/frontend/base/default/graphics/images/energie.gif similarity index 100% rename from skin/frontend/base/default/graphics/images/energie.gif rename to src/skin/frontend/base/default/graphics/images/energie.gif diff --git a/skin/frontend/base/default/graphics/images/false.png b/src/skin/frontend/base/default/graphics/images/false.png similarity index 100% rename from skin/frontend/base/default/graphics/images/false.png rename to src/skin/frontend/base/default/graphics/images/false.png diff --git a/skin/frontend/base/default/graphics/images/female.gif b/src/skin/frontend/base/default/graphics/images/female.gif similarity index 100% rename from skin/frontend/base/default/graphics/images/female.gif rename to src/skin/frontend/base/default/graphics/images/female.gif diff --git a/skin/frontend/base/default/graphics/images/icon_latest_reply.gif b/src/skin/frontend/base/default/graphics/images/icon_latest_reply.gif similarity index 100% rename from skin/frontend/base/default/graphics/images/icon_latest_reply.gif rename to src/skin/frontend/base/default/graphics/images/icon_latest_reply.gif diff --git a/skin/frontend/base/default/graphics/images/kristall.gif b/src/skin/frontend/base/default/graphics/images/kristall.gif similarity index 100% rename from skin/frontend/base/default/graphics/images/kristall.gif rename to src/skin/frontend/base/default/graphics/images/kristall.gif diff --git a/skin/frontend/base/default/graphics/images/loadingAnimation.gif b/src/skin/frontend/base/default/graphics/images/loadingAnimation.gif similarity index 100% rename from skin/frontend/base/default/graphics/images/loadingAnimation.gif rename to src/skin/frontend/base/default/graphics/images/loadingAnimation.gif diff --git a/skin/frontend/base/default/graphics/images/male.gif b/src/skin/frontend/base/default/graphics/images/male.gif similarity index 100% rename from skin/frontend/base/default/graphics/images/male.gif rename to src/skin/frontend/base/default/graphics/images/male.gif diff --git a/skin/frontend/base/default/graphics/images/message.gif b/src/skin/frontend/base/default/graphics/images/message.gif similarity index 100% rename from skin/frontend/base/default/graphics/images/message.gif rename to src/skin/frontend/base/default/graphics/images/message.gif diff --git a/skin/frontend/base/default/graphics/images/metall.gif b/src/skin/frontend/base/default/graphics/images/metall.gif similarity index 100% rename from skin/frontend/base/default/graphics/images/metall.gif rename to src/skin/frontend/base/default/graphics/images/metall.gif diff --git a/skin/frontend/base/default/graphics/images/officiers/601.jpg b/src/skin/frontend/base/default/graphics/images/officiers/601.jpg similarity index 100% rename from skin/frontend/base/default/graphics/images/officiers/601.jpg rename to src/skin/frontend/base/default/graphics/images/officiers/601.jpg diff --git a/skin/frontend/base/default/graphics/images/officiers/602.jpg b/src/skin/frontend/base/default/graphics/images/officiers/602.jpg similarity index 100% rename from skin/frontend/base/default/graphics/images/officiers/602.jpg rename to src/skin/frontend/base/default/graphics/images/officiers/602.jpg diff --git a/skin/frontend/base/default/graphics/images/officiers/603.jpg b/src/skin/frontend/base/default/graphics/images/officiers/603.jpg similarity index 100% rename from skin/frontend/base/default/graphics/images/officiers/603.jpg rename to src/skin/frontend/base/default/graphics/images/officiers/603.jpg diff --git a/skin/frontend/base/default/graphics/images/officiers/604.jpg b/src/skin/frontend/base/default/graphics/images/officiers/604.jpg similarity index 100% rename from skin/frontend/base/default/graphics/images/officiers/604.jpg rename to src/skin/frontend/base/default/graphics/images/officiers/604.jpg diff --git a/skin/frontend/base/default/graphics/images/officiers/605.jpg b/src/skin/frontend/base/default/graphics/images/officiers/605.jpg similarity index 100% rename from skin/frontend/base/default/graphics/images/officiers/605.jpg rename to src/skin/frontend/base/default/graphics/images/officiers/605.jpg diff --git a/skin/frontend/base/default/graphics/images/officiers/606.jpg b/src/skin/frontend/base/default/graphics/images/officiers/606.jpg similarity index 100% rename from skin/frontend/base/default/graphics/images/officiers/606.jpg rename to src/skin/frontend/base/default/graphics/images/officiers/606.jpg diff --git a/skin/frontend/base/default/graphics/images/officiers/607.jpg b/src/skin/frontend/base/default/graphics/images/officiers/607.jpg similarity index 100% rename from skin/frontend/base/default/graphics/images/officiers/607.jpg rename to src/skin/frontend/base/default/graphics/images/officiers/607.jpg diff --git a/skin/frontend/base/default/graphics/images/officiers/608.jpg b/src/skin/frontend/base/default/graphics/images/officiers/608.jpg similarity index 100% rename from skin/frontend/base/default/graphics/images/officiers/608.jpg rename to src/skin/frontend/base/default/graphics/images/officiers/608.jpg diff --git a/skin/frontend/base/default/graphics/images/officiers/609.jpg b/src/skin/frontend/base/default/graphics/images/officiers/609.jpg similarity index 100% rename from skin/frontend/base/default/graphics/images/officiers/609.jpg rename to src/skin/frontend/base/default/graphics/images/officiers/609.jpg diff --git a/skin/frontend/base/default/graphics/images/officiers/610.jpg b/src/skin/frontend/base/default/graphics/images/officiers/610.jpg similarity index 100% rename from skin/frontend/base/default/graphics/images/officiers/610.jpg rename to src/skin/frontend/base/default/graphics/images/officiers/610.jpg diff --git a/skin/frontend/base/default/graphics/images/officiers/611.jpg b/src/skin/frontend/base/default/graphics/images/officiers/611.jpg similarity index 100% rename from skin/frontend/base/default/graphics/images/officiers/611.jpg rename to src/skin/frontend/base/default/graphics/images/officiers/611.jpg diff --git a/skin/frontend/base/default/graphics/images/officiers/612.jpg b/src/skin/frontend/base/default/graphics/images/officiers/612.jpg similarity index 100% rename from skin/frontend/base/default/graphics/images/officiers/612.jpg rename to src/skin/frontend/base/default/graphics/images/officiers/612.jpg diff --git a/skin/frontend/base/default/graphics/images/officiers/613.jpg b/src/skin/frontend/base/default/graphics/images/officiers/613.jpg similarity index 100% rename from skin/frontend/base/default/graphics/images/officiers/613.jpg rename to src/skin/frontend/base/default/graphics/images/officiers/613.jpg diff --git a/skin/frontend/base/default/graphics/images/officiers/614.jpg b/src/skin/frontend/base/default/graphics/images/officiers/614.jpg similarity index 100% rename from skin/frontend/base/default/graphics/images/officiers/614.jpg rename to src/skin/frontend/base/default/graphics/images/officiers/614.jpg diff --git a/skin/frontend/base/default/graphics/images/officiers/615.jpg b/src/skin/frontend/base/default/graphics/images/officiers/615.jpg similarity index 100% rename from skin/frontend/base/default/graphics/images/officiers/615.jpg rename to src/skin/frontend/base/default/graphics/images/officiers/615.jpg diff --git a/skin/frontend/base/default/graphics/images/progress.gif b/src/skin/frontend/base/default/graphics/images/progress.gif similarity index 100% rename from skin/frontend/base/default/graphics/images/progress.gif rename to src/skin/frontend/base/default/graphics/images/progress.gif diff --git a/skin/frontend/base/default/graphics/images/progressbar.gif b/src/skin/frontend/base/default/graphics/images/progressbar.gif similarity index 100% rename from skin/frontend/base/default/graphics/images/progressbar.gif rename to src/skin/frontend/base/default/graphics/images/progressbar.gif diff --git a/skin/frontend/base/default/graphics/images/r1.png b/src/skin/frontend/base/default/graphics/images/r1.png similarity index 100% rename from skin/frontend/base/default/graphics/images/r1.png rename to src/skin/frontend/base/default/graphics/images/r1.png diff --git a/skin/frontend/base/default/graphics/images/r2.png b/src/skin/frontend/base/default/graphics/images/r2.png similarity index 100% rename from skin/frontend/base/default/graphics/images/r2.png rename to src/skin/frontend/base/default/graphics/images/r2.png diff --git a/skin/frontend/base/default/graphics/images/r3.png b/src/skin/frontend/base/default/graphics/images/r3.png similarity index 100% rename from skin/frontend/base/default/graphics/images/r3.png rename to src/skin/frontend/base/default/graphics/images/r3.png diff --git a/skin/frontend/base/default/graphics/images/r4.png b/src/skin/frontend/base/default/graphics/images/r4.png similarity index 100% rename from skin/frontend/base/default/graphics/images/r4.png rename to src/skin/frontend/base/default/graphics/images/r4.png diff --git a/skin/frontend/base/default/graphics/images/r5.png b/src/skin/frontend/base/default/graphics/images/r5.png similarity index 100% rename from skin/frontend/base/default/graphics/images/r5.png rename to src/skin/frontend/base/default/graphics/images/r5.png diff --git a/skin/frontend/base/default/graphics/images/r6.png b/src/skin/frontend/base/default/graphics/images/r6.png similarity index 100% rename from skin/frontend/base/default/graphics/images/r6.png rename to src/skin/frontend/base/default/graphics/images/r6.png diff --git a/skin/frontend/base/default/graphics/images/r7.png b/src/skin/frontend/base/default/graphics/images/r7.png similarity index 100% rename from skin/frontend/base/default/graphics/images/r7.png rename to src/skin/frontend/base/default/graphics/images/r7.png diff --git a/skin/frontend/base/default/graphics/images/r8.png b/src/skin/frontend/base/default/graphics/images/r8.png similarity index 100% rename from skin/frontend/base/default/graphics/images/r8.png rename to src/skin/frontend/base/default/graphics/images/r8.png diff --git a/skin/frontend/base/default/graphics/images/r9.png b/src/skin/frontend/base/default/graphics/images/r9.png similarity index 100% rename from skin/frontend/base/default/graphics/images/r9.png rename to src/skin/frontend/base/default/graphics/images/r9.png diff --git a/skin/frontend/base/default/graphics/images/smileys/confused.png b/src/skin/frontend/base/default/graphics/images/smileys/confused.png similarity index 100% rename from skin/frontend/base/default/graphics/images/smileys/confused.png rename to src/skin/frontend/base/default/graphics/images/smileys/confused.png diff --git a/skin/frontend/base/default/graphics/images/smileys/cry.png b/src/skin/frontend/base/default/graphics/images/smileys/cry.png similarity index 100% rename from skin/frontend/base/default/graphics/images/smileys/cry.png rename to src/skin/frontend/base/default/graphics/images/smileys/cry.png diff --git a/skin/frontend/base/default/graphics/images/smileys/dizzy.png b/src/skin/frontend/base/default/graphics/images/smileys/dizzy.png similarity index 100% rename from skin/frontend/base/default/graphics/images/smileys/dizzy.png rename to src/skin/frontend/base/default/graphics/images/smileys/dizzy.png diff --git a/skin/frontend/base/default/graphics/images/smileys/happy.png b/src/skin/frontend/base/default/graphics/images/smileys/happy.png similarity index 100% rename from skin/frontend/base/default/graphics/images/smileys/happy.png rename to src/skin/frontend/base/default/graphics/images/smileys/happy.png diff --git a/skin/frontend/base/default/graphics/images/smileys/lol.png b/src/skin/frontend/base/default/graphics/images/smileys/lol.png similarity index 100% rename from skin/frontend/base/default/graphics/images/smileys/lol.png rename to src/skin/frontend/base/default/graphics/images/smileys/lol.png diff --git a/skin/frontend/base/default/graphics/images/smileys/neutral.png b/src/skin/frontend/base/default/graphics/images/smileys/neutral.png similarity index 100% rename from skin/frontend/base/default/graphics/images/smileys/neutral.png rename to src/skin/frontend/base/default/graphics/images/smileys/neutral.png diff --git a/skin/frontend/base/default/graphics/images/smileys/omg.png b/src/skin/frontend/base/default/graphics/images/smileys/omg.png similarity index 100% rename from skin/frontend/base/default/graphics/images/smileys/omg.png rename to src/skin/frontend/base/default/graphics/images/smileys/omg.png diff --git a/skin/frontend/base/default/graphics/images/smileys/sad.png b/src/skin/frontend/base/default/graphics/images/smileys/sad.png similarity index 100% rename from skin/frontend/base/default/graphics/images/smileys/sad.png rename to src/skin/frontend/base/default/graphics/images/smileys/sad.png diff --git a/skin/frontend/base/default/graphics/images/smileys/shit.png b/src/skin/frontend/base/default/graphics/images/smileys/shit.png similarity index 100% rename from skin/frontend/base/default/graphics/images/smileys/shit.png rename to src/skin/frontend/base/default/graphics/images/smileys/shit.png diff --git a/skin/frontend/base/default/graphics/images/smileys/smile.png b/src/skin/frontend/base/default/graphics/images/smileys/smile.png similarity index 100% rename from skin/frontend/base/default/graphics/images/smileys/smile.png rename to src/skin/frontend/base/default/graphics/images/smileys/smile.png diff --git a/skin/frontend/base/default/graphics/images/smileys/tongue.png b/src/skin/frontend/base/default/graphics/images/smileys/tongue.png similarity index 100% rename from skin/frontend/base/default/graphics/images/smileys/tongue.png rename to src/skin/frontend/base/default/graphics/images/smileys/tongue.png diff --git a/skin/frontend/base/default/graphics/images/smileys/wink.png b/src/skin/frontend/base/default/graphics/images/smileys/wink.png similarity index 100% rename from skin/frontend/base/default/graphics/images/smileys/wink.png rename to src/skin/frontend/base/default/graphics/images/smileys/wink.png diff --git a/skin/frontend/base/default/graphics/images/tlo.jpg b/src/skin/frontend/base/default/graphics/images/tlo.jpg similarity index 100% rename from skin/frontend/base/default/graphics/images/tlo.jpg rename to src/skin/frontend/base/default/graphics/images/tlo.jpg diff --git a/skin/frontend/base/default/graphics/images/true.png b/src/skin/frontend/base/default/graphics/images/true.png similarity index 100% rename from skin/frontend/base/default/graphics/images/true.png rename to src/skin/frontend/base/default/graphics/images/true.png diff --git a/skin/frontend/base/default/graphics/images/xnova.png b/src/skin/frontend/base/default/graphics/images/xnova.png similarity index 100% rename from skin/frontend/base/default/graphics/images/xnova.png rename to src/skin/frontend/base/default/graphics/images/xnova.png diff --git a/skin/frontend/base/default/graphics/img/b.gif b/src/skin/frontend/base/default/graphics/img/b.gif similarity index 100% rename from skin/frontend/base/default/graphics/img/b.gif rename to src/skin/frontend/base/default/graphics/img/b.gif diff --git a/skin/frontend/base/default/graphics/img/background1.jpg b/src/skin/frontend/base/default/graphics/img/background1.jpg similarity index 100% rename from skin/frontend/base/default/graphics/img/background1.jpg rename to src/skin/frontend/base/default/graphics/img/background1.jpg diff --git a/skin/frontend/base/default/graphics/img/background2.jpg b/src/skin/frontend/base/default/graphics/img/background2.jpg similarity index 100% rename from skin/frontend/base/default/graphics/img/background2.jpg rename to src/skin/frontend/base/default/graphics/img/background2.jpg diff --git a/skin/frontend/base/default/graphics/img/bg1.gif b/src/skin/frontend/base/default/graphics/img/bg1.gif similarity index 100% rename from skin/frontend/base/default/graphics/img/bg1.gif rename to src/skin/frontend/base/default/graphics/img/bg1.gif diff --git a/skin/frontend/base/default/graphics/img/e.gif b/src/skin/frontend/base/default/graphics/img/e.gif similarity index 100% rename from skin/frontend/base/default/graphics/img/e.gif rename to src/skin/frontend/base/default/graphics/img/e.gif diff --git a/skin/frontend/base/default/graphics/img/link.gif b/src/skin/frontend/base/default/graphics/img/link.gif similarity index 100% rename from skin/frontend/base/default/graphics/img/link.gif rename to src/skin/frontend/base/default/graphics/img/link.gif diff --git a/skin/frontend/base/default/graphics/img/m.gif b/src/skin/frontend/base/default/graphics/img/m.gif similarity index 100% rename from skin/frontend/base/default/graphics/img/m.gif rename to src/skin/frontend/base/default/graphics/img/m.gif diff --git a/skin/frontend/base/default/graphics/img/p.png b/src/skin/frontend/base/default/graphics/img/p.png similarity index 100% rename from skin/frontend/base/default/graphics/img/p.png rename to src/skin/frontend/base/default/graphics/img/p.png diff --git a/skin/frontend/base/default/graphics/img/p1z1.png b/src/skin/frontend/base/default/graphics/img/p1z1.png similarity index 100% rename from skin/frontend/base/default/graphics/img/p1z1.png rename to src/skin/frontend/base/default/graphics/img/p1z1.png diff --git a/skin/frontend/base/default/graphics/img/p2z2.png b/src/skin/frontend/base/default/graphics/img/p2z2.png similarity index 100% rename from skin/frontend/base/default/graphics/img/p2z2.png rename to src/skin/frontend/base/default/graphics/img/p2z2.png diff --git a/skin/frontend/base/default/graphics/img/p3z2.png b/src/skin/frontend/base/default/graphics/img/p3z2.png similarity index 100% rename from skin/frontend/base/default/graphics/img/p3z2.png rename to src/skin/frontend/base/default/graphics/img/p3z2.png diff --git a/skin/frontend/base/default/graphics/img/r.gif b/src/skin/frontend/base/default/graphics/img/r.gif similarity index 100% rename from skin/frontend/base/default/graphics/img/r.gif rename to src/skin/frontend/base/default/graphics/img/r.gif diff --git a/skin/frontend/base/default/graphics/img/s.gif b/src/skin/frontend/base/default/graphics/img/s.gif similarity index 100% rename from skin/frontend/base/default/graphics/img/s.gif rename to src/skin/frontend/base/default/graphics/img/s.gif diff --git a/skin/frontend/base/default/graphics/img/starz2.png b/src/skin/frontend/base/default/graphics/img/starz2.png similarity index 100% rename from skin/frontend/base/default/graphics/img/starz2.png rename to src/skin/frontend/base/default/graphics/img/starz2.png diff --git a/skin/frontend/base/default/graphics/pic/abort.gif b/src/skin/frontend/base/default/graphics/pic/abort.gif similarity index 100% rename from skin/frontend/base/default/graphics/pic/abort.gif rename to src/skin/frontend/base/default/graphics/pic/abort.gif diff --git a/skin/frontend/base/default/graphics/pic/appwiz.gif b/src/skin/frontend/base/default/graphics/pic/appwiz.gif similarity index 100% rename from skin/frontend/base/default/graphics/pic/appwiz.gif rename to src/skin/frontend/base/default/graphics/pic/appwiz.gif diff --git a/skin/frontend/base/default/graphics/pic/key.gif b/src/skin/frontend/base/default/graphics/pic/key.gif similarity index 100% rename from skin/frontend/base/default/graphics/pic/key.gif rename to src/skin/frontend/base/default/graphics/pic/key.gif diff --git a/skin/frontend/base/default/graphics/planeten/debris.jpg b/src/skin/frontend/base/default/graphics/planeten/debris.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/debris.jpg rename to src/skin/frontend/base/default/graphics/planeten/debris.jpg diff --git a/skin/frontend/base/default/graphics/planeten/dschjungelplanet01.jpg b/src/skin/frontend/base/default/graphics/planeten/dschjungelplanet01.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/dschjungelplanet01.jpg rename to src/skin/frontend/base/default/graphics/planeten/dschjungelplanet01.jpg diff --git a/skin/frontend/base/default/graphics/planeten/dschjungelplanet02.jpg b/src/skin/frontend/base/default/graphics/planeten/dschjungelplanet02.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/dschjungelplanet02.jpg rename to src/skin/frontend/base/default/graphics/planeten/dschjungelplanet02.jpg diff --git a/skin/frontend/base/default/graphics/planeten/dschjungelplanet03.jpg b/src/skin/frontend/base/default/graphics/planeten/dschjungelplanet03.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/dschjungelplanet03.jpg rename to src/skin/frontend/base/default/graphics/planeten/dschjungelplanet03.jpg diff --git a/skin/frontend/base/default/graphics/planeten/dschjungelplanet04.jpg b/src/skin/frontend/base/default/graphics/planeten/dschjungelplanet04.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/dschjungelplanet04.jpg rename to src/skin/frontend/base/default/graphics/planeten/dschjungelplanet04.jpg diff --git a/skin/frontend/base/default/graphics/planeten/dschjungelplanet05.jpg b/src/skin/frontend/base/default/graphics/planeten/dschjungelplanet05.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/dschjungelplanet05.jpg rename to src/skin/frontend/base/default/graphics/planeten/dschjungelplanet05.jpg diff --git a/skin/frontend/base/default/graphics/planeten/dschjungelplanet06.jpg b/src/skin/frontend/base/default/graphics/planeten/dschjungelplanet06.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/dschjungelplanet06.jpg rename to src/skin/frontend/base/default/graphics/planeten/dschjungelplanet06.jpg diff --git a/skin/frontend/base/default/graphics/planeten/dschjungelplanet07.jpg b/src/skin/frontend/base/default/graphics/planeten/dschjungelplanet07.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/dschjungelplanet07.jpg rename to src/skin/frontend/base/default/graphics/planeten/dschjungelplanet07.jpg diff --git a/skin/frontend/base/default/graphics/planeten/dschjungelplanet08.jpg b/src/skin/frontend/base/default/graphics/planeten/dschjungelplanet08.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/dschjungelplanet08.jpg rename to src/skin/frontend/base/default/graphics/planeten/dschjungelplanet08.jpg diff --git a/skin/frontend/base/default/graphics/planeten/dschjungelplanet09.jpg b/src/skin/frontend/base/default/graphics/planeten/dschjungelplanet09.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/dschjungelplanet09.jpg rename to src/skin/frontend/base/default/graphics/planeten/dschjungelplanet09.jpg diff --git a/skin/frontend/base/default/graphics/planeten/dschjungelplanet10.jpg b/src/skin/frontend/base/default/graphics/planeten/dschjungelplanet10.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/dschjungelplanet10.jpg rename to src/skin/frontend/base/default/graphics/planeten/dschjungelplanet10.jpg diff --git a/skin/frontend/base/default/graphics/planeten/eisplanet01.jpg b/src/skin/frontend/base/default/graphics/planeten/eisplanet01.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/eisplanet01.jpg rename to src/skin/frontend/base/default/graphics/planeten/eisplanet01.jpg diff --git a/skin/frontend/base/default/graphics/planeten/eisplanet02.jpg b/src/skin/frontend/base/default/graphics/planeten/eisplanet02.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/eisplanet02.jpg rename to src/skin/frontend/base/default/graphics/planeten/eisplanet02.jpg diff --git a/skin/frontend/base/default/graphics/planeten/eisplanet03.jpg b/src/skin/frontend/base/default/graphics/planeten/eisplanet03.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/eisplanet03.jpg rename to src/skin/frontend/base/default/graphics/planeten/eisplanet03.jpg diff --git a/skin/frontend/base/default/graphics/planeten/eisplanet04.jpg b/src/skin/frontend/base/default/graphics/planeten/eisplanet04.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/eisplanet04.jpg rename to src/skin/frontend/base/default/graphics/planeten/eisplanet04.jpg diff --git a/skin/frontend/base/default/graphics/planeten/eisplanet05.jpg b/src/skin/frontend/base/default/graphics/planeten/eisplanet05.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/eisplanet05.jpg rename to src/skin/frontend/base/default/graphics/planeten/eisplanet05.jpg diff --git a/skin/frontend/base/default/graphics/planeten/eisplanet06.jpg b/src/skin/frontend/base/default/graphics/planeten/eisplanet06.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/eisplanet06.jpg rename to src/skin/frontend/base/default/graphics/planeten/eisplanet06.jpg diff --git a/skin/frontend/base/default/graphics/planeten/eisplanet07.jpg b/src/skin/frontend/base/default/graphics/planeten/eisplanet07.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/eisplanet07.jpg rename to src/skin/frontend/base/default/graphics/planeten/eisplanet07.jpg diff --git a/skin/frontend/base/default/graphics/planeten/eisplanet08.jpg b/src/skin/frontend/base/default/graphics/planeten/eisplanet08.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/eisplanet08.jpg rename to src/skin/frontend/base/default/graphics/planeten/eisplanet08.jpg diff --git a/skin/frontend/base/default/graphics/planeten/eisplanet09.jpg b/src/skin/frontend/base/default/graphics/planeten/eisplanet09.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/eisplanet09.jpg rename to src/skin/frontend/base/default/graphics/planeten/eisplanet09.jpg diff --git a/skin/frontend/base/default/graphics/planeten/eisplanet10.jpg b/src/skin/frontend/base/default/graphics/planeten/eisplanet10.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/eisplanet10.jpg rename to src/skin/frontend/base/default/graphics/planeten/eisplanet10.jpg diff --git a/skin/frontend/base/default/graphics/planeten/gasplanet01.jpg b/src/skin/frontend/base/default/graphics/planeten/gasplanet01.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/gasplanet01.jpg rename to src/skin/frontend/base/default/graphics/planeten/gasplanet01.jpg diff --git a/skin/frontend/base/default/graphics/planeten/gasplanet02.jpg b/src/skin/frontend/base/default/graphics/planeten/gasplanet02.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/gasplanet02.jpg rename to src/skin/frontend/base/default/graphics/planeten/gasplanet02.jpg diff --git a/skin/frontend/base/default/graphics/planeten/gasplanet03.jpg b/src/skin/frontend/base/default/graphics/planeten/gasplanet03.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/gasplanet03.jpg rename to src/skin/frontend/base/default/graphics/planeten/gasplanet03.jpg diff --git a/skin/frontend/base/default/graphics/planeten/gasplanet04.jpg b/src/skin/frontend/base/default/graphics/planeten/gasplanet04.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/gasplanet04.jpg rename to src/skin/frontend/base/default/graphics/planeten/gasplanet04.jpg diff --git a/skin/frontend/base/default/graphics/planeten/gasplanet05.jpg b/src/skin/frontend/base/default/graphics/planeten/gasplanet05.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/gasplanet05.jpg rename to src/skin/frontend/base/default/graphics/planeten/gasplanet05.jpg diff --git a/skin/frontend/base/default/graphics/planeten/gasplanet06.jpg b/src/skin/frontend/base/default/graphics/planeten/gasplanet06.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/gasplanet06.jpg rename to src/skin/frontend/base/default/graphics/planeten/gasplanet06.jpg diff --git a/skin/frontend/base/default/graphics/planeten/gasplanet07.jpg b/src/skin/frontend/base/default/graphics/planeten/gasplanet07.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/gasplanet07.jpg rename to src/skin/frontend/base/default/graphics/planeten/gasplanet07.jpg diff --git a/skin/frontend/base/default/graphics/planeten/gasplanet08.jpg b/src/skin/frontend/base/default/graphics/planeten/gasplanet08.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/gasplanet08.jpg rename to src/skin/frontend/base/default/graphics/planeten/gasplanet08.jpg diff --git a/skin/frontend/base/default/graphics/planeten/mond.jpg b/src/skin/frontend/base/default/graphics/planeten/mond.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/mond.jpg rename to src/skin/frontend/base/default/graphics/planeten/mond.jpg diff --git a/skin/frontend/base/default/graphics/planeten/normaltempplanet01.jpg b/src/skin/frontend/base/default/graphics/planeten/normaltempplanet01.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/normaltempplanet01.jpg rename to src/skin/frontend/base/default/graphics/planeten/normaltempplanet01.jpg diff --git a/skin/frontend/base/default/graphics/planeten/normaltempplanet02.jpg b/src/skin/frontend/base/default/graphics/planeten/normaltempplanet02.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/normaltempplanet02.jpg rename to src/skin/frontend/base/default/graphics/planeten/normaltempplanet02.jpg diff --git a/skin/frontend/base/default/graphics/planeten/normaltempplanet03.jpg b/src/skin/frontend/base/default/graphics/planeten/normaltempplanet03.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/normaltempplanet03.jpg rename to src/skin/frontend/base/default/graphics/planeten/normaltempplanet03.jpg diff --git a/skin/frontend/base/default/graphics/planeten/normaltempplanet04.jpg b/src/skin/frontend/base/default/graphics/planeten/normaltempplanet04.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/normaltempplanet04.jpg rename to src/skin/frontend/base/default/graphics/planeten/normaltempplanet04.jpg diff --git a/skin/frontend/base/default/graphics/planeten/normaltempplanet05.jpg b/src/skin/frontend/base/default/graphics/planeten/normaltempplanet05.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/normaltempplanet05.jpg rename to src/skin/frontend/base/default/graphics/planeten/normaltempplanet05.jpg diff --git a/skin/frontend/base/default/graphics/planeten/normaltempplanet06.jpg b/src/skin/frontend/base/default/graphics/planeten/normaltempplanet06.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/normaltempplanet06.jpg rename to src/skin/frontend/base/default/graphics/planeten/normaltempplanet06.jpg diff --git a/skin/frontend/base/default/graphics/planeten/normaltempplanet07.jpg b/src/skin/frontend/base/default/graphics/planeten/normaltempplanet07.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/normaltempplanet07.jpg rename to src/skin/frontend/base/default/graphics/planeten/normaltempplanet07.jpg diff --git a/skin/frontend/base/default/graphics/planeten/normaltempplanet08.jpg b/src/skin/frontend/base/default/graphics/planeten/normaltempplanet08.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/normaltempplanet08.jpg rename to src/skin/frontend/base/default/graphics/planeten/normaltempplanet08.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet01.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet01.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet01.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet01.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet02.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet02.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet02.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet02.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet03.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet03.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet03.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet03.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet04.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet04.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet04.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet04.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet05.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet05.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet05.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet05.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet06.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet06.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet06.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet06.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet07.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet07.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet07.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet07.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet08.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet08.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet08.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet08.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet09.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet09.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet09.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet09.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet10.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet10.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet10.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_dschjungelplanet10.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_eisplanet01.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet01.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_eisplanet01.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet01.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_eisplanet02.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet02.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_eisplanet02.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet02.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_eisplanet03.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet03.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_eisplanet03.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet03.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_eisplanet04.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet04.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_eisplanet04.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet04.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_eisplanet05.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet05.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_eisplanet05.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet05.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_eisplanet06.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet06.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_eisplanet06.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet06.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_eisplanet07.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet07.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_eisplanet07.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet07.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_eisplanet08.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet08.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_eisplanet08.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet08.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_eisplanet09.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet09.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_eisplanet09.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet09.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_eisplanet10.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet10.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_eisplanet10.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_eisplanet10.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_gasplanet01.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_gasplanet01.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_gasplanet01.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_gasplanet01.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_gasplanet02.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_gasplanet02.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_gasplanet02.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_gasplanet02.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_gasplanet03.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_gasplanet03.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_gasplanet03.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_gasplanet03.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_gasplanet04.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_gasplanet04.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_gasplanet04.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_gasplanet04.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_gasplanet05.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_gasplanet05.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_gasplanet05.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_gasplanet05.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_gasplanet06.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_gasplanet06.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_gasplanet06.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_gasplanet06.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_gasplanet07.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_gasplanet07.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_gasplanet07.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_gasplanet07.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_gasplanet08.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_gasplanet08.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_gasplanet08.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_gasplanet08.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_mond.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_mond.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_mond.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_mond.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet01.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet01.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet01.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet01.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet02.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet02.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet02.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet02.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet03.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet03.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet03.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet03.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet04.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet04.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet04.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet04.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet05.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet05.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet05.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet05.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet06.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet06.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet06.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet06.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet07.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet07.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet07.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet07.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet08.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet08.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet08.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_normaltempplanet08.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet01.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet01.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_trockenplanet01.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet01.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet02.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet02.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_trockenplanet02.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet02.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet03.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet03.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_trockenplanet03.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet03.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet04.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet04.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_trockenplanet04.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet04.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet05.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet05.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_trockenplanet05.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet05.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet06.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet06.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_trockenplanet06.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet06.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet07.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet07.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_trockenplanet07.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet07.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet08.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet08.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_trockenplanet08.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet08.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet09.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet09.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_trockenplanet09.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet09.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet10.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet10.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_trockenplanet10.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_trockenplanet10.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet01.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet01.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_wasserplanet01.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet01.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet02.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet02.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_wasserplanet02.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet02.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet03.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet03.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_wasserplanet03.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet03.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet04.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet04.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_wasserplanet04.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet04.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet05.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet05.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_wasserplanet05.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet05.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet06.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet06.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_wasserplanet06.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet06.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet07.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet07.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_wasserplanet07.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet07.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet08.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet08.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_wasserplanet08.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet08.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet09.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet09.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_wasserplanet09.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_wasserplanet09.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_wuestenplanet01.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_wuestenplanet01.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_wuestenplanet01.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_wuestenplanet01.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_wuestenplanet02.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_wuestenplanet02.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_wuestenplanet02.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_wuestenplanet02.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_wuestenplanet03.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_wuestenplanet03.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_wuestenplanet03.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_wuestenplanet03.jpg diff --git a/skin/frontend/base/default/graphics/planeten/small/s_wuestenplanet04.jpg b/src/skin/frontend/base/default/graphics/planeten/small/s_wuestenplanet04.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/small/s_wuestenplanet04.jpg rename to src/skin/frontend/base/default/graphics/planeten/small/s_wuestenplanet04.jpg diff --git a/skin/frontend/base/default/graphics/planeten/trockenplanet01.jpg b/src/skin/frontend/base/default/graphics/planeten/trockenplanet01.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/trockenplanet01.jpg rename to src/skin/frontend/base/default/graphics/planeten/trockenplanet01.jpg diff --git a/skin/frontend/base/default/graphics/planeten/trockenplanet02.jpg b/src/skin/frontend/base/default/graphics/planeten/trockenplanet02.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/trockenplanet02.jpg rename to src/skin/frontend/base/default/graphics/planeten/trockenplanet02.jpg diff --git a/skin/frontend/base/default/graphics/planeten/trockenplanet03.jpg b/src/skin/frontend/base/default/graphics/planeten/trockenplanet03.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/trockenplanet03.jpg rename to src/skin/frontend/base/default/graphics/planeten/trockenplanet03.jpg diff --git a/skin/frontend/base/default/graphics/planeten/trockenplanet04.jpg b/src/skin/frontend/base/default/graphics/planeten/trockenplanet04.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/trockenplanet04.jpg rename to src/skin/frontend/base/default/graphics/planeten/trockenplanet04.jpg diff --git a/skin/frontend/base/default/graphics/planeten/trockenplanet05.jpg b/src/skin/frontend/base/default/graphics/planeten/trockenplanet05.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/trockenplanet05.jpg rename to src/skin/frontend/base/default/graphics/planeten/trockenplanet05.jpg diff --git a/skin/frontend/base/default/graphics/planeten/trockenplanet06.jpg b/src/skin/frontend/base/default/graphics/planeten/trockenplanet06.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/trockenplanet06.jpg rename to src/skin/frontend/base/default/graphics/planeten/trockenplanet06.jpg diff --git a/skin/frontend/base/default/graphics/planeten/trockenplanet07.jpg b/src/skin/frontend/base/default/graphics/planeten/trockenplanet07.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/trockenplanet07.jpg rename to src/skin/frontend/base/default/graphics/planeten/trockenplanet07.jpg diff --git a/skin/frontend/base/default/graphics/planeten/trockenplanet08.jpg b/src/skin/frontend/base/default/graphics/planeten/trockenplanet08.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/trockenplanet08.jpg rename to src/skin/frontend/base/default/graphics/planeten/trockenplanet08.jpg diff --git a/skin/frontend/base/default/graphics/planeten/trockenplanet09.jpg b/src/skin/frontend/base/default/graphics/planeten/trockenplanet09.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/trockenplanet09.jpg rename to src/skin/frontend/base/default/graphics/planeten/trockenplanet09.jpg diff --git a/skin/frontend/base/default/graphics/planeten/trockenplanet10.jpg b/src/skin/frontend/base/default/graphics/planeten/trockenplanet10.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/trockenplanet10.jpg rename to src/skin/frontend/base/default/graphics/planeten/trockenplanet10.jpg diff --git a/skin/frontend/base/default/graphics/planeten/wasserplanet01.jpg b/src/skin/frontend/base/default/graphics/planeten/wasserplanet01.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/wasserplanet01.jpg rename to src/skin/frontend/base/default/graphics/planeten/wasserplanet01.jpg diff --git a/skin/frontend/base/default/graphics/planeten/wasserplanet02.jpg b/src/skin/frontend/base/default/graphics/planeten/wasserplanet02.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/wasserplanet02.jpg rename to src/skin/frontend/base/default/graphics/planeten/wasserplanet02.jpg diff --git a/skin/frontend/base/default/graphics/planeten/wasserplanet03.jpg b/src/skin/frontend/base/default/graphics/planeten/wasserplanet03.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/wasserplanet03.jpg rename to src/skin/frontend/base/default/graphics/planeten/wasserplanet03.jpg diff --git a/skin/frontend/base/default/graphics/planeten/wasserplanet04.jpg b/src/skin/frontend/base/default/graphics/planeten/wasserplanet04.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/wasserplanet04.jpg rename to src/skin/frontend/base/default/graphics/planeten/wasserplanet04.jpg diff --git a/skin/frontend/base/default/graphics/planeten/wasserplanet05.jpg b/src/skin/frontend/base/default/graphics/planeten/wasserplanet05.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/wasserplanet05.jpg rename to src/skin/frontend/base/default/graphics/planeten/wasserplanet05.jpg diff --git a/skin/frontend/base/default/graphics/planeten/wasserplanet06.jpg b/src/skin/frontend/base/default/graphics/planeten/wasserplanet06.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/wasserplanet06.jpg rename to src/skin/frontend/base/default/graphics/planeten/wasserplanet06.jpg diff --git a/skin/frontend/base/default/graphics/planeten/wasserplanet07.jpg b/src/skin/frontend/base/default/graphics/planeten/wasserplanet07.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/wasserplanet07.jpg rename to src/skin/frontend/base/default/graphics/planeten/wasserplanet07.jpg diff --git a/skin/frontend/base/default/graphics/planeten/wasserplanet08.jpg b/src/skin/frontend/base/default/graphics/planeten/wasserplanet08.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/wasserplanet08.jpg rename to src/skin/frontend/base/default/graphics/planeten/wasserplanet08.jpg diff --git a/skin/frontend/base/default/graphics/planeten/wasserplanet09.jpg b/src/skin/frontend/base/default/graphics/planeten/wasserplanet09.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/wasserplanet09.jpg rename to src/skin/frontend/base/default/graphics/planeten/wasserplanet09.jpg diff --git a/skin/frontend/base/default/graphics/planeten/wuestenplanet01.jpg b/src/skin/frontend/base/default/graphics/planeten/wuestenplanet01.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/wuestenplanet01.jpg rename to src/skin/frontend/base/default/graphics/planeten/wuestenplanet01.jpg diff --git a/skin/frontend/base/default/graphics/planeten/wuestenplanet02.jpg b/src/skin/frontend/base/default/graphics/planeten/wuestenplanet02.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/wuestenplanet02.jpg rename to src/skin/frontend/base/default/graphics/planeten/wuestenplanet02.jpg diff --git a/skin/frontend/base/default/graphics/planeten/wuestenplanet03.jpg b/src/skin/frontend/base/default/graphics/planeten/wuestenplanet03.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/wuestenplanet03.jpg rename to src/skin/frontend/base/default/graphics/planeten/wuestenplanet03.jpg diff --git a/skin/frontend/base/default/graphics/planeten/wuestenplanet04.jpg b/src/skin/frontend/base/default/graphics/planeten/wuestenplanet04.jpg similarity index 100% rename from skin/frontend/base/default/graphics/planeten/wuestenplanet04.jpg rename to src/skin/frontend/base/default/graphics/planeten/wuestenplanet04.jpg diff --git a/skin/frontend/base/default/js/fleet.js b/src/skin/frontend/base/default/js/fleet.js similarity index 100% rename from skin/frontend/base/default/js/fleet.js rename to src/skin/frontend/base/default/js/fleet.js diff --git a/skin/install/base/default/css/base.css b/src/skin/install/base/default/css/base.css similarity index 100% rename from skin/install/base/default/css/base.css rename to src/skin/install/base/default/css/base.css diff --git a/stat.php b/src/stat.php similarity index 99% rename from stat.php rename to src/stat.php index 69b51f3..278840c 100644 --- a/stat.php +++ b/src/stat.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/techdetails.php b/src/techdetails.php similarity index 98% rename from techdetails.php rename to src/techdetails.php index fd02217..56c53dd 100644 --- a/techdetails.php +++ b/src/techdetails.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/techtree.php b/src/techtree.php similarity index 98% rename from techtree.php rename to src/techtree.php index 617aa8e..09d1d04 100644 --- a/techtree.php +++ b/src/techtree.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/verband.php b/src/verband.php similarity index 99% rename from verband.php rename to src/verband.php index 1fcd63b..4e19134 100644 --- a/verband.php +++ b/src/verband.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/application/config/local.php b/tests/.placeholder similarity index 100% rename from application/config/local.php rename to tests/.placeholder
getData('Law_leyends')?>
getData('a') > 0):?> - + <?php echo $this->__('Remove rank')?> diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_admin_members_function.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_members_function.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_admin_members_function.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_members_function.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_admin_members_row.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_members_row.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_admin_members_row.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_members_row.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_admin_members_row_edit.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_members_row_edit.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_admin_members_row_edit.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_members_row_edit.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_admin_members_table.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_members_table.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_admin_members_table.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_members_table.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_admin_rename.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_rename.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_admin_rename.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_rename.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_admin_rename1.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_rename1.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_admin_rename1.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_rename1.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_admin_rename2.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_rename2.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_admin_rename2.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_rename2.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_admin_request_form.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_request_form.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_admin_request_form.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_request_form.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_admin_request_row.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_request_row.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_admin_request_row.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_request_row.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_admin_request_table.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_request_table.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_admin_request_table.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_admin_request_table.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_ainfo.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_ainfo.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_ainfo.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_ainfo.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_apply_waitform.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_apply_waitform.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_apply_waitform.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_apply_waitform.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_applyform.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_applyform.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_applyform.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_applyform.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_circular.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_circular.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_circular.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_circular.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_circular_form.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_circular_form.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_circular_form.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_circular_form.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_defaultmenu.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_defaultmenu.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_defaultmenu.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_defaultmenu.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_frontpage.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_frontpage.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_frontpage.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_frontpage.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_make.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_make.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_make.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_make.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_makeform.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_makeform.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_makeform.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_makeform.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_memberslist_row.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_memberslist_row.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_memberslist_row.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_memberslist_row.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_memberslist_table.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_memberslist_table.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_memberslist_table.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_memberslist_table.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_searchform.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_searchform.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_searchform.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_searchform.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_searchresult_row.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_searchresult_row.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_searchresult_row.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_searchresult_row.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/alliance_searchresult_table.tpl b/src/application/design/frontend/base/default/scripts/deprecated/alliance_searchresult_table.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/alliance_searchresult_table.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/alliance_searchresult_table.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/banned_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/banned_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/banned_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/banned_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/changelog_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/changelog_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/changelog_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/changelog_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/changelog_table.tpl b/src/application/design/frontend/base/default/scripts/deprecated/changelog_table.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/changelog_table.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/changelog_table.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/chat_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/chat_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/chat_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/chat_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/contact_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/contact_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/contact_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/contact_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/contact_body_rows.tpl b/src/application/design/frontend/base/default/scripts/deprecated/contact_body_rows.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/contact_body_rows.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/contact_body_rows.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/credit_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/credit_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/credit_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/credit_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/galaxy_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/galaxy_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/galaxy_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/galaxy_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/galaxy_row.tpl b/src/application/design/frontend/base/default/scripts/deprecated/galaxy_row.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/galaxy_row.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/galaxy_row.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/galaxy_row_action.tpl b/src/application/design/frontend/base/default/scripts/deprecated/galaxy_row_action.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/galaxy_row_action.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/galaxy_row_action.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/galaxy_row_ally.tpl b/src/application/design/frontend/base/default/scripts/deprecated/galaxy_row_ally.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/galaxy_row_ally.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/galaxy_row_ally.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/galaxy_row_debris.tpl b/src/application/design/frontend/base/default/scripts/deprecated/galaxy_row_debris.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/galaxy_row_debris.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/galaxy_row_debris.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/galaxy_row_luna.tpl b/src/application/design/frontend/base/default/scripts/deprecated/galaxy_row_luna.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/galaxy_row_luna.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/galaxy_row_luna.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/galaxy_row_planet.tpl b/src/application/design/frontend/base/default/scripts/deprecated/galaxy_row_planet.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/galaxy_row_planet.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/galaxy_row_planet.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/galaxy_row_user.tpl b/src/application/design/frontend/base/default/scripts/deprecated/galaxy_row_user.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/galaxy_row_user.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/galaxy_row_user.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/gate_fleet_rows.tpl b/src/application/design/frontend/base/default/scripts/deprecated/gate_fleet_rows.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/gate_fleet_rows.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/gate_fleet_rows.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/gate_fleet_table.tpl b/src/application/design/frontend/base/default/scripts/deprecated/gate_fleet_table.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/gate_fleet_table.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/gate_fleet_table.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/imperium_row.tpl b/src/application/design/frontend/base/default/scripts/deprecated/imperium_row.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/imperium_row.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/imperium_row.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/imperium_row2.tpl b/src/application/design/frontend/base/default/scripts/deprecated/imperium_row2.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/imperium_row2.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/imperium_row2.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/imperium_table.tpl b/src/application/design/frontend/base/default/scripts/deprecated/imperium_table.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/imperium_table.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/imperium_table.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/info_buildings_defense.tpl b/src/application/design/frontend/base/default/scripts/deprecated/info_buildings_defense.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/info_buildings_defense.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/info_buildings_defense.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/info_buildings_destroy.tpl b/src/application/design/frontend/base/default/scripts/deprecated/info_buildings_destroy.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/info_buildings_destroy.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/info_buildings_destroy.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/info_buildings_fleet.tpl b/src/application/design/frontend/base/default/scripts/deprecated/info_buildings_fleet.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/info_buildings_fleet.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/info_buildings_fleet.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/info_buildings_general.tpl b/src/application/design/frontend/base/default/scripts/deprecated/info_buildings_general.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/info_buildings_general.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/info_buildings_general.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/info_buildings_table.tpl b/src/application/design/frontend/base/default/scripts/deprecated/info_buildings_table.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/info_buildings_table.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/info_buildings_table.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/info_officiers_general.tpl b/src/application/design/frontend/base/default/scripts/deprecated/info_officiers_general.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/info_officiers_general.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/info_officiers_general.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/lostpassword.tpl b/src/application/design/frontend/base/default/scripts/deprecated/lostpassword.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/lostpassword.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/lostpassword.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/marchand_cristal.tpl b/src/application/design/frontend/base/default/scripts/deprecated/marchand_cristal.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/marchand_cristal.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/marchand_cristal.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/marchand_deuterium.tpl b/src/application/design/frontend/base/default/scripts/deprecated/marchand_deuterium.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/marchand_deuterium.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/marchand_deuterium.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/marchand_main.tpl b/src/application/design/frontend/base/default/scripts/deprecated/marchand_main.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/marchand_main.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/marchand_main.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/marchand_metal.tpl b/src/application/design/frontend/base/default/scripts/deprecated/marchand_metal.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/marchand_metal.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/marchand_metal.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/message_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/message_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/message_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/message_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/messages_pm_form.tpl b/src/application/design/frontend/base/default/scripts/deprecated/messages_pm_form.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/messages_pm_form.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/messages_pm_form.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/messages_pm_form_bb.tpl b/src/application/design/frontend/base/default/scripts/deprecated/messages_pm_form_bb.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/messages_pm_form_bb.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/messages_pm_form_bb.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/multi.tpl b/src/application/design/frontend/base/default/scripts/deprecated/multi.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/multi.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/multi.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/notes_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/notes_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/notes_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/notes_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/notes_body_entry.tpl b/src/application/design/frontend/base/default/scripts/deprecated/notes_body_entry.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/notes_body_entry.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/notes_body_entry.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/notes_form.tpl b/src/application/design/frontend/base/default/scripts/deprecated/notes_form.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/notes_form.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/notes_form.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/officier_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/officier_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/officier_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/officier_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/officier_rows.tpl b/src/application/design/frontend/base/default/scripts/deprecated/officier_rows.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/officier_rows.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/officier_rows.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/options_admadd.tpl b/src/application/design/frontend/base/default/scripts/deprecated/options_admadd.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/options_admadd.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/options_admadd.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/options_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/options_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/options_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/options_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/options_body_vmode.tpl b/src/application/design/frontend/base/default/scripts/deprecated/options_body_vmode.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/options_body_vmode.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/options_body_vmode.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/overall_footer.tpl b/src/application/design/frontend/base/default/scripts/deprecated/overall_footer.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/overall_footer.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/overall_footer.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/overview_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/overview_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/overview_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/overview_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/overview_deleteplanet.tpl b/src/application/design/frontend/base/default/scripts/deprecated/overview_deleteplanet.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/overview_deleteplanet.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/overview_deleteplanet.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/overview_fleet_event.tpl b/src/application/design/frontend/base/default/scripts/deprecated/overview_fleet_event.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/overview_fleet_event.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/overview_fleet_event.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/overview_renameplanet.tpl b/src/application/design/frontend/base/default/scripts/deprecated/overview_renameplanet.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/overview_renameplanet.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/overview_renameplanet.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/phalanx_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/phalanx_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/phalanx_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/phalanx_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/records_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/records_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/records_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/records_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/records_section_header.tpl b/src/application/design/frontend/base/default/scripts/deprecated/records_section_header.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/records_section_header.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/records_section_header.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/records_section_rows.tpl b/src/application/design/frontend/base/default/scripts/deprecated/records_section_rows.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/records_section_rows.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/records_section_rows.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/registry_form.tpl b/src/application/design/frontend/base/default/scripts/deprecated/registry_form.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/registry_form.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/registry_form.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/resources.tpl b/src/application/design/frontend/base/default/scripts/deprecated/resources.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/resources.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/resources.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/resources_row.tpl b/src/application/design/frontend/base/default/scripts/deprecated/resources_row.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/resources_row.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/resources_row.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/rules_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/rules_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/rules_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/rules_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/search_ally_row.tpl b/src/application/design/frontend/base/default/scripts/deprecated/search_ally_row.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/search_ally_row.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/search_ally_row.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/search_ally_table.tpl b/src/application/design/frontend/base/default/scripts/deprecated/search_ally_table.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/search_ally_table.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/search_ally_table.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/search_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/search_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/search_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/search_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/search_user_row.tpl b/src/application/design/frontend/base/default/scripts/deprecated/search_user_row.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/search_user_row.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/search_user_row.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/search_user_table.tpl b/src/application/design/frontend/base/default/scripts/deprecated/search_user_table.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/search_user_table.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/search_user_table.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/serv_infos.tpl b/src/application/design/frontend/base/default/scripts/deprecated/serv_infos.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/serv_infos.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/serv_infos.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/simple_footer.tpl b/src/application/design/frontend/base/default/scripts/deprecated/simple_footer.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/simple_footer.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/simple_footer.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/simple_header.tpl b/src/application/design/frontend/base/default/scripts/deprecated/simple_header.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/simple_header.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/simple_header.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/stat_alliancetable.tpl b/src/application/design/frontend/base/default/scripts/deprecated/stat_alliancetable.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/stat_alliancetable.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/stat_alliancetable.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/stat_alliancetable_header.tpl b/src/application/design/frontend/base/default/scripts/deprecated/stat_alliancetable_header.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/stat_alliancetable_header.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/stat_alliancetable_header.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/stat_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/stat_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/stat_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/stat_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/stat_playertable.tpl b/src/application/design/frontend/base/default/scripts/deprecated/stat_playertable.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/stat_playertable.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/stat_playertable.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/stat_playertable_header.tpl b/src/application/design/frontend/base/default/scripts/deprecated/stat_playertable_header.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/stat_playertable_header.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/stat_playertable_header.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/statjoueur.tpl b/src/application/design/frontend/base/default/scripts/deprecated/statjoueur.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/statjoueur.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/statjoueur.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/techtree_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/techtree_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/techtree_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/techtree_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/techtree_details.tpl b/src/application/design/frontend/base/default/scripts/deprecated/techtree_details.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/techtree_details.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/techtree_details.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/techtree_head.tpl b/src/application/design/frontend/base/default/scripts/deprecated/techtree_head.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/techtree_head.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/techtree_head.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/techtree_row.tpl b/src/application/design/frontend/base/default/scripts/deprecated/techtree_row.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/techtree_row.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/techtree_row.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/teleport.tpl b/src/application/design/frontend/base/default/scripts/deprecated/teleport.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/teleport.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/teleport.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/tradingscrapmetal.tpl b/src/application/design/frontend/base/default/scripts/deprecated/tradingscrapmetal.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/tradingscrapmetal.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/tradingscrapmetal.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/tradingscrapmetal_n.tpl b/src/application/design/frontend/base/default/scripts/deprecated/tradingscrapmetal_n.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/tradingscrapmetal_n.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/tradingscrapmetal_n.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/usr_banned.tpl b/src/application/design/frontend/base/default/scripts/deprecated/usr_banned.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/usr_banned.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/usr_banned.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/usuw_body.tpl b/src/application/design/frontend/base/default/scripts/deprecated/usuw_body.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/usuw_body.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/usuw_body.tpl diff --git a/application/design/frontend/base/default/scripts/deprecated/zglos.tpl b/src/application/design/frontend/base/default/scripts/deprecated/zglos.tpl similarity index 100% rename from application/design/frontend/base/default/scripts/deprecated/zglos.tpl rename to src/application/design/frontend/base/default/scripts/deprecated/zglos.tpl diff --git a/application/design/frontend/base/default/scripts/empire/planet/buildings.phtml b/src/application/design/frontend/base/default/scripts/empire/planet/buildings.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/empire/planet/buildings.phtml rename to src/application/design/frontend/base/default/scripts/empire/planet/buildings.phtml diff --git a/application/design/frontend/base/default/scripts/empire/planet/buildings/item.phtml b/src/application/design/frontend/base/default/scripts/empire/planet/buildings/item.phtml similarity index 80% rename from application/design/frontend/base/default/scripts/empire/planet/buildings/item.phtml rename to src/application/design/frontend/base/default/scripts/empire/planet/buildings/item.phtml index b169db1..4254d2f 100644 --- a/application/design/frontend/base/default/scripts/empire/planet/buildings/item.phtml +++ b/src/application/design/frontend/base/default/scripts/empire/planet/buildings/item.phtml @@ -6,9 +6,15 @@
-
-

__('Build next level (%s)', $this->renderNumber($this->getNextLevel()))?>

+ isBuildable()):?> +
+

__('Resources Needed')?>

+ + +

getDescription()?>

    diff --git a/application/design/frontend/base/default/scripts/empire/planet/buildings/queue.phtml b/src/application/design/frontend/base/default/scripts/empire/planet/buildings/queue.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/empire/planet/buildings/queue.phtml rename to src/application/design/frontend/base/default/scripts/empire/planet/buildings/queue.phtml diff --git a/src/application/design/frontend/base/default/scripts/empire/planet/buildings/queue/item.phtml b/src/application/design/frontend/base/default/scripts/empire/planet/buildings/queue/item.phtml new file mode 100644 index 0000000..f0ab9b0 --- /dev/null +++ b/src/application/design/frontend/base/default/scripts/empire/planet/buildings/queue/item.phtml @@ -0,0 +1,11 @@ + +
    +

    + + escape($this->getName())?> (renderNumber($this->getItemQueuedLevel())?>) +

    +

    __('Lasts %s', $this->renderTime($this->getBuildingRemainingTime()))?>

    + +
    \ No newline at end of file diff --git a/application/design/frontend/base/default/scripts/empire/planet/research-lab.phtml b/src/application/design/frontend/base/default/scripts/empire/planet/research-lab.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/empire/planet/research-lab.phtml rename to src/application/design/frontend/base/default/scripts/empire/planet/research-lab.phtml diff --git a/application/design/frontend/base/default/scripts/empire/planet/research-lab/item.phtml b/src/application/design/frontend/base/default/scripts/empire/planet/research-lab/item.phtml similarity index 84% rename from application/design/frontend/base/default/scripts/empire/planet/research-lab/item.phtml rename to src/application/design/frontend/base/default/scripts/empire/planet/research-lab/item.phtml index 146fd38..87c1d88 100644 --- a/application/design/frontend/base/default/scripts/empire/planet/research-lab/item.phtml +++ b/src/application/design/frontend/base/default/scripts/empire/planet/research-lab/item.phtml @@ -7,7 +7,7 @@
-

__('Building time: %s', $this->renderTime($this->getBuildingTime(1), false))?> +

__('Building time: %s', $this->renderTime($this->getBuildingTimeForNextLevel(), false))?>

\ No newline at end of file diff --git a/application/design/frontend/base/default/scripts/empire/planet/research-lab/queue.phtml b/src/application/design/frontend/base/default/scripts/empire/planet/research-lab/queue.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/empire/planet/research-lab/queue.phtml rename to src/application/design/frontend/base/default/scripts/empire/planet/research-lab/queue.phtml diff --git a/src/application/design/frontend/base/default/scripts/empire/planet/research-lab/queue/item.phtml b/src/application/design/frontend/base/default/scripts/empire/planet/research-lab/queue/item.phtml new file mode 100644 index 0000000..f0ab9b0 --- /dev/null +++ b/src/application/design/frontend/base/default/scripts/empire/planet/research-lab/queue/item.phtml @@ -0,0 +1,11 @@ + +
+

+ + escape($this->getName())?> (renderNumber($this->getItemQueuedLevel())?>) +

+

__('Lasts %s', $this->renderTime($this->getBuildingRemainingTime()))?>

+ +
\ No newline at end of file diff --git a/application/design/frontend/base/default/scripts/empire/planet/shipyard.phtml b/src/application/design/frontend/base/default/scripts/empire/planet/shipyard.phtml similarity index 88% rename from application/design/frontend/base/default/scripts/empire/planet/shipyard.phtml rename to src/application/design/frontend/base/default/scripts/empire/planet/shipyard.phtml index d833b35..4f19a2d 100644 --- a/application/design/frontend/base/default/scripts/empire/planet/shipyard.phtml +++ b/src/application/design/frontend/base/default/scripts/empire/planet/shipyard.phtml @@ -1,6 +1,6 @@

__('Shipyard')?>

- + getPartial('item-list.items')->render()?> diff --git a/application/design/frontend/base/default/scripts/empire/planet/shipyard/item.phtml b/src/application/design/frontend/base/default/scripts/empire/planet/shipyard/item.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/empire/planet/shipyard/item.phtml rename to src/application/design/frontend/base/default/scripts/empire/planet/shipyard/item.phtml diff --git a/application/design/frontend/base/default/scripts/empire/planet/shipyard/queue.phtml b/src/application/design/frontend/base/default/scripts/empire/planet/shipyard/queue.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/empire/planet/shipyard/queue.phtml rename to src/application/design/frontend/base/default/scripts/empire/planet/shipyard/queue.phtml diff --git a/application/design/frontend/base/default/scripts/empire/resources/default.phtml b/src/application/design/frontend/base/default/scripts/empire/resources/default.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/empire/resources/default.phtml rename to src/application/design/frontend/base/default/scripts/empire/resources/default.phtml diff --git a/application/design/frontend/base/default/scripts/empire/resources/energy.phtml b/src/application/design/frontend/base/default/scripts/empire/resources/energy.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/empire/resources/energy.phtml rename to src/application/design/frontend/base/default/scripts/empire/resources/energy.phtml diff --git a/application/design/frontend/base/default/scripts/empire/topnav.phtml b/src/application/design/frontend/base/default/scripts/empire/topnav.phtml similarity index 79% rename from application/design/frontend/base/default/scripts/empire/topnav.phtml rename to src/application/design/frontend/base/default/scripts/empire/topnav.phtml index afcf936..ab4f285 100644 --- a/application/design/frontend/base/default/scripts/empire/topnav.phtml +++ b/src/application/design/frontend/base/default/scripts/empire/topnav.phtml @@ -4,18 +4,18 @@ getPlanetCollection() as $planet):?> getId() != $currentPlanet->getId()):?>
@@ -82,12 +82,12 @@
<?php echo $this->__('Messages')?>

- getCurrentUser()->getNewMessagesCount()) > 1):?> - __('%1$d messages.', $count)?> + getCurrentPlayer()->getNewMessagesCount()) > 1):?> + __('%1$d messages.', $count)?> - __('1 message.')?> + __('1 message.')?> - __('No message.')?> + __('No message.')?>

diff --git a/application/design/frontend/base/default/scripts/page/1column.phtml b/src/application/design/frontend/base/default/scripts/page/1column.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/page/1column.phtml rename to src/application/design/frontend/base/default/scripts/page/1column.phtml diff --git a/application/design/frontend/base/default/scripts/page/2columns-left.phtml b/src/application/design/frontend/base/default/scripts/page/2columns-left.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/page/2columns-left.phtml rename to src/application/design/frontend/base/default/scripts/page/2columns-left.phtml diff --git a/application/design/frontend/base/default/scripts/page/2columns-right.phtml b/src/application/design/frontend/base/default/scripts/page/2columns-right.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/page/2columns-right.phtml rename to src/application/design/frontend/base/default/scripts/page/2columns-right.phtml diff --git a/application/design/frontend/base/default/scripts/page/3columns.phtml b/src/application/design/frontend/base/default/scripts/page/3columns.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/page/3columns.phtml rename to src/application/design/frontend/base/default/scripts/page/3columns.phtml diff --git a/application/design/install/base/default/scripts/page/html/head.phtml b/src/application/design/frontend/base/default/scripts/page/html/head.phtml similarity index 62% rename from application/design/install/base/default/scripts/page/html/head.phtml rename to src/application/design/frontend/base/default/scripts/page/html/head.phtml index 7301e63..cb74234 100644 --- a/application/design/install/base/default/scripts/page/html/head.phtml +++ b/src/application/design/frontend/base/default/scripts/page/html/head.phtml @@ -1,5 +1,5 @@ <?php echo $this->escape($this->getTitle())?> - + getCss() as $css):?> @@ -12,7 +12,7 @@ getJs() as $js):?> - + getSkinJs() as $js):?> @@ -23,4 +23,12 @@ /*]]>*/ - \ No newline at end of file + + \ No newline at end of file diff --git a/application/design/frontend/base/default/scripts/page/html/message.phtml b/src/application/design/frontend/base/default/scripts/page/html/message.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/page/html/message.phtml rename to src/application/design/frontend/base/default/scripts/page/html/message.phtml diff --git a/application/design/frontend/base/default/scripts/page/html/navigation.phtml b/src/application/design/frontend/base/default/scripts/page/html/navigation.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/page/html/navigation.phtml rename to src/application/design/frontend/base/default/scripts/page/html/navigation.phtml diff --git a/application/design/frontend/base/default/scripts/page/html/navigation/link.phtml b/src/application/design/frontend/base/default/scripts/page/html/navigation/link.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/page/html/navigation/link.phtml rename to src/application/design/frontend/base/default/scripts/page/html/navigation/link.phtml diff --git a/application/design/frontend/base/default/scripts/page/html/navigation/node.phtml b/src/application/design/frontend/base/default/scripts/page/html/navigation/node.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/page/html/navigation/node.phtml rename to src/application/design/frontend/base/default/scripts/page/html/navigation/node.phtml diff --git a/src/application/design/frontend/base/default/scripts/page/html/no-route.phtml b/src/application/design/frontend/base/default/scripts/page/html/no-route.phtml new file mode 100644 index 0000000..9a65c8b --- /dev/null +++ b/src/application/design/frontend/base/default/scripts/page/html/no-route.phtml @@ -0,0 +1,5 @@ +
+

__('Not found')?>

+

__('The page you requested could not be found, please check your input.')?>

+

__('Back to the home page.')?>

+
\ No newline at end of file diff --git a/src/application/design/frontend/base/default/scripts/page/html/top-bar.phtml b/src/application/design/frontend/base/default/scripts/page/html/top-bar.phtml new file mode 100644 index 0000000..8fffea9 --- /dev/null +++ b/src/application/design/frontend/base/default/scripts/page/html/top-bar.phtml @@ -0,0 +1,14 @@ +
+
+ isLoggedIn()):?> + + __('Register')?> + __('There are %d registered players', $this->getPlayerCount())?> + + __('Logged in as %s', $this->escape($this->getPlayer()->getUsername()))?> + __('Logout')?> + __('Back to the game')?> + + __('There are %d online players', $this->getOnlinePlayerCount())?> +
+
\ No newline at end of file diff --git a/src/application/design/frontend/base/default/scripts/player/login.phtml b/src/application/design/frontend/base/default/scripts/player/login.phtml new file mode 100644 index 0000000..6594e56 --- /dev/null +++ b/src/application/design/frontend/base/default/scripts/player/login.phtml @@ -0,0 +1,23 @@ +
+
+ __('Login')?> +

+ + +

+

+ + +

+

+ + +

+

+ __('I have lost my password.')?> +

+
+

+ +

+
\ No newline at end of file diff --git a/src/application/design/frontend/base/default/scripts/player/lost-password.phtml b/src/application/design/frontend/base/default/scripts/player/lost-password.phtml new file mode 100644 index 0000000..9e074f0 --- /dev/null +++ b/src/application/design/frontend/base/default/scripts/player/lost-password.phtml @@ -0,0 +1,16 @@ +
+
+ __('Lost your password?')?> +

+ + +

+

+ + +

+
+

+ +

+
\ No newline at end of file diff --git a/src/application/design/frontend/base/default/scripts/player/overview.phtml b/src/application/design/frontend/base/default/scripts/player/overview.phtml new file mode 100644 index 0000000..96f9e62 --- /dev/null +++ b/src/application/design/frontend/base/default/scripts/player/overview.phtml @@ -0,0 +1,10 @@ +
+

__('Overview')?>

+
+ renderPartial('overview.left')?> +
+
+ renderPartial('overview.center')?> +
+
+
\ No newline at end of file diff --git a/application/design/frontend/base/default/scripts/empire/overview/fleet/item.phtml b/src/application/design/frontend/base/default/scripts/player/overview/fleet/item.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/empire/overview/fleet/item.phtml rename to src/application/design/frontend/base/default/scripts/player/overview/fleet/item.phtml diff --git a/application/design/frontend/base/default/scripts/empire/overview/form/destroy-planet.phtml b/src/application/design/frontend/base/default/scripts/player/overview/form/destroy-planet.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/empire/overview/form/destroy-planet.phtml rename to src/application/design/frontend/base/default/scripts/player/overview/form/destroy-planet.phtml diff --git a/application/design/frontend/base/default/scripts/empire/overview/form/rename-planet.phtml b/src/application/design/frontend/base/default/scripts/player/overview/form/rename-planet.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/empire/overview/form/rename-planet.phtml rename to src/application/design/frontend/base/default/scripts/player/overview/form/rename-planet.phtml diff --git a/application/design/frontend/base/default/scripts/empire/overview/messages.phtml b/src/application/design/frontend/base/default/scripts/player/overview/messages.phtml similarity index 100% rename from application/design/frontend/base/default/scripts/empire/overview/messages.phtml rename to src/application/design/frontend/base/default/scripts/player/overview/messages.phtml diff --git a/application/design/frontend/base/default/scripts/empire/overview/planet/list/item.phtml b/src/application/design/frontend/base/default/scripts/player/overview/planet/list/item.phtml similarity index 75% rename from application/design/frontend/base/default/scripts/empire/overview/planet/list/item.phtml rename to src/application/design/frontend/base/default/scripts/player/overview/planet/list/item.phtml index c571391..44b2fd5 100644 --- a/application/design/frontend/base/default/scripts/empire/overview/planet/list/item.phtml +++ b/src/application/design/frontend/base/default/scripts/player/overview/planet/list/item.phtml @@ -1,6 +1,6 @@

escape($this['planet']->getData('name'))?>

-

+

count() > 0):?> diff --git a/src/application/design/frontend/base/default/scripts/player/overview/planet/mini.phtml b/src/application/design/frontend/base/default/scripts/player/overview/planet/mini.phtml new file mode 100644 index 0000000..c30fdda --- /dev/null +++ b/src/application/design/frontend/base/default/scripts/player/overview/planet/mini.phtml @@ -0,0 +1,7 @@ +
+

escape($this->getPlanetName())?>

+

escape($this->getPlanetCoords())?>

+

+ +

+
diff --git a/src/application/design/frontend/base/default/scripts/player/overview/planet/view.phtml b/src/application/design/frontend/base/default/scripts/player/overview/planet/view.phtml new file mode 100644 index 0000000..c4a724d --- /dev/null +++ b/src/application/design/frontend/base/default/scripts/player/overview/planet/view.phtml @@ -0,0 +1 @@ +renderPartial('planet-list') ?> diff --git a/application/design/frontend/base/default/scripts/user/registration.phtml b/src/application/design/frontend/base/default/scripts/player/registration.phtml similarity index 71% rename from application/design/frontend/base/default/scripts/user/registration.phtml rename to src/application/design/frontend/base/default/scripts/player/registration.phtml index f141946..28aae6a 100644 --- a/application/design/frontend/base/default/scripts/user/registration.phtml +++ b/src/application/design/frontend/base/default/scripts/player/registration.phtml @@ -1,37 +1,39 @@ -
-

Wootook!

+ +

__('Register')?>

__('User data:')?> -

+

-

+

-

+

__('Password:')?> -

+

-

+

__('Planet:')?> -

+

- +

+ +

\ No newline at end of file diff --git a/application/design/install/base/default/layouts/install.php b/src/application/design/install/base/default/layouts/install.php similarity index 92% rename from application/design/install/base/default/layouts/install.php rename to src/application/design/install/base/default/layouts/install.php index 6053560..5bc7c8e 100644 --- a/application/design/install/base/default/layouts/install.php +++ b/src/application/design/install/base/default/layouts/install.php @@ -148,6 +148,17 @@ 'template' => 'summary.phtml' ), ) + ), + 'status' => array( + 'actions' => array( + array( + 'method' => 'setData', + 'params' => array( + 'key' => 'step', + 'value' => 5 + ) + ) + ) ) ) ), diff --git a/application/design/install/base/default/layouts/page.xml b/src/application/design/install/base/default/layouts/page.xml similarity index 67% rename from application/design/install/base/default/layouts/page.xml rename to src/application/design/install/base/default/layouts/page.xml index ec1ea8e..e0837eb 100644 --- a/application/design/install/base/default/layouts/page.xml +++ b/src/application/design/install/base/default/layouts/page.xml @@ -8,9 +8,7 @@ - - page/2columns-left.phtml - + page/2columns-left.phtml @@ -20,9 +18,7 @@ - - page/2columns-right.phtml - + page/2columns-right.phtml @@ -32,9 +28,7 @@ - - page/3columns.phtml - + page/3columns.phtml @@ -44,24 +38,10 @@ - - css/deprecated/default.css - - - - - css/deprecated/formate.css - - - - - css/base.css - + css/base.css - - scripts/jquery/jquery-1.6.4.js - + scripts/jquery/jquery-1.6.4.js diff --git a/application/design/install/base/default/scripts/intro.phtml b/src/application/design/install/base/default/scripts/intro.phtml similarity index 100% rename from application/design/install/base/default/scripts/intro.phtml rename to src/application/design/install/base/default/scripts/intro.phtml diff --git a/application/design/install/base/default/scripts/page/1column.phtml b/src/application/design/install/base/default/scripts/page/1column.phtml similarity index 100% rename from application/design/install/base/default/scripts/page/1column.phtml rename to src/application/design/install/base/default/scripts/page/1column.phtml diff --git a/application/design/install/base/default/scripts/page/2columns-left.phtml b/src/application/design/install/base/default/scripts/page/2columns-left.phtml similarity index 100% rename from application/design/install/base/default/scripts/page/2columns-left.phtml rename to src/application/design/install/base/default/scripts/page/2columns-left.phtml diff --git a/application/design/install/base/default/scripts/page/2columns-right.phtml b/src/application/design/install/base/default/scripts/page/2columns-right.phtml similarity index 100% rename from application/design/install/base/default/scripts/page/2columns-right.phtml rename to src/application/design/install/base/default/scripts/page/2columns-right.phtml diff --git a/application/design/install/base/default/scripts/page/3columns.phtml b/src/application/design/install/base/default/scripts/page/3columns.phtml similarity index 100% rename from application/design/install/base/default/scripts/page/3columns.phtml rename to src/application/design/install/base/default/scripts/page/3columns.phtml diff --git a/application/design/frontend/base/default/scripts/page/html/head.phtml b/src/application/design/install/base/default/scripts/page/html/head.phtml similarity index 88% rename from application/design/frontend/base/default/scripts/page/html/head.phtml rename to src/application/design/install/base/default/scripts/page/html/head.phtml index 7301e63..b98b464 100644 --- a/application/design/frontend/base/default/scripts/page/html/head.phtml +++ b/src/application/design/install/base/default/scripts/page/html/head.phtml @@ -1,5 +1,5 @@ <?php echo $this->escape($this->getTitle())?> - + getCss() as $css):?> @@ -12,7 +12,7 @@ getJs() as $js):?> - + getSkinJs() as $js):?> diff --git a/application/design/install/base/default/scripts/page/html/message.phtml b/src/application/design/install/base/default/scripts/page/html/message.phtml similarity index 100% rename from application/design/install/base/default/scripts/page/html/message.phtml rename to src/application/design/install/base/default/scripts/page/html/message.phtml diff --git a/application/design/install/base/default/scripts/page/html/navigation.phtml b/src/application/design/install/base/default/scripts/page/html/navigation.phtml similarity index 100% rename from application/design/install/base/default/scripts/page/html/navigation.phtml rename to src/application/design/install/base/default/scripts/page/html/navigation.phtml diff --git a/application/design/install/base/default/scripts/page/html/navigation/link.phtml b/src/application/design/install/base/default/scripts/page/html/navigation/link.phtml similarity index 100% rename from application/design/install/base/default/scripts/page/html/navigation/link.phtml rename to src/application/design/install/base/default/scripts/page/html/navigation/link.phtml diff --git a/application/design/install/base/default/scripts/page/html/navigation/node.phtml b/src/application/design/install/base/default/scripts/page/html/navigation/node.phtml similarity index 100% rename from application/design/install/base/default/scripts/page/html/navigation/node.phtml rename to src/application/design/install/base/default/scripts/page/html/navigation/node.phtml diff --git a/application/design/install/base/default/scripts/status.phtml b/src/application/design/install/base/default/scripts/status.phtml similarity index 100% rename from application/design/install/base/default/scripts/status.phtml rename to src/application/design/install/base/default/scripts/status.phtml diff --git a/application/design/install/base/default/scripts/step/database.phtml b/src/application/design/install/base/default/scripts/step/database.phtml similarity index 100% rename from application/design/install/base/default/scripts/step/database.phtml rename to src/application/design/install/base/default/scripts/step/database.phtml diff --git a/application/design/install/base/default/scripts/step/profile.phtml b/src/application/design/install/base/default/scripts/step/profile.phtml similarity index 100% rename from application/design/install/base/default/scripts/step/profile.phtml rename to src/application/design/install/base/default/scripts/step/profile.phtml diff --git a/application/design/install/base/default/scripts/step/system.phtml b/src/application/design/install/base/default/scripts/step/system.phtml similarity index 100% rename from application/design/install/base/default/scripts/step/system.phtml rename to src/application/design/install/base/default/scripts/step/system.phtml diff --git a/application/design/install/base/default/scripts/step/universe.phtml b/src/application/design/install/base/default/scripts/step/universe.phtml similarity index 100% rename from application/design/install/base/default/scripts/step/universe.phtml rename to src/application/design/install/base/default/scripts/step/universe.phtml diff --git a/application/design/install/base/default/scripts/summary.phtml b/src/application/design/install/base/default/scripts/summary.phtml similarity index 100% rename from application/design/install/base/default/scripts/summary.phtml rename to src/application/design/install/base/default/scripts/summary.phtml diff --git a/application/gamedata/default/default/combat.php b/src/application/gamedata/default/default/combat.php similarity index 100% rename from application/gamedata/default/default/combat.php rename to src/application/gamedata/default/default/combat.php diff --git a/application/gamedata/default/default/events.php b/src/application/gamedata/default/default/events.php similarity index 100% rename from application/gamedata/default/default/events.php rename to src/application/gamedata/default/default/events.php diff --git a/application/gamedata/default/default/fields-alias.php b/src/application/gamedata/default/default/fields-alias.php similarity index 100% rename from application/gamedata/default/default/fields-alias.php rename to src/application/gamedata/default/default/fields-alias.php diff --git a/application/gamedata/default/default/modules.php b/src/application/gamedata/default/default/modules.php similarity index 100% rename from application/gamedata/default/default/modules.php rename to src/application/gamedata/default/default/modules.php diff --git a/application/gamedata/default/default/prices.php b/src/application/gamedata/default/default/prices.php similarity index 100% rename from application/gamedata/default/default/prices.php rename to src/application/gamedata/default/default/prices.php diff --git a/application/gamedata/default/default/production.php b/src/application/gamedata/default/default/production.php similarity index 100% rename from application/gamedata/default/default/production.php rename to src/application/gamedata/default/default/production.php diff --git a/application/gamedata/default/default/requirements.php b/src/application/gamedata/default/default/requirements.php similarity index 100% rename from application/gamedata/default/default/requirements.php rename to src/application/gamedata/default/default/requirements.php diff --git a/application/gamedata/default/default/resources.php b/src/application/gamedata/default/default/resources.php similarity index 100% rename from application/gamedata/default/default/resources.php rename to src/application/gamedata/default/default/resources.php diff --git a/application/gamedata/default/default/types.php b/src/application/gamedata/default/default/types.php similarity index 100% rename from application/gamedata/default/default/types.php rename to src/application/gamedata/default/default/types.php diff --git a/application/gamedata/legacies/default/combat.php b/src/application/gamedata/legacies/default/combat.php similarity index 100% rename from application/gamedata/legacies/default/combat.php rename to src/application/gamedata/legacies/default/combat.php diff --git a/application/gamedata/legacies/default/events.php b/src/application/gamedata/legacies/default/events.php similarity index 95% rename from application/gamedata/legacies/default/events.php rename to src/application/gamedata/legacies/default/events.php index 23bdedb..c3d2af0 100644 --- a/application/gamedata/legacies/default/events.php +++ b/src/application/gamedata/legacies/default/events.php @@ -1,7 +1,7 @@ array(), 'layout.prepare.after' => array( - array('Wootook_Empire_Model_User', 'layoutPrepareAfterListener') + array('Wootook_Player_Model_Entity', 'layoutPrepareAfterListener') ), 'login.failure' => array(), 'login.success' => array(), diff --git a/application/gamedata/legacies/default/fields-alias.php b/src/application/gamedata/legacies/default/fields-alias.php similarity index 100% rename from application/gamedata/legacies/default/fields-alias.php rename to src/application/gamedata/legacies/default/fields-alias.php diff --git a/src/application/gamedata/legacies/default/modules.php b/src/application/gamedata/legacies/default/modules.php new file mode 100644 index 0000000..cf043d3 --- /dev/null +++ b/src/application/gamedata/legacies/default/modules.php @@ -0,0 +1,11 @@ + array( + 'core' => array('Wootook_Core_Block_' => 'Wootook/Core/Block'), + 'empire' => array('Wootook_Empire_Block_' => 'Wootook/Empire/Block'), + 'player' => array('Wootook_Player_Block_' => 'Wootook/Player/Block'), + 'legacies-core' => array('Legacies_Core_Block_' => 'Legacies/Core/Block'), + 'legacies-empire' => array('Legacies_Empire_Block_' => 'Legacies/Empire/Block'), + 'legacies-officers' => array('Legacies_Officers_Block_' => 'Legacies/Officers/Block'), + 'legacies-stats' => array('Legacies_Stats_Block_' => 'Legacies/Stats/Block') + ) + ); \ No newline at end of file diff --git a/application/gamedata/legacies/default/prices.php b/src/application/gamedata/legacies/default/prices.php similarity index 100% rename from application/gamedata/legacies/default/prices.php rename to src/application/gamedata/legacies/default/prices.php diff --git a/application/gamedata/legacies/default/production.php b/src/application/gamedata/legacies/default/production.php similarity index 100% rename from application/gamedata/legacies/default/production.php rename to src/application/gamedata/legacies/default/production.php diff --git a/application/gamedata/legacies/default/requirements.php b/src/application/gamedata/legacies/default/requirements.php similarity index 100% rename from application/gamedata/legacies/default/requirements.php rename to src/application/gamedata/legacies/default/requirements.php diff --git a/application/gamedata/legacies/default/resources.php b/src/application/gamedata/legacies/default/resources.php similarity index 100% rename from application/gamedata/legacies/default/resources.php rename to src/application/gamedata/legacies/default/resources.php diff --git a/application/gamedata/legacies/default/types.php b/src/application/gamedata/legacies/default/types.php similarity index 100% rename from application/gamedata/legacies/default/types.php rename to src/application/gamedata/legacies/default/types.php diff --git a/application/gamedata/legacies/version.php b/src/application/gamedata/legacies/version.php similarity index 100% rename from application/gamedata/legacies/version.php rename to src/application/gamedata/legacies/version.php diff --git a/application/locale/en_US/Legacies_User.csv b/src/application/locale/en_US/Legacies_User.csv similarity index 100% rename from application/locale/en_US/Legacies_User.csv rename to src/application/locale/en_US/Legacies_User.csv diff --git a/application/locale/fr_FR/Legacies.csv b/src/application/locale/fr_FR/Legacies.csv similarity index 100% rename from application/locale/fr_FR/Legacies.csv rename to src/application/locale/fr_FR/Legacies.csv diff --git a/application/locale/fr_FR/Legacies_User.csv b/src/application/locale/fr_FR/Legacies_User.csv similarity index 100% rename from application/locale/fr_FR/Legacies_User.csv rename to src/application/locale/fr_FR/Legacies_User.csv diff --git a/application/locale/fr_FR/Legacies_User.txt b/src/application/locale/fr_FR/Legacies_User.txt similarity index 100% rename from application/locale/fr_FR/Legacies_User.txt rename to src/application/locale/fr_FR/Legacies_User.txt diff --git a/src/application/locale/fr_FR/Wootook_Core.csv b/src/application/locale/fr_FR/Wootook_Core.csv new file mode 100644 index 0000000..5b8590e --- /dev/null +++ b/src/application/locale/fr_FR/Wootook_Core.csv @@ -0,0 +1,154 @@ +"Game is disabled.","Le jeu est clos." +"%1$d day(s) and %2$d hour(s)","%1$d jour(s) et %2$d heure(s)" +"%1$d hour(s), %2$d minute(s) and %3$d second(s)","%1$d heure(s), %2$d minute(s) et %3$d seconde(s)" +"%1$d minute(s) and %2$d second(s)","%1$d minute(s) et %2$d seconde(s)" +"%1$d second(s)","%1$d seconde(s)" +"%1$d per minute","%1$d par minute" +"instantaneous","instantanné" +"Attack","Attaquer" +"Transport","Transporter" +"Station","Stationner" +"Settle","Coloniser" +"Recycle","Recycler" +"Destroy","Detruire" +"Missiles Launch","Envoi de missiles" +"Expedition","Expédition" +"Unknown","Inconnu" +"Planet is already destroyed.","La planète a déjà été détruite." +"Could not delete planet until fleets aten't retuned.","Impossible de détruire la planète tant que toutes les flottes ne sont pas revenues." +"You can't destroy your home planet.","Vous ne pouvez pas détruire votre planète mère." +"No such user.","Cet utilisateur n'existe pas." +"You were banned, please contact admin for more information.","Vous avez été banni. Veuillez contacter l'administrateur pour plus d'informations." +"Your username or credential is invalid, please check your input.","Votre nom d'utilisateur ou votre mot de passe sont invalides, veuillez vérifier votre saisie." +"My %s message!","My %s message!" +"An hostile fleet sent by %1$s, coming from %2$s, reaches your planet %3$d. It has been sent with the mission: %4$d","Une flotte hostile envoyée par %1$s et prevenant de %2$s atteint votre planète %3$d. Sa mission est : %4$d." +"Your hostile fleet, sent from %1$s, reaches %2$d\'s planet %3$d. It has been sent with the mission: %4$d","Votre flotte hostile envoyée depuis %1$s, atteint la planète de %2$d : %3$d. Sa mission est : %4$d" +"Your peaceful fleet, sent from %2$s, reaches the planet %3$d. It has been sent with the mission: %4$d","Votre flotte envoyée depuis %2$s, atteint la planète %3$d. Sa mission est : %4$d" +"A peaceful fleet sent by %1$s, coming from %2$s, reaches your planet %3$d. It has been sent with the mission: %4$d","Une flotte pacifique envoyée par %1$s et venant de %2$s atteint votre palnète %3$d. Sa mission est : %4$d" +"I want to destroy this planet","Je veux détruire cette planète." +"New name:","Nouveau nom:" +"You have 1 unread message.","Vous avez un message non lu." +"You have %1$d unread messages.","Vous avez %1$d messages non lus." +"Idle.","Inactif." +"Level %d","Niveau %d" +"Current count: %s","Quantité actuelle : %s" +"Build max (%s)","Construire le max (%s)" +"Build next level (%s)","Construire au niveau %s" +"Building time: %s","Temps de construction : %s" +"Lasts %s","Il reste %s" +"Cancel","Annuler" +"Work in progress","En cours..." +"Buildings","Bâtiments" +"Research Laboratory","Laboratoire de recherche" +"Shipyard","Chantier spatial" +"Build","Build" +"Metal","Métal" +"Cristal","Cristal" +"Deuterium","Deutérium" +"Energy","Energie" +"Messages","Messages" +"1 message.","Un message." +"You have no new message.","Vous n'avez pas de nouveau message." +"No message.","Pas de message." +"Username","Nom d'utilisateur" +"Password","Mot de passe" +"Remember me","Se souvenir de moi" +"Log in!","Connexion!" +"I have lost my password.","J'ai perdu mon mot de passe." +"Register","Créer un compte" +"Boards","Forum" +"Contact","Contact" +"Welcome on %s!","Bienvenue sur %s!" +"%1$s make you an emperor. Conquer outer space and master other players on %1$s.","%1$s fait de vous un empereur. Parcourez l'espace sidéral et conquérez les territoires d'autres joueurs sur %1$s." +"Register now!","S'enregistrer maintenant!" +"Player count: ","Nombre de joueurs : " +"Latest player: ","Dernier inscrit : " +"Online players: ","Joueurs en ligne : " +"User data:","Votre compte :" +"Username:","Nom d'empire :" +"Email:","Email :" +"Confirm email:","Confirmez l'email :" +"Password:","Mot de passe :" +"Confirm password:","Confirmez le mot de passe :" +"Planet:","Planète :" +"Planet name:","Nom de votre planète :" +"Register!","S'enregistrer!" +"Welcome to the Wootook! installer","Bienvenue sur l'installation de Wootook!" +"This page will guide you through the installation proces of Wootook! the MMO game engine platform.","Cette page vous guidera à travers le processus d'installation de Wootook! la plateforme de jeux web MMO." +"Feel free to ask for help at any time at wootook.org.","Feel free to ask for help at any time at wootook.org." +"Next step","Etape suivante" +"Welcome","Bienvenue" +"System","Système" +"Database","Base de données" +"Universe","Univers" +"Admin profile","Profil administrateur" +"Summary","Finalisation" +"Database Config","Configuration de votre base de données" +"Database host address:","Adresse du serveur :" +"Database host port:","Port du serveur :" +"Database account name:","Compte utilisateur:" +"Database account password:","Mot de passe :" +"Database name:","Nom de la base de données :" +"Table name prefix:","Préfixe des noms des tables :" +"Test connection","Tester la connexion" +"Connection succeeded.","Connexion réussie." +"Connection error: ","Erreur de connexion : " +"Admin Profile Config","Configuration du compte administrateur" +"Root admin account name:","Nom d'utilisateur :" +"Root admin email:","Email du compte administrateur :" +"Root admin account password:","Mot de passe :" +"Root admin account password confirm:","Confirmez le mot de passe :" +"System Config","Configuration système" +"Base URL path for the game:","URL de base Base du jeu :" +"Game timezone:","Fuseau horaire du jeu :" +"Africa","Afrique" +"America","Amerique" +"Atlantic","Atlantique" +"Asia","Asie" +"Europe","Europe" +"Pacific","Pacifique" +"Universe Config","configuration de l'univers" +"Galaxies count:","Nombre de galaxies :" +"Systems count:","Nombre de systèmes solaires :" +"Positions in each system:","Nombre de planètes dans chaque système solaire :" +"Allow spy drone attacks","Autoriser la attaques de sondes d'espionnage" +"Activate large numbers handling","Activer la gestion des très grands nombres" +"'BC Math' extension is unavailable. This option will have no effect until the extension isn't active.","L'extension PHP 'BC Math' est indisponible sur votre machine. Cette option n'aura aucun effet tant que l'extension ne sera pas activée." +"Wootook! was successfully installed.","Wootook! a été correctmeent installé." +"You can now play at %s and tell your friends to come and play.","Vous pouvez maintenant jouer sur %s et dire à vos amis de venir." +"Feel free to ask for help at any time at wootook.org.","Feel free to ask for help at any time at wootook.org." +"Play!","Jouer!" +"Shipyard is required","Le chantier spatial est requis" +"In order to build ships you will need to build a shipyard building.","Pour construire des vaisseaux, vous devrez construire un chantier spatial." +"Research lab is required","Le laboratoire de recherche est requis" +"In order to do technological researches, you will need to build a research lab building.","Pour effectuer des recherches de nouvelles technologies, vous devrez construire un laboratoire de recherches." +"Unnamed","Sans nom" +"Name","Nom" +"Galaxy","Galaxie" +"System","Système" +"Planet","Planète" +"Debris","Débris" +"Moon","Lune" +"Reset","Réinitialiser" +"Save","Sauvegarder" +"The shortcut has been saved.","Le raccourci a été enregistré." +"The shortcut has been deleted","Le raccourdi a été supprimé" +"The shortcut has been updated.","Le raccourci a été mis à jour." +"Success","Succès" +"Colony","Colonie" +"Moon","Lune" +"Game data successfully initialized.","Game data successfully initialized." +"Passwords does not match.","Les mots de passe ne correpsondent pas." +"Both e-mails does not match.","Les emails ne correpsondent pas." +"Could not create user.","Impossible de créer le compte d'utilisateur." +"Could not set to vacation mode.","Impossible d'activer le mode vacances." +"You currently can't get to vacation mode, please check your flying fleets, and building queues.","You currently can't get to vacation mode, please check your flying fleets, and building queues." +"Password was not correct.","Le mot de passe est incorrect." +"Planet has been successfully destroyed.","LA planète a été détruite." +"Open the chat.","Ouvrir le chat." +"No root view declared.","Aucune vue racine n'est déclarée." +"Query failed: SQLSTATE %s: %s.","La requête a échoué : SQLSTATE %s: %s." +"Undefined method %s::%s.","La méthode %s::%s est inconnue." +"Ajax failure.","Erreur AJAX." +"Invalid security key.","code de sécurité invalide." +"Form data error.","données de formulaire erronnées." diff --git a/src/application/test/translate.csv b/src/application/test/translate.csv new file mode 100644 index 0000000..a873711 --- /dev/null +++ b/src/application/test/translate.csv @@ -0,0 +1,154 @@ +"Game is disabled.","Le jeu est clos." +"%1$d day(s) and %2$d hour(s)","%1$d jour(s) et %2$d heure(s)" +"%1$d hour(s), %2$d minute(s) and %3$d second(s)","%1$d heure(s), %2$d minute(s) et %3$d seconde(s)" +"%1$d minute(s) and %2$d second(s)","%1$d minute(s) et %2$d seconde(s)" +"%1$d second(s)","%1$d seconde(s)" +"%1$d per minute","%1$d par minute" +"instantaneous","instantanné" +"Attack","Attaquer" +"Transport","Transporter" +"Station","Stationner" +"Settle","Coloniser" +"Recycle","Recycler" +"Destroy","Detruire" +"Missiles Launch","Envoi de missiles" +"Expedition","Expédition" +"Unknown","Inconnu" +"Planet is already destroyed.","La planète a déjà été détruite." +"Could not delete planet until fleets aten't retuned.","Impossible de détruire la planète tant que toutes les flottes ne sont pas revenues." +"You can't destroy your home planet.","Vous ne pouvez pas détruire votre planète mère." +"No such user.","Cet utilisateur n'existe pas." +"You were banned, please contact admin for more information.","Vous avez été banni. Veuillez contacter l'administrateur pour plus d'informations." +"Your username or credential is invalid, please check your input.","Votre nom d'utilisateur ou votre mot de passe sont invalides, veuillez vérifier votre saisie." +"My %s message!","My %s message!" +"An hostile fleet sent by %1$s, coming from %2$s, reaches your planet %3$d. It has been sent with the mission: %4$d","Une flotte hostile envoyée par %1$s et prevenant de %2$s atteint votre planète %3$d. Sa mission est : %4$d." +"Your hostile fleet, sent from %1$s, reaches %2$d\'s planet %3$d. It has been sent with the mission: %4$d","Votre flotte hostile envoyée depuis %1$s, atteint la planète de %2$d : %3$d. Sa mission est : %4$d" +"Your peaceful fleet, sent from %2$s, reaches the planet %3$d. It has been sent with the mission: %4$d","Votre flotte envoyée depuis %2$s, atteint la planète %3$d. Sa mission est : %4$d" +"A peaceful fleet sent by %1$s, coming from %2$s, reaches your planet %3$d. It has been sent with the mission: %4$d","Une flotte pacifique envoyée par %1$s et venant de %2$s atteint votre palnète %3$d. Sa mission est : %4$d" +"I want to destroy this planet","Je veux détruire cette planète." +"New name:","Nouveau nom:" +"You have 1 unread message.","Vous avez un message non lu." +"You have %1$d unread messages.","Vous avez %1$d messages non lus." +"Idle.","Inactif." +"Level %d","Niveau %d" +"Current count: %s","Quantité actuelle : %s" +"Build max (%s)","Construire le max (%s)" +"Build next level (%s)","Construire le niveau suivant (%s)" +"Building time: %s","Temps de construction : %s" +"Lasts %s","Il reste %s" +"Cancel","Annuler" +"Work in progress","En cours..." +"Buildings","Bâtiments" +"Research Laboratory","Laboratoire de recherche" +"Shipyard","Chantier spatial" +"Build","Build" +"Metal","Métal" +"Cristal","Cristal" +"Deuterium","Deutérium" +"Energy","Energie" +"Messages","Messages" +"1 message.","Un message." +"You have no new message.","Vous n'avez pas de nouveau message." +"No message.","Pas de message." +"Username","Nom d'utilisateur" +"Password","Mot de passe" +"Remember me","Se souvenir de moi" +"Log in!","Connexion!" +"I have lost my password.","J'ai perdu mon mot de passe." +"Register","Créer un compte" +"Boards","Forum" +"Contact","Contact" +"Welcome on %s!","Bienvenue sur %s!" +"%1$s make you an emperor. Conquer outer space and master other players on %1$s.","%1$s fait de vous un empereur. Parcourez l'espace sidéral et conquérez les territoires d'autres joueurs sur %1$s." +"Register now!","S'enregistrer maintenant!" +"Player count: ","Nombre de joueurs : " +"Latest player: ","Dernier inscrit : " +"Online players: ","Joueurs en ligne : " +"User data:","Votre compte :" +"Username:","Nom d'empire :" +"Email:","Email :" +"Confirm email:","Confirmez l'email :" +"Password:","Mot de passe :" +"Confirm password:","Confirmez le mot de passe :" +"Planet:","Planète :" +"Planet name:","Nom de votre planète :" +"Register!","S'enregistrer!" +"Welcome to the Wootook! installer","Bienvenue sur l'installation de Wootook!" +"This page will guide you through the installation proces of Wootook! the MMO game engine platform.","Cette page vous guidera à travers le processus d'installation de Wootook! la plateforme de jeux web MMO." +"Feel free to ask for help at any time at wootook.org.","Feel free to ask for help at any time at wootook.org." +"Next step","Etape suivante" +"Welcome","Bienvenue" +"System","Système" +"Database","Base de données" +"Universe","Univers" +"Admin profile","Compte Admin" +"Summary","Finalisation" +"Database Config","Configuration de votre base de données" +"Database host address:","Adresse du serveur :" +"Database host port:","Port du serveur :" +"Database account name:","Compte utilisateur:" +"Database account password:","Mot de passe :" +"Database name:","Nom de la base de données :" +"Table name prefix:","Préfixe des noms des tables :" +"Test connection","Tester la connexion" +"Connection succeeded.","Connexion réussie." +"Connection error: ","Erreur de connexion : " +"Admin Profile Config","Configuration du compte administrateur" +"Root admin account name:","Nom d'utilisateur :" +"Root admin email:","Email du compte administrateur :" +"Root admin account password:","Mot de passe :" +"Root admin account password confirm:","Confirmez le mot de passe :" +"System Config","Configuration système" +"Base URL path for the game:","URL de base Base du jeu :" +"Game timezone:","Fuseau horaire du jeu :" +"Africa","Afrique" +"America","Amerique" +"Atlantic","Atlantique" +"Asia","Asie" +"Europe","Europe" +"Pacific","Pacifique" +"Universe Config","configuration de l'univers" +"Galaxies count:","Nombre de galaxies :" +"Systems count:","Nombre de systèmes solaires :" +"Positions in each system:","Nombre de planètes dans chaque système solaire :" +"Allow spy drone attacks","Autoriser la attaques de sondes d'espionnage" +"Activate large numbers handling","Activer la gestion des très grands nombres" +"'BC Math' extension is unavailable. This option will have no effect until the extension isn't active.","L'extension PHP 'BC Math' est indisponible sur votre machine. Cette option n'aura aucun effet tant que l'extension ne sera pas activée." +"Wootook! was successfully installed.","Wootook! a été correctmeent installé." +"You can now play at %s and tell your friends to come and play.","Vous pouvez maintenant jouer sur %s et dire à vos amis de venir." +"Feel free to ask for help at any time at wootook.org.","Feel free to ask for help at any time at wootook.org." +"Play!","Jouer!" +"Shipyard is required","Le chantier spatial est requis" +"In order to build ships you will need to build a shipyard building.","Pour construire des vaisseaux, vous devrez construire un chantier spatial." +"Research lab is required","Le laboratoire de recherche est requis" +"In order to do technological researches, you will need to build a research lab building.","Pour effectuer des recherches de nouvelles technologies, vous devrez construire un laboratoire de recherches." +"Unnamed","Sans nom" +"Name","Nom" +"Galaxy","Galaxie" +"System","Système" +"Planet","Planète" +"Debris","Débris" +"Moon","Lune" +"Reset","Réinitialiser" +"Save","Sauvegarder" +"The shortcut has been saved.","Le raccourci a été enregistré." +"The shortcut has been deleted","Le raccourdi a été supprimé" +"The shortcut has been updated.","Le raccourci a été mis à jour." +"Success","Succès" +"Colony","Colonie" +"Moon","Lune" +"Game data successfully initialized.","Game data successfully initialized." +"Passwords does not match.","Les mots de passe ne correpsondent pas." +"Both e-mails does not match.","Les emails ne correpsondent pas." +"Could not create user.","Impossible de créer le compte d'utilisateur." +"Could not set to vacation mode.","Impossible d'activer le mode vacances." +"You currently can't get to vacation mode, please check your flying fleets, and building queues.","You currently can't get to vacation mode, please check your flying fleets, and building queues." +"Password was not correct.","Le mot de passe est incorrect." +"Planet has been successfully destroyed.","LA planète a été détruite." +"Open the chat.","Ouvrir le chat." +"No root view declared.","Aucune vue racine n'est déclarée." +"Query failed: SQLSTATE %s: %s.","La requête a échoué : SQLSTATE %s: %s." +"Undefined method %s::%s.","La méthode %s::%s est inconnue." +"Ajax failure.","Erreur AJAX." +"Invalid security key.","code de sécurité invalide." +"Form data error.","données de formulaire erronnées." diff --git a/src/application/test/translate2.txt b/src/application/test/translate2.txt new file mode 100644 index 0000000..6731a74 Binary files /dev/null and b/src/application/test/translate2.txt differ diff --git a/banned.php b/src/banned.php similarity index 98% rename from banned.php rename to src/banned.php index 53c3b94..2ff2b33 100644 --- a/banned.php +++ b/src/banned.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/buddy.php b/src/buddy.php similarity index 99% rename from buddy.php rename to src/buddy.php index a59aca3..89e8b49 100644 --- a/buddy.php +++ b/src/buddy.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/buildings.php b/src/buildings.php similarity index 87% rename from buildings.php rename to src/buildings.php index 0efe1cc..2d1cf82 100644 --- a/buildings.php +++ b/src/buildings.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -34,8 +34,8 @@ require_once dirname(__FILE__) .'/application/bootstrap.php'; includeLang('buildings'); -$user = Wootook_Empire_Model_User::getSingleton(); -$planet = $user->getCurrentPlanet(); +$player = Wootook_Player_Model_Session::getSingleton()->getPlayer(); +$planet = $player->getCurrentPlanet(); $mode = isset($_GET['mode']) ? $_GET['mode'] : null; switch ($mode) { @@ -64,7 +64,7 @@ case 'fleet': $planet->save(); Wootook::getResponse() - ->setRedirect(Wootook::getUrl('buildings.php', array('mode' => $mode))) + ->setRedirect(Wootook::getStaticUrl('buildings.php', array('mode' => $mode))) ->sendHeaders(); exit(0); } @@ -90,11 +90,12 @@ case 'research': if (isset($_GET['research']) && !empty($_GET['research'])) { $data = $planet->getAllDatas(); - $planet->appendBuildingQueue(intval($_GET['research']), isset($_GET['destroy'])); + $planet->getResearchLab()->appendQueue(intval($_GET['research'])); $planet->save(); + $player->save(); Wootook::getResponse() - ->setRedirect(Wootook::getUrl('buildings.php', array('mode' => $mode))) + ->setRedirect(Wootook::getStaticUrl('buildings.php', array('mode' => $mode))) ->sendHeaders(); exit(0); } else if (isset($_GET['cancel']) && !empty($_GET['cancel'])) { @@ -102,7 +103,7 @@ case 'research': $planet->save(); Wootook::getResponse() - ->setRedirect(Wootook::getUrl('buildings.php', array('mode' => $mode))) + ->setRedirect(Wootook::getStaticUrl('buildings.php', array('mode' => $mode))) ->sendHeaders(); exit(0); } @@ -138,7 +139,7 @@ case 'defense': $planet->save(); Wootook::getResponse() - ->setRedirect(Wootook::getUrl('buildings.php', array('mode' => $mode))) + ->setRedirect(Wootook::getStaticUrl('buildings.php', array('mode' => $mode))) ->sendHeaders(); exit(0); } @@ -160,7 +161,7 @@ default: $planet->save(); Wootook::getResponse() - ->setRedirect(Wootook::getUrl('buildings.php', array('mode' => $mode))) + ->setRedirect(Wootook::getStaticUrl('buildings.php', array('mode' => $mode))) ->sendHeaders(); exit(0); } else if (isset($_GET['cancel']) && !empty($_GET['cancel'])) { @@ -168,7 +169,7 @@ default: $planet->save(); Wootook::getResponse() - ->setRedirect(Wootook::getUrl('buildings.php', array('mode' => $mode))) + ->setRedirect(Wootook::getStaticUrl('buildings.php', array('mode' => $mode))) ->sendHeaders(); exit(0); } diff --git a/calc.php b/src/calc.php similarity index 99% rename from calc.php rename to src/calc.php index 13c5db8..194afe3 100644 --- a/calc.php +++ b/src/calc.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/changelog.php b/src/changelog.php similarity index 98% rename from changelog.php rename to src/changelog.php index 00df85d..f816d73 100644 --- a/changelog.php +++ b/src/changelog.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/chat.php b/src/chat.php similarity index 97% rename from chat.php rename to src/chat.php index 16254dd..07c1f4d 100644 --- a/chat.php +++ b/src/chat.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/chat_add.php b/src/chat_add.php similarity index 98% rename from chat_add.php rename to src/chat_add.php index f3f8c13..5d37c5b 100644 --- a/chat_add.php +++ b/src/chat_add.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/chat_msg.php b/src/chat_msg.php similarity index 99% rename from chat_msg.php rename to src/chat_msg.php index acb1bfa..37b3bfc 100644 --- a/chat_msg.php +++ b/src/chat_msg.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/contact.php b/src/contact.php similarity index 98% rename from contact.php rename to src/contact.php index 17fc8bf..3d28913 100644 --- a/contact.php +++ b/src/contact.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/emoticones/Oo.png b/src/emoticones/Oo.png similarity index 100% rename from emoticones/Oo.png rename to src/emoticones/Oo.png diff --git a/emoticones/Smile.png b/src/emoticones/Smile.png similarity index 100% rename from emoticones/Smile.png rename to src/emoticones/Smile.png diff --git a/emoticones/cool.png b/src/emoticones/cool.png similarity index 100% rename from emoticones/cool.png rename to src/emoticones/cool.png diff --git a/emoticones/grrr.png b/src/emoticones/grrr.png similarity index 100% rename from emoticones/grrr.png rename to src/emoticones/grrr.png diff --git a/emoticones/love.png b/src/emoticones/love.png similarity index 100% rename from emoticones/love.png rename to src/emoticones/love.png diff --git a/emoticones/msn.png b/src/emoticones/msn.png similarity index 100% rename from emoticones/msn.png rename to src/emoticones/msn.png diff --git a/emoticones/perdu.png b/src/emoticones/perdu.png similarity index 100% rename from emoticones/perdu.png rename to src/emoticones/perdu.png diff --git a/emoticones/wink.png b/src/emoticones/wink.png similarity index 100% rename from emoticones/wink.png rename to src/emoticones/wink.png diff --git a/emoticones/wow.png b/src/emoticones/wow.png similarity index 100% rename from emoticones/wow.png rename to src/emoticones/wow.png diff --git a/favicon.ico b/src/favicon.ico similarity index 100% rename from favicon.ico rename to src/favicon.ico diff --git a/fleet.php b/src/fleet.php similarity index 99% rename from fleet.php rename to src/fleet.php index 4f72f44..c4f2c98 100644 --- a/fleet.php +++ b/src/fleet.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -68,7 +68,7 @@ $position = isset($_GET['planet']) ? intval($_GET['planet']) : 0; $planetType = isset($_GET['planettype']) ? intval($_GET['planettype']) : 0; $targetMission = isset($_GET['target_mission']) ? intval($_GET['target_mission']) : 0; -$user = Wootook_Empire_Model_User::getSingleton(); +$user = Wootook_Player_Model_Session::getSingleton()->getPlayer(); $planet = $user->getCurrentPlanet(); $MaxFlyingFleets = $user->getFleetCount(); diff --git a/fleetback.php b/src/fleetback.php similarity index 100% rename from fleetback.php rename to src/fleetback.php diff --git a/fleetshortcut.php b/src/fleetshortcut.php similarity index 99% rename from fleetshortcut.php rename to src/fleetshortcut.php index 44248f3..eea2b14 100644 --- a/fleetshortcut.php +++ b/src/fleetshortcut.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -36,7 +36,7 @@ require_once dirname(__FILE__) .'/application/bootstrap.php'; $mode = isset($_GET['mode']) ? $_GET['mode'] : null; $a = isset($_GET['a']) ? $_GET['a'] : null; -$user = Wootook_Empire_Model_User::getSingleton(); +$user = Wootook_Player_Model_Session::getSingleton()->getPlayer(); if ($mode) { if ($_POST) { diff --git a/floten1.php b/src/floten1.php similarity index 97% rename from floten1.php rename to src/floten1.php index 1f627ef..0e327ee 100644 --- a/floten1.php +++ b/src/floten1.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -46,7 +46,7 @@ $speed = array( 1 => 10, ); -$user = Wootook_Empire_Model_User::getSingleton(); +$user = Wootook_Player_Model_Session::getSingleton()->getPlayer(); $planetrow = $user->getCurrentPlanet(); $g = isset($_POST['galaxy']) ? intval($_POST['galaxy']) : 0; @@ -119,6 +119,7 @@ $session['speed'] = $speedArray; $session['consumption'] = $consumptionArray; $session['capacity'] = $capacityArray; +var_dump($_SESSION); if (empty($fleetArray)) { message($lang['fl_unselectall'], $lang['fl_error'], "fleet." . PHPEXT, 1); } else { @@ -128,8 +129,8 @@ if (empty($fleetArray)) { $speedFactor = GetGameSpeedFactor(); $session['speedallsmin'] = $speedallsmin; -$scriptPath = Wootook::getUrl('scripts/flotten.js'); -$page .= ""; +$scriptPath = Wootook::getStaticUrl('scripts/flotten.js'); +$page = ""; $page .= ""; diff --git a/floten2.php b/src/floten2.php similarity index 98% rename from floten2.php rename to src/floten2.php index e092f3a..a0ce14d 100644 --- a/floten2.php +++ b/src/floten2.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -49,7 +49,7 @@ $coords = array( $destination = Wootook_Empire_Model_Planet::factoryFromCoords($coords, $planettype); $session['planet_destination'] = $destination->getId(); -$user = Wootook_Empire_Model_User::getSingleton(); +$user = Wootook_Player_Model_Session::getSingleton()->getPlayer(); $planetrow = $user->getCurrentPlanet(); $YourPlanet = false; @@ -62,6 +62,12 @@ if ($destination->getId()) { } $fleetArray = $session['fleet']; +if (empty($fleetArray)) { + Wootook::getResponse() + ->setRedirect(Wootook::getStaticUrl('fleet.php')) + ->sendHeaders(); + exit(0); +} $missionTypes = array(); // Determinons les type de missions possibles par rapport a la planete cible @@ -96,7 +102,6 @@ if ($position == (Wootook::getGameConfig('engine/universe/positions') + 1)) { (isset($fleetArray[Legacies_Empire::ID_SHIP_HEAVY_FIGHTER]) && $fleetArray[Legacies_Empire::ID_SHIP_HEAVY_FIGHTER] > 0) || (isset($fleetArray[Legacies_Empire::ID_SHIP_CRUISER]) && $fleetArray[Legacies_Empire::ID_SHIP_CRUISER] > 0) || (isset($fleetArray[Legacies_Empire::ID_SHIP_BATTLESHIP]) && $fleetArray[Legacies_Empire::ID_SHIP_BATTLESHIP] > 0) || - (isset($fleetArray[Legacies_Empire::ID_SHIP_COLONY_SHIP]) && $fleetArray[Legacies_Empire::ID_SHIP_COLONY_SHIP] > 0) || (isset($fleetArray[Legacies_Empire::ID_SHIP_RECYCLER]) && $fleetArray[Legacies_Empire::ID_SHIP_RECYCLER] > 0) || (isset($fleetArray[Legacies_Empire::ID_SHIP_SPY_DRONE]) && $fleetArray[Legacies_Empire::ID_SHIP_SPY_DRONE] > 0 && Wootook::getGameConfig('engine/combat/allow_spy_drone_attacks')) || (isset($fleetArray[Legacies_Empire::ID_SHIP_BOMBER]) && $fleetArray[Legacies_Empire::ID_SHIP_BOMBER] > 0) || @@ -127,6 +132,7 @@ $mission = isset($_POST['target_mission']) ? $_POST['target_mission'] : 0; $SpeedFactor = GetGameSpeedFactor(); $AllFleetSpeed = GetFleetMaxSpeed($fleetArray, 0, $user); +var_dump($AllFleetSpeed, $fleetArray); $MaxFleetSpeed = min($AllFleetSpeed); $distance = GetTargetDistance($planetrow->getGalaxy(), $galaxy, $planetrow->getSystem(), $system, $planetrow->getPosition(), $planet); diff --git a/floten3.php b/src/floten3.php similarity index 98% rename from floten3.php rename to src/floten3.php index d3173fc..66eeda2 100644 --- a/floten3.php +++ b/src/floten3.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -36,7 +36,7 @@ includeLang('fleet'); $session = Wootook::getSession('fleet'); -$user = Wootook_Empire_Model_User::getSingleton(); +$user = Wootook_Player_Model_Session::getSingleton()->getPlayer(); $planet = $user->getCurrentPlanet(); $galaxy = isset($_POST['galaxy']) ? intval($_POST['galaxy']) : 0; @@ -55,19 +55,19 @@ $protectiontime = Wootook::getGameConfig('game/noob-protection/points-cap'); $protectionmulti = Wootook::getGameConfig('game/noob-protection/multiplier'); if ($protectiontime < 1) { - $protectiontime = 9999999999999999; + $protectiontime = 0x7FFFFFFF; } $fleetArray = $session['fleet']; if (!is_array($fleetArray)) { - message ("". $lang['fl_fleet_err'] ."", $lang['fl_error'], "fleet." . PHPEXT, 2); + message ("". $lang['fl_fleet_err'] ."", $lang['fl_error'], "fleet.php", 2); } // On verifie s'il y a assez de vaisseaux sur la planete ! foreach ($fleetArray as $shipId => $count) { if ($Count > $planet->getElement($shipId)) { - message ("". $lang['fl_fleet_err'] ."", $lang['fl_error'], "fleet." . PHPEXT, 2); + message ("". $lang['fl_fleet_err'] ."", $lang['fl_error'], "fleet.php", 2); } } @@ -77,14 +77,14 @@ $allowedPlanetTypes = array( Wootook_Empire_Model_Planet::TYPE_MOON ); if (!in_array($type, $allowedPlanetTypes)) { - message ("". $lang['fl_fleet_err_pl'] ."", $lang['fl_error'], "fleet." . PHPEXT, 2); + message ("". $lang['fl_fleet_err_pl'] ."", $lang['fl_error'], "fleet.php", 2); } if ($planet->getGalaxy() == $galaxy && $planet->getSystem() == $system && $planet->getPosition() == $position && $planet->getType() == $type) { - message ("". $lang['fl_ownpl_err'] ."", $lang['fl_error'], "fleet." . PHPEXT, 2); + message ("". $lang['fl_ownpl_err'] ."", $lang['fl_error'], "fleet.php", 2); } $YourPlanet = false; diff --git a/flotenajax.php b/src/flotenajax.php similarity index 99% rename from flotenajax.php rename to src/flotenajax.php index d175221..a77654c 100644 --- a/flotenajax.php +++ b/src/flotenajax.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/galaxy.php b/src/galaxy.php similarity index 99% rename from galaxy.php rename to src/galaxy.php index b93a201..b3f806b 100644 --- a/galaxy.php +++ b/src/galaxy.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/imperium.php b/src/imperium.php similarity index 99% rename from imperium.php rename to src/imperium.php index f3de193..16d76a5 100644 --- a/imperium.php +++ b/src/imperium.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/CombatEngine.php b/src/includes/CombatEngine.php similarity index 99% rename from includes/CombatEngine.php rename to src/includes/CombatEngine.php index c252393..39f4c92 100644 --- a/includes/CombatEngine.php +++ b/src/includes/CombatEngine.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/aks.php b/src/includes/aks.php similarity index 99% rename from includes/aks.php rename to src/includes/aks.php index 24e1285..f6f99f6 100644 --- a/includes/aks.php +++ b/src/includes/aks.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/ataki.php b/src/includes/ataki.php similarity index 99% rename from includes/ataki.php rename to src/includes/ataki.php index 461ea05..ab9e6a6 100644 --- a/includes/ataki.php +++ b/src/includes/ataki.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/bb.class.php b/src/includes/bb.class.php similarity index 100% rename from includes/bb.class.php rename to src/includes/bb.class.php diff --git a/includes/constants.php b/src/includes/constants.php similarity index 94% rename from includes/constants.php rename to src/includes/constants.php index 6457ea3..867b2a5 100644 --- a/includes/constants.php +++ b/src/includes/constants.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -32,8 +32,6 @@ defined('E_USER_DEPRECATED') || define('E_USER_DEPRECATED', E_USER_WARNING); // define('ADMINEMAIL', "no-reply@wootook.org"); -defined('BCNUMBERS') || define('BCNUMBERS', Wootook::getGameConfig('engine/core/use_large_numbers')); - /** * User level constants * {{{ diff --git a/includes/databaseinfos.php b/src/includes/databaseinfos.php similarity index 99% rename from includes/databaseinfos.php rename to src/includes/databaseinfos.php index 4d8ff84..dcaf887 100644 --- a/includes/databaseinfos.php +++ b/src/includes/databaseinfos.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/debug.class.php b/src/includes/debug.class.php similarity index 99% rename from includes/debug.class.php rename to src/includes/debug.class.php index 4b50f04..a090d06 100644 --- a/includes/debug.class.php +++ b/src/includes/debug.class.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/deprecated.php b/src/includes/deprecated.php similarity index 89% rename from includes/deprecated.php rename to src/includes/deprecated.php index 3ab2185..c11b5ab 100644 --- a/includes/deprecated.php +++ b/src/includes/deprecated.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -33,7 +33,7 @@ * * @deprecated * @param Wootook_Empire_Model_Planet|array $currentPlanet - * @param Wootook_Empire_Model_User|array $currentUser + * @param Wootook_Player_Model_Entity|array $currentUser * @param int $buildingId * @param bool $AddMode */ @@ -73,15 +73,15 @@ function BuildingSavePlanetRecord($currentPlanet) * Deprecaed function used to save the user record * * @deprecated - * @param Wootook_Empire_Model_User|array $currentUser + * @param Wootook_Player_Model_Entity|array $currentUser */ function BuildingSaveUserRecord($currentUser) { defined('DEPRECATION') || Wootook_Core_ErrorProfiler::getSingleton()->addException(new Wootook_Core_Exception_Deprecated(sprintf('Function "%s" is deprecated', __FUNCTION__))); - if (!$currentUser instanceof Wootook_Empire_Model_User) { - trigger_error('$currentUser should be an instance of Wootook_Empire_Model_User', E_USER_WARNING); - $currentUser = Wootook_Empire_Model_User::factory($currentUser['id']); + if (!$currentUser instanceof Wootook_Player_Model_Entity) { + trigger_error('$currentUser should be an instance of Wootook_Player_Model_Entity', E_USER_WARNING); + $currentUser = Wootook_Player_Model_Entity::factory($currentUser['id']); } $currentUser->save(); @@ -90,7 +90,7 @@ function BuildingSaveUserRecord($currentUser) /** * @deprecated * @param Wootook_Empire_Model_Planet|array $currentPlanet - * @param Wootook_Empire_Model_User|array $currentUser + * @param Wootook_Player_Model_Entity|array $currentUser */ function CheckPlanetBuildingQueue($currentPlanet, $currentUser) { @@ -101,9 +101,9 @@ function CheckPlanetBuildingQueue($currentPlanet, $currentUser) $currentPlanet = Wootook_Empire_Model_Planet::factory($currentPlanet['id']); } - if (!$currentUser instanceof Wootook_Empire_Model_User) { - trigger_error('$currentUser should be an instance of Wootook_Empire_Model_User', E_USER_WARNING); - $currentUser = Wootook_Empire_Model_User::factory($currentUser['id']); + if (!$currentUser instanceof Wootook_Player_Model_Entity) { + trigger_error('$currentUser should be an instance of Wootook_Player_Model_Entity', E_USER_WARNING); + $currentUser = Wootook_Player_Model_Entity::factory($currentUser['id']); } $currentPlanet->updateBuildingQueue(); @@ -129,7 +129,7 @@ function CheckPlanetUsedFields($currentPlanet) /** * * @deprecated - * @param Wootook_Empire_Model_User|array $currentUser + * @param Wootook_Player_Model_Entity|array $currentUser * @param Wootook_Empire_Model_Planet|array $currentPlanet * @param int $buildingId * @param bool $incremental @@ -144,9 +144,9 @@ function GetBuildingPrice($currentUser, $currentPlanet, $buildingId, $incrementa $currentPlanet = Wootook_Empire_Model_Planet::factory($currentPlanet['id']); } - if (!$currentUser instanceof Wootook_Empire_Model_User) { - trigger_error('$currentUser should be an instance of Wootook_Empire_Model_User', E_USER_WARNING); - $currentUser = Wootook_Empire_Model_User::factory($currentUser['id']); + if (!$currentUser instanceof Wootook_Player_Model_Entity) { + trigger_error('$currentUser should be an instance of Wootook_Player_Model_Entity', E_USER_WARNING); + $currentUser = Wootook_Player_Model_Entity::factory($currentUser['id']); } $types = Wootook_Empire_Model_Game_Types::getSingleton(); @@ -184,7 +184,7 @@ function GetBuildingPrice($currentUser, $currentPlanet, $buildingId, $incrementa /** * * @deprecated - * @param Wootook_Empire_Model_User|array $currentUser + * @param Wootook_Player_Model_Entity|array $currentUser * @param Wootook_Empire_Model_Planet|array $currentPlanet * @param int $buildingId */ @@ -197,9 +197,9 @@ function GetBuildingTime($currentUser, $currentPlanet, $buildingId) $currentPlanet = Wootook_Empire_Model_Planet::factory($currentPlanet['id']); } - if (!$currentUser instanceof Wootook_Empire_Model_User) { - trigger_error('$currentUser should be an instance of Wootook_Empire_Model_User', E_USER_WARNING); - $currentUser = Wootook_Empire_Model_User::factory($currentUser['id']); + if (!$currentUser instanceof Wootook_Player_Model_Entity) { + trigger_error('$currentUser should be an instance of Wootook_Player_Model_Entity', E_USER_WARNING); + $currentUser = Wootook_Player_Model_Entity::factory($currentUser['id']); } $types = Wootook_Empire_Model_Game_Types::getSingleton(); @@ -218,7 +218,7 @@ function GetBuildingTime($currentUser, $currentPlanet, $buildingId) /** * * @deprecated - * @param Wootook_Empire_Model_User|array $currentUser + * @param Wootook_Player_Model_Entity|array $currentUser * @param Wootook_Empire_Model_Planet|array $currentPlanet * @param int $Element * @param int|string $level @@ -232,9 +232,9 @@ function GetBuildingTimeLevel($currentUser, $currentPlanet, $buildingId, $level) $currentPlanet = Wootook_Empire_Model_Planet::factory($currentPlanet['id']); } - if (!$currentUser instanceof Wootook_Empire_Model_User) { - trigger_error('$currentUser should be an instance of Wootook_Empire_Model_User', E_USER_WARNING); - $currentUser = Wootook_Empire_Model_User::factory($currentUser['id']); + if (!$currentUser instanceof Wootook_Player_Model_Entity) { + trigger_error('$currentUser should be an instance of Wootook_Player_Model_Entity', E_USER_WARNING); + $currentUser = Wootook_Player_Model_Entity::factory($currentUser['id']); } $types = Wootook_Empire_Model_Game_Types::getSingleton(); @@ -253,7 +253,7 @@ function GetBuildingTimeLevel($currentUser, $currentPlanet, $buildingId, $level) /** * * @deprecated - * @param Wootook_Empire_Model_User|array $currentUser + * @param Wootook_Player_Model_Entity|array $currentUser * @param Wootook_Empire_Model_Planet|array $currentPlanet * @param int $buildingId * @param unknown_type $userfactor @@ -267,9 +267,9 @@ function GetElementPrice($currentUser, $currentPlanet, $buildingId, $userfactor $currentPlanet = Wootook_Empire_Model_Planet::factory($currentPlanet['id']); } - if (!$currentUser instanceof Wootook_Empire_Model_User) { - trigger_error('$currentUser should be an instance of Wootook_Empire_Model_User', E_USER_WARNING); - $currentUser = Wootook_Empire_Model_User::factory($currentUser['id']); + if (!$currentUser instanceof Wootook_Player_Model_Entity) { + trigger_error('$currentUser should be an instance of Wootook_Player_Model_Entity', E_USER_WARNING); + $currentUser = Wootook_Player_Model_Entity::factory($currentUser['id']); } global $lang; @@ -320,7 +320,7 @@ function GetElementRessources($elementId, $count) { defined('DEPRECATION') || Wootook_Core_ErrorProfiler::getSingleton()->addException(new Wootook_Core_Exception_Deprecated(sprintf('Function "%s" is deprecated', __FUNCTION__))); - $currentUser = Wootook_Empire_Model_User::getSingleton(); + $currentUser = Wootook_Player_Model_Session::getSingleton()->getPlayer(); $currentPlanet = $currentUser->getCurrentPlanet(); return $currentPlanet->getShipyard()->getResourcesNeeded($buildingId, $count); @@ -329,7 +329,7 @@ function GetElementRessources($elementId, $count) /** * * @deprecated - * @param Wootook_Empire_Model_User|array $currentUser + * @param Wootook_Player_Model_Entity|array $currentUser * @param Wootook_Empire_Model_Planet|array $currentPlanet * @param int $productionTime * @@ -347,15 +347,15 @@ function HandleElementBuildingQueue($currentUser, $currentPlanet, $productionTim * @deprecated * @param bool $isUserChecked * - * @see Wootook_Empire_Model_User::getSingleton() + * @see Wootook_Player_Model_Session::getSingleton()->getPlayer() */ function CheckCookies($isUserChecked) { defined('DEPRECATION') || Wootook_Core_ErrorProfiler::getSingleton()->addException(new Wootook_Core_Exception_Deprecated(sprintf('Function "%s" is deprecated', __FUNCTION__))); - $user = Wootook_Empire_Model_User::getSingleton(); + $user = Wootook_Player_Model_Session::getSingleton()->getPlayer(); - if ($user instanceof Wootook_Empire_Model_User) { + if ($user instanceof Wootook_Player_Model_Entity) { return array( 'state' => true, 'record' => $user @@ -373,7 +373,7 @@ function CheckCookies($isUserChecked) * @deprecated * @param bool $isUserChecked * - * @see Wootook_Empire_Model_User::getSingleton() + * @see Wootook_Player_Model_Session::getSingleton()->getPlayer() */ function CheckTheUser($isUserChecked) { @@ -381,7 +381,7 @@ function CheckTheUser($isUserChecked) $result = CheckCookies($isUserChecked); - if ($result['record'] instanceof Wootook_Empire_Model_User && $result['record']['bana']) { + if ($result['record'] instanceof Wootook_Player_Model_Entity && $result['record']['bana']) { die(parsetemplate(gettemplate('usr_banned'), $lang)); } @@ -392,7 +392,7 @@ function CheckTheUser($isUserChecked) * * @deprecated * @param Wootook_Empire_Model_Planet|array $currentPlanet - * @param Wootook_Empire_Model_User|array $currentUser + * @param Wootook_Player_Model_Entity|array $currentUser * * @see Wootook_Empire_Model_Planet::updateBuildingQueue() */ @@ -431,7 +431,7 @@ function CalculateMaxPlanetFields($currentPlanet) /** * * @deprecated - * @param Wootook_Empire_Model_User|array $currentUser + * @param Wootook_Player_Model_Entity|array $currentUser * @param Wootook_Empire_Model_Planet|array $currentPlanet */ function AbandonColony($currentUser, $currentPlanet) @@ -472,7 +472,7 @@ function CheckFleets($currentPlanet) /** * * @deprecated - * @param Wootook_Empire_Model_User|array $currentUser + * @param Wootook_Player_Model_Entity|array $currentUser * @param Wootook_Empire_Model_Planet|array $currentPlanet */ function CancelBuildingFromQueue($currentPlanet, $currentUser) @@ -536,6 +536,9 @@ function display($page, $title = '', $topnav = true, $metatags = '', $adminPage } $content = $layout->getBlock('content'); + if (!$content instanceof Wootook_Core_View) { + exit(0); + } $pageContent = $layout->createBlock('core/text', 'content'); $pageContent->setContent($page); $content->page = $pageContent; @@ -556,7 +559,7 @@ function parsetemplate($template, $array) static $baseUrl = null; if ($baseUrl === null) { - $user = Wootook_Empire_Model_User::getSingleton(); + $user = Wootook_Player_Model_Session::getSingleton()->getPlayer(); if ($user !== null && $user->getId() && ($baseUrl = $user->getSkinPath()) == '') { $baseUrl = DEFAULT_SKINPATH; } @@ -624,9 +627,9 @@ function doquery($query, $table, $fetch = false) defined('DEPRECATION') || Wootook_Core_ErrorProfiler::getSingleton()->addException(new Wootook_Core_Exception_Deprecated(sprintf('Function "%s" is deprecated', __FUNCTION__))); /** - * @var Wootook_Database $database + * @var Wootook_Core_Database $database */ - $database = Wootook_Database::getSingleton(); + $database = Wootook_Core_Database::getSingleton(); $sql = str_replace("{{table}}", $database->getTable($table), $query); @@ -657,13 +660,13 @@ function ResetThisFuckingCheater($userId) { defined('DEPRECATION') || Wootook_Core_ErrorProfiler::getSingleton()->addException(new Wootook_Core_Exception_Deprecated(sprintf('Function "%s" is deprecated', __FUNCTION__))); - $user = Wootook_Empire_Model_User::factory($userId); + $user = Wootook_Player_Model_Entity::factory($userId); $username = $user->getData('username'); $email = $user->getData('email'); $password = $user->getData('password'); $user->delete(); - $user = Wootook_Empire_Model_User::register($TheUser['username'], $TheUser['email'], 'password'); + $user = Wootook_Player_Model_Entity::register($TheUser['username'], $TheUser['email'], 'password'); $user->setData('password', $password); $user->save(); return; diff --git a/includes/functions.php b/src/includes/functions.php similarity index 99% rename from includes/functions.php rename to src/includes/functions.php index 1d8982e..2867297 100644 --- a/includes/functions.php +++ b/src/includes/functions.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/BBcodeFunction.php b/src/includes/functions/BBcodeFunction.php similarity index 99% rename from includes/functions/BBcodeFunction.php rename to src/includes/functions/BBcodeFunction.php index d945b59..fa193b4 100644 --- a/includes/functions/BBcodeFunction.php +++ b/src/includes/functions/BBcodeFunction.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/BuildFleetEventTable.php b/src/includes/functions/BuildFleetEventTable.php similarity index 99% rename from includes/functions/BuildFleetEventTable.php rename to src/includes/functions/BuildFleetEventTable.php index 20c20e7..f82fbfc 100644 --- a/includes/functions/BuildFleetEventTable.php +++ b/src/includes/functions/BuildFleetEventTable.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/BuildFlyingFleetTable.php b/src/includes/functions/BuildFlyingFleetTable.php similarity index 99% rename from includes/functions/BuildFlyingFleetTable.php rename to src/includes/functions/BuildFlyingFleetTable.php index 077cf32..3caa837 100644 --- a/includes/functions/BuildFlyingFleetTable.php +++ b/src/includes/functions/BuildFlyingFleetTable.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/CheckInputStrings.php b/src/includes/functions/CheckInputStrings.php similarity index 97% rename from includes/functions/CheckInputStrings.php rename to src/includes/functions/CheckInputStrings.php index a8041c6..575554c 100644 --- a/includes/functions/CheckInputStrings.php +++ b/src/includes/functions/CheckInputStrings.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/DeleteSelectedUser.php b/src/includes/functions/DeleteSelectedUser.php similarity index 99% rename from includes/functions/DeleteSelectedUser.php rename to src/includes/functions/DeleteSelectedUser.php index 64daccc..447db95 100644 --- a/includes/functions/DeleteSelectedUser.php +++ b/src/includes/functions/DeleteSelectedUser.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/ElementBuildListBox.php b/src/includes/functions/ElementBuildListBox.php similarity index 98% rename from includes/functions/ElementBuildListBox.php rename to src/includes/functions/ElementBuildListBox.php index 3646e19..94c71d5 100644 --- a/includes/functions/ElementBuildListBox.php +++ b/src/includes/functions/ElementBuildListBox.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/FlyingFleetHandler.php b/src/includes/functions/FlyingFleetHandler.php similarity index 99% rename from includes/functions/FlyingFleetHandler.php rename to src/includes/functions/FlyingFleetHandler.php index 8ed967c..66550d5 100644 --- a/includes/functions/FlyingFleetHandler.php +++ b/src/includes/functions/FlyingFleetHandler.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/GalaxyCheckFunctions.php b/src/includes/functions/GalaxyCheckFunctions.php similarity index 98% rename from includes/functions/GalaxyCheckFunctions.php rename to src/includes/functions/GalaxyCheckFunctions.php index 59e98b4..c71d0cc 100644 --- a/includes/functions/GalaxyCheckFunctions.php +++ b/src/includes/functions/GalaxyCheckFunctions.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/GalaxyLegendPopup.php b/src/includes/functions/GalaxyLegendPopup.php similarity index 98% rename from includes/functions/GalaxyLegendPopup.php rename to src/includes/functions/GalaxyLegendPopup.php index c0945b4..e39ed18 100644 --- a/includes/functions/GalaxyLegendPopup.php +++ b/src/includes/functions/GalaxyLegendPopup.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/GalaxyRowActions.php b/src/includes/functions/GalaxyRowActions.php similarity index 99% rename from includes/functions/GalaxyRowActions.php rename to src/includes/functions/GalaxyRowActions.php index 11f74c2..76c23dc 100644 --- a/includes/functions/GalaxyRowActions.php +++ b/src/includes/functions/GalaxyRowActions.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/GalaxyRowAlly.php b/src/includes/functions/GalaxyRowAlly.php similarity index 99% rename from includes/functions/GalaxyRowAlly.php rename to src/includes/functions/GalaxyRowAlly.php index 86cfa7b..4c414d6 100644 --- a/includes/functions/GalaxyRowAlly.php +++ b/src/includes/functions/GalaxyRowAlly.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/GalaxyRowDebris.php b/src/includes/functions/GalaxyRowDebris.php similarity index 99% rename from includes/functions/GalaxyRowDebris.php rename to src/includes/functions/GalaxyRowDebris.php index 8eaaf39..4ac2fb6 100644 --- a/includes/functions/GalaxyRowDebris.php +++ b/src/includes/functions/GalaxyRowDebris.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/GalaxyRowMoon.php b/src/includes/functions/GalaxyRowMoon.php similarity index 99% rename from includes/functions/GalaxyRowMoon.php rename to src/includes/functions/GalaxyRowMoon.php index 333cb49..f486e5f 100644 --- a/includes/functions/GalaxyRowMoon.php +++ b/src/includes/functions/GalaxyRowMoon.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/GalaxyRowPlanet.php b/src/includes/functions/GalaxyRowPlanet.php similarity index 99% rename from includes/functions/GalaxyRowPlanet.php rename to src/includes/functions/GalaxyRowPlanet.php index 9fec958..b4fcb1a 100644 --- a/includes/functions/GalaxyRowPlanet.php +++ b/src/includes/functions/GalaxyRowPlanet.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/GalaxyRowPlanetName.php b/src/includes/functions/GalaxyRowPlanetName.php similarity index 99% rename from includes/functions/GalaxyRowPlanetName.php rename to src/includes/functions/GalaxyRowPlanetName.php index b235dba..ced1d9b 100644 --- a/includes/functions/GalaxyRowPlanetName.php +++ b/src/includes/functions/GalaxyRowPlanetName.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/GalaxyRowPos.php b/src/includes/functions/GalaxyRowPos.php similarity index 97% rename from includes/functions/GalaxyRowPos.php rename to src/includes/functions/GalaxyRowPos.php index 36202dd..ba0834e 100644 --- a/includes/functions/GalaxyRowPos.php +++ b/src/includes/functions/GalaxyRowPos.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/GalaxyRowUser.php b/src/includes/functions/GalaxyRowUser.php similarity index 99% rename from includes/functions/GalaxyRowUser.php rename to src/includes/functions/GalaxyRowUser.php index 4c1a8b1..11ca438 100644 --- a/includes/functions/GalaxyRowUser.php +++ b/src/includes/functions/GalaxyRowUser.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/GetMaxConstructibleElements.php b/src/includes/functions/GetMaxConstructibleElements.php similarity index 98% rename from includes/functions/GetMaxConstructibleElements.php rename to src/includes/functions/GetMaxConstructibleElements.php index ffa2056..ea69783 100644 --- a/includes/functions/GetMaxConstructibleElements.php +++ b/src/includes/functions/GetMaxConstructibleElements.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/GetMissileRange.php b/src/includes/functions/GetMissileRange.php similarity index 97% rename from includes/functions/GetMissileRange.php rename to src/includes/functions/GetMissileRange.php index c1b07d5..7d6526f 100644 --- a/includes/functions/GetMissileRange.php +++ b/src/includes/functions/GetMissileRange.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/GetPhalanxRange.php b/src/includes/functions/GetPhalanxRange.php similarity index 98% rename from includes/functions/GetPhalanxRange.php rename to src/includes/functions/GetPhalanxRange.php index d868c83..32d47b0 100644 --- a/includes/functions/GetPhalanxRange.php +++ b/src/includes/functions/GetPhalanxRange.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/GetRestPrice.php b/src/includes/functions/GetRestPrice.php similarity index 98% rename from includes/functions/GetRestPrice.php rename to src/includes/functions/GetRestPrice.php index 012a1d5..7678f7a 100644 --- a/includes/functions/GetRestPrice.php +++ b/src/includes/functions/GetRestPrice.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/InsertGalaxyScripts.php b/src/includes/functions/InsertGalaxyScripts.php similarity index 99% rename from includes/functions/InsertGalaxyScripts.php rename to src/includes/functions/InsertGalaxyScripts.php index 20bc497..20843ef 100644 --- a/includes/functions/InsertGalaxyScripts.php +++ b/src/includes/functions/InsertGalaxyScripts.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/InsertJavaScriptChronoApplet.php b/src/includes/functions/InsertJavaScriptChronoApplet.php similarity index 99% rename from includes/functions/InsertJavaScriptChronoApplet.php rename to src/includes/functions/InsertJavaScriptChronoApplet.php index 0a85425..1964278 100644 --- a/includes/functions/InsertJavaScriptChronoApplet.php +++ b/src/includes/functions/InsertJavaScriptChronoApplet.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/IsOfficierAccessible.php b/src/includes/functions/IsOfficierAccessible.php similarity index 98% rename from includes/functions/IsOfficierAccessible.php rename to src/includes/functions/IsOfficierAccessible.php index 50a4322..cd407f8 100644 --- a/includes/functions/IsOfficierAccessible.php +++ b/src/includes/functions/IsOfficierAccessible.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/IsTechnologieAccessible.php b/src/includes/functions/IsTechnologieAccessible.php similarity index 98% rename from includes/functions/IsTechnologieAccessible.php rename to src/includes/functions/IsTechnologieAccessible.php index f12dc66..7ffe4c0 100644 --- a/includes/functions/IsTechnologieAccessible.php +++ b/src/includes/functions/IsTechnologieAccessible.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/MessageForm.php b/src/includes/functions/MessageForm.php similarity index 98% rename from includes/functions/MessageForm.php rename to src/includes/functions/MessageForm.php index df0d582..5006d38 100644 --- a/includes/functions/MessageForm.php +++ b/src/includes/functions/MessageForm.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/MipCombatEngine.php b/src/includes/functions/MipCombatEngine.php similarity index 99% rename from includes/functions/MipCombatEngine.php rename to src/includes/functions/MipCombatEngine.php index eef66d0..5161d20 100644 --- a/includes/functions/MipCombatEngine.php +++ b/src/includes/functions/MipCombatEngine.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/MissionCaseAttack.php b/src/includes/functions/MissionCaseAttack.php similarity index 99% rename from includes/functions/MissionCaseAttack.php rename to src/includes/functions/MissionCaseAttack.php index 9d679ee..6428065 100644 --- a/includes/functions/MissionCaseAttack.php +++ b/src/includes/functions/MissionCaseAttack.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -60,7 +60,7 @@ function MissionCaseAttack($FleetRow) $targetPlanet->save(); $TargetUser = $targetPlanet->getUser(); - $CurrentUser = Wootook_Empire_Model_User::factory($FleetRow['fleet_owner']); + $CurrentUser = Wootook_Player_Model_Entity::factory($FleetRow['fleet_owner']); $TargetUserID = $TargetUser->getId(); $CurrentUserID = $CurrentUser->getId(); @@ -214,7 +214,7 @@ function MissionCaseAttack($FleetRow) } if (($UserChance > 0) and ($UserChance <= $MoonChance) and $galenemyrow['id_luna'] == 0) { - $user = Wootook_Empire_Model_User::factory($TargetUserID); + $user = Wootook_Player_Model_Entity::factory($TargetUserID); $user->createNewPlanet( intval($FleetRow['fleet_end_galaxy']), intval($FleetRow['fleet_end_system']), diff --git a/includes/functions/MissionCaseColonisation.php b/src/includes/functions/MissionCaseColonisation.php similarity index 97% rename from includes/functions/MissionCaseColonisation.php rename to src/includes/functions/MissionCaseColonisation.php index 0ef6a78..a21ba1b 100644 --- a/includes/functions/MissionCaseColonisation.php +++ b/src/includes/functions/MissionCaseColonisation.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -50,7 +50,7 @@ function MissionCaseColonisation ( $FleetRow ) { SendSimpleMessage ( $FleetRow['fleet_owner'], '', $FleetRow['fleet_start_time'], 0, $lang['sys_colo_mess_from'], $lang['sys_colo_mess_report'], $TheMessage); doquery("UPDATE {{table}} SET `fleet_mess` = '1' WHERE `fleet_id` = ". $FleetRow["fleet_id"], 'fleets'); } else { - $user = Wootook_Empire_Model_User::factory($FleetRow['fleet_owner']); + $user = Wootook_Player_Model_Entity::factory($FleetRow['fleet_owner']); $user->createNewPlanet( intval($FleetRow['fleet_end_galaxy']), intval($FleetRow['fleet_end_system']), diff --git a/includes/functions/MissionCaseDestruction.php b/src/includes/functions/MissionCaseDestruction.php similarity index 99% rename from includes/functions/MissionCaseDestruction.php rename to src/includes/functions/MissionCaseDestruction.php index 729ee6c..1b0b9ae 100644 --- a/includes/functions/MissionCaseDestruction.php +++ b/src/includes/functions/MissionCaseDestruction.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -295,7 +295,7 @@ function MissionCaseDestruction($FleetRow) } if (($UserChance > 0) and ($UserChance <= $MoonChance) and $galenemyrow['id_luna'] == 0) { - $user = Wootook_Empire_Model_User::factory($TargetUserID); + $user = Wootook_Player_Model_Entity::factory($TargetUserID); $user->createNewPlanet( intval($FleetRow['fleet_end_galaxy']), intval($FleetRow['fleet_end_system']), diff --git a/includes/functions/MissionCaseExpedition.php b/src/includes/functions/MissionCaseExpedition.php similarity index 99% rename from includes/functions/MissionCaseExpedition.php rename to src/includes/functions/MissionCaseExpedition.php index e4271c5..ddbaa8c 100644 --- a/includes/functions/MissionCaseExpedition.php +++ b/src/includes/functions/MissionCaseExpedition.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/MissionCaseRecycling.php b/src/includes/functions/MissionCaseRecycling.php similarity index 99% rename from includes/functions/MissionCaseRecycling.php rename to src/includes/functions/MissionCaseRecycling.php index fddd459..f70acc4 100644 --- a/includes/functions/MissionCaseRecycling.php +++ b/src/includes/functions/MissionCaseRecycling.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/MissionCaseSpy.php b/src/includes/functions/MissionCaseSpy.php similarity index 99% rename from includes/functions/MissionCaseSpy.php rename to src/includes/functions/MissionCaseSpy.php index a37d579..6fb5116 100644 --- a/includes/functions/MissionCaseSpy.php +++ b/src/includes/functions/MissionCaseSpy.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/MissionCaseStay.php b/src/includes/functions/MissionCaseStay.php similarity index 99% rename from includes/functions/MissionCaseStay.php rename to src/includes/functions/MissionCaseStay.php index d04857e..18750e3 100644 --- a/includes/functions/MissionCaseStay.php +++ b/src/includes/functions/MissionCaseStay.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/MissionCaseStayAlly.php b/src/includes/functions/MissionCaseStayAlly.php similarity index 99% rename from includes/functions/MissionCaseStayAlly.php rename to src/includes/functions/MissionCaseStayAlly.php index bf03cbf..b2c862e 100644 --- a/includes/functions/MissionCaseStayAlly.php +++ b/src/includes/functions/MissionCaseStayAlly.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/MissionCaseTransport.php b/src/includes/functions/MissionCaseTransport.php similarity index 99% rename from includes/functions/MissionCaseTransport.php rename to src/includes/functions/MissionCaseTransport.php index 069f7eb..5213b29 100644 --- a/includes/functions/MissionCaseTransport.php +++ b/src/includes/functions/MissionCaseTransport.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/PlanetResourceUpdate.php b/src/includes/functions/PlanetResourceUpdate.php similarity index 98% rename from includes/functions/PlanetResourceUpdate.php rename to src/includes/functions/PlanetResourceUpdate.php index c31874b..1388d6e 100644 --- a/includes/functions/PlanetResourceUpdate.php +++ b/src/includes/functions/PlanetResourceUpdate.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/RestoreFleetToPlanet.php b/src/includes/functions/RestoreFleetToPlanet.php similarity index 98% rename from includes/functions/RestoreFleetToPlanet.php rename to src/includes/functions/RestoreFleetToPlanet.php index 722323f..b50d0a6 100644 --- a/includes/functions/RestoreFleetToPlanet.php +++ b/src/includes/functions/RestoreFleetToPlanet.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/RevisionTime.php b/src/includes/functions/RevisionTime.php similarity index 98% rename from includes/functions/RevisionTime.php rename to src/includes/functions/RevisionTime.php index a175310..62634de 100644 --- a/includes/functions/RevisionTime.php +++ b/src/includes/functions/RevisionTime.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/SendNewPassword.php b/src/includes/functions/SendNewPassword.php similarity index 98% rename from includes/functions/SendNewPassword.php rename to src/includes/functions/SendNewPassword.php index 89a1e6a..d039d0a 100644 --- a/includes/functions/SendNewPassword.php +++ b/src/includes/functions/SendNewPassword.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/SendSimpleMessage.php b/src/includes/functions/SendSimpleMessage.php similarity index 98% rename from includes/functions/SendSimpleMessage.php rename to src/includes/functions/SendSimpleMessage.php index 13ce29e..6849694 100644 --- a/includes/functions/SendSimpleMessage.php +++ b/src/includes/functions/SendSimpleMessage.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/ShowGalaxyFooter.php b/src/includes/functions/ShowGalaxyFooter.php similarity index 99% rename from includes/functions/ShowGalaxyFooter.php rename to src/includes/functions/ShowGalaxyFooter.php index 462d5a4..abf11c7 100644 --- a/includes/functions/ShowGalaxyFooter.php +++ b/src/includes/functions/ShowGalaxyFooter.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/ShowGalaxyMISelector.php b/src/includes/functions/ShowGalaxyMISelector.php similarity index 98% rename from includes/functions/ShowGalaxyMISelector.php rename to src/includes/functions/ShowGalaxyMISelector.php index 775cc83..e204c47 100644 --- a/includes/functions/ShowGalaxyMISelector.php +++ b/src/includes/functions/ShowGalaxyMISelector.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/ShowGalaxyRows.php b/src/includes/functions/ShowGalaxyRows.php similarity index 99% rename from includes/functions/ShowGalaxyRows.php rename to src/includes/functions/ShowGalaxyRows.php index 41ec7b1..d7fda7b 100644 --- a/includes/functions/ShowGalaxyRows.php +++ b/src/includes/functions/ShowGalaxyRows.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/ShowGalaxySelector.php b/src/includes/functions/ShowGalaxySelector.php similarity index 99% rename from includes/functions/ShowGalaxySelector.php rename to src/includes/functions/ShowGalaxySelector.php index fc1cc62..5974bd8 100644 --- a/includes/functions/ShowGalaxySelector.php +++ b/src/includes/functions/ShowGalaxySelector.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/ShowGalaxyTitles.php b/src/includes/functions/ShowGalaxyTitles.php similarity index 98% rename from includes/functions/ShowGalaxyTitles.php rename to src/includes/functions/ShowGalaxyTitles.php index 5442d3c..af3f8c9 100644 --- a/includes/functions/ShowGalaxyTitles.php +++ b/src/includes/functions/ShowGalaxyTitles.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/SortUserPlanets.php b/src/includes/functions/SortUserPlanets.php similarity index 98% rename from includes/functions/SortUserPlanets.php rename to src/includes/functions/SortUserPlanets.php index 0cbb12d..dc8ca49 100644 --- a/includes/functions/SortUserPlanets.php +++ b/src/includes/functions/SortUserPlanets.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/SpyTarget.php b/src/includes/functions/SpyTarget.php similarity index 99% rename from includes/functions/SpyTarget.php rename to src/includes/functions/SpyTarget.php index c6a9b30..52556b4 100644 --- a/includes/functions/SpyTarget.php +++ b/src/includes/functions/SpyTarget.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/StoreGoodsToPlanet.php b/src/includes/functions/StoreGoodsToPlanet.php similarity index 98% rename from includes/functions/StoreGoodsToPlanet.php rename to src/includes/functions/StoreGoodsToPlanet.php index f28f159..ba1a0ca 100644 --- a/includes/functions/StoreGoodsToPlanet.php +++ b/src/includes/functions/StoreGoodsToPlanet.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/functions/UpdatePlanetBatimentQueueList.php b/src/includes/functions/UpdatePlanetBatimentQueueList.php similarity index 98% rename from includes/functions/UpdatePlanetBatimentQueueList.php rename to src/includes/functions/UpdatePlanetBatimentQueueList.php index 68b38ca..5f7c78b 100644 --- a/includes/functions/UpdatePlanetBatimentQueueList.php +++ b/src/includes/functions/UpdatePlanetBatimentQueueList.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/migrateinfo.php b/src/includes/migrateinfo.php similarity index 99% rename from includes/migrateinfo.php rename to src/includes/migrateinfo.php index b4bc680..0b45f63 100644 --- a/includes/migrateinfo.php +++ b/src/includes/migrateinfo.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/raketenangriff.php b/src/includes/raketenangriff.php similarity index 99% rename from includes/raketenangriff.php rename to src/includes/raketenangriff.php index f74e00c..4402061 100644 --- a/includes/raketenangriff.php +++ b/src/includes/raketenangriff.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/strings.php b/src/includes/strings.php similarity index 98% rename from includes/strings.php rename to src/includes/strings.php index 2bec82f..cbaca2c 100644 --- a/includes/strings.php +++ b/src/includes/strings.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/todofleetcontrol.php b/src/includes/todofleetcontrol.php similarity index 99% rename from includes/todofleetcontrol.php rename to src/includes/todofleetcontrol.php index 8603dd7..75a92d7 100644 --- a/includes/todofleetcontrol.php +++ b/src/includes/todofleetcontrol.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/unlocalised.php b/src/includes/unlocalised.php similarity index 99% rename from includes/unlocalised.php rename to src/includes/unlocalised.php index 7e3ac6c..df0d20e 100644 --- a/includes/unlocalised.php +++ b/src/includes/unlocalised.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/includes/vars.php b/src/includes/vars.php similarity index 98% rename from includes/vars.php rename to src/includes/vars.php index 5ea5aaf..9b9fb7f 100644 --- a/includes/vars.php +++ b/src/includes/vars.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-2010, Wootook Support Team * All rights reserved. diff --git a/index.php b/src/index.php similarity index 80% rename from index.php rename to src/index.php index 607b768..2b06af4 100644 --- a/index.php +++ b/src/index.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -28,4 +28,11 @@ * */ -header('Location: overview.php'); +define('DISABLE_IDENTITY_CHECK', true); +require_once dirname(__FILE__) .'/application/bootstrap.php'; + +$frontController = new Wootook_Core_Controller_Front(Wootook::getRequest(), Wootook::getResponse()); + +$frontController + ->dispatch() + ->send(); diff --git a/infos.php b/src/infos.php similarity index 99% rename from infos.php rename to src/infos.php index 583ec10..13d9ae0 100644 --- a/infos.php +++ b/src/infos.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/install/gameplays.php b/src/install/gameplays.php similarity index 100% rename from install/gameplays.php rename to src/install/gameplays.php diff --git a/install/index.php b/src/install/index.php similarity index 86% rename from install/index.php rename to src/install/index.php index 5a38a40..648f362 100644 --- a/install/index.php +++ b/src/install/index.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -130,8 +130,9 @@ $configRewrites = array( ), 'system' => array( 'path' => array( - 'base' => ROOT_PATH, - 'skin' => ROOT_PATH . 'skin' . DIRECTORY_SEPARATOR, + 'base' => ROOT_PATH, + 'design' => ROOT_PATH . 'design' . DIRECTORY_SEPARATOR, + 'skin' => ROOT_PATH . 'skin' . DIRECTORY_SEPARATOR, ) ), 'package' => 'default', @@ -140,9 +141,30 @@ $configRewrites = array( 'page' => 'page.xml', 'install' => 'install.php' ), - 'storyline' => array( - 'universe' => 'legacies', - 'episode' => 'default', + 'engine' => array( + 'storyline' => array( + 'universe' => 'legacies', + 'episode' => 'default', + ) + ), + 'resources' => array( + 'initial' => array( + 'metal' => 500, + 'cristal' => 500, + 'deuterium' => 0, + 'energy' => 0, + ), + 'base-income' => array( + 'metal' => 20, + 'cristal' => 10, + 'deuterium' => 0, + 'energy' => 0, + ), + ), + 'planet' => array( + 'initial' => array( + 'fields' => 163 + ) ) ) ); @@ -187,7 +209,7 @@ case 'install': if (!$form->validate()) { $session->setData('step', STEP_SYSTEM); $session->setFormData($form->getData()); - $response->setRedirect(Wootook::getUrl('install/index.php', array('mode' => 'install', 'step' => STEP_SYSTEM))); + $response->setRedirect(Wootook::getStaticUrl('install/index.php', array('mode' => 'install', 'step' => STEP_SYSTEM))); $response->sendHeaders(); exit(0); } @@ -244,7 +266,7 @@ case 'install': $session->setData('config', serialize($config)); $session->setData('step', STEP_DATABASE); - $response->setRedirect(Wootook::getUrl('install/index.php', array('mode' => 'install', 'step' => STEP_DATABASE))); + $response->setRedirect(Wootook::getStaticUrl('install/index.php', array('mode' => 'install', 'step' => STEP_DATABASE))); $response->sendHeaders(); exit(0); } @@ -281,7 +303,7 @@ case 'install': if (!$form->validate()) { $session->setData('step', STEP_DATABASE); $session->setFormData($request->getData()); - $response->setRedirect(Wootook::getUrl('install/index.php', array('mode' => 'install', 'step' => STEP_DATABASE))); + $response->setRedirect(Wootook::getStaticUrl('install/index.php', array('mode' => 'install', 'step' => STEP_DATABASE))); $response->sendHeaders(); exit(0); } @@ -299,7 +321,7 @@ case 'install': $database = $request->getPost('dbname'); $port = $request->getPost('port'); - $connection = new Wootook_Database("mysql:dbname={$database};host={$hostname};port={$port}", $username, $password); + $connection = new Wootook_Core_Database("mysql:dbname={$database};host={$hostname};port={$port}", $username, $password); $data['status'] = 'success'; } catch (PDOException $e) { $data['status'] = 'error'; @@ -343,7 +365,7 @@ case 'install': $session->setData('config', serialize($config)); $session->setData('step', STEP_UNIVERSE); - $response->setRedirect(Wootook::getUrl('install/index.php', array('mode' => 'install', 'step' => STEP_UNIVERSE))); + $response->setRedirect(Wootook::getStaticUrl('install/index.php', array('mode' => 'install', 'step' => STEP_UNIVERSE))); $response->sendHeaders(); exit(0); } @@ -368,7 +390,7 @@ case 'install': if (!$form->validate()) { $session->setData('step', STEP_UNIVERSE); $session->setFormData($request->getData()); - $response->setRedirect(Wootook::getUrl('install/index.php', array('mode' => 'install', 'step' => STEP_PROFILE))); + $response->setRedirect(Wootook::getStaticUrl('install/index.php', array('mode' => 'install', 'step' => STEP_PROFILE))); $response->sendHeaders(); exit(0); } @@ -434,7 +456,7 @@ case 'install': $session->addError($e->getMessage()); Wootook_Core_ErrorProfiler::getSingleton()->exceptionManager($e); - $response->setRedirect(Wootook::getUrl('install/index.php', array('mode' => 'install', 'step' => STEP_UNIVERSE))); + $response->setRedirect(Wootook::getStaticUrl('install/index.php', array('mode' => 'install', 'step' => STEP_UNIVERSE))); $response->sendHeaders(); exit(0); break; @@ -446,7 +468,7 @@ case 'install': $session->addSuccess(Wootook::__('Game data successfully initialized.')); $session->setData('step', STEP_PROFILE); - $response->setRedirect(Wootook::getUrl('install/index.php', array('mode' => 'install', 'step' => STEP_PROFILE))); + $response->setRedirect(Wootook::getStaticUrl('install/index.php', array('mode' => 'install', 'step' => STEP_PROFILE))); $response->sendHeaders(); exit(0); } @@ -471,7 +493,7 @@ case 'install': $session->setData('step', STEP_PROFILE); $session->setFormData($request->getData()); $session->addError(Wootook::__('Form data error.')); - $response->setRedirect(Wootook::getUrl('install/index.php', array('mode' => 'install', 'step' => STEP_PROFILE))); + $response->setRedirect(Wootook::getStaticUrl('install/index.php', array('mode' => 'install', 'step' => STEP_PROFILE))); $response->sendHeaders(); exit(0); } @@ -480,7 +502,7 @@ case 'install': $session->setData('step', STEP_PROFILE); $session->setFormData($request->getData()); $session->addError(Wootook::__('Passwords does not match.')); - $response->setRedirect(Wootook::getUrl('install/index.php', array('mode' => 'install', 'step' => STEP_PROFILE))); + $response->setRedirect(Wootook::getStaticUrl('install/index.php', array('mode' => 'install', 'step' => STEP_PROFILE))); $response->sendHeaders(); exit(0); } @@ -489,13 +511,13 @@ case 'install': $session->setData('step', STEP_PROFILE); $session->setFormData($request->getData()); $session->addError(Wootook::__('Both e-mails does not match.')); - $response->setRedirect(Wootook::getUrl('install/index.php', array('mode' => 'install', 'step' => STEP_PROFILE))); + $response->setRedirect(Wootook::getStaticUrl('install/index.php', array('mode' => 'install', 'step' => STEP_PROFILE))); $response->sendHeaders(); exit(0); } try { - $user = Wootook_Empire_Model_User::register($request->getPost('username'), $request->getPost('email'), $request->getPost('password')); + $user = Wootook_Player_Model_Entity::register($request->getPost('username'), $request->getPost('email'), $request->getPost('password')); } catch (Wootook_Empire_Exception_RuntimeException $e) { } $layout->getMessagesBlock()->prepareMessages('user'); @@ -503,11 +525,11 @@ case 'install': $session->setData('step', STEP_PROFILE); $session->setFormData($request->getData()); $session->addError(Wootook::__('Could not create user.')); - $response->setRedirect(Wootook::getUrl('install/index.php', array('mode' => 'install', 'step' => STEP_PROFILE))); + $response->setRedirect(Wootook::getStaticUrl('install/index.php', array('mode' => 'install', 'step' => STEP_PROFILE))); $response->sendHeaders(); exit(0); } else { - Wootook_Empire_Model_User::setLoggedIn($user); + Wootook_Player_Model_Entity::setLoggedIn($user); $user->setData('authlevel', LEVEL_ADMIN)->save(); @@ -515,8 +537,8 @@ case 'install': } $session->setData('step', STEP_CONFIG); - //$response->setRedirect(Wootook::getUrl('install/index.php', array('mode' => 'install', 'step' => STEP_CONFIG))); - $response->setRedirect(Wootook::getUrl('install/index.php', array('mode' => 'summary'))); + //$response->setRedirect(Wootook::getStaticUrl('install/index.php', array('mode' => 'install', 'step' => STEP_CONFIG))); + $response->setRedirect(Wootook::getStaticUrl('install/index.php', array('mode' => 'summary'))); $response->sendHeaders(); exit(0); } @@ -527,7 +549,7 @@ case 'install': case STEP_CONFIG: //* - $response->setRedirect(Wootook::getUrl('install/index.php', array('mode' => 'summary'))); + $response->setRedirect(Wootook::getStaticUrl('install/index.php', array('mode' => 'summary'))); $response->sendHeaders(); exit(0); /*/ diff --git a/install/migration.mysql b/src/install/migration.mysql similarity index 100% rename from install/migration.mysql rename to src/install/migration.mysql diff --git a/jumpgate.php b/src/jumpgate.php similarity index 99% rename from jumpgate.php rename to src/jumpgate.php index 25455b5..af0d312 100644 --- a/jumpgate.php +++ b/src/jumpgate.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/src/klore/arme-ultime.png b/src/klore/arme-ultime.png new file mode 100644 index 0000000..f7b3044 Binary files /dev/null and b/src/klore/arme-ultime.png differ diff --git a/src/klore/artillerir-renforcee.png b/src/klore/artillerir-renforcee.png new file mode 100644 index 0000000..98d1350 Binary files /dev/null and b/src/klore/artillerir-renforcee.png differ diff --git a/src/klore/blindage-renfoece.png b/src/klore/blindage-renfoece.png new file mode 100644 index 0000000..d302dba Binary files /dev/null and b/src/klore/blindage-renfoece.png differ diff --git a/src/klore/bouclier-planetaire.png b/src/klore/bouclier-planetaire.png new file mode 100644 index 0000000..2a0f43f Binary files /dev/null and b/src/klore/bouclier-planetaire.png differ diff --git a/src/klore/canon-a-impulsion.png b/src/klore/canon-a-impulsion.png new file mode 100644 index 0000000..1502062 Binary files /dev/null and b/src/klore/canon-a-impulsion.png differ diff --git a/src/klore/centrale-electrique.png b/src/klore/centrale-electrique.png new file mode 100644 index 0000000..9236873 Binary files /dev/null and b/src/klore/centrale-electrique.png differ diff --git a/src/klore/chantier-spatial.png b/src/klore/chantier-spatial.png new file mode 100644 index 0000000..e315754 Binary files /dev/null and b/src/klore/chantier-spatial.png differ diff --git a/src/klore/chasseur-leger.png b/src/klore/chasseur-leger.png new file mode 100644 index 0000000..22f0fb7 Binary files /dev/null and b/src/klore/chasseur-leger.png differ diff --git a/src/klore/chasseur-lourd.png b/src/klore/chasseur-lourd.png new file mode 100644 index 0000000..917b659 Binary files /dev/null and b/src/klore/chasseur-lourd.png differ diff --git a/src/klore/dematerialisateur.png b/src/klore/dematerialisateur.png new file mode 100644 index 0000000..4b5f2ba Binary files /dev/null and b/src/klore/dematerialisateur.png differ diff --git a/src/klore/forage.png b/src/klore/forage.png new file mode 100644 index 0000000..b5a6a47 Binary files /dev/null and b/src/klore/forage.png differ diff --git a/src/klore/fregate.png b/src/klore/fregate.png new file mode 100644 index 0000000..e1b0dcb Binary files /dev/null and b/src/klore/fregate.png differ diff --git a/src/klore/genie-spatial.png b/src/klore/genie-spatial.png new file mode 100644 index 0000000..0d1964f Binary files /dev/null and b/src/klore/genie-spatial.png differ diff --git a/src/klore/grand-transporteur.png b/src/klore/grand-transporteur.png new file mode 100644 index 0000000..9d05cf3 Binary files /dev/null and b/src/klore/grand-transporteur.png differ diff --git a/src/klore/hangar.png b/src/klore/hangar.png new file mode 100644 index 0000000..f874b13 Binary files /dev/null and b/src/klore/hangar.png differ diff --git a/src/klore/laboratoire.png b/src/klore/laboratoire.png new file mode 100644 index 0000000..6ff3dbb Binary files /dev/null and b/src/klore/laboratoire.png differ diff --git a/src/klore/mine-de-cristal.png b/src/klore/mine-de-cristal.png new file mode 100644 index 0000000..fa1625f Binary files /dev/null and b/src/klore/mine-de-cristal.png differ diff --git a/src/klore/mine-de-metal.png b/src/klore/mine-de-metal.png new file mode 100644 index 0000000..bec66e8 Binary files /dev/null and b/src/klore/mine-de-metal.png differ diff --git a/src/klore/mines.png b/src/klore/mines.png new file mode 100644 index 0000000..324e1f7 Binary files /dev/null and b/src/klore/mines.png differ diff --git a/src/klore/missile-inerplanetaire.png b/src/klore/missile-inerplanetaire.png new file mode 100644 index 0000000..c35aa37 Binary files /dev/null and b/src/klore/missile-inerplanetaire.png differ diff --git a/src/klore/penitencier.png b/src/klore/penitencier.png new file mode 100644 index 0000000..5a31912 Binary files /dev/null and b/src/klore/penitencier.png differ diff --git a/src/klore/petit-transporteur.png b/src/klore/petit-transporteur.png new file mode 100644 index 0000000..6c90b47 Binary files /dev/null and b/src/klore/petit-transporteur.png differ diff --git a/src/klore/pompe-a-essence.png b/src/klore/pompe-a-essence.png new file mode 100644 index 0000000..c6cc2f4 Binary files /dev/null and b/src/klore/pompe-a-essence.png differ diff --git a/src/klore/poste-de-commandement.png b/src/klore/poste-de-commandement.png new file mode 100644 index 0000000..104374b Binary files /dev/null and b/src/klore/poste-de-commandement.png differ diff --git a/src/klore/ravitailleur.png b/src/klore/ravitailleur.png new file mode 100644 index 0000000..1eb265a Binary files /dev/null and b/src/klore/ravitailleur.png differ diff --git a/src/klore/reacteur-a-impulsion.png b/src/klore/reacteur-a-impulsion.png new file mode 100644 index 0000000..6dbc299 Binary files /dev/null and b/src/klore/reacteur-a-impulsion.png differ diff --git a/src/klore/reacteur-a-propulsion.png b/src/klore/reacteur-a-propulsion.png new file mode 100644 index 0000000..757fa3b Binary files /dev/null and b/src/klore/reacteur-a-propulsion.png differ diff --git a/src/klore/recycleur.png b/src/klore/recycleur.png new file mode 100644 index 0000000..a57efe0 Binary files /dev/null and b/src/klore/recycleur.png differ diff --git a/src/klore/sonde.png b/src/klore/sonde.png new file mode 100644 index 0000000..9941c6c Binary files /dev/null and b/src/klore/sonde.png differ diff --git a/src/klore/technologie-espionnage.png b/src/klore/technologie-espionnage.png new file mode 100644 index 0000000..fddd4dc Binary files /dev/null and b/src/klore/technologie-espionnage.png differ diff --git a/src/klore/technologie-laser.png b/src/klore/technologie-laser.png new file mode 100644 index 0000000..389b040 Binary files /dev/null and b/src/klore/technologie-laser.png differ diff --git a/src/klore/tour-a-missiles.png b/src/klore/tour-a-missiles.png new file mode 100644 index 0000000..4099720 Binary files /dev/null and b/src/klore/tour-a-missiles.png differ diff --git a/src/klore/tour-laser.png b/src/klore/tour-laser.png new file mode 100644 index 0000000..9c3d1cb Binary files /dev/null and b/src/klore/tour-laser.png differ diff --git a/src/klore/usine-automatisee.png b/src/klore/usine-automatisee.png new file mode 100644 index 0000000..a9c389d Binary files /dev/null and b/src/klore/usine-automatisee.png differ diff --git a/src/klore/vaisseau-orbital.png b/src/klore/vaisseau-orbital.png new file mode 100644 index 0000000..bcf3272 Binary files /dev/null and b/src/klore/vaisseau-orbital.png differ diff --git a/src/klore/voile-magnetique.png b/src/klore/voile-magnetique.png new file mode 100644 index 0000000..8d05869 Binary files /dev/null and b/src/klore/voile-magnetique.png differ diff --git a/language/en/admin.mo b/src/language/en/admin.mo similarity index 100% rename from language/en/admin.mo rename to src/language/en/admin.mo diff --git a/language/en/admin/Queries.mo b/src/language/en/admin/Queries.mo similarity index 100% rename from language/en/admin/Queries.mo rename to src/language/en/admin/Queries.mo diff --git a/language/en/admin/add_fleet.mo b/src/language/en/admin/add_fleet.mo similarity index 100% rename from language/en/admin/add_fleet.mo rename to src/language/en/admin/add_fleet.mo diff --git a/language/en/admin/addmoon.mo b/src/language/en/admin/addmoon.mo similarity index 100% rename from language/en/admin/addmoon.mo rename to src/language/en/admin/addmoon.mo diff --git a/language/en/admin/adminpanel.mo b/src/language/en/admin/adminpanel.mo similarity index 100% rename from language/en/admin/adminpanel.mo rename to src/language/en/admin/adminpanel.mo diff --git a/language/en/admin/banned.mo b/src/language/en/admin/banned.mo similarity index 100% rename from language/en/admin/banned.mo rename to src/language/en/admin/banned.mo diff --git a/language/en/admin/changepass.mo b/src/language/en/admin/changepass.mo similarity index 100% rename from language/en/admin/changepass.mo rename to src/language/en/admin/changepass.mo diff --git a/language/en/admin/fleets.mo b/src/language/en/admin/fleets.mo similarity index 100% rename from language/en/admin/fleets.mo rename to src/language/en/admin/fleets.mo diff --git a/language/en/admin/md5enc.mo b/src/language/en/admin/md5enc.mo similarity index 100% rename from language/en/admin/md5enc.mo rename to src/language/en/admin/md5enc.mo diff --git a/language/en/admin/messagelist.mo b/src/language/en/admin/messagelist.mo similarity index 100% rename from language/en/admin/messagelist.mo rename to src/language/en/admin/messagelist.mo diff --git a/language/en/admin/multi.mo b/src/language/en/admin/multi.mo similarity index 100% rename from language/en/admin/multi.mo rename to src/language/en/admin/multi.mo diff --git a/language/en/admin/server.mo b/src/language/en/admin/server.mo similarity index 100% rename from language/en/admin/server.mo rename to src/language/en/admin/server.mo diff --git a/language/en/admin/settings.mo b/src/language/en/admin/settings.mo similarity index 100% rename from language/en/admin/settings.mo rename to src/language/en/admin/settings.mo diff --git a/language/en/admin/statconfig.mo b/src/language/en/admin/statconfig.mo similarity index 100% rename from language/en/admin/statconfig.mo rename to src/language/en/admin/statconfig.mo diff --git a/language/en/alliance.mo b/src/language/en/alliance.mo similarity index 100% rename from language/en/alliance.mo rename to src/language/en/alliance.mo diff --git a/language/en/announce.mo b/src/language/en/announce.mo similarity index 100% rename from language/en/announce.mo rename to src/language/en/announce.mo diff --git a/language/en/banned.mo b/src/language/en/banned.mo similarity index 100% rename from language/en/banned.mo rename to src/language/en/banned.mo diff --git a/language/en/buddy.mo b/src/language/en/buddy.mo similarity index 100% rename from language/en/buddy.mo rename to src/language/en/buddy.mo diff --git a/language/en/buildings.mo b/src/language/en/buildings.mo similarity index 100% rename from language/en/buildings.mo rename to src/language/en/buildings.mo diff --git a/language/en/changelog.mo b/src/language/en/changelog.mo similarity index 100% rename from language/en/changelog.mo rename to src/language/en/changelog.mo diff --git a/language/en/chat.mo b/src/language/en/chat.mo similarity index 100% rename from language/en/chat.mo rename to src/language/en/chat.mo diff --git a/language/en/contact.mo b/src/language/en/contact.mo similarity index 100% rename from language/en/contact.mo rename to src/language/en/contact.mo diff --git a/language/en/cookies.mo b/src/language/en/cookies.mo similarity index 100% rename from language/en/cookies.mo rename to src/language/en/cookies.mo diff --git a/language/en/credit.mo b/src/language/en/credit.mo similarity index 100% rename from language/en/credit.mo rename to src/language/en/credit.mo diff --git a/language/en/fleet.mo b/src/language/en/fleet.mo similarity index 100% rename from language/en/fleet.mo rename to src/language/en/fleet.mo diff --git a/language/en/galaxy.mo b/src/language/en/galaxy.mo similarity index 100% rename from language/en/galaxy.mo rename to src/language/en/galaxy.mo diff --git a/language/en/imperium.mo b/src/language/en/imperium.mo similarity index 100% rename from language/en/imperium.mo rename to src/language/en/imperium.mo diff --git a/language/en/index.mo b/src/language/en/index.mo similarity index 100% rename from language/en/index.mo rename to src/language/en/index.mo diff --git a/language/en/infos.mo b/src/language/en/infos.mo similarity index 100% rename from language/en/infos.mo rename to src/language/en/infos.mo diff --git a/language/en/install/install.mo b/src/language/en/install/install.mo similarity index 100% rename from language/en/install/install.mo rename to src/language/en/install/install.mo diff --git a/language/en/lang_info.cfg b/src/language/en/lang_info.cfg similarity index 100% rename from language/en/lang_info.cfg rename to src/language/en/lang_info.cfg diff --git a/language/en/leftmenu.mo b/src/language/en/leftmenu.mo similarity index 100% rename from language/en/leftmenu.mo rename to src/language/en/leftmenu.mo diff --git a/language/en/login.mo b/src/language/en/login.mo similarity index 100% rename from language/en/login.mo rename to src/language/en/login.mo diff --git a/language/en/logout.mo b/src/language/en/logout.mo similarity index 100% rename from language/en/logout.mo rename to src/language/en/logout.mo diff --git a/language/en/lostpassword.mo b/src/language/en/lostpassword.mo similarity index 100% rename from language/en/lostpassword.mo rename to src/language/en/lostpassword.mo diff --git a/language/en/marchand.mo b/src/language/en/marchand.mo similarity index 100% rename from language/en/marchand.mo rename to src/language/en/marchand.mo diff --git a/language/en/messages.mo b/src/language/en/messages.mo similarity index 100% rename from language/en/messages.mo rename to src/language/en/messages.mo diff --git a/language/en/news.mo b/src/language/en/news.mo similarity index 100% rename from language/en/news.mo rename to src/language/en/news.mo diff --git a/language/en/notes.mo b/src/language/en/notes.mo similarity index 100% rename from language/en/notes.mo rename to src/language/en/notes.mo diff --git a/language/en/officier.mo b/src/language/en/officier.mo similarity index 100% rename from language/en/officier.mo rename to src/language/en/officier.mo diff --git a/language/en/options.mo b/src/language/en/options.mo similarity index 100% rename from language/en/options.mo rename to src/language/en/options.mo diff --git a/language/en/overview.mo b/src/language/en/overview.mo similarity index 100% rename from language/en/overview.mo rename to src/language/en/overview.mo diff --git a/language/en/phalanx.mo b/src/language/en/phalanx.mo similarity index 100% rename from language/en/phalanx.mo rename to src/language/en/phalanx.mo diff --git a/language/en/player.mo b/src/language/en/player.mo similarity index 100% rename from language/en/player.mo rename to src/language/en/player.mo diff --git a/language/en/records.mo b/src/language/en/records.mo similarity index 100% rename from language/en/records.mo rename to src/language/en/records.mo diff --git a/language/en/reg.mo b/src/language/en/reg.mo similarity index 100% rename from language/en/reg.mo rename to src/language/en/reg.mo diff --git a/language/en/resources.mo b/src/language/en/resources.mo similarity index 100% rename from language/en/resources.mo rename to src/language/en/resources.mo diff --git a/language/en/rules.mo b/src/language/en/rules.mo similarity index 100% rename from language/en/rules.mo rename to src/language/en/rules.mo diff --git a/language/en/search.mo b/src/language/en/search.mo similarity index 100% rename from language/en/search.mo rename to src/language/en/search.mo diff --git a/language/en/stat.mo b/src/language/en/stat.mo similarity index 100% rename from language/en/stat.mo rename to src/language/en/stat.mo diff --git a/language/en/supp.mo b/src/language/en/supp.mo similarity index 100% rename from language/en/supp.mo rename to src/language/en/supp.mo diff --git a/language/en/system.mo b/src/language/en/system.mo similarity index 100% rename from language/en/system.mo rename to src/language/en/system.mo diff --git a/language/en/tech.mo b/src/language/en/tech.mo similarity index 100% rename from language/en/tech.mo rename to src/language/en/tech.mo diff --git a/language/en/tradingscrapmetal.mo b/src/language/en/tradingscrapmetal.mo similarity index 100% rename from language/en/tradingscrapmetal.mo rename to src/language/en/tradingscrapmetal.mo diff --git a/language/fr/admin.mo b/src/language/fr/admin.mo similarity index 100% rename from language/fr/admin.mo rename to src/language/fr/admin.mo diff --git a/language/fr/admin/Queries.mo b/src/language/fr/admin/Queries.mo similarity index 100% rename from language/fr/admin/Queries.mo rename to src/language/fr/admin/Queries.mo diff --git a/language/fr/admin/add_fleet.mo b/src/language/fr/admin/add_fleet.mo similarity index 100% rename from language/fr/admin/add_fleet.mo rename to src/language/fr/admin/add_fleet.mo diff --git a/language/fr/admin/addmoon.mo b/src/language/fr/admin/addmoon.mo similarity index 100% rename from language/fr/admin/addmoon.mo rename to src/language/fr/admin/addmoon.mo diff --git a/language/fr/admin/adminpanel.mo b/src/language/fr/admin/adminpanel.mo similarity index 100% rename from language/fr/admin/adminpanel.mo rename to src/language/fr/admin/adminpanel.mo diff --git a/language/fr/admin/changepass.mo b/src/language/fr/admin/changepass.mo similarity index 100% rename from language/fr/admin/changepass.mo rename to src/language/fr/admin/changepass.mo diff --git a/language/fr/admin/fleets.mo b/src/language/fr/admin/fleets.mo similarity index 100% rename from language/fr/admin/fleets.mo rename to src/language/fr/admin/fleets.mo diff --git a/language/fr/admin/md5enc.mo b/src/language/fr/admin/md5enc.mo similarity index 100% rename from language/fr/admin/md5enc.mo rename to src/language/fr/admin/md5enc.mo diff --git a/language/fr/admin/messagelist.mo b/src/language/fr/admin/messagelist.mo similarity index 100% rename from language/fr/admin/messagelist.mo rename to src/language/fr/admin/messagelist.mo diff --git a/language/fr/admin/multi.mo b/src/language/fr/admin/multi.mo similarity index 100% rename from language/fr/admin/multi.mo rename to src/language/fr/admin/multi.mo diff --git a/language/fr/admin/settings.mo b/src/language/fr/admin/settings.mo similarity index 100% rename from language/fr/admin/settings.mo rename to src/language/fr/admin/settings.mo diff --git a/language/fr/admin/statconfig.mo b/src/language/fr/admin/statconfig.mo similarity index 100% rename from language/fr/admin/statconfig.mo rename to src/language/fr/admin/statconfig.mo diff --git a/language/fr/alliance.mo b/src/language/fr/alliance.mo similarity index 100% rename from language/fr/alliance.mo rename to src/language/fr/alliance.mo diff --git a/language/fr/banned.mo b/src/language/fr/banned.mo similarity index 100% rename from language/fr/banned.mo rename to src/language/fr/banned.mo diff --git a/language/fr/buddy.mo b/src/language/fr/buddy.mo similarity index 100% rename from language/fr/buddy.mo rename to src/language/fr/buddy.mo diff --git a/language/fr/buildings.mo b/src/language/fr/buildings.mo similarity index 100% rename from language/fr/buildings.mo rename to src/language/fr/buildings.mo diff --git a/language/fr/changelog.mo b/src/language/fr/changelog.mo similarity index 100% rename from language/fr/changelog.mo rename to src/language/fr/changelog.mo diff --git a/language/fr/chat.mo b/src/language/fr/chat.mo similarity index 100% rename from language/fr/chat.mo rename to src/language/fr/chat.mo diff --git a/language/fr/contact.mo b/src/language/fr/contact.mo similarity index 100% rename from language/fr/contact.mo rename to src/language/fr/contact.mo diff --git a/language/fr/cookies.mo b/src/language/fr/cookies.mo similarity index 100% rename from language/fr/cookies.mo rename to src/language/fr/cookies.mo diff --git a/language/fr/credit.mo b/src/language/fr/credit.mo similarity index 100% rename from language/fr/credit.mo rename to src/language/fr/credit.mo diff --git a/language/fr/fleet.mo b/src/language/fr/fleet.mo similarity index 100% rename from language/fr/fleet.mo rename to src/language/fr/fleet.mo diff --git a/language/fr/galaxy.mo b/src/language/fr/galaxy.mo similarity index 100% rename from language/fr/galaxy.mo rename to src/language/fr/galaxy.mo diff --git a/language/fr/imperium.mo b/src/language/fr/imperium.mo similarity index 100% rename from language/fr/imperium.mo rename to src/language/fr/imperium.mo diff --git a/language/fr/index.mo b/src/language/fr/index.mo similarity index 100% rename from language/fr/index.mo rename to src/language/fr/index.mo diff --git a/language/fr/infos.mo b/src/language/fr/infos.mo similarity index 100% rename from language/fr/infos.mo rename to src/language/fr/infos.mo diff --git a/language/fr/install/install.mo b/src/language/fr/install/install.mo similarity index 100% rename from language/fr/install/install.mo rename to src/language/fr/install/install.mo diff --git a/language/fr/lang_info.cfg b/src/language/fr/lang_info.cfg similarity index 100% rename from language/fr/lang_info.cfg rename to src/language/fr/lang_info.cfg diff --git a/language/fr/leftmenu.mo b/src/language/fr/leftmenu.mo similarity index 100% rename from language/fr/leftmenu.mo rename to src/language/fr/leftmenu.mo diff --git a/language/fr/login.mo b/src/language/fr/login.mo similarity index 100% rename from language/fr/login.mo rename to src/language/fr/login.mo diff --git a/language/fr/logout.mo b/src/language/fr/logout.mo similarity index 100% rename from language/fr/logout.mo rename to src/language/fr/logout.mo diff --git a/language/fr/lostpassword.mo b/src/language/fr/lostpassword.mo similarity index 100% rename from language/fr/lostpassword.mo rename to src/language/fr/lostpassword.mo diff --git a/language/fr/marchand.mo b/src/language/fr/marchand.mo similarity index 100% rename from language/fr/marchand.mo rename to src/language/fr/marchand.mo diff --git a/language/fr/messages.mo b/src/language/fr/messages.mo similarity index 100% rename from language/fr/messages.mo rename to src/language/fr/messages.mo diff --git a/language/fr/news.mo b/src/language/fr/news.mo similarity index 100% rename from language/fr/news.mo rename to src/language/fr/news.mo diff --git a/language/fr/notes.mo b/src/language/fr/notes.mo similarity index 100% rename from language/fr/notes.mo rename to src/language/fr/notes.mo diff --git a/language/fr/officier.mo b/src/language/fr/officier.mo similarity index 100% rename from language/fr/officier.mo rename to src/language/fr/officier.mo diff --git a/language/fr/options.mo b/src/language/fr/options.mo similarity index 100% rename from language/fr/options.mo rename to src/language/fr/options.mo diff --git a/language/fr/overview.mo b/src/language/fr/overview.mo similarity index 100% rename from language/fr/overview.mo rename to src/language/fr/overview.mo diff --git a/language/fr/phalanx.mo b/src/language/fr/phalanx.mo similarity index 100% rename from language/fr/phalanx.mo rename to src/language/fr/phalanx.mo diff --git a/language/fr/player.mo b/src/language/fr/player.mo similarity index 100% rename from language/fr/player.mo rename to src/language/fr/player.mo diff --git a/language/fr/records.mo b/src/language/fr/records.mo similarity index 100% rename from language/fr/records.mo rename to src/language/fr/records.mo diff --git a/language/fr/reg.mo b/src/language/fr/reg.mo similarity index 100% rename from language/fr/reg.mo rename to src/language/fr/reg.mo diff --git a/language/fr/resources.mo b/src/language/fr/resources.mo similarity index 100% rename from language/fr/resources.mo rename to src/language/fr/resources.mo diff --git a/language/fr/rules.mo b/src/language/fr/rules.mo similarity index 100% rename from language/fr/rules.mo rename to src/language/fr/rules.mo diff --git a/language/fr/search.mo b/src/language/fr/search.mo similarity index 100% rename from language/fr/search.mo rename to src/language/fr/search.mo diff --git a/language/fr/stat.mo b/src/language/fr/stat.mo similarity index 100% rename from language/fr/stat.mo rename to src/language/fr/stat.mo diff --git a/language/fr/system.mo b/src/language/fr/system.mo similarity index 100% rename from language/fr/system.mo rename to src/language/fr/system.mo diff --git a/language/fr/tech.mo b/src/language/fr/tech.mo similarity index 100% rename from language/fr/tech.mo rename to src/language/fr/tech.mo diff --git a/language/fr/tradingscrapmetal.mo b/src/language/fr/tradingscrapmetal.mo similarity index 100% rename from language/fr/tradingscrapmetal.mo rename to src/language/fr/tradingscrapmetal.mo diff --git a/language/it/admin.mo b/src/language/it/admin.mo similarity index 100% rename from language/it/admin.mo rename to src/language/it/admin.mo diff --git a/language/it/admin/Queries.mo b/src/language/it/admin/Queries.mo similarity index 100% rename from language/it/admin/Queries.mo rename to src/language/it/admin/Queries.mo diff --git a/language/it/admin/add_fleet.mo b/src/language/it/admin/add_fleet.mo similarity index 100% rename from language/it/admin/add_fleet.mo rename to src/language/it/admin/add_fleet.mo diff --git a/language/it/admin/addmoon.mo b/src/language/it/admin/addmoon.mo similarity index 100% rename from language/it/admin/addmoon.mo rename to src/language/it/admin/addmoon.mo diff --git a/language/it/admin/adminpanel.mo b/src/language/it/admin/adminpanel.mo similarity index 100% rename from language/it/admin/adminpanel.mo rename to src/language/it/admin/adminpanel.mo diff --git a/language/it/admin/changepass.mo b/src/language/it/admin/changepass.mo similarity index 100% rename from language/it/admin/changepass.mo rename to src/language/it/admin/changepass.mo diff --git a/language/it/admin/fleets.mo b/src/language/it/admin/fleets.mo similarity index 100% rename from language/it/admin/fleets.mo rename to src/language/it/admin/fleets.mo diff --git a/language/it/admin/md5enc.mo b/src/language/it/admin/md5enc.mo similarity index 100% rename from language/it/admin/md5enc.mo rename to src/language/it/admin/md5enc.mo diff --git a/language/it/admin/messagelist.mo b/src/language/it/admin/messagelist.mo similarity index 100% rename from language/it/admin/messagelist.mo rename to src/language/it/admin/messagelist.mo diff --git a/language/it/admin/multi.mo b/src/language/it/admin/multi.mo similarity index 100% rename from language/it/admin/multi.mo rename to src/language/it/admin/multi.mo diff --git a/language/it/admin/settings.mo b/src/language/it/admin/settings.mo similarity index 100% rename from language/it/admin/settings.mo rename to src/language/it/admin/settings.mo diff --git a/language/it/admin/statconfig.mo b/src/language/it/admin/statconfig.mo similarity index 100% rename from language/it/admin/statconfig.mo rename to src/language/it/admin/statconfig.mo diff --git a/language/it/alliance.mo b/src/language/it/alliance.mo similarity index 100% rename from language/it/alliance.mo rename to src/language/it/alliance.mo diff --git a/language/it/banned.mo b/src/language/it/banned.mo similarity index 100% rename from language/it/banned.mo rename to src/language/it/banned.mo diff --git a/language/it/buddy.mo b/src/language/it/buddy.mo similarity index 100% rename from language/it/buddy.mo rename to src/language/it/buddy.mo diff --git a/language/it/buildings.mo b/src/language/it/buildings.mo similarity index 100% rename from language/it/buildings.mo rename to src/language/it/buildings.mo diff --git a/language/it/changelog.mo b/src/language/it/changelog.mo similarity index 100% rename from language/it/changelog.mo rename to src/language/it/changelog.mo diff --git a/language/it/chat.mo b/src/language/it/chat.mo similarity index 100% rename from language/it/chat.mo rename to src/language/it/chat.mo diff --git a/language/it/contact.mo b/src/language/it/contact.mo similarity index 100% rename from language/it/contact.mo rename to src/language/it/contact.mo diff --git a/language/it/cookies.mo b/src/language/it/cookies.mo similarity index 100% rename from language/it/cookies.mo rename to src/language/it/cookies.mo diff --git a/language/it/credit.mo b/src/language/it/credit.mo similarity index 100% rename from language/it/credit.mo rename to src/language/it/credit.mo diff --git a/language/it/fleet.mo b/src/language/it/fleet.mo similarity index 100% rename from language/it/fleet.mo rename to src/language/it/fleet.mo diff --git a/language/it/galaxy.mo b/src/language/it/galaxy.mo similarity index 100% rename from language/it/galaxy.mo rename to src/language/it/galaxy.mo diff --git a/language/it/imperium.mo b/src/language/it/imperium.mo similarity index 100% rename from language/it/imperium.mo rename to src/language/it/imperium.mo diff --git a/language/it/index.mo b/src/language/it/index.mo similarity index 100% rename from language/it/index.mo rename to src/language/it/index.mo diff --git a/language/it/infos.mo b/src/language/it/infos.mo similarity index 100% rename from language/it/infos.mo rename to src/language/it/infos.mo diff --git a/language/it/install.php b/src/language/it/install.php similarity index 100% rename from language/it/install.php rename to src/language/it/install.php diff --git a/language/it/install/admin.mo b/src/language/it/install/admin.mo similarity index 100% rename from language/it/install/admin.mo rename to src/language/it/install/admin.mo diff --git a/language/it/install/alliance.mo b/src/language/it/install/alliance.mo similarity index 100% rename from language/it/install/alliance.mo rename to src/language/it/install/alliance.mo diff --git a/language/it/install/banned.mo b/src/language/it/install/banned.mo similarity index 100% rename from language/it/install/banned.mo rename to src/language/it/install/banned.mo diff --git a/language/it/install/buddy.mo b/src/language/it/install/buddy.mo similarity index 100% rename from language/it/install/buddy.mo rename to src/language/it/install/buddy.mo diff --git a/language/it/install/buildings.mo b/src/language/it/install/buildings.mo similarity index 100% rename from language/it/install/buildings.mo rename to src/language/it/install/buildings.mo diff --git a/language/it/install/changelog.mo b/src/language/it/install/changelog.mo similarity index 100% rename from language/it/install/changelog.mo rename to src/language/it/install/changelog.mo diff --git a/language/it/install/chat.mo b/src/language/it/install/chat.mo similarity index 100% rename from language/it/install/chat.mo rename to src/language/it/install/chat.mo diff --git a/language/it/install/contact.mo b/src/language/it/install/contact.mo similarity index 100% rename from language/it/install/contact.mo rename to src/language/it/install/contact.mo diff --git a/language/it/install/cookies.mo b/src/language/it/install/cookies.mo similarity index 100% rename from language/it/install/cookies.mo rename to src/language/it/install/cookies.mo diff --git a/language/it/install/credit.mo b/src/language/it/install/credit.mo similarity index 100% rename from language/it/install/credit.mo rename to src/language/it/install/credit.mo diff --git a/language/it/install/fleet.mo b/src/language/it/install/fleet.mo similarity index 100% rename from language/it/install/fleet.mo rename to src/language/it/install/fleet.mo diff --git a/language/it/install/galaxy.mo b/src/language/it/install/galaxy.mo similarity index 100% rename from language/it/install/galaxy.mo rename to src/language/it/install/galaxy.mo diff --git a/language/it/install/imperium.mo b/src/language/it/install/imperium.mo similarity index 100% rename from language/it/install/imperium.mo rename to src/language/it/install/imperium.mo diff --git a/language/it/install/index.mo b/src/language/it/install/index.mo similarity index 100% rename from language/it/install/index.mo rename to src/language/it/install/index.mo diff --git a/language/it/install/infos.mo b/src/language/it/install/infos.mo similarity index 100% rename from language/it/install/infos.mo rename to src/language/it/install/infos.mo diff --git a/language/it/install/install.mo b/src/language/it/install/install.mo similarity index 100% rename from language/it/install/install.mo rename to src/language/it/install/install.mo diff --git a/language/it/install/lang_info.cfg b/src/language/it/install/lang_info.cfg similarity index 100% rename from language/it/install/lang_info.cfg rename to src/language/it/install/lang_info.cfg diff --git a/language/it/install/leftmenu.mo b/src/language/it/install/leftmenu.mo similarity index 100% rename from language/it/install/leftmenu.mo rename to src/language/it/install/leftmenu.mo diff --git a/language/it/install/login.mo b/src/language/it/install/login.mo similarity index 100% rename from language/it/install/login.mo rename to src/language/it/install/login.mo diff --git a/language/it/install/logout.mo b/src/language/it/install/logout.mo similarity index 100% rename from language/it/install/logout.mo rename to src/language/it/install/logout.mo diff --git a/language/it/install/lostpassword.mo b/src/language/it/install/lostpassword.mo similarity index 100% rename from language/it/install/lostpassword.mo rename to src/language/it/install/lostpassword.mo diff --git a/language/it/install/marchand.mo b/src/language/it/install/marchand.mo similarity index 100% rename from language/it/install/marchand.mo rename to src/language/it/install/marchand.mo diff --git a/language/it/install/messages.mo b/src/language/it/install/messages.mo similarity index 100% rename from language/it/install/messages.mo rename to src/language/it/install/messages.mo diff --git a/language/it/install/news.mo b/src/language/it/install/news.mo similarity index 100% rename from language/it/install/news.mo rename to src/language/it/install/news.mo diff --git a/language/it/install/notes.mo b/src/language/it/install/notes.mo similarity index 100% rename from language/it/install/notes.mo rename to src/language/it/install/notes.mo diff --git a/language/it/install/officier.mo b/src/language/it/install/officier.mo similarity index 100% rename from language/it/install/officier.mo rename to src/language/it/install/officier.mo diff --git a/language/it/install/options.mo b/src/language/it/install/options.mo similarity index 100% rename from language/it/install/options.mo rename to src/language/it/install/options.mo diff --git a/language/it/install/overview.mo b/src/language/it/install/overview.mo similarity index 100% rename from language/it/install/overview.mo rename to src/language/it/install/overview.mo diff --git a/language/it/install/phalanx.mo b/src/language/it/install/phalanx.mo similarity index 100% rename from language/it/install/phalanx.mo rename to src/language/it/install/phalanx.mo diff --git a/language/it/install/player.mo b/src/language/it/install/player.mo similarity index 100% rename from language/it/install/player.mo rename to src/language/it/install/player.mo diff --git a/language/it/install/records.mo b/src/language/it/install/records.mo similarity index 100% rename from language/it/install/records.mo rename to src/language/it/install/records.mo diff --git a/language/it/install/reg.mo b/src/language/it/install/reg.mo similarity index 100% rename from language/it/install/reg.mo rename to src/language/it/install/reg.mo diff --git a/language/it/install/resources.mo b/src/language/it/install/resources.mo similarity index 100% rename from language/it/install/resources.mo rename to src/language/it/install/resources.mo diff --git a/language/it/install/rules.mo b/src/language/it/install/rules.mo similarity index 100% rename from language/it/install/rules.mo rename to src/language/it/install/rules.mo diff --git a/language/it/install/search.mo b/src/language/it/install/search.mo similarity index 100% rename from language/it/install/search.mo rename to src/language/it/install/search.mo diff --git a/language/it/install/stat.mo b/src/language/it/install/stat.mo similarity index 100% rename from language/it/install/stat.mo rename to src/language/it/install/stat.mo diff --git a/language/it/install/system.mo b/src/language/it/install/system.mo similarity index 100% rename from language/it/install/system.mo rename to src/language/it/install/system.mo diff --git a/language/it/install/tech.mo b/src/language/it/install/tech.mo similarity index 100% rename from language/it/install/tech.mo rename to src/language/it/install/tech.mo diff --git a/language/it/install/tradingscrapmetal.mo b/src/language/it/install/tradingscrapmetal.mo similarity index 100% rename from language/it/install/tradingscrapmetal.mo rename to src/language/it/install/tradingscrapmetal.mo diff --git a/language/it/iso.txt b/src/language/it/iso.txt similarity index 100% rename from language/it/iso.txt rename to src/language/it/iso.txt diff --git a/language/it/lang_info.cfg b/src/language/it/lang_info.cfg similarity index 100% rename from language/it/lang_info.cfg rename to src/language/it/lang_info.cfg diff --git a/language/it/leftmenu.mo b/src/language/it/leftmenu.mo similarity index 100% rename from language/it/leftmenu.mo rename to src/language/it/leftmenu.mo diff --git a/language/it/login.mo b/src/language/it/login.mo similarity index 100% rename from language/it/login.mo rename to src/language/it/login.mo diff --git a/language/it/logout.mo b/src/language/it/logout.mo similarity index 100% rename from language/it/logout.mo rename to src/language/it/logout.mo diff --git a/language/it/lostpassword.mo b/src/language/it/lostpassword.mo similarity index 100% rename from language/it/lostpassword.mo rename to src/language/it/lostpassword.mo diff --git a/language/it/marchand.mo b/src/language/it/marchand.mo similarity index 100% rename from language/it/marchand.mo rename to src/language/it/marchand.mo diff --git a/language/it/messages.mo b/src/language/it/messages.mo similarity index 100% rename from language/it/messages.mo rename to src/language/it/messages.mo diff --git a/language/it/news.mo b/src/language/it/news.mo similarity index 100% rename from language/it/news.mo rename to src/language/it/news.mo diff --git a/language/it/notes.mo b/src/language/it/notes.mo similarity index 100% rename from language/it/notes.mo rename to src/language/it/notes.mo diff --git a/language/it/officier.mo b/src/language/it/officier.mo similarity index 100% rename from language/it/officier.mo rename to src/language/it/officier.mo diff --git a/language/it/options.mo b/src/language/it/options.mo similarity index 100% rename from language/it/options.mo rename to src/language/it/options.mo diff --git a/language/it/overview.mo b/src/language/it/overview.mo similarity index 100% rename from language/it/overview.mo rename to src/language/it/overview.mo diff --git a/language/it/phalanx.mo b/src/language/it/phalanx.mo similarity index 100% rename from language/it/phalanx.mo rename to src/language/it/phalanx.mo diff --git a/language/it/player.mo b/src/language/it/player.mo similarity index 100% rename from language/it/player.mo rename to src/language/it/player.mo diff --git a/language/it/records.mo b/src/language/it/records.mo similarity index 100% rename from language/it/records.mo rename to src/language/it/records.mo diff --git a/language/it/reg.mo b/src/language/it/reg.mo similarity index 100% rename from language/it/reg.mo rename to src/language/it/reg.mo diff --git a/language/it/resources.mo b/src/language/it/resources.mo similarity index 100% rename from language/it/resources.mo rename to src/language/it/resources.mo diff --git a/language/it/rules.mo b/src/language/it/rules.mo similarity index 100% rename from language/it/rules.mo rename to src/language/it/rules.mo diff --git a/language/it/search.mo b/src/language/it/search.mo similarity index 100% rename from language/it/search.mo rename to src/language/it/search.mo diff --git a/language/it/search.php b/src/language/it/search.php similarity index 100% rename from language/it/search.php rename to src/language/it/search.php diff --git a/language/it/settings.mo b/src/language/it/settings.mo similarity index 100% rename from language/it/settings.mo rename to src/language/it/settings.mo diff --git a/language/it/stat.mo b/src/language/it/stat.mo similarity index 100% rename from language/it/stat.mo rename to src/language/it/stat.mo diff --git a/language/it/system.mo b/src/language/it/system.mo similarity index 100% rename from language/it/system.mo rename to src/language/it/system.mo diff --git a/language/it/tech.mo b/src/language/it/tech.mo similarity index 100% rename from language/it/tech.mo rename to src/language/it/tech.mo diff --git a/language/it/tradingscrapmetal.mo b/src/language/it/tradingscrapmetal.mo similarity index 100% rename from language/it/tradingscrapmetal.mo rename to src/language/it/tradingscrapmetal.mo diff --git a/lostpassword.php b/src/lostpassword.php similarity index 90% rename from lostpassword.php rename to src/lostpassword.php index 9c4d9f0..3c91b92 100644 --- a/lostpassword.php +++ b/src/lostpassword.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -28,15 +28,15 @@ * */ -define('INSIDE' , true); -define('INSTALL' , false); +define('INSIDE', true); +define('INSTALL', false); define('DISABLE_IDENTITY_CHECK', true); require_once dirname(__FILE__) . '/application/bootstrap.php'; $mailData = array( 'recipient' => NULL, - 'sender' => 'no-reply', - 'subject' => 'Wootook:Legacies - Changement de mot de passe' + 'sender' => 'no-reply@wootook.org', + 'subject' => 'Wootook:Legacies - Changement de mot de passe' ); includeLang('lostpassword'); @@ -110,6 +110,7 @@ EOF; } } -$parse = $lang; -$page = parsetemplate(gettemplate('lostpassword'), $parse); -display($page, $lang['registry']); +$layout = new Wootook_Core_Layout(); +$layout->getMessagesBlock()->prepareMessages(Wootook_Player_Model_Entity::SESSION_KEY); +$layout->load('lost-password'); +echo $layout->render(); diff --git a/marchand.php b/src/marchand.php similarity index 99% rename from marchand.php rename to src/marchand.php index 9e603d1..f3ff559 100644 --- a/marchand.php +++ b/src/marchand.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/messages.php b/src/messages.php similarity index 99% rename from messages.php rename to src/messages.php index a8c4dd3..d9c78dd 100644 --- a/messages.php +++ b/src/messages.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/mipattack.php b/src/mipattack.php similarity index 99% rename from mipattack.php rename to src/mipattack.php index aec78c0..7cf5da5 100644 --- a/mipattack.php +++ b/src/mipattack.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/multi.php b/src/multi.php similarity index 98% rename from multi.php rename to src/multi.php index 902ed81..e3833fd 100644 --- a/multi.php +++ b/src/multi.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/neusuw.php b/src/neusuw.php similarity index 99% rename from neusuw.php rename to src/neusuw.php index 888bc25..cf04e47 100644 --- a/neusuw.php +++ b/src/neusuw.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/src/new-tables.mysql b/src/new-tables.mysql new file mode 100644 index 0000000..cf38bed --- /dev/null +++ b/src/new-tables.mysql @@ -0,0 +1,112 @@ +SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; + +CREATE TABLE IF NOT EXISTS `game_core_config` ( + `website_id` tinyint(3) unsigned NOT NULL, + `game_id` tinyint(3) unsigned NOT NULL, + `config_path` varchar(64) NOT NULL, + `config_value` varchar(255) NOT NULL, + PRIMARY KEY (`website_id`,`game_id`,`config_path`), + KEY `website_id` (`website_id`), + KEY `game_id` (`game_id`), + KEY `config_path` (`config_path`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `game_core_config` (`website_id`, `game_id`, `config_path`, `config_value`) VALUES +(0, 0, 'engine/ban/duration', '86400'), +(0, 0, 'engine/bot/active', '0'), +(0, 0, 'engine/bot/email', 'contact@wootook.org'), +(0, 0, 'engine/bot/name', 'Woot'), +(0, 0, 'engine/options/announces', '0'), +(0, 0, 'engine/options/banner', '0'), +(0, 0, 'engine/options/bbcode', '1'), +(0, 0, 'engine/options/chat', '0'), +(0, 0, 'engine/options/ga', '1'), +(0, 0, 'engine/options/notes', '0'), +(0, 0, 'engine/options/retailer', '0'), +(0, 0, 'engine/options/vacation-min-time', '172800'), +(0, 0, 'game/news/active', '0'), +(0, 0, 'game/news/content', 'Bienvenue sur le nouveau serveur de jeu Wootook!'), +(0, 0, 'web/cookie/name', '__wtk'), +(0, 0, 'web/cookie/time', '2592000'), +(0, 0, 'web/session/time', '900'), +(1, 1, 'game/debris/cristal-percent', '30'), +(1, 1, 'game/debris/defense', '0'), +(1, 1, 'game/debris/deuterium-percent', '0'), +(1, 1, 'game/debris/energy-percent', '0'), +(1, 1, 'game/debris/fleet', '1'), +(1, 1, 'game/debris/metal-percent', '30'), +(1, 1, 'game/general/active', '1'), +(1, 1, 'game/general/boards-url', 'http://wootook.org/board/'), +(1, 1, 'game/general/closing-message', 'Le jeu est clos pour le moment.'), +(1, 1, 'game/general/extra-url', 'http://wootook.org/'), +(1, 1, 'game/general/extra-url-title', 'Wootook!'), +(1, 1, 'game/general/locale', 'fr_FR'), +(1, 1, 'game/general/name', 'Wootook'), +(1, 1, 'game/noob-protection/active', '0'), +(1, 1, 'game/noob-protection/multiplier', '5'), +(1, 1, 'game/noob-protection/points-cap', '5000'), +(1, 1, 'game/resource/multiplier', '1000'), +(1, 1, 'game/speed/fleet', '2500'), +(1, 1, 'game/speed/general', '2500'), +(1, 1, 'resource/base-income/cristal', '10'), +(1, 1, 'resource/base-income/deuterium', '0'), +(1, 1, 'resource/base-income/energy', '0'), +(1, 1, 'resource/base-income/metal', '20'), +(1, 1, 'resource/initial/cristal', '500'), +(1, 1, 'resource/initial/deuterium', '0'), +(1, 1, 'resource/initial/energy', '0'), +(1, 1, 'resource/initial/fields', '163'), +(1, 1, 'resource/initial/metal', '500'), +(1, 1, 'web/cookie/name', '__wtk_1_1'); + +CREATE TABLE IF NOT EXISTS `game_core_game` ( + `game_id` smallint(5) unsigned NOT NULL, + `group_id` tinyint(3) unsigned NOT NULL, + `website_id` tinyint(3) unsigned NOT NULL, + `code` varchar(64) NOT NULL, + `name` varchar(255) NOT NULL, + `sort_order` tinyint(3) unsigned NOT NULL, + `is_default` tinyint(1) NOT NULL, + `is_staging` tinyint(1) NOT NULL, + `is_active` tinyint(1) NOT NULL, + PRIMARY KEY (`group_id`), + UNIQUE KEY `code` (`code`), + KEY `website_id` (`website_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `game_core_game` (`game_id`, `group_id`, `website_id`, `code`, `name`, `sort_order`, `is_default`, `is_staging`, `is_active`) VALUES +(0, 0, 0, 'admin', 'Administration', 0, 0, 0, 1), +(1, 1, 1, 'default', 'Default Game', 1, 1, 0, 1); + +CREATE TABLE IF NOT EXISTS `game_core_game_group` ( + `group_id` tinyint(3) unsigned NOT NULL, + `website_id` tinyint(3) unsigned NOT NULL, + `code` varchar(64) NOT NULL, + `name` varchar(255) NOT NULL, + `sort_order` tinyint(3) unsigned NOT NULL, + `is_default` tinyint(1) NOT NULL, + PRIMARY KEY (`group_id`), + UNIQUE KEY `code` (`code`), + KEY `website_id` (`website_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `game_core_game_group` (`group_id`, `website_id`, `code`, `name`, `sort_order`, `is_default`) VALUES +(0, 0, 'admin', 'Administration', 0, 0), +(1, 1, 'default', 'Default Group', 1, 1); + +CREATE TABLE IF NOT EXISTS `game_core_website` ( + `website_id` tinyint(3) unsigned NOT NULL, + `code` varchar(64) NOT NULL, + `name` varchar(255) NOT NULL, + `sort_order` tinyint(3) unsigned NOT NULL, + `default_group_id` tinyint(3) unsigned NOT NULL, + `is_default` tinyint(1) NOT NULL, + `is_staging` tinyint(1) NOT NULL, + `is_active` tinyint(1) NOT NULL, + PRIMARY KEY (`website_id`), + UNIQUE KEY `code` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO `game_core_website` (`website_id`, `code`, `name`, `sort_order`, `default_group_id`, `is_default`, `is_staging`, `is_active`) VALUES +(0, 'admin', 'Administration', 0, 0, 0, 0, 1), +(1, 'default', 'Default Website', 1, 1, 1, 0, 1); diff --git a/notes.php b/src/notes.php similarity index 99% rename from notes.php rename to src/notes.php index bc7e144..c53dd5b 100644 --- a/notes.php +++ b/src/notes.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/officier.php b/src/officier.php similarity index 99% rename from officier.php rename to src/officier.php index 163ec0a..b75b0f6 100644 --- a/officier.php +++ b/src/officier.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. diff --git a/options.php b/src/options.php similarity index 99% rename from options.php rename to src/options.php index a78fa47..7dc68c2 100644 --- a/options.php +++ b/src/options.php @@ -3,7 +3,7 @@ * This file is part of Wootook * * @license http://www.gnu.org/licenses/gpl-3.0.txt - * @see http://www.wootook.com/ + * @see http://wootook.org/ * * Copyright (c) 2009-Present, Wootook Support Team * All rights reserved. @@ -33,7 +33,7 @@ define('INSTALL' , false); require_once dirname(__FILE__) .'/application/bootstrap.php'; -$user = Wootook_Empire_Model_User::getSingleton(); +$user = Wootook_Player_Model_Session::getSingleton()->getPlayer(); includeLang('options'); diff --git a/src/overview.php b/src/overview.php new file mode 100644 index 0000000..81c2f7c --- /dev/null +++ b/src/overview.php @@ -0,0 +1,351 @@ + + * All rights reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * --> NOTICE <-- + * This file is part of the core development branch, changing its contents will + * make you unable to use the automatic updates manager. Please refer to the + * documentation for further information about customizing Wootook. + * + */ + +define('INSTALL' , false); +require_once dirname(__FILE__) .'/application/bootstrap.php'; + +$user = Wootook_Player_Model_Session::getSingleton()->getPlayer(); +$planet = $user->getCurrentPlanet(); +$moon = $planet->getMoon(); + +$action = isset($_GET['action']) ? $_GET['action'] : null; + +if (isset($_POST) && !empty($_POST)) {/* + die('a'); + $action = isset($_POST['action']) && !empty($_POST['action']) ? $_POST['action'] : $action; + $formKey = isset($_POST['form_key']) && !empty($_POST['form_key']) ? $_POST['form_key'] : null; + + if ($formKey == Wootook::getSession('security')->getData('form_key')) { + if ($action == 'rename' && isset($_POST['name']) && !empty($_POST['name'])) { + $planet->setData('name', $_POST['name'])->save(); + } else if ($action == 'destroy' && isset($_POST['password']) && !empty($_POST['password']) && isset($_POST['confirm'])) { + if (!$user->checkPassword($_POST['password'])) { + Wootook::getSession('user') + ->addError(Wootook::__('Password was not correct.')); + } + + try { + $user->getCurrentPlanet()->destroy(); + + Wootook::getSession('user') + ->addSucces(Wootook::__('Planet has been successfully destroyed.')); + } catch (Wootook_Empire_Model_Planet_Exception $e) { + Wootook::getSession('user') + ->addError($e->getMessage()); + } + } + } else { + Wootook::getSession('user') + ->addError(Wootook::__('Invalid security key.')); + } + + header('HTTP/1.1 302 Found'); + header('Location: ' . Wootook::getStaticUrl(basename(__FILE__))); + exit(0);*/ +} else if ($action == 'rename') {/* + die('a'); + $layout = new Wootook_Core_Layout(); + $layout->load('overview.rename-planet'); + + echo $layout->render(); + exit(0);*/ +} else if ($action == 'destroy') {/* + die('a'); + $layout = new Wootook_Core_Layout(); + $layout->load('overview.destroy-planet'); + + echo $layout->render(); + exit(0);*/ +} + +includeLang('resources'); +includeLang('overview'); + +$layout = new Wootook_Core_Layout(); +$layout->load('overview'); + +if ($user->getId()) { + $planetCollection = $user->getPlanetCollection(); + $planetBlock = $layout->createBlock('core/deprecated', 'planet.view'); + $planetBlock->setTemplate('empire/overview/planet/view.phtml'); + + $planetList = $layout->createBlock('core/concat', 'planet.list'); + $planetBlock->planetList = $planetList; + + $i = 0; + foreach ($planetCollection as $userPlanet) { + if ($userPlanet->getId() == $planet->getId()) { + continue; + } + + /* + * Update planet resources and constructions + */ + Wootook::dispatchEvent('planet.update', array( + 'planet' => $userPlanet + )); + $userPlanet->save(); + + if ($userPlanet->getId() != $user->getCurrentPlanet()->getId() && $userPlanet->isPlanet()) { + $id = uniqid(); + $block = $layout->createBlock('core/deprecated', "planet.list.item.{$id}"); + $block->setTemplate('empire/overview/planet/list/item.phtml'); + $block['planet'] = $userPlanet; + + $buildingQueue = $userPlanet->getBuildingQueue(); + $buildingQueue->rewind(); + $currentItem = $buildingQueue->current(); + $block['queue_item'] = $currentItem; + $block['even'] = (($i++ % 4) == 3); + + $planetList->$id = $block; + } + } + + /** + * Missile attack management + * Refactoring needed + * {{{ + */ + $iraks_query = doquery("SELECT * FROM {{table}} WHERE owner = '" . $user['id'] . "'", 'iraks'); + $Record = 4000; + while ($irak = $iraks_query->fetch(PDO::FETCH_ASSOC)) { + $Record++; + $fpage[$irak['zeit']] = ''; + + if ($irak['zeit'] > time()) { + $time = $irak['zeit'] - time(); + + $fpage[$irak['zeit']] .= InsertJavaScriptChronoApplet ("fm", $Record, $time, true); + + $planet_start = doquery("SELECT * FROM {{table}} WHERE + galaxy = '" . $irak['galaxy'] . "' AND + system = '" . $irak['system'] . "' AND + planet = '" . $irak['planet'] . "' AND + planet_type = '1'", 'planets'); + + $user_planet = doquery("SELECT * FROM {{table}} WHERE + galaxy = '" . $irak['galaxy_angreifer'] . "' AND + system = '" . $irak['system_angreifer'] . "' AND + planet = '" . $irak['planet_angreifer'] . "' AND + planet_type = '1'", 'planets', true); + + if ($planet_start->rowCount() == 1) { + $planet = mysql_fetch_array($planet_start); + } + + $fpage[$irak['zeit']] .= "
" . gmdate("H:i:s", $irak['zeit'] + 1 * 60 * 60) . "
Une attaque de missiles (" . $irak['anzahl'] . ") de " . $user_planet['name'] . " "; + $fpage[$irak['zeit']] .= '[' . $irak["galaxy_angreifer"] . ':' . $irak["system_angreifer"] . ':' . $irak["planet_angreifer"] . ']'; + $fpage[$irak['zeit']] .= ' arrive sur la planète' . $planet["name"] . ' '; + $fpage[$irak['zeit']] .= '[' . $irak["galaxy"] . ':' . $irak["system"] . ':' . $irak["planet"] . ']'; + $fpage[$irak['zeit']] .= ''; + $fpage[$irak['zeit']] .= InsertJavaScriptChronoApplet ("fm", $Record, $time, false); + $fpage[$irak['zeit']] .= "
" . $lang['ov_news_title'] . "" . htmlentities(Wootook::getGameConfig('game/news/content'), ENT_QUOTES, 'UTF-8') . "
" . Wootook::__('Open the chat.') . "

".$lang['InfoBanner']."