Updated page display
Updated signature image generator Navigation menu has been finalized Some deprectaed templates has been removed Fixed registration Fixed galaxy notices messages Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
This commit is contained in:
parent
ec7e40e1aa
commit
6d61e93c47
67 changed files with 10177 additions and 940 deletions
|
|
@ -60,7 +60,7 @@ if (!defined('DEBUG')) {
|
|||
defined('ROOT_PATH') || define('ROOT_PATH', dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR);
|
||||
defined('APPLICATION_PATH') || define('APPLICATION_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
|
||||
|
||||
defined('PHPEXT') || define('PHPEXT', require 'extension.inc');
|
||||
defined('PHPEXT') || define('PHPEXT', 'php');
|
||||
|
||||
defined('VERSION') || define('VERSION', '2011.1');
|
||||
|
||||
|
|
@ -87,8 +87,6 @@ if (0 === filesize(ROOT_PATH . 'config.php')) {
|
|||
|
||||
$lang = array();
|
||||
|
||||
define('TEMPLATE_DIR', realpath(ROOT_PATH . '/templates/'));
|
||||
define('TEMPLATE_NAME', 'OpenGame');
|
||||
define('DEFAULT_LANG', 'fr');
|
||||
|
||||
include(ROOT_PATH . 'includes/debug.class.'.PHPEXT);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,87 @@
|
|||
<?php
|
||||
/**
|
||||
* This file is part of Wootook
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/agpl-3.0.txt
|
||||
* @see http://www.wootook.com/
|
||||
*
|
||||
* Copyright (c) 2011-Present, Grégory PLANCHAT <g.planchat@gmail.com>
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* --> 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_Empire_Block_Planet_Shipyard_Queue_Item
|
||||
extends Wootook_Empire_Block_Planet_Builder_Queue_ItemAbstract
|
||||
{
|
||||
protected $_itemIdField = 'research_id';
|
||||
|
||||
public function getLevel()
|
||||
{
|
||||
return $this->getPlanet()->getElement($this->getItemId());
|
||||
}
|
||||
|
||||
public function getResourcesNeeded($level)
|
||||
{
|
||||
return $this->getPlanet()->getShipyard()->getResourcesNeeded($this->getItemId(), 1);
|
||||
}
|
||||
|
||||
public function getBuildingTime($qty)
|
||||
{
|
||||
return $this->getPlanet()->getShipyard()->getBuildingTime($this->getItemId(), $qty);
|
||||
}
|
||||
|
||||
public function getResourcesConfigForLevel($qty)
|
||||
{
|
||||
$resources = $this->getResourcesNeeded($qty);
|
||||
|
||||
$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());
|
||||
}
|
||||
}
|
||||
|
|
@ -325,7 +325,12 @@ class Legacies_Empire_Model_Planet_Building_Shipyard_Builder
|
|||
return $this;
|
||||
}
|
||||
|
||||
$this->enqueue($shipId, $qty, $time);
|
||||
$this->enqueue(array(
|
||||
'ship_id' => $shipId,
|
||||
'qty' => $qty,
|
||||
'created_at' => $time,
|
||||
'updated_at' => $time
|
||||
));
|
||||
$this->_currentPlanet->setData('b_hangar_id', $this->serialize());
|
||||
|
||||
foreach ($remainingAmounts as $resourceId => $resourceAmount) {
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ class Legacies_Officers_Model_Observer
|
|||
if ($user->getData('lvl_minier') < $level) {
|
||||
$difference = $level - $user->getData('lvl_minier');
|
||||
if ($difference == 1) {
|
||||
Wootook::getSession(Legacies_Empire_Model_User::SESSION_KEY)
|
||||
Wootook::getSession(Wootook_Empire_Model_User::SESSION_KEY)
|
||||
->addInfo('You gained 1 miner level.');
|
||||
} else {
|
||||
Wootook::getSession(Legacies_Empire_Model_User::SESSION_KEY)
|
||||
Wootook::getSession(Wootook_Empire_Model_User::SESSION_KEY)
|
||||
->addInfo('You gained %1$d miner level.', (int) $difference);
|
||||
}
|
||||
}
|
||||
|
|
@ -58,10 +58,10 @@ class Legacies_Officers_Model_Observer
|
|||
if ($user->getData('lvl_raid') < $level) {
|
||||
$difference = $level - $user->getData('lvl_raid');
|
||||
if ($difference == 1) {
|
||||
Wootook::getSession(Legacies_Empire_Model_User::SESSION_KEY)
|
||||
Wootook::getSession(Wootook_Empire_Model_User::SESSION_KEY)
|
||||
->addInfo('You gained 1 raider level.');
|
||||
} else {
|
||||
Wootook::getSession(Legacies_Empire_Model_User::SESSION_KEY)
|
||||
Wootook::getSession(Wootook_Empire_Model_User::SESSION_KEY)
|
||||
->addInfo('You gained %1$d raider level.', (int) $difference);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ class Wootook
|
|||
public static function getTranslator($locale = null)
|
||||
{
|
||||
if ($locale === null) {
|
||||
$locale = self::getDefaultLocale();
|
||||
$locale = self::getLocale();
|
||||
}
|
||||
|
||||
if (!isset($translator[$locale])) {
|
||||
|
|
@ -174,7 +174,14 @@ class Wootook
|
|||
$args = func_get_args();
|
||||
array_shift($args);
|
||||
|
||||
return self::getTranslator(self::getDefaultLocale())->translateArgs($message, $args);
|
||||
return self::getTranslator(self::getLocale())->translateArgs($message, $args);
|
||||
}
|
||||
|
||||
public static function getLocale()
|
||||
{
|
||||
$availableLocales = self::getConfig('global/locales');
|
||||
|
||||
return self::getPreferredLocale($availableLocales);
|
||||
}
|
||||
|
||||
public static function setDefaultLocale($locale)
|
||||
|
|
@ -190,6 +197,56 @@ class Wootook
|
|||
return self::$_defaultLocale;
|
||||
}
|
||||
|
||||
public function getPreferredLocale($availableLocales = array())
|
||||
{
|
||||
if (empty($availableLocales)) {
|
||||
return self::getDefaultLocale();
|
||||
}
|
||||
|
||||
$userLocale = self::getSession('user')->getData('locale');
|
||||
if ($userLocale !== null) {
|
||||
return $userLocale;
|
||||
}
|
||||
|
||||
$locales = array();
|
||||
|
||||
if (($accept = self::getRequest()->getServer('HTTP_ACCEPT_LANGUAGE')) !== null) {
|
||||
// break up string into pieces (languages and q factors)
|
||||
preg_match_all('/([a-z]{1,8}(?:-([a-z]{1,8}))?)\s*(?:;\s*q\s*=\s*(1|0\.[0-9]+))?/i', $accept, $matches);
|
||||
|
||||
$length = count($matches[1]);
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$locale = $lang_parse[1];
|
||||
if (!empty($lang_parse[2])) {
|
||||
$locale .= '_' . strtoupper($lang_parse[2]);
|
||||
}
|
||||
$locales[$locale] = !empty($lang_parse[3]) ? min(max(floatval($lang_parse[3]), 0), 1) : 1;
|
||||
}
|
||||
|
||||
arsort($locales, SORT_NUMERIC);
|
||||
}
|
||||
|
||||
if (empty($locales)) {
|
||||
return self::getDefaultLocale();
|
||||
}
|
||||
|
||||
$preferredLocale = key($locales);
|
||||
$preferredPriority = current($locales);
|
||||
foreach ($locales as $locale => $piority) {
|
||||
if (!in_array($locale, $availableLocales)) {
|
||||
continue;
|
||||
}
|
||||
if ($preferredPriority < $piority) {
|
||||
$preferredPriority = $piority;
|
||||
$preferredLocale = $locale;
|
||||
}
|
||||
}
|
||||
|
||||
self::getSession('user')->setData('locale', $preferredLocale);
|
||||
|
||||
return $preferredLocale;
|
||||
}
|
||||
|
||||
public static function now()
|
||||
{
|
||||
if (self::$_now === null) {
|
||||
|
|
|
|||
|
|
@ -11,8 +11,70 @@ class Wootook_Core_Block_Html_Head
|
|||
const TYPE_INLINE_CSS = 'inline_css';
|
||||
const TYPE_INLINE_JS = 'inline_js';
|
||||
|
||||
const TITLE_CONCAT_BEFORE = 'BEFORE';
|
||||
const TITLE_CONCAT_AFTER = 'AFTER';
|
||||
const TITLE_OVERWRITE = 'OVERWRITE';
|
||||
|
||||
protected $_items = array();
|
||||
|
||||
protected $_title = '';
|
||||
protected $_titleDefaultConcat = self::TITLE_CONCAT_AFTER;
|
||||
protected $_titleSeparator = ' | ';
|
||||
|
||||
protected $_titleConcatTypes = array(
|
||||
self::TITLE_CONCAT_AFTER,
|
||||
self::TITLE_CONCAT_BEFORE,
|
||||
self::TITLE_OVERWRITE
|
||||
);
|
||||
|
||||
public function setTitleSeparator($separator)
|
||||
{
|
||||
$this->_titleSeparator = $separator;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getTitleSeparator()
|
||||
{
|
||||
return $this->_titleSeparator;
|
||||
}
|
||||
|
||||
public function setTitleDefaultConcat($defaultConcat)
|
||||
{
|
||||
if (in_array($concatType, $this->_titleConcatTypes)) {
|
||||
$this->_titleDefaultConcat = $defaultConcat;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getTitleDefaultConcat()
|
||||
{
|
||||
return $this->_titleDefaultConcat;
|
||||
}
|
||||
|
||||
public function setTitle($title, $concatType = self::TITLE_CONCAT_AFTER)
|
||||
{
|
||||
if (!in_array($concatType, $this->_titleConcatTypes)) {
|
||||
$concatType = $this->getTitleDefaultConcat();
|
||||
}
|
||||
|
||||
if ($concatType == self::TITLE_OVERWRITE) {
|
||||
$this->_title = $title;
|
||||
} else if ($concatType == self::TITLE_CONCAT_BEFORE) {
|
||||
$this->_title = $title . $this->getTitleSeparator() . $this->_title;
|
||||
} else if ($concatType == self::TITLE_CONCAT_AFTER) {
|
||||
$this->_title .= $this->getTitleSeparator() . $title;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->_title;
|
||||
}
|
||||
|
||||
public function addItem($type, Array $options = array())
|
||||
{
|
||||
if (!isset($this->_items[$type])) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
class Wootook_Core_Block_Html_Navigation
|
||||
extends Wootook_Core_Block_Template
|
||||
{
|
||||
public function addLink($name, $label, $title, $uri, Array $params = array(), Array $classes = array(), $template = null)
|
||||
public function addLink($name, $label, $title, $uri, Array $params = array(), Array $classes = array(), $template = null, Array $attributes = array())
|
||||
{
|
||||
$explodedPath = explode('/', $name);
|
||||
$baseName = array_pop($explodedPath);
|
||||
|
|
@ -28,6 +28,38 @@ class Wootook_Core_Block_Html_Navigation
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function addExternalLink($name, $label, $title, $url, Array $classes = array(), $template = null, Array $attributes = array())
|
||||
{
|
||||
$explodedPath = explode('/', $name);
|
||||
$baseName = array_pop($explodedPath);
|
||||
$parent = $this->_getNode($explodedPath);
|
||||
|
||||
$child = $this->getLayout()
|
||||
->createBlock('core/html.navigation.link', $this->getNameInLayout() . '.' . $baseName, array(
|
||||
'url' => $url,
|
||||
'label' => $label,
|
||||
'title' => $title,
|
||||
'classes' => $classes,
|
||||
'attributes' => $attributes
|
||||
));
|
||||
$parent->setPartial($baseName, $child);
|
||||
|
||||
if ($template !== null) {
|
||||
$child->setTemplate($template);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function addPopupLink($name, $label, $title, $uri, Array $params = array(), Array $classes = array(), $template = null, Array $attributes = array())
|
||||
{
|
||||
$uri = $this->getUrl($uri, $params);
|
||||
|
||||
$attributes['onclick'] = "f('{$params}', '{$label}');return false;";
|
||||
|
||||
return $this->addLink($name, $label, $title, null, array(), $classes, $template, $attributes);
|
||||
}
|
||||
|
||||
public function setNodeTitle($path, $title)
|
||||
{
|
||||
return $this->getNode($path)->setTitle($title);
|
||||
|
|
@ -48,10 +80,12 @@ class Wootook_Core_Block_Html_Navigation
|
|||
$name = array_shift($explodedPath);
|
||||
|
||||
if ($this->hasPartial($name)) {
|
||||
$child = $this->getPartial($name)->_getNode($explodedPath);
|
||||
$child = $this->getPartial($name);
|
||||
} else {
|
||||
$child = $this->getLayout()
|
||||
->createBlock('core/html.navigation.node', $this->getNameInLayout() . '.' . $name);
|
||||
|
||||
$this->setPartial($name, $child);
|
||||
}
|
||||
|
||||
if ($child instanceof Wootook_Core_Block_Html_Navigation_Link) {
|
||||
|
|
|
|||
|
|
@ -5,9 +5,11 @@ class Wootook_Core_Block_Html_Navigation_Link
|
|||
{
|
||||
protected $_label = '';
|
||||
protected $_title = '';
|
||||
protected $_uri = '';
|
||||
protected $_uri = null;
|
||||
protected $_url = null;
|
||||
protected $_params = array();
|
||||
protected $_classes = array('link');
|
||||
protected $_attributes = array();
|
||||
|
||||
public function getTemplate()
|
||||
{
|
||||
|
|
@ -43,18 +45,71 @@ class Wootook_Core_Block_Html_Navigation_Link
|
|||
|
||||
public function setUrl($uri, $params = array())
|
||||
{
|
||||
if ($uri === null) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
$this->_uri = $uri;
|
||||
$this->_params = $params;
|
||||
$this->_url = $this->getUrl($uri, $params);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setExternalUrl($url)
|
||||
{
|
||||
$this->_url = $url;
|
||||
$this->_uri = null;
|
||||
$this->_params = array();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLinkUrl($moreParams = array())
|
||||
{
|
||||
if (empty($moreParams) || $this->_uri === null) {
|
||||
return $this->_url;
|
||||
}
|
||||
$params = array_merge($this->_params, $moreParams);
|
||||
return $this->getUrl($this->_uri, $params);
|
||||
}
|
||||
|
||||
public function setAttribute($attributeName, $attributeValue)
|
||||
{
|
||||
$this->_attributes[$attributeName] = $attributeValue;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAttribute($attributeName)
|
||||
{
|
||||
if ($this->hasAttribute($attributeName)) {
|
||||
return $this->_attributes[$attributeName];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function hasAttribute($attributeName)
|
||||
{
|
||||
if (isset($this->_attributes[$attributeName])) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function unsetAttribute($attributeName)
|
||||
{
|
||||
if ($this->hasAttribute($attributeName)) {
|
||||
unset($this->_attributes[$attributeName]);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAttributes()
|
||||
{
|
||||
return $this->_attributes;
|
||||
}
|
||||
|
||||
public function addClass($class)
|
||||
{
|
||||
$this->_classes[] = $class;
|
||||
|
|
@ -69,7 +124,7 @@ class Wootook_Core_Block_Html_Navigation_Link
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function renderClasses($moreClasses)
|
||||
public function renderClasses(Array $moreClasses = array())
|
||||
{
|
||||
$classes = array_merge($this->_classes, $moreClasses);
|
||||
return implode(' ', $classes);
|
||||
|
|
@ -95,7 +150,7 @@ class Wootook_Core_Block_Html_Navigation_Link
|
|||
$this->setUrl($data['url']['uri']);
|
||||
}
|
||||
} else {
|
||||
$this->setUrl($data['url']);
|
||||
$this->setExternalUrl($data['url']);
|
||||
}
|
||||
unset($data['url']);
|
||||
}
|
||||
|
|
@ -105,7 +160,16 @@ class Wootook_Core_Block_Html_Navigation_Link
|
|||
unset($data['classes']);
|
||||
|
||||
foreach ($classes as $class) {
|
||||
$this->set($class);
|
||||
$this->addClass(trim($class));
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($data['attributes'])) {
|
||||
$attributes = (array) $data['attributes'];
|
||||
unset($data['attributes']);
|
||||
|
||||
foreach ($attributes as $attributeName => $attributeValue) {
|
||||
$this->setAttribute($attributeName, $attributeValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,11 @@ 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);
|
||||
return null;
|
||||
}
|
||||
|
||||
$pattern = "{$this->getScriptPath()}/%s/%s/scripts/{$file}";
|
||||
if (($layout = $this->getLayout()) !== null) {
|
||||
$package = $this->getLayout()->getPackage();
|
||||
|
|
@ -23,6 +28,8 @@ class Wootook_Core_Block_Template
|
|||
return $path;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
trigger_error("No layout defined.", E_USER_NOTICE);
|
||||
}
|
||||
|
||||
$path = sprintf($pattern, Wootook_Core_Layout::DEFAULT_PACKAGE, Wootook_Core_Layout::DEFAULT_THEME);
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ class Wootook_Core_Controller_Response_Http
|
|||
const REDIRECT_TEMPORARY = 307;
|
||||
|
||||
protected static $_redirectCodes = array(
|
||||
REDIRECT_MOVED_PERMANENTLY => 'Moved Permanently',
|
||||
REDIRECT_FOUND => 'Found',
|
||||
REDIRECT_SEE_OTHER => 'See Other',
|
||||
REDIRECT_TEMPORARY => 'Temporary Redirect'
|
||||
self::REDIRECT_MOVED_PERMANENTLY => 'Moved Permanently',
|
||||
self::REDIRECT_FOUND => 'Found',
|
||||
self::REDIRECT_SEE_OTHER => 'See Other',
|
||||
self::REDIRECT_TEMPORARY => 'Temporary Redirect'
|
||||
);
|
||||
|
||||
public function __construct()
|
||||
|
|
|
|||
|
|
@ -139,9 +139,17 @@ class Wootook_Core_Layout
|
|||
}
|
||||
}
|
||||
|
||||
Wootook::dispatchEvent($this->_eventPrefix . '.prepare.before', array(
|
||||
$this->_eventObject => $this
|
||||
));
|
||||
|
||||
foreach ($this->_blocks as $block) {
|
||||
$block->prepareLayout();
|
||||
}
|
||||
|
||||
Wootook::dispatchEvent($this->_eventPrefix . '.prepare.after', array(
|
||||
$this->_eventObject => $this
|
||||
));
|
||||
}
|
||||
|
||||
protected function _save()
|
||||
|
|
@ -190,7 +198,7 @@ class Wootook_Core_Layout
|
|||
}
|
||||
}
|
||||
|
||||
trigger_error(Wootook::__('Class type "%s" could not be resolved.', $type), E_USER_INFO);
|
||||
trigger_error(Wootook::__('Class type "%s" could not be resolved.', $type), E_USER_NOTICE);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -220,6 +228,9 @@ class Wootook_Core_Layout
|
|||
{
|
||||
$instance = $this->_createBlock($type, $name, $config);
|
||||
|
||||
if ($instance === null) {
|
||||
return null;
|
||||
}
|
||||
$instance->prepareLayout();
|
||||
|
||||
return $instance;
|
||||
|
|
@ -263,11 +274,14 @@ class Wootook_Core_Layout
|
|||
if (!isset($config['type'])) {
|
||||
$instance->$alias = new Wootook_Core_View($config);
|
||||
} else {
|
||||
$instance->$alias = $this->_createBlock($config['type'], $name, $config);
|
||||
$child = $this->_createBlock($config['type'], $name, $config);
|
||||
if ($child !== null) {
|
||||
$instance->$alias = $child;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (ReflectionException $e) {
|
||||
trigger_error($e->getMessage(), E_USER_INFO);
|
||||
trigger_error($e->getMessage(), E_USER_NOTICE);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -305,13 +319,14 @@ class Wootook_Core_Layout
|
|||
$callParamaters[$paramterPosition] = $parameter->getDefaultValue();
|
||||
//} else if (!$parameter->isOptionnal()) {
|
||||
} else if ($paramterPosition <= $requiredParameterCount) {
|
||||
throw new Wootook_Core_Exception_RuntimeException();
|
||||
throw new Wootook_Core_Exception_RuntimeException(Wootook::__('Method %s requires parameter %d ($%s) to be defined.',
|
||||
$reflectionMethod->getName(), $paramterPosition + 1, $paramterName));
|
||||
}
|
||||
}
|
||||
|
||||
$reflectionMethod->invokeArgs($block, $callParamaters);
|
||||
} catch (ReflectionException $e) {
|
||||
trigger_error($e->getMessage(), E_USER_INFO);
|
||||
trigger_error($e->getMessage(), E_USER_NOTICE);
|
||||
continue;
|
||||
} catch (RuntimeException $e) {
|
||||
trigger_error($e->getMessage(), E_USER_WARNING);
|
||||
|
|
@ -392,7 +407,7 @@ class Wootook_Core_Layout
|
|||
return $path;
|
||||
}
|
||||
|
||||
trigger_error(Legacies::__("Layout file '%s' does not exist.", $file), E_USER_INFO);
|
||||
trigger_error(Legacies::__("Layout file '%s' does not exist.", $file), E_USER_NOTICE);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,12 +6,10 @@ abstract class Wootook_Core_Model_Config_Abstract
|
|||
{
|
||||
protected function _initData($filename)
|
||||
{
|
||||
$config = include ROOT_PATH . 'config.php';
|
||||
$universe = $config['global']['storyline']['universe'];
|
||||
$episode = $config['global']['storyline']['episode'];
|
||||
$config = Wootook::getConfig('global/storyline');
|
||||
|
||||
$path = 'gamedata' . DIRECTORY_SEPARATOR . $universe . DIRECTORY_SEPARATOR
|
||||
. $episode . DIRECTORY_SEPARATOR . $filename . '.php';
|
||||
$path = 'gamedata' . DIRECTORY_SEPARATOR . $config['universe'] . DIRECTORY_SEPARATOR
|
||||
. $config['episode'] . DIRECTORY_SEPARATOR . $filename . '.php';
|
||||
|
||||
foreach (include APPLICATION_PATH . $path as $elementId => $fieldName) {
|
||||
$this->setData($elementId, $fieldName);
|
||||
|
|
|
|||
194
application/code/core/Wootook/Core/Model/Image/Png.php
Normal file
194
application/code/core/Wootook/Core/Model/Image/Png.php
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @todo Update the position alignment management.
|
||||
* @author Greg
|
||||
*
|
||||
*/
|
||||
class Wootook_Core_Model_Image_Png
|
||||
{
|
||||
private $_format = NULL;
|
||||
private $_mime = NULL;
|
||||
|
||||
const COLOR_RED = 'red';
|
||||
const COLOR_GREEN = 'green';
|
||||
const COLOR_BLUE = 'blue';
|
||||
|
||||
const POSITION_LEFT = 0x01;
|
||||
const POSITION_RIGHT = 0x02;
|
||||
const POSITION_CENTER = 0x03;
|
||||
|
||||
const POSITION_TOP = 0x10;
|
||||
const POSITION_BOTTOM = 0x20;
|
||||
const POSITION_MIDDLE = 0x30;
|
||||
|
||||
const POSITION_DEFAULT = 0x11;
|
||||
|
||||
private $_texts = array();
|
||||
private $_background = NULL;
|
||||
private $_font = NULL;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->_setMime('image/png');
|
||||
$this->_setFormat('png');
|
||||
}
|
||||
|
||||
protected function _getFormat()
|
||||
{
|
||||
return $this->_format;
|
||||
}
|
||||
|
||||
protected function _setFormat($format)
|
||||
{
|
||||
$this->_format = $format;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function _getMime()
|
||||
{
|
||||
return $this->_mime;
|
||||
}
|
||||
|
||||
protected function _setMime($mime)
|
||||
{
|
||||
$this->_mime = $mime;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getHeaders()
|
||||
{
|
||||
return array(
|
||||
'Content-Type' => $this->_getMime()
|
||||
);
|
||||
}
|
||||
|
||||
public function addText($content, $fontSize, $fontFile, $positionAbscix, $positionOrdinates, $angle, Array $color, $alignment = self::POSITION_DEFAULT)
|
||||
{
|
||||
$this->_texts[] = array(
|
||||
'content' => $content,
|
||||
'color' => $color,
|
||||
'sizes' => $this->_getTextPositions($content, $fontSize, $fontFile, $positionAbscix, $positionOrdinates, $angle, $alignment),
|
||||
'font_size' => $fontSize,
|
||||
'font_file' => $fontFile,
|
||||
);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function _getTextPositions($textContent, $fontSize, $fontFile, $positionAbscix, $positionOrdinates, $angle = 0, $alignment = self::POSITION_DEFAULT)
|
||||
{
|
||||
$dimensions = imageFtbBox($fontSize, $angle, $fontFile, $textContent);
|
||||
$width = $dimensions[2] - $dimensions[0];
|
||||
$height = $dimensions[1] - $dimensions[7];
|
||||
|
||||
switch ($alignment & 0x7) {
|
||||
case self::POSITION_CENTER:
|
||||
$positionAbscix -= ceil($width / 2);
|
||||
break;
|
||||
|
||||
case self::POSITION_RIGHT:
|
||||
$positionAbscix -= $width;
|
||||
break;
|
||||
|
||||
case self::POSITION_LEFT:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch ($alignment & 0x70) {
|
||||
case self::POSITION_MIDDLE:
|
||||
$positionOrdinates -= ceil($height / 2);
|
||||
break;
|
||||
|
||||
case self::POSITION_TOP:
|
||||
$positionOrdinates -= $height;
|
||||
break;
|
||||
|
||||
case self::POSITION_BOTTOM:
|
||||
default:
|
||||
$width = 0;
|
||||
$height = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return array(
|
||||
'abscix' => $positionAbscix,
|
||||
'ordinate' => $positionOrdinates,
|
||||
'alignment' => $alignment,
|
||||
'width' => $width,
|
||||
'height' => $height,
|
||||
'angle' => $angle
|
||||
);
|
||||
}
|
||||
|
||||
public function setBackground($backgroundImage)
|
||||
{
|
||||
$this->_background = $backgroundImage;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setFont($fontFile)
|
||||
{
|
||||
$this->_font = $fontFile;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
ob_start();
|
||||
if (!is_null($this->_background)) {
|
||||
$gdHandler = imageCreateFromPng($this->_background);
|
||||
} else {
|
||||
$gdHandler = imageCreateTrueColor();
|
||||
}
|
||||
|
||||
foreach ($this->_texts as $text) {
|
||||
$color = imageColorAllocate(
|
||||
$gdHandler,
|
||||
$text['color'][self::COLOR_RED],
|
||||
$text['color'][self::COLOR_GREEN],
|
||||
$text['color'][self::COLOR_BLUE]
|
||||
);
|
||||
|
||||
switch ($text['sizes']['alignment'] & 0x0F) {
|
||||
case self::POSITION_CENTER:
|
||||
$text['sizes']['abscix'] -= floor(imageSX($gdHandler) / 2);
|
||||
break;
|
||||
|
||||
case self::POSITION_RIGHT:
|
||||
$text['sizes']['abscix'] = imageSX($gdHandler) - ($text['sizes']['abscix'] + $text['sizes']['width']) -10;
|
||||
break;
|
||||
|
||||
case self::POSITION_LEFT:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
$imageText = imageTtfText(
|
||||
$gdHandler,
|
||||
$text['font_size'],
|
||||
$text['sizes']['angle'],
|
||||
$text['sizes']['abscix'],
|
||||
$text['sizes']['ordinate'],
|
||||
$color,
|
||||
$text['font_file'],
|
||||
$text['content']
|
||||
);
|
||||
}
|
||||
|
||||
imagePng($gdHandler);
|
||||
imageDestroy($gdHandler);
|
||||
|
||||
$imageData = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
return $imageData;
|
||||
}
|
||||
}
|
||||
|
|
@ -27,6 +27,7 @@ class Wootook_Empire_Block_Topnav
|
|||
*/
|
||||
public function getPlanetCollection()
|
||||
{
|
||||
return $this->getCurrentUser()->getPlanetCollection();
|
||||
return $this->getCurrentUser()
|
||||
->getPlanetCollection(array(Wootook_Empire_Model_Planet::TYPE_PLANET));
|
||||
}
|
||||
}
|
||||
|
|
@ -64,8 +64,8 @@ class Wootook_Empire_Model_User
|
|||
$session = Wootook::getSession(self::SESSION_KEY);
|
||||
if ($session->hasData('user_id')) {
|
||||
$id = intval($session->getData('user_id'));
|
||||
} else if (Wootook::getRequest() !== null && ($cookie = Wootook::getRequest()->getCookie(self::$_cookieName)) !== null) {
|
||||
$cookieData = unserialize(stripslashes($cookie));
|
||||
} else if (Wootook::getRequest() !== null && ($cookieData = Wootook::getRequest()->getCookie(self::$_cookieName)) !== null) {
|
||||
//$cookieData = unserialize(stripslashes($cookie));
|
||||
if (is_array($cookieData)) {
|
||||
$collection = new Wootook_Core_Collection(array('user' => 'users'));
|
||||
$cookieData = array(
|
||||
|
|
@ -182,8 +182,8 @@ class Wootook_Empire_Model_User
|
|||
}
|
||||
}
|
||||
|
||||
if (isset($_POST["rememberme"]) && Wootook::getRequest() !== null) {
|
||||
Wootook::$response->setCookie(self::$_cookieName, array('id' => $login['id'], 'key' => $login['login_rememberme']), self::COOKIE_LIFETIME);
|
||||
if (isset($_POST["rememberme"]) && Wootook::getResponse() !== null) {
|
||||
Wootook::getResponse()->setCookie(self::$_cookieName, array('id' => $login['id'], 'key' => $login['login_rememberme']), self::COOKIE_LIFETIME);
|
||||
}
|
||||
|
||||
self::$_singleton = self::factory($login['id']);
|
||||
|
|
@ -223,7 +223,9 @@ class Wootook_Empire_Model_User
|
|||
|
||||
$user->save();
|
||||
} catch (Wootook_Core_Exception_DataAccessException $e) {
|
||||
echo $e->getTraceAsString();
|
||||
$session = Wootook_Core_Model_Session::factory(Wootook_Empire_Model_User::SESSION_KEY);
|
||||
|
||||
trigger_error($e->getMessage(), E_USER_ERROR);
|
||||
$session->addError($e->getMessage());
|
||||
return null;
|
||||
}
|
||||
|
|
@ -382,10 +384,14 @@ class Wootook_Empire_Model_User
|
|||
return $planetCollection;
|
||||
}
|
||||
|
||||
public function getPlanetCollection()
|
||||
public function getPlanetCollection(Array $typeFilter = array())
|
||||
{
|
||||
$planetCollection = $this->_preparePlanetCollection();
|
||||
|
||||
if (!empty($typeFilter)) {
|
||||
$planetCollection->where('planet.planet_type IN(' . implode(',', $typeFilter) . ')');
|
||||
}
|
||||
|
||||
$planetCollection->load(array(
|
||||
'user' => $this->getId()
|
||||
));
|
||||
|
|
@ -535,4 +541,20 @@ class Wootook_Empire_Model_User
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static function layoutPrepareAfterListener($eventData)
|
||||
{
|
||||
$player = self::getSingleton();
|
||||
if ($player === null || !$player->getId() || !in_array($player->getData('authlevel'), array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERATOR))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isset($eventData['layout']) || !$eventData['layout'] instanceof Wootook_Core_Layout) {
|
||||
return;
|
||||
}
|
||||
$layout = $eventData['layout'];
|
||||
$navigation = $layout->getBlock('navigation');
|
||||
|
||||
$navigation->addLink('tools/admin', 'Admin Panel', 'Admin Panel', 'admin/index.php', array(), array('admin'));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php return array(
|
||||
'empire' => array(
|
||||
'update' => '2columns-left',
|
||||
'update' => '1column',
|
||||
'reference' => array(
|
||||
'navigation' => array(
|
||||
'actions' => array(
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
'name' => 'development/buildings',
|
||||
'label' => 'Buildings',
|
||||
'title' => 'Buildings',
|
||||
'uri' => 'overview.php'
|
||||
'uri' => 'buildings.php'
|
||||
)
|
||||
),
|
||||
array(
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
'name' => 'development/research-lab',
|
||||
'label' => 'Research Lab',
|
||||
'title' => 'Research Lab',
|
||||
'uri' => 'overview.php',
|
||||
'uri' => 'buildings.php',
|
||||
'params' => array(
|
||||
'mode' => 'research'
|
||||
)
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
'name' => 'development/shipyard',
|
||||
'label' => 'Shipyard',
|
||||
'title' => 'Shipyard',
|
||||
'uri' => 'overview.php',
|
||||
'uri' => 'buildings.php',
|
||||
'params' => array(
|
||||
'mode' => 'fleet'
|
||||
)
|
||||
|
|
@ -59,11 +59,230 @@
|
|||
'name' => 'development/defenses',
|
||||
'label' => 'Defenses',
|
||||
'title' => 'Defenses',
|
||||
'uri' => 'overview.php',
|
||||
'uri' => 'buildings.php',
|
||||
'params' => array(
|
||||
'mode' => 'defense'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addLink',
|
||||
'params' => array(
|
||||
'name' => 'development/officers',
|
||||
'label' => 'Officers',
|
||||
'title' => 'Officers',
|
||||
'uri' => 'officers.php'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'setNodeTitle',
|
||||
'params' => array(
|
||||
'path' => 'navigation',
|
||||
'title' => 'Navigation'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addLink',
|
||||
'params' => array(
|
||||
'name' => 'navigation/alliance',
|
||||
'label' => 'Alliance',
|
||||
'title' => 'Alliance',
|
||||
'uri' => 'alliance.php'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addLink',
|
||||
'params' => array(
|
||||
'name' => 'navigation/fleet',
|
||||
'label' => 'Fleet',
|
||||
'title' => 'Fleet',
|
||||
'uri' => 'fleet.php'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addLink',
|
||||
'params' => array(
|
||||
'name' => 'navigation/galaxy',
|
||||
'label' => 'Galaxy',
|
||||
'title' => 'Galaxy',
|
||||
'uri' => 'galaxy.php'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addLink',
|
||||
'params' => array(
|
||||
'name' => 'navigation/empire',
|
||||
'label' => 'Empire',
|
||||
'title' => 'Empire',
|
||||
'uri' => 'imperium.php'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addLink',
|
||||
'params' => array(
|
||||
'name' => 'navigation/resources',
|
||||
'label' => 'Resources Production',
|
||||
'title' => 'Resources Production',
|
||||
'uri' => 'resources.php'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addLink',
|
||||
'params' => array(
|
||||
'name' => 'development/retailer',
|
||||
'label' => 'Retailer',
|
||||
'title' => 'Retailer',
|
||||
'uri' => 'marchand.php'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addLink',
|
||||
'params' => array(
|
||||
'name' => 'navigation/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/messages',
|
||||
'label' => 'Messages',
|
||||
'title' => 'Messages',
|
||||
'uri' => 'messages.php'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addLink',
|
||||
'params' => array(
|
||||
'name' => 'tools/records',
|
||||
'label' => 'Records',
|
||||
'title' => 'Records',
|
||||
'uri' => 'records.php'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addLink',
|
||||
'params' => array(
|
||||
'name' => 'tools/statistics',
|
||||
'label' => 'Stats',
|
||||
'title' => 'Stats',
|
||||
'uri' => 'stat.php'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addLink',
|
||||
'params' => array(
|
||||
'name' => 'tools/banned',
|
||||
'label' => 'Banned Players',
|
||||
'title' => 'Banned Players',
|
||||
'uri' => 'banned.php'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addLink',
|
||||
'params' => array(
|
||||
'name' => 'tools/announcement',
|
||||
'label' => 'Announcements',
|
||||
'title' => 'Announcements',
|
||||
'uri' => 'annonce.php'
|
||||
)
|
||||
),
|
||||
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/search-player',
|
||||
'label' => 'Search Player',
|
||||
'title' => 'Search Player',
|
||||
'uri' => 'search.php'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addLink',
|
||||
'params' => array(
|
||||
'name' => 'community/chat',
|
||||
'label' => 'Chat',
|
||||
'title' => 'Chat',
|
||||
'uri' => 'chat.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'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,16 @@
|
|||
<?php return array(
|
||||
'1column' => array(
|
||||
'update' => 'default'
|
||||
'update' => 'default',
|
||||
'reference' => array(
|
||||
'content' => array(
|
||||
'children' => array(
|
||||
'navigation' => array(
|
||||
'type' => 'core/html.navigation',
|
||||
'template' => 'page/html/navigation.phtml'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'2columns-left' => array(
|
||||
|
|
@ -79,6 +89,12 @@
|
|||
'params' => array(
|
||||
'stylesheet' => 'css/legacies.css'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'method' => 'addJs',
|
||||
'params' => array(
|
||||
'script' => 'scripts/jquery/jquery-1.6.4.js'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
<center>
|
||||
<br />
|
||||
<?php echo $this->getData('BuildListScript')?>
|
||||
<table width=530>
|
||||
<?php echo $this->getData('BuildList')?>
|
||||
<tr>
|
||||
<th ><?php echo $this->getData('bld_usedcells')?></th>
|
||||
<th colspan="2" >
|
||||
<font color="#00FF00"><?php echo $this->getData('planet_field_current')?></font> / <font color="#FF0000"><?php echo $this->getData('planet_field_max')?></font> <?php echo $this->getData('bld_theyare')?> <?php echo $this->getData('field_libre')?> <?php echo $this->getData('bld_cellfree')?>
|
||||
</th >
|
||||
</tr>
|
||||
<?php echo $this->getData('BuildingsList')?>
|
||||
</table>
|
||||
<br />
|
||||
</center>
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
<script src="scripts/cnt.js" type="text/javascript"></script>
|
||||
<div id="btc" class="z"></div><script language="JavaScript">
|
||||
pp = '<?php echo $this->getData('time')?>';
|
||||
pk = '<?php echo $this->getData('building_id')?>';
|
||||
pl = '<?php echo $this->getData('id')?>';
|
||||
ps = 'buildings.php';
|
||||
t();
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
v = new Date();
|
||||
p = 0;
|
||||
g = <?php echo $this->getData('b_building_queue')?>;
|
||||
s = 0;
|
||||
hs = 0;
|
||||
of = 1;
|
||||
c = new Array(<?php echo $this->getData('c')?>'');
|
||||
b = new Array(<?php echo $this->getData('b')?>'');
|
||||
a = new Array(<?php echo $this->getData('a')?>'');
|
||||
aa = '<?php echo $this->getData('completed')?>';
|
||||
|
||||
function t() {
|
||||
if ( hs == 0 ) {
|
||||
xd();
|
||||
hs = 1;
|
||||
}
|
||||
n = new Date();
|
||||
s = c[p]-g-Math.round((n.getTime()-v.getTime())/1000.);
|
||||
s = Math.round(s);
|
||||
m = 0;
|
||||
h = 0;
|
||||
if ( s < 0 ) {
|
||||
a[p]--;
|
||||
xd();
|
||||
if ( a[p] <= 0 ) {
|
||||
p++;
|
||||
xd();
|
||||
}
|
||||
g = 0;
|
||||
v = new Date();
|
||||
s = 0;
|
||||
}
|
||||
if ( s > 59 ) {
|
||||
m = Math.floor( s / 60 );
|
||||
s = s - m * 60;
|
||||
}
|
||||
if ( m > 59 ) {
|
||||
h = Math.floor( m / 60 );
|
||||
m = m - h * 60;
|
||||
}
|
||||
if ( s < 10 ) {
|
||||
s = "0" + s;
|
||||
}
|
||||
if ( m < 10 ) {
|
||||
m = "0" + m;
|
||||
}
|
||||
if (p > b.length - 2) {
|
||||
document.getElementById("bx").innerHTML=aa ;
|
||||
} else {
|
||||
document.getElementById("bx").innerHTML= b[p] + " " + h + ":" + m + ":" + s;
|
||||
}
|
||||
window.setTimeout("t();", 200);
|
||||
}
|
||||
|
||||
function xd() {
|
||||
while (document.Atr.auftr.length > 0) {
|
||||
document.Atr.auftr.options[document.Atr.auftr.length-1] = null;
|
||||
}
|
||||
if ( p > b.length - 2 ) {
|
||||
document.Atr.auftr.options[document.Atr.auftr.length] = new Option(aa);
|
||||
}
|
||||
for (iv = p; iv <= b.length - 2; iv++) {
|
||||
if ( a[iv] < 2 ) {
|
||||
ae = " ";
|
||||
} else {
|
||||
ae = " ";
|
||||
}
|
||||
if ( iv == p ) {
|
||||
act = " (<?php echo $this->getData('in_working')?>)";
|
||||
} else {
|
||||
act = "";
|
||||
}
|
||||
document.Atr.auftr.options[document.Atr.auftr.length] = new Option( a[iv] + ae + " \"" + b[iv] + "\"" + act, iv + of );
|
||||
}
|
||||
}
|
||||
|
||||
window.onload = t;
|
||||
</script>
|
||||
|
||||
<center>
|
||||
<br>
|
||||
<form name="Atr" method="get" action="buildings.php">
|
||||
<input type="hidden" name="mode" value="fleet">
|
||||
<table width="530">
|
||||
<tr>
|
||||
<td class="c" ><?php echo $this->getData('work_todo')?></td>
|
||||
</tr><tr>
|
||||
<th ><select name="auftr" size="10"></select></th>
|
||||
</tr><tr>
|
||||
<td class="c" ></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php echo $this->getData('total_left_time')?>
|
||||
|
||||
<?php echo $this->getData('pretty_time_b_hangar')?>
|
||||
<br>
|
||||
</center>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<tr>
|
||||
<td class="l">
|
||||
<a href="infos.php?gid=<?php echo $this->getData('i')?>">
|
||||
<img border="0" src="<?php echo $this->getData('dpath')?>gebaeude/<?php echo $this->getData('i')?>.gif" align="top" width="120" height="120">
|
||||
</a>
|
||||
</td>
|
||||
<td class="l">
|
||||
<a href="infos.php?gid=<?php echo $this->getData('i')?>"><?php echo $this->getData('n')?></a><?php echo $this->getData('nivel')?><br>
|
||||
<?php echo $this->getData('descriptions')?><br>
|
||||
<?php echo $this->getData('price')?>
|
||||
<?php echo $this->getData('time')?>
|
||||
<?php echo $this->getData('rest_price')?>
|
||||
</td>
|
||||
<td class="k"><?php echo $this->getData('click')?></td>
|
||||
</tr>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<script src="scripts/cnt.js" type="text/javascript"></script>
|
||||
<div id="btc" class="z"></div><SCRIPT language="JavaScript">
|
||||
pp='<?php echo $this->getData('time')?>';
|
||||
pk='<?php echo $this->getData('building_id')?>';
|
||||
pl='<?php echo $this->getData('id')?>';
|
||||
ps='buildings.php';
|
||||
t();
|
||||
</script>
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
<center>
|
||||
<br />
|
||||
<table align="top">
|
||||
<tr>
|
||||
<td>
|
||||
<form action="buildings.php?mode=defense" method="post">
|
||||
<table width=530>
|
||||
<?php echo $this->getData('buildlist')?>
|
||||
<tr>
|
||||
<td class="c" colspan=2 align="center"><input type="submit" value="<?php echo $this->getData('Construire')?>"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
<td valign="top"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php echo $this->getData('buildinglist')?>
|
||||
</center>
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
<center>
|
||||
<br />
|
||||
<table align="top">
|
||||
<tr>
|
||||
<td>
|
||||
<form action="buildings.php?mode=fleet" method="post">
|
||||
<table width=530>
|
||||
<?php echo $this->getData('buildlist')?>
|
||||
<tr>
|
||||
<td class="c" colspan=2 align="center"><input type="submit" value="<?php echo $this->getData('Construire')?>"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
<td valign="top"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php echo $this->getData('buildinglist')?>
|
||||
</center>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<center>
|
||||
<font color="#ff0000"><?php echo $this->getData('noresearch')?></font>
|
||||
<br />
|
||||
<table align=top>
|
||||
<tr>
|
||||
<td>
|
||||
<table width=530>
|
||||
<tr>
|
||||
<?php echo $this->getData('technolist')?>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<tr>
|
||||
<th class="l">
|
||||
<a href="infos.php?gid=<?php echo $this->getData('tech_id')?>">
|
||||
<img border=0 src="<?php echo $this->getData('dpath')?>gebaeude/<?php echo $this->getData('tech_id')?>.gif" align="top" width=120 height=120></a>
|
||||
</th>
|
||||
<td class="l">
|
||||
<a href="infos.php?gid=<?php echo $this->getData('tech_id')?>"><?php echo $this->getData('tech_name')?></a> <?php echo $this->getData('tech_level')?><br><?php echo $this->getData('tech_descr')?><br>
|
||||
<?php echo $this->getData('tech_price')?>
|
||||
<?php echo $this->getData('search_time')?>
|
||||
<?php echo $this->getData('tech_restp')?>
|
||||
</td>
|
||||
<th class="l">
|
||||
<?php echo $this->getData('tech_link')?>
|
||||
</th>
|
||||
</tr>
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
<div id="brp" class="z"></div>
|
||||
<script type="text/javascript">
|
||||
v = new Date();
|
||||
var brp = document.getElementById('brp');
|
||||
function t(){
|
||||
n = new Date();
|
||||
ss = <?php echo $this->getData('tech_time')?>;
|
||||
s = ss - Math.round( (n.getTime() - v.getTime()) / 1000.);
|
||||
m = 0;
|
||||
h = 0;
|
||||
if ( s < 0 ) {
|
||||
brp.innerHTML = '<?php echo $this->getData('ready')?><br><a href=buildings.php?mode=research&cp=<?php echo $this->getData('tech_home')?>><?php echo $this->getData('continue')?></a>';
|
||||
} else {
|
||||
if ( s > 59 ) { m = Math.floor( s / 60 ); s = s - m * 60; }
|
||||
if ( m > 59 ) { h = Math.floor( m / 60 ); m = m - h * 60; }
|
||||
if ( s < 10 ) { s = "0" + s }
|
||||
if ( m < 10 ) { m = "0" + m }
|
||||
brp.innerHTML = h + ':' + m + ':' + s + '<br><a href=buildings.php?mode=research&cmd=cancel&tech=<?php echo $this->getData('tech_id')?>><?php echo $this->getData('cancel')?><br><?php echo $this->getData('tech_name')?></a>';
|
||||
}
|
||||
window.setTimeout("t();",999);
|
||||
}
|
||||
window.onload=t;
|
||||
</script>
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<div>Production Actuelle:
|
||||
<select id="buildList" size="10"></select>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var date = new Date();
|
||||
var data = <?php echo $this->getData('data')?>;
|
||||
var select = document.getElementById('buildList');
|
||||
|
||||
setInterval(function(){
|
||||
var now = new Date();
|
||||
var datediff = (now.getTime() - date.getTime()) / 1000;
|
||||
|
||||
var option = null;
|
||||
var index = 0;
|
||||
if (data.length == 0) {
|
||||
select.parentNode.style.display = 'none';
|
||||
return;
|
||||
}
|
||||
select.length = 0;
|
||||
for (i in data) {
|
||||
if (datediff > 0) {
|
||||
data[i]['actual_qty'] = data[i]['qty'] - Math.floor(datediff / data[i]['speed']);
|
||||
} else {
|
||||
data[i]['actual_qty'] = data[i]['qty'];
|
||||
}
|
||||
if (data[i]['actual_qty'] <= 0) {
|
||||
datediff = datediff - (data[i]['speed'] * data[i]['qty']);
|
||||
delete data[i];
|
||||
continue;
|
||||
} else {
|
||||
datediff = 0;
|
||||
}
|
||||
option = new Option(data[i]['label'] + ' (' + data[i]['actual_qty'] + ')', data[i]['speed'], false, true);
|
||||
select.options[index++] = option;
|
||||
}
|
||||
}, 1000);
|
||||
//]]>
|
||||
</script>
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
<div id='leftmenu'>
|
||||
<script language="JavaScript">
|
||||
function f(target_url,win_name) {
|
||||
var new_win = window.open(target_url,win_name,'resizable=yes,scrollbars=yes,menubar=no,toolbar=no,width=550,height=280,top=0,left=0');
|
||||
new_win.focus();
|
||||
}
|
||||
</script>
|
||||
<body class="style" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
|
||||
<center>
|
||||
<div id='menu'>
|
||||
<br>
|
||||
<table width="130" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td colspan="2" style="border-top: 1px #545454 solid"><div><center><?php echo $this->getData('servername')?><br>(<a href="changelog.php" target=<?php echo $this->getData('mf')?>><font color=red><?php echo $this->getData('XNovaRelease')?></font></a>)<center></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2" background="<?php echo $this->getData('dpath')?>img/bg1.gif"><center><?php echo $this->getData('devlp')?></center></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="overview.php" accesskey="g" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Overview')?></a></div></td>
|
||||
</tr><tr>
|
||||
|
||||
<td height="1px" colspan="2" style="background-color:#FFFFFF"></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="buildings.php" accesskey="b" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Buildings')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="buildings.php?mode=research" accesskey="r" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Research')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="buildings.php?mode=fleet" accesskey="f" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Shipyard')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="buildings.php?mode=defense" accesskey="d" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Defense')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="officier.php" accesskey="o" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Officiers')?></a></div></td>
|
||||
</tr><tr>
|
||||
<?php echo $this->getData('marchand_link')?>
|
||||
</tr><tr>
|
||||
<td colspan="2" background="<?php echo $this->getData('dpath')?>img/bg1.gif"><center><?php echo $this->getData('navig')?></center></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="alliance.php" accesskey="a" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Alliance')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="fleet.php" accesskey="t" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Fleet')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="messages.php" accesskey="c" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Messages')?></a></div></td>
|
||||
</tr><tr>
|
||||
|
||||
<td colspan="2" background="<?php echo $this->getData('dpath')?>img/bg1.gif"><center><?php echo $this->getData('observ')?></center></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="galaxy.php?mode=0" accesskey="s" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Galaxy')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="imperium.php" accesskey="i" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Imperium')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="resources.php" accesskey="r" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Resources')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="techtree.php" accesskey="g" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Technology')?></a></div></td>
|
||||
</tr><tr>
|
||||
|
||||
<td height="1px" colspan="2" style="background-color:#FFFFFF"></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="records.php" accesskey="3" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Records')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="stat.php?range=<?php echo $this->getData('user_rank')?>" accesskey="k" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Statistics')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="search.php" accesskey="b" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Search')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="banned.php" accesskey="3" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('blocked')?></a></div></td>
|
||||
</tr><?php echo $this->getData('announce_link')?><tr>
|
||||
|
||||
|
||||
<td colspan="2" background="<?php echo $this->getData('dpath')?>img/bg1.gif"><center><?php echo $this->getData('commun')?></center></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="#" onClick="f('buddy.php', '');" accesskey="c"><?php echo $this->getData('Buddylist')?></a></div></td>
|
||||
</tr></tr><?php echo $this->getData('notes_link')?><tr><tr>
|
||||
<td colspan="2"><div><a href="chat.php" accesskey="a" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Chat')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="<?php echo $this->getData('forum_url')?>" accesskey="1" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Board')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="add_declare.php" accesskey="1" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('multi')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="rules.php" accesskey="c" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Rules')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="contact.php" accesskey="3" target="<?php echo $this->getData('mf')?>" ><?php echo $this->getData('Contact')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2"><div><a href="options.php" accesskey="o" target="<?php echo $this->getData('mf')?>"><?php echo $this->getData('Options')?></a></div></td>
|
||||
</tr>
|
||||
<?php echo $this->getData('ADMIN_LINK')?>
|
||||
<tr>
|
||||
</tr>
|
||||
<?php echo $this->getData('added_link')?>
|
||||
<tr>
|
||||
<td colspan="2"><div><a href="javascript:top.location.href='logout.php'" accesskey="s" style="color:red"><?php echo $this->getData('Logout')?></a></div></td>
|
||||
</tr><tr>
|
||||
<td colspan="2" background="<?php echo $this->getData('dpath')?>img/bg1.gif"><center><?php echo $this->getData('infog')?></center></td>
|
||||
</tr>
|
||||
<?php echo $this->getData('server_info')?>
|
||||
</table>
|
||||
</div>
|
||||
</center>
|
||||
</body>
|
||||
</div>
|
||||
|
|
@ -1,10 +1,14 @@
|
|||
<th>
|
||||
<h1><?php echo $this->escape($this['planet']->getData('name'))?></h1>
|
||||
<p><a href="<?php echo $this->getUrl('overview.php', array('cp' => $this['planet']->getId()))?>" title="<?php echo $this->escape($this['planet']->getData('name'))?>">
|
||||
<img src="<?php echo $this->getUrl('planeten/small/s_' . $this['planet']->getData('image') . '.jpg')?>" height="50" width="50" />
|
||||
</a></p>
|
||||
<?php if ($this['queue']->count() > 0):?>
|
||||
<p><?php echo $this->escape($this['queue_item']->getData('building_id'))?></p>
|
||||
<?php else:?>
|
||||
<p><?php echo $this->__('Idle.')?></p>
|
||||
<?php endif?>
|
||||
<td>
|
||||
<h1><?php echo $this->escape($this['planet']->getData('name'))?></h1>
|
||||
<p><a href="<?php echo $this->getUrl('overview.php', array('cp' => $this['planet']->getId()))?>" title="<?php echo $this->escape($this['planet']->getData('name'))?>">
|
||||
<img src="<?php echo $this->getSkinUrl('graphics/planeten/small/s_' . $this['planet']->getData('image') . '.jpg')?>" height="50" width="50" />
|
||||
</a></p>
|
||||
<?php if (isset($this['queue']) && $this['queue']->count() > 0):?>
|
||||
<p><?php echo $this->escape($this['queue_item']->getData('building_id'))?></p>
|
||||
<?php else:?>
|
||||
<p><?php echo $this->__('Idle.')?></p>
|
||||
<?php endif?>
|
||||
</td>
|
||||
<?php if ($this['even']):?>
|
||||
</tr><tr>
|
||||
<?php endif?>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="shipyard item-list">
|
||||
<h1><?php echo $this->__('Shipyard')?></h1>
|
||||
<form action="<?php echo $this->getUrl('buildings.php', array('mode' => 'fleets'))?>" method="post">
|
||||
<form action="<?php echo $this->getUrl('buildings.php', array('mode' => 'fleet'))?>" method="post">
|
||||
<dl>
|
||||
<?php echo $this->getPartial('item-list.items')->render()?>
|
||||
</dl>
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
<?php
|
||||
|
|
@ -1 +0,0 @@
|
|||
<?php
|
||||
|
|
@ -1 +0,0 @@
|
|||
<?php
|
||||
|
|
@ -1,17 +1,42 @@
|
|||
<?php $currentPlanet = $this->getCurrentPlanet();?>
|
||||
<div class="planet-carrousel">
|
||||
<div class="arrow left">⇦</div>
|
||||
<div class="arrow left"><!--⇦--></div>
|
||||
<div class="items">
|
||||
<?php foreach ($this->getPlanetCollection() as $planet):?>
|
||||
<?php if ($planet->getId() != $currentPlanet->getId()):?>
|
||||
<div class="planet item">
|
||||
<?php if ($planet->getId() != $this->getCurrentPlanet()->getId()):?>
|
||||
<a href="<?php echo $this->getUrl('', array('cp' => $planet->getId()))?>"><?php echo $this->escape($planet->getName())?> [<?php echo $this->escape($planet->getCoords())?>]</a>
|
||||
<?php else:?>
|
||||
<?php echo $this->escape($planet->getName())?> [<?php echo $this->escape($planet->getCoords())?>]
|
||||
<?php endif?>
|
||||
<p class="planet-name"><a href="<?php echo $this->getUrl('overview.php', array('cp' => $planet->getId()))?>"><?php echo $this->escape($planet->getName())?></a></p>
|
||||
<div class="planet-image">
|
||||
<?php if (false && ($moon = $planet->getMoon()) !== null): ?>
|
||||
<a href="<?php echo $this->getUrl('overview.php', array('cp' => $moon->getId()))?>" class="moon">
|
||||
<img src="<?php echo $this->getSkinUrl($moon->getImage())?>" width="20" height="20"/>
|
||||
</a>
|
||||
<?php endif?>
|
||||
<a href="<?php echo $this->getUrl('overview.php', array('cp' => $planet->getId()))?>" class="planet">
|
||||
<img src="<?php echo $this->getSkinUrl($planet->getImage())?>" width="50" height="50"/>
|
||||
</a>
|
||||
</div>
|
||||
<p class="planet-position"><a href="<?php echo $this->getUrl('overview.php', array('cp' => $planet->getId()))?>">[<?php echo $this->escape($planet->getCoords())?>]</a></p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class="planet item selected">
|
||||
<p class="planet-name"><?php echo $this->escape($planet->getName())?></p>
|
||||
<div class="planet-image">
|
||||
<?php if (false && ($moon = $planet->getMoon()) !== null): ?>
|
||||
<span class="moon">
|
||||
<img src="<?php echo $this->getSkinUrl($moon->getImage())?>" width="20" height="20"/>
|
||||
</span>
|
||||
<?php endif?>
|
||||
<span class="planet">
|
||||
<img src="<?php echo $this->getSkinUrl($planet->getImage())?>" width="50" height="50"/>
|
||||
</span>
|
||||
</div>
|
||||
<p class="planet-position">[<?php echo $this->escape($planet->getCoords())?>]</p>
|
||||
</div>
|
||||
<?php endif?>
|
||||
<?php endforeach?>
|
||||
</div>
|
||||
<div class="arrow right">⇨</div>
|
||||
<div class="arrow right"><!--⇨--></div>
|
||||
</div>
|
||||
<div class="resources-display">
|
||||
<div class="resource metal">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<title>XNova:Legacies</title>
|
||||
<title><?php echo $this->escape($this->getTitle())?></title>
|
||||
<link rel="shortcut icon" href="<?php echo $this->getUrl('favicon.ico')?>">
|
||||
<?php foreach ($this->getCss() as $css):?>
|
||||
<link rel="stylesheet" type="<?php echo $css['type']?>" href="<?php echo $this->getSkinUrl($css['path'])?>" />
|
||||
|
|
|
|||
|
|
@ -2,4 +2,17 @@
|
|||
<?php foreach ($this->getAllPartials() as $partial):?>
|
||||
<?php echo $partial->render()?>
|
||||
<?php endforeach?>
|
||||
<span class="last"></span>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
(function($){
|
||||
var navigation = $('.navigation');
|
||||
$('.navigation-node', navigation).hover(function(e){
|
||||
$('.navigation-link,.last', $(this)).show();
|
||||
}, function(e){
|
||||
$('.navigation-link,.last', $(this)).hide();
|
||||
});
|
||||
})(jQuery);
|
||||
//]]>
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1 +1,3 @@
|
|||
<span class="<?php echo $this->escape($this->renderClasses())?>"><a href="<?php echo $this->escape($this->getLinkUrl())?>"><?php echo $this->escape($link->getLabel())?></a></span>
|
||||
<span class="<?php echo $this->escape($this->renderClasses())?> navigation-link">
|
||||
<a href="<?php echo $this->escape($this->getLinkUrl())?>"<?php foreach ($this->getAttributes() as $attributeName => $attributeValue):?> <?php echo $attributeName?>="<?php echo $attributeValue ?>"<?php endforeach?>><?php echo $this->escape($this->getLabel())?></a>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<div class="navigation-node">
|
||||
<?php foreach ($this->getAllPartials() as $partial):?>
|
||||
<p class="title"><?php echo $this->escape($this->getTitle())?></p>
|
||||
<?php foreach ($this->getAllPartials() as $name => $partial):?>
|
||||
<?php echo $partial->render()?>
|
||||
<?php endforeach?>
|
||||
<span class="last"></span>
|
||||
</div>
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
<form action="reg.php" method="post">
|
||||
<form action="reg.php" method="post" class="registration">
|
||||
<h1>Wootook!</h1>
|
||||
<fieldset>
|
||||
<legend><?php echo $this->__('User data:')?></legend>
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
<?php return array(
|
||||
'layout.prepare.before' => array(),
|
||||
'layout.prepare.after' => array(
|
||||
array('Wootook_Empire_Model_User', 'layoutPrepareAfterListener')
|
||||
),
|
||||
'login.failure' => array(),
|
||||
'login.success' => array(),
|
||||
'logout.success' => array(),
|
||||
|
|
@ -9,13 +13,14 @@
|
|||
),
|
||||
'planet.update' => array(
|
||||
array('Wootook_Empire_Model_Planet', 'planetUpdateListener'),
|
||||
array('Legacies_Empire_Model_Planet_Building_Shipyard', 'planetUpdateListener')
|
||||
array('Legacies_Empire_Model_Planet_Building_Shipyard', 'planetUpdateListener'),
|
||||
array('Legacies_Officers_Model_Observer', 'planetUpdateListener')
|
||||
),
|
||||
'user.init' => array(
|
||||
array('Wootook_Empire_Model_Planet', 'registrationListener')
|
||||
),
|
||||
'planet.init' => array(
|
||||
array('Legacies_Empire_Model_Galaxy_Position', 'initPlanetListerner')
|
||||
array('Wootook_Empire_Model_Galaxy_Position', 'initPlanetListerner')
|
||||
),
|
||||
'planet.shipyard.check-availability' => array(),
|
||||
'planet.shipyard.update-queue.before' => array(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue