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
|
|
@ -40,7 +40,7 @@ function DisplayGameSettingsPage ( $CurrentUser ) {
|
|||
includeLang('admin/settings');
|
||||
|
||||
if (in_array((int) $CurrentUser['authlevel'], array(LEVEL_ADMIN))) {
|
||||
if ($_POST['opt_save'] == "1") {
|
||||
if (isset($_POST['opt_save']) && $_POST['opt_save'] == "1") {
|
||||
// Jeu Ouvert ou Ferm<72> !
|
||||
if (isset($_POST['closed']) && $_POST['closed'] == 'on') {
|
||||
$gameConfig['game_disable'] = "1";
|
||||
|
|
@ -189,64 +189,8 @@ $gameConfig['banner_source_post'] = $_POST['banner_source_post'];
|
|||
$gameConfig['enable_bbcode'] = $_POST['bbcode_field'];
|
||||
}
|
||||
|
||||
// Activation du jeu
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['game_disable'] ."' WHERE `config_name` = 'game_disable';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['close_reason'] ."' WHERE `config_name` = 'close_reason';", 'config');
|
||||
$gameConfig->save();
|
||||
|
||||
//Stats
|
||||
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['stat_settings'] ."' WHERE `config_name` = 'stat_settings';", 'config');
|
||||
|
||||
|
||||
// Configuration du Jeu
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['forum_url'] ."' WHERE `config_name` = 'forum_url';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['game_name'] ."' WHERE `config_name` = 'game_name';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['game_speed'] ."' WHERE `config_name` = 'game_speed';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['fleet_speed'] ."' WHERE `config_name` = 'fleet_speed';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['resource_multiplier'] ."' WHERE `config_name` = 'resource_multiplier';", 'config');
|
||||
|
||||
// Page Generale
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['OverviewNewsFrame'] ."' WHERE `config_name` = 'OverviewNewsFrame';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['OverviewNewsText'] ."' WHERE `config_name` = 'OverviewNewsText';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['OverviewExternChat'] ."' WHERE `config_name` = 'OverviewExternChat';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['OverviewExternChatCmd'] ."' WHERE `config_name` = 'OverviewExternChatCmd';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['OverviewBanner'] ."' WHERE `config_name` = 'OverviewBanner';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['OverviewClickBanner'] ."' WHERE `config_name` = 'OverviewClickBanner';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['ForumBannerFrame'] ."' WHERE `config_name` = 'ForumBannerFrame';", 'config');
|
||||
|
||||
//Bannière
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['banner_source_post'] ."' WHERE `config_name` = 'banner_source_post';", 'config');
|
||||
|
||||
// Lien supplémentaire dans le menu
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['link_enable'] ."' WHERE `config_name` = 'link_enable';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['link_name'] ."' WHERE `config_name` = 'link_name';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['link_url'] ."' WHERE `config_name` = 'link_url';", 'config');
|
||||
|
||||
// Options Planete
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['initial_fields'] ."' WHERE `config_name` = 'initial_fields';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['metal_basic_income'] ."' WHERE `config_name` = 'metal_basic_income';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['crystal_basic_income'] ."' WHERE `config_name` = 'crystal_basic_income';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['deuterium_basic_income'] ."' WHERE `config_name` = 'deuterium_basic_income';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['energy_basic_income'] ."' WHERE `config_name` = 'energy_basic_income';", 'config');
|
||||
|
||||
//Bot antimulti
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['bot_name'] ."' WHERE `config_name` = 'bot_name';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['bot_adress'] ."' WHERE `config_name` = 'bot_adress';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['ban_duration'] ."' WHERE `config_name` = 'ban_duration';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['enable_bot'] ."' WHERE `config_name` = 'enable_bot';", 'config');
|
||||
|
||||
|
||||
//Réglage du BBCode
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['enable_bbcode'] ."' WHERE `config_name` = 'enable_bbcode';", 'config');
|
||||
|
||||
|
||||
//Controle des pages
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['enable_announces'] ."' WHERE `config_name` = 'enable_announces';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['enable_marchand'] ."' WHERE `config_name` = 'enable_marchand';", 'config');
|
||||
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['enable_notes'] ."' WHERE `config_name` = 'enable_notes';", 'config');
|
||||
|
||||
// Mode Debug
|
||||
doquery("UPDATE {{table}} SET `config_value` = '" .$gameConfig['debug'] ."' WHERE `config_name` ='debug'", 'config');
|
||||
AdminMessage ('Options changees avec succes !', 'Succes', '?');
|
||||
} else {
|
||||
|
||||
|
|
@ -295,7 +239,7 @@ $gameConfig['banner_source_post'] = $_POST['banner_source_post'];
|
|||
$parse['bannerframe'] = ($gameConfig['ForumBannerFrame'] == 1) ? " checked = 'checked' ":"";
|
||||
|
||||
$PageTPL = gettemplate('admin/options_body');
|
||||
$Page .= parsetemplate( $PageTPL, $parse );
|
||||
$Page = parsetemplate( $PageTPL, $parse );
|
||||
|
||||
display ( $Page, $lang['adm_opt_title'], false, '', true );
|
||||
}
|
||||
|
|
@ -305,6 +249,5 @@ $gameConfig['banner_source_post'] = $_POST['banner_source_post'];
|
|||
return $Page;
|
||||
}
|
||||
|
||||
$Page = DisplayGameSettingsPage ( $user );
|
||||
$Page = DisplayGameSettingsPage($user);
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -42,14 +42,14 @@ if (strtolower(substr(PHP_SAPI, 0, 3)) == 'cli' || in_array($user['authlevel'],
|
|||
|
||||
$StatDate = time();
|
||||
// Rotation des statistiques
|
||||
doquery ( "DELETE FROM {{table}} WHERE `stat_code` = '2';" , 'statpoints');
|
||||
doquery ( "DELETE FROM {{table}} WHERE `stat_code` >= '10';" , 'statpoints');
|
||||
doquery ( "UPDATE {{table}} SET `stat_code` = `stat_code` + '1';" , 'statpoints');
|
||||
|
||||
$GameUsers = doquery("SELECT * FROM {{table}} WHERE authlevel<3", 'users');
|
||||
|
||||
while ($CurUser = $GameUsers->fetch(PDO::FETCH_ASSOC)) {
|
||||
// Recuperation des anciennes statistiques
|
||||
$OldStatRecord = doquery ("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `id_owner` = '".$CurUser['id']."';",'statpoints');
|
||||
$OldStatRecord = doquery ("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `id_owner` = '".$CurUser['id']."';", 'statpoints', true);
|
||||
if ($OldStatRecord) {
|
||||
$OldTotalRank = $OldStatRecord['total_rank'];
|
||||
$OldTechRank = $OldStatRecord['tech_rank'];
|
||||
|
|
@ -81,7 +81,7 @@ if (strtolower(substr(PHP_SAPI, 0, 3)) == 'cli' || in_array($user['authlevel'],
|
|||
$GCount = $TTechCount;
|
||||
$GPoints = $TTechPoints;
|
||||
$UsrPlanets = doquery("SELECT * FROM {{table}} WHERE `id_owner` = '". $CurUser['id'] ."';", 'planets');
|
||||
while ($CurPlanet = mysql_fetch_assoc($UsrPlanets) ) {
|
||||
while ($CurPlanet = $UsrPlanets->fetch(PDO::FETCH_ASSOC)) {
|
||||
$Points = GetBuildPoints ( $CurPlanet );
|
||||
$TBuildCount += $Points['BuildCount'];
|
||||
$GCount += $Points['BuildCount'];
|
||||
|
|
@ -134,7 +134,7 @@ if (strtolower(substr(PHP_SAPI, 0, 3)) == 'cli' || in_array($user['authlevel'],
|
|||
|
||||
$Rank = 1;
|
||||
$RankQry = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' ORDER BY `tech_points` DESC;", 'statpoints');
|
||||
while ($TheRank = mysql_fetch_assoc($RankQry) ) {
|
||||
while ($TheRank = $RankQry->fetch(PDO::FETCH_ASSOC)) {
|
||||
$QryUpdateStats = "UPDATE {{table}} SET ";
|
||||
$QryUpdateStats .= "`tech_rank` = '". $Rank ."' ";
|
||||
$QryUpdateStats .= "WHERE ";
|
||||
|
|
@ -145,7 +145,7 @@ if (strtolower(substr(PHP_SAPI, 0, 3)) == 'cli' || in_array($user['authlevel'],
|
|||
|
||||
$Rank = 1;
|
||||
$RankQry = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' ORDER BY `build_points` DESC;", 'statpoints');
|
||||
while ($TheRank = mysql_fetch_assoc($RankQry) ) {
|
||||
while ($TheRank = $RankQry->fetch(PDO::FETCH_ASSOC) ) {
|
||||
$QryUpdateStats = "UPDATE {{table}} SET ";
|
||||
$QryUpdateStats .= "`build_rank` = '". $Rank ."' ";
|
||||
$QryUpdateStats .= "WHERE ";
|
||||
|
|
@ -156,7 +156,7 @@ if (strtolower(substr(PHP_SAPI, 0, 3)) == 'cli' || in_array($user['authlevel'],
|
|||
|
||||
$Rank = 1;
|
||||
$RankQry = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' ORDER BY `defs_points` DESC;", 'statpoints');
|
||||
while ($TheRank = mysql_fetch_assoc($RankQry) ) {
|
||||
while ($TheRank = $RankQry->fetch(PDO::FETCH_ASSOC)) {
|
||||
$QryUpdateStats = "UPDATE {{table}} SET ";
|
||||
$QryUpdateStats .= "`defs_rank` = '". $Rank ."' ";
|
||||
$QryUpdateStats .= "WHERE ";
|
||||
|
|
@ -167,7 +167,7 @@ if (strtolower(substr(PHP_SAPI, 0, 3)) == 'cli' || in_array($user['authlevel'],
|
|||
|
||||
$Rank = 1;
|
||||
$RankQry = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' ORDER BY `fleet_points` DESC;", 'statpoints');
|
||||
while ($TheRank = mysql_fetch_assoc($RankQry) ) {
|
||||
while ($TheRank = $RankQry->fetch(PDO::FETCH_ASSOC)) {
|
||||
$QryUpdateStats = "UPDATE {{table}} SET ";
|
||||
$QryUpdateStats .= "`fleet_rank` = '". $Rank ."' ";
|
||||
$QryUpdateStats .= "WHERE ";
|
||||
|
|
@ -178,7 +178,7 @@ if (strtolower(substr(PHP_SAPI, 0, 3)) == 'cli' || in_array($user['authlevel'],
|
|||
|
||||
$Rank = 1;
|
||||
$RankQry = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' ORDER BY `total_points` DESC;", 'statpoints');
|
||||
while ($TheRank = mysql_fetch_assoc($RankQry) ) {
|
||||
while ($TheRank = $RankQry->fetch(PDO::FETCH_ASSOC)) {
|
||||
$QryUpdateStats = "UPDATE {{table}} SET ";
|
||||
$QryUpdateStats .= "`total_rank` = '". $Rank ."' ";
|
||||
$QryUpdateStats .= "WHERE ";
|
||||
|
|
@ -192,7 +192,7 @@ if (strtolower(substr(PHP_SAPI, 0, 3)) == 'cli' || in_array($user['authlevel'],
|
|||
|
||||
while ($CurAlly = $GameAllys->fetch(PDO::FETCH_ASSOC)) {
|
||||
// Recuperation des anciennes statistiques
|
||||
$OldStatRecord = doquery ("SELECT * FROM {{table}} WHERE `stat_type` = '2' AND `id_owner` = '".$CurAlly['id']."';",'statpoints');
|
||||
$OldStatRecord = doquery ("SELECT * FROM {{table}} WHERE `stat_type` = '2' AND `id_owner` = '".$CurAlly['id']."';",'statpoints', true);
|
||||
if ($OldStatRecord) {
|
||||
$OldTotalRank = $OldStatRecord['total_rank'];
|
||||
$OldTechRank = $OldStatRecord['tech_rank'];
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ function GetTechnoPoints ( $CurrentUser ) {
|
|||
foreach ( $reslist['tech'] as $n => $Techno ) {
|
||||
if ( $CurrentUser[ $resource[ $Techno ] ] > 0 ) {
|
||||
for ( $Level = 1; $Level < $CurrentUser[ $resource[ $Techno ] ]; $Level++ ) {
|
||||
$Units = $pricelist[ $Techno ]['metal'] + $pricelist[ $Techno ]['crystal'] + $pricelist[ $Techno ]['deuterium'];
|
||||
$Units = $pricelist[ $Techno ]['metal'] + $pricelist[ $Techno ]['cristal'] + $pricelist[ $Techno ]['deuterium'];
|
||||
$LevelMul = pow( $pricelist[ $Techno ]['factor'], $Level );
|
||||
$TechPoints += ($Units * $LevelMul);
|
||||
$TechCounts += 1;
|
||||
|
|
@ -57,7 +57,7 @@ function GetBuildPoints ( $CurrentPlanet ) {
|
|||
foreach($reslist['build'] as $n => $Building) {
|
||||
if ( $CurrentPlanet[ $resource[ $Building ] ] > 0 ) {
|
||||
for ( $Level = 1; $Level < $CurrentPlanet[ $resource[ $Building ] ]; $Level++ ) {
|
||||
$Units = $pricelist[ $Building ]['metal'] + $pricelist[ $Building ]['crystal'] + $pricelist[ $Building ]['deuterium'];
|
||||
$Units = $pricelist[ $Building ]['metal'] + $pricelist[ $Building ]['cristal'] + $pricelist[ $Building ]['deuterium'];
|
||||
$LevelMul = pow( $pricelist[ $Building ]['factor'], $Level );
|
||||
$BuildPoints += ($Units * $LevelMul);
|
||||
$BuildCounts += 1;
|
||||
|
|
@ -77,7 +77,7 @@ function GetDefensePoints ( $CurrentPlanet ) {
|
|||
$DefensePoints = 0;
|
||||
foreach($reslist['defense'] as $n => $Defense) {
|
||||
if ($CurrentPlanet[ $resource[ $Defense ] ] > 0) {
|
||||
$Units = $pricelist[ $Defense ]['metal'] + $pricelist[ $Defense ]['crystal'] + $pricelist[ $Defense ]['deuterium'];
|
||||
$Units = $pricelist[ $Defense ]['metal'] + $pricelist[ $Defense ]['cristal'] + $pricelist[ $Defense ]['deuterium'];
|
||||
$DefensePoints += ($Units * $CurrentPlanet[ $resource[ $Defense ] ]);
|
||||
$DefenseCounts += $CurrentPlanet[ $resource[ $Defense ] ];
|
||||
}
|
||||
|
|
@ -95,7 +95,7 @@ function GetFleetPoints ( $CurrentPlanet ) {
|
|||
$FleetPoints = 0;
|
||||
foreach($reslist['fleet'] as $n => $Fleet) {
|
||||
if ($CurrentPlanet[ $resource[ $Fleet ] ] > 0) {
|
||||
$Units = $pricelist[ $Fleet ]['metal'] + $pricelist[ $Fleet ]['crystal'] + $pricelist[ $Fleet ]['deuterium'];
|
||||
$Units = $pricelist[ $Fleet ]['metal'] + $pricelist[ $Fleet ]['cristal'] + $pricelist[ $Fleet ]['deuterium'];
|
||||
$FleetPoints += ($Units * $CurrentPlanet[ $resource[ $Fleet ] ]);
|
||||
$FleetCounts += $CurrentPlanet[ $resource[ $Fleet ] ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ case 'fleet':
|
|||
$block['title'] = Wootook::__('Shipyard is required');
|
||||
$block['message'] = Wootook::__('In order to build ships you will need to build a shipyard building.');
|
||||
|
||||
$layout->render();
|
||||
echo $layout->render();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -77,9 +77,9 @@ case 'research':
|
|||
|
||||
$block = $layout->getBlock('message');
|
||||
$block['title'] = Wootook::__('Research lab is required');
|
||||
$block['title'] = Wootook::__('In order to do technological researches, you will need to build a research lab building.');
|
||||
$block['message'] = Wootook::__('In order to do technological researches, you will need to build a research lab building.');
|
||||
|
||||
$layout->render();
|
||||
echo $layout->render();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -105,9 +105,9 @@ case 'defense':
|
|||
|
||||
$block = $layout->getBlock('message');
|
||||
$block['title'] = Wootook::__('Shipyard is required');
|
||||
$block['title'] = Wootook::__('In order to build ships you will need to build a shipyard building.');
|
||||
$block['message'] = Wootook::__('In order to build ships you will need to build a shipyard building.');
|
||||
|
||||
$layout->render();
|
||||
echo $layout->render();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,12 @@
|
|||
'layout' => array(
|
||||
'page' => 'page.php',
|
||||
'empire' => 'empire.php'
|
||||
),
|
||||
'locales' => array(
|
||||
'fr' => 'fr_FR',
|
||||
'fr_FR' => 'fr_FR',
|
||||
'en' => 'en_US',
|
||||
'en_US' => 'en_US'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
@ -1 +0,0 @@
|
|||
<?php return 'php';
|
||||
|
|
@ -228,6 +228,7 @@ if (!$planet) {
|
|||
|
||||
$ShipData = "";
|
||||
|
||||
$have_ships = false;
|
||||
foreach ($reslist['fleet'] as $n => $i) {
|
||||
if ($planet[$resource[$i]] > 0) {
|
||||
$page .= "<tr height=\"20\">";
|
||||
|
|
@ -246,8 +247,8 @@ foreach ($reslist['fleet'] as $n => $i) {
|
|||
$page .= "<th><input name=\"ship[". $i ."]\" size=\"10\" value=\"0\" onfocus=\"javascript:if(this.value == '0') this.value='';\" onblur=\"javascript:if(this.value == '') this.value='0';\" alt=\"". $lang['tech'][$i] . $planet[$resource[$i]] ."\" onChange=\"shortInfo()\" onKeyUp=\"shortInfo()\" /></th>";
|
||||
}
|
||||
$page .= "</tr>";
|
||||
$have_ships = true;
|
||||
}
|
||||
$have_ships = true;
|
||||
}
|
||||
|
||||
$btncontinue = "<tr height=\"20\"><th colspan=\"4\"><input type=\"submit\" value=\" ".$lang['fl_continue']." \" /></th>";
|
||||
|
|
|
|||
53
frames.php
53
frames.php
|
|
@ -1,53 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* 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, Wootook Support Team <http://www.xnova-ng.org>
|
||||
* 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 <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.
|
||||
*
|
||||
*/
|
||||
|
||||
defined('DEPRECATION') || define('DEPRECATION', false);
|
||||
defined('DEBUG') || define('DEBUG', false);
|
||||
|
||||
require_once dirname(__FILE__) .'/application/bootstrap.php';
|
||||
|
||||
Wootook_Core_ErrorProfiler::unregister(true);
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<link rel="shortcut icon" href="favicon.ico">
|
||||
<title>Wootook:Legacies</title>
|
||||
</head>
|
||||
<frameset framespacing="0" border="0" cols="190,*" frameborder="0">
|
||||
<frame name="LeftMenu" src="leftmenu.php" marginwidth="0" marginheight="0">
|
||||
<frame name="Hauptframe" src="overview.php">
|
||||
<noframes>
|
||||
<body>
|
||||
<p>Votre navigateur ne gère pas les frames.</p>
|
||||
</body>
|
||||
</noframes>
|
||||
</frameset>
|
||||
</html>
|
||||
183
galaxy.php
183
galaxy.php
|
|
@ -32,126 +32,123 @@ define('INSIDE' , true);
|
|||
define('INSTALL' , false);
|
||||
require_once dirname(__FILE__) .'/application/bootstrap.php';
|
||||
|
||||
includeLang('galaxy');
|
||||
includeLang('galaxy');
|
||||
|
||||
$CurrentPlanet = doquery("SELECT * FROM {{table}} WHERE `id` = '". $user['current_planet'] ."';", 'planets', true);
|
||||
$lunarow = doquery("SELECT * FROM {{table}} WHERE `id` = '". $user['current_luna'] ."';", 'lunas', true);
|
||||
$galaxyrow = doquery("SELECT * FROM {{table}} WHERE `id_planet` = '". $CurrentPlanet['id'] ."';", 'galaxy', true);
|
||||
$CurrentPlanet = doquery("SELECT * FROM {{table}} WHERE `id` = '". $user['current_planet'] ."';", 'planets', true);
|
||||
$lunarow = doquery("SELECT * FROM {{table}} WHERE `id` = '". $user['current_luna'] ."';", 'lunas', true);
|
||||
$galaxyrow = doquery("SELECT * FROM {{table}} WHERE `id_planet` = '". $CurrentPlanet['id'] ."';", 'galaxy', true);
|
||||
|
||||
$dpath = (!$user["dpath"]) ? DEFAULT_SKINPATH : $user["dpath"];
|
||||
$fleetmax = $user['computer_tech'] + 1;
|
||||
$CurrentPlID = $CurrentPlanet['id'];
|
||||
$CurrentMIP = $CurrentPlanet['interplanetary_misil'];
|
||||
$CurrentRC = $CurrentPlanet['recycler'];
|
||||
$CurrentSP = $CurrentPlanet['spy_sonde'];
|
||||
$HavePhalanx = $CurrentPlanet['phalanx'];
|
||||
$CurrentSystem = $CurrentPlanet['system'];
|
||||
$CurrentGalaxy = $CurrentPlanet['galaxy'];
|
||||
$CanDestroy = $CurrentPlanet[$resource[213]] + $CurrentPlanet[$resource[214]];
|
||||
$dpath = (!$user["dpath"]) ? DEFAULT_SKINPATH : $user["dpath"];
|
||||
$fleetmax = $user['computer_tech'] + 1;
|
||||
$CurrentPlID = $CurrentPlanet['id'];
|
||||
$CurrentMIP = $CurrentPlanet['interplanetary_misil'];
|
||||
$CurrentRC = $CurrentPlanet['recycler'];
|
||||
$CurrentSP = $CurrentPlanet['spy_sonde'];
|
||||
$HavePhalanx = $CurrentPlanet['phalanx'];
|
||||
$CurrentSystem = $CurrentPlanet['system'];
|
||||
$CurrentGalaxy = $CurrentPlanet['galaxy'];
|
||||
$CanDestroy = $CurrentPlanet[$resource[213]] + $CurrentPlanet[$resource[214]];
|
||||
|
||||
$maxfleet = doquery("SELECT * FROM {{table}} WHERE `fleet_owner` = '". $user['id'] ."';", 'fleets');
|
||||
$maxfleet_count = $maxfleet->rowCount();
|
||||
$maxfleet = doquery("SELECT * FROM {{table}} WHERE `fleet_owner` = '". $user['id'] ."';", 'fleets');
|
||||
$maxfleet_count = $maxfleet->rowCount();
|
||||
|
||||
CheckPlanetUsedFields($CurrentPlanet);
|
||||
CheckPlanetUsedFields($lunarow);
|
||||
|
||||
if (!isset($mode)) {
|
||||
if (isset($_GET['mode'])) {
|
||||
$mode = intval($_GET['mode']);
|
||||
} else {
|
||||
$mode = 0;
|
||||
}
|
||||
if (!isset($mode)) {
|
||||
if (isset($_GET['mode'])) {
|
||||
$mode = intval($_GET['mode']);
|
||||
} else {
|
||||
$mode = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$galaxy = 1;
|
||||
$system = 1;
|
||||
$planet = null;
|
||||
$galaxy = 1;
|
||||
$system = 1;
|
||||
$planet = null;
|
||||
|
||||
if ($mode == 0) {
|
||||
$galaxy = $CurrentGalaxy;
|
||||
$system = $CurrentSystem;
|
||||
} elseif ($mode == 1 || $mode == 3) {
|
||||
if (isset($_POST["galaxyLeft"])) {
|
||||
if (!isset($_POST["galaxy"]) || $_POST["galaxy"] <= 1 || $_POST["galaxy"] > MAX_GALAXY_IN_WORLD) {
|
||||
$galaxy = 1;
|
||||
} else {
|
||||
$galaxy = intval($_POST["galaxy"]) - 1;
|
||||
}
|
||||
} elseif (isset($_POST["galaxyRight"])) {
|
||||
if (!isset($_POST["galaxy"]) || $_POST["galaxy"] >= MAX_GALAXY_IN_WORLD) {
|
||||
$galaxy = MAX_GALAXY_IN_WORLD;
|
||||
} else {
|
||||
$galaxy = intval($_POST["galaxy"]) + 1;
|
||||
}
|
||||
} else if (!isset($_POST["galaxy"]) || $_POST["galaxy"] <= 1 || $_POST["galaxy"] > MAX_GALAXY_IN_WORLD) {
|
||||
if ($mode == 0) {
|
||||
$galaxy = $CurrentGalaxy;
|
||||
$system = $CurrentSystem;
|
||||
} elseif ($mode == 1 || $mode == 3) {
|
||||
if (isset($_POST["galaxyLeft"])) {
|
||||
if (!isset($_POST["galaxy"]) || $_POST["galaxy"] <= 1 || $_POST["galaxy"] > MAX_GALAXY_IN_WORLD) {
|
||||
$galaxy = 1;
|
||||
} else {
|
||||
$galaxy = intval($_POST["galaxy"]);
|
||||
$galaxy = intval($_POST["galaxy"]) - 1;
|
||||
}
|
||||
|
||||
if (isset($_POST["systemLeft"])) {
|
||||
if (!isset($_POST["system"]) || $_POST["system"] <= 1 || $_POST["system"] > MAX_SYSTEM_IN_GALAXY) {
|
||||
$system = 1;
|
||||
} else {
|
||||
$system = intval($_POST["system"]) - 1;
|
||||
}
|
||||
} elseif (isset($_POST["systemRight"])) {
|
||||
if (!isset($_POST["system"]) || $_POST["system"] >= MAX_SYSTEM_IN_GALAXY) {
|
||||
$system = MAX_SYSTEM_IN_GALAXY;
|
||||
} else {
|
||||
$system = intval($_POST["system"]) + 1;
|
||||
}
|
||||
} else if (!isset($_POST["system"]) || $_POST["system"] <= 1 || $_POST["system"] > MAX_SYSTEM_IN_GALAXY) {
|
||||
$system = 1;
|
||||
} else {
|
||||
$system = intval($_POST["system"]);
|
||||
}
|
||||
} elseif ($mode == 2) {
|
||||
if (!isset($_POST["galaxy"]) || $_POST["galaxy"] <= 0) {
|
||||
$galaxy = 1;
|
||||
} else if ($_POST["galaxy"] >= MAX_GALAXY_IN_WORLD) {
|
||||
} elseif (isset($_POST["galaxyRight"])) {
|
||||
if (!isset($_POST["galaxy"]) || $_POST["galaxy"] >= MAX_GALAXY_IN_WORLD) {
|
||||
$galaxy = MAX_GALAXY_IN_WORLD;
|
||||
} else {
|
||||
$galaxy = intval($_POST["galaxy"]) + 1;
|
||||
}
|
||||
} else if (!isset($_POST["galaxy"]) || $_POST["galaxy"] <= 1 || $_POST["galaxy"] > MAX_GALAXY_IN_WORLD) {
|
||||
$galaxy = 1;
|
||||
} else {
|
||||
$galaxy = intval($_POST["galaxy"]);
|
||||
}
|
||||
|
||||
if (!isset($_POST["system"]) || $_POST["system"] <= 0) {
|
||||
if (isset($_POST["systemLeft"])) {
|
||||
if (!isset($_POST["system"]) || $_POST["system"] <= 1 || $_POST["system"] > MAX_SYSTEM_IN_GALAXY) {
|
||||
$system = 1;
|
||||
} else if ($_POST["system"] >= MAX_SYSTEM_IN_GALAXY) {
|
||||
} else {
|
||||
$system = intval($_POST["system"]) - 1;
|
||||
}
|
||||
} elseif (isset($_POST["systemRight"])) {
|
||||
if (!isset($_POST["system"]) || $_POST["system"] >= MAX_SYSTEM_IN_GALAXY) {
|
||||
$system = MAX_SYSTEM_IN_GALAXY;
|
||||
} else {
|
||||
$system = intval($_POST["system"]) + 1;
|
||||
}
|
||||
|
||||
if (!isset($_POST["planet"]) || $_POST["planet"] <= 0) {
|
||||
$planet = 1;
|
||||
} else if ($_POST["planet"] >= MAX_PLANET_IN_SYSTEM) {
|
||||
$planet = MAX_PLANET_IN_SYSTEM;
|
||||
} else {
|
||||
$planet = intval($_POST["planet"]) + 1;
|
||||
}
|
||||
} else if (!isset($_POST["system"]) || $_POST["system"] <= 1 || $_POST["system"] > MAX_SYSTEM_IN_GALAXY) {
|
||||
$system = 1;
|
||||
} else {
|
||||
$system = intval($_POST["system"]);
|
||||
}
|
||||
} elseif ($mode == 2) {
|
||||
if (!isset($_POST["galaxy"]) || $_POST["galaxy"] <= 0) {
|
||||
$galaxy = 1;
|
||||
} else if ($_POST["galaxy"] >= MAX_GALAXY_IN_WORLD) {
|
||||
$galaxy = MAX_GALAXY_IN_WORLD;
|
||||
} else {
|
||||
$galaxy = intval($_POST["galaxy"]) + 1;
|
||||
}
|
||||
|
||||
$planetcount = 0;
|
||||
$lunacount = 0;
|
||||
|
||||
$page = InsertGalaxyScripts($CurrentPlanet);
|
||||
|
||||
$page .= ShowGalaxySelector ( $galaxy, $system );
|
||||
|
||||
if ($mode == 2) {
|
||||
$page .= ShowGalaxyMISelector($galaxy, $system, $planet, $CurrentPlanet['id'], $CurrentMIP);
|
||||
if (!isset($_POST["system"]) || $_POST["system"] <= 0) {
|
||||
$system = 1;
|
||||
} else if ($_POST["system"] >= MAX_SYSTEM_IN_GALAXY) {
|
||||
$system = MAX_SYSTEM_IN_GALAXY;
|
||||
} else {
|
||||
$system = intval($_POST["system"]) + 1;
|
||||
}
|
||||
|
||||
$page .= "<table width=569><tbody>";
|
||||
if (!isset($_POST["planet"]) || $_POST["planet"] <= 0) {
|
||||
$planet = 1;
|
||||
} else if ($_POST["planet"] >= MAX_PLANET_IN_SYSTEM) {
|
||||
$planet = MAX_PLANET_IN_SYSTEM;
|
||||
} else {
|
||||
$planet = intval($_POST["planet"]) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
$page .= ShowGalaxyTitles($galaxy, $system);
|
||||
$page .= ShowGalaxyRows($galaxy, $system);
|
||||
$page .= ShowGalaxyFooter($galaxy, $system, $CurrentMIP, $CurrentRC, $CurrentSP);
|
||||
$planetcount = 0;
|
||||
$lunacount = 0;
|
||||
|
||||
$page .= "</tbody></table></div>";
|
||||
$page = InsertGalaxyScripts($CurrentPlanet);
|
||||
|
||||
display ($page, $lang[''], false, '', false);
|
||||
$page .= ShowGalaxySelector ( $galaxy, $system );
|
||||
|
||||
if ($mode == 2) {
|
||||
$page .= ShowGalaxyMISelector($galaxy, $system, $planet, $CurrentPlanet['id'], $CurrentMIP);
|
||||
}
|
||||
|
||||
$page .= "<table width=569><tbody>";
|
||||
|
||||
$page .= ShowGalaxyTitles($galaxy, $system);
|
||||
$page .= ShowGalaxyRows($galaxy, $system);
|
||||
$page .= ShowGalaxyFooter($galaxy, $system, $CurrentMIP, $CurrentRC, $CurrentSP);
|
||||
|
||||
$page .= "</tbody></table></div>";
|
||||
|
||||
display($page, $lang, false, '', false);
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------
|
||||
// History version
|
||||
|
|
|
|||
|
|
@ -30,18 +30,24 @@
|
|||
|
||||
defined('E_USER_DEPRECATED') || define('E_USER_DEPRECATED', E_USER_WARNING); // Defined in PHP 5.3 core
|
||||
|
||||
define('ADMINEMAIL', "admin@xnova-ng.org");
|
||||
define('GAMEURL', "http://".$_SERVER['HTTP_HOST']."/");
|
||||
define('ADMINEMAIL', "moderation@wootook.org");
|
||||
|
||||
// Definition du monde connu !
|
||||
define('MAX_GALAXY_IN_WORLD', 3);
|
||||
define('MAX_SYSTEM_IN_GALAXY', 100);
|
||||
define('MAX_PLANET_IN_SYSTEM', 50);
|
||||
|
||||
/**
|
||||
* User level constants
|
||||
* {{{
|
||||
*/
|
||||
define('LEVEL_ADMIN', 3);
|
||||
define('LEVEL_OPERATOR', 2);
|
||||
define('LEVEL_MODERATOR', 1);
|
||||
define('LEVEL_PLAYER', 0);
|
||||
/**
|
||||
* }}}
|
||||
*/
|
||||
|
||||
define('ALLOW_SPY_DRONE_ATTACKS', true);
|
||||
|
||||
|
|
|
|||
|
|
@ -507,7 +507,7 @@ class Deprecated
|
|||
{
|
||||
if (self::$layout === null) {
|
||||
self::$layout = new Wootook_Core_Layout();
|
||||
self::$layout->load('2columns-left');
|
||||
self::$layout->load('empire');
|
||||
}
|
||||
|
||||
return self::$layout;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
function GalaxyLegendPopup () {
|
||||
global $lang;
|
||||
|
||||
$Result = "<a href=# style=\"cursor: pointer;\"";
|
||||
$Result = '<a href="#" onclick="return false;" style="cursor: pointer;"';
|
||||
$Result .= " onmouseover='return overlib(\"";
|
||||
|
||||
$Result .= "<table width=240>";
|
||||
|
|
@ -54,7 +54,11 @@ function GalaxyLegendPopup () {
|
|||
$Result .= "</tr><tr>";
|
||||
$Result .= "<td width=220>".$lang['Inactive_28_days']."</td><td><span class=longinactive>".$lang['inactif_28_shortcut']."</span></td>";
|
||||
$Result .= "</tr><tr>";
|
||||
$Result .= "<td width=220>Admin</td><td><font color=lime><blink>A</blink></font></td>";
|
||||
$Result .= "<td width=220>Admin</td><td><font color=red><blink>A</blink></font></td>";
|
||||
$Result .= "</tr><tr>";
|
||||
$Result .= "<td width=220>Operator</td><td><font color=lime><blink>O</blink></font></td>";
|
||||
$Result .= "</tr><tr>";
|
||||
$Result .= "<td width=220>Moderator</td><td><font color=skyblue><blink>M</blink></font></td>";
|
||||
$Result .= "</tr>";
|
||||
$Result .= "</table>";
|
||||
$Result .= "\");' onmouseout='return nd();'>";
|
||||
|
|
|
|||
|
|
@ -41,6 +41,11 @@
|
|||
*/
|
||||
function GalaxyRowActions ( $GalaxyRow, $GalaxyRowPlanet, $GalaxyRowPlayer, $Galaxy, $System, $Planet, $PlanetType ) {
|
||||
global $lang, $user, $dpath, $CurrentMIP, $CurrentSystem, $CurrentGalaxy;
|
||||
|
||||
if (empty($GalaxyRowPlanet)) {
|
||||
return '<th width="125"></th>';
|
||||
}
|
||||
|
||||
// Icones action
|
||||
$Result = "<th style=\"white-space: nowrap;\" width=125>";
|
||||
if ($GalaxyRowPlayer['id'] != $user['id']) {
|
||||
|
|
@ -77,26 +82,26 @@ function GalaxyRowActions ( $GalaxyRow, $GalaxyRowPlanet, $GalaxyRowPlayer, $Gal
|
|||
if ($user["settings_esp"] == "1" &&
|
||||
$GalaxyRowPlayer['id']) {
|
||||
$Result .= "<a href=# onclick=\"javascript:doit(6, ".$Galaxy.", ".$System.", ".$Planet.", 1, ".$user["spio_anz"].");\" >";
|
||||
$Result .= "<img src=". $dpath ."img/e.gif alt=\"".$lang['gl_espionner']."\" title=\"".$lang['gl_espionner']."\" border=0></a>";
|
||||
$Result .= '<img src="' . Wootook::getSkinUrl('base', 'default', 'graphics/img/e.gif') . '" alt="'.$lang['gl_espionner'].'" title="'.$lang['gl_espionner'].'" border="0"></a>';
|
||||
$Result .= " ";
|
||||
}
|
||||
if ($user["settings_wri"] == "1" &&
|
||||
$GalaxyRowPlayer['id']) {
|
||||
$Result .= "<a href=messages.php?mode=write&id=".$GalaxyRowPlayer["id"].">";
|
||||
$Result .= "<img src=". $dpath ."img/m.gif alt=\"".$lang['gl_sendmess']."\" title=\"".$lang['gl_sendmess']."\" border=0></a>";
|
||||
$Result .= '<img src="' . Wootook::getSkinUrl('base', 'default', 'graphics/img/m.gif') . '" alt="'.$lang['gl_sendmess'].'" title="'.$lang['gl_sendmess'].'" border="0"></a>';
|
||||
$Result .= " ";
|
||||
}
|
||||
if ($user["settings_bud"] == "1" &&
|
||||
$GalaxyRowPlayer['id']) {
|
||||
$Result .= "<a href=buddy.php?a=2&u=".$GalaxyRowPlayer['id']." >";
|
||||
$Result .= "<img src=". $dpath ."img/b.gif alt=\"".$lang['gl_buddyreq']."\" title=\"".$lang['gl_buddyreq']."\" border=0></a>";
|
||||
$Result .= '<img src="' . Wootook::getSkinUrl('base', 'default', 'graphics/img/b.gif') . '" alt="'.$lang['gl_buddyreq'].'" title="'.$lang['gl_buddyreq'].'" border="0"></a>';
|
||||
$Result .= " ";
|
||||
}
|
||||
if ($user["settings_mis"] == "1" AND
|
||||
$MissileBtn == true &&
|
||||
$GalaxyRowPlayer['id']) {
|
||||
$Result .= "<a href=galaxy.php?mode=2&galaxy=".$Galaxy."&system=".$System."&planet=".$Planet."¤t=".$user['current_planet']." >";
|
||||
$Result .= "<img src=". $dpath ."img/r.gif alt=\"".$lang['gl_mipattack']."\" title=\"".$lang['gl_mipattack']."\" border=0></a>";
|
||||
$Result .= '<img src="' . Wootook::getSkinUrl('base', 'default', 'graphics/img/r.gif') . '" alt="'.$lang['gl_mipattack'].'" title="'.$lang['gl_mipattack'].'" border="0"></a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@
|
|||
function GalaxyRowAlly ( $GalaxyRow, $GalaxyRowPlanet, $GalaxyRowUser, $Galaxy, $System, $Planet, $PlanetType ) {
|
||||
global $lang, $user;
|
||||
|
||||
if (empty($GalaxyRowPlanet)) {
|
||||
return '<th width="80"></th>';
|
||||
}
|
||||
|
||||
// Alliances
|
||||
$Result = "<th width=80>";
|
||||
if ($GalaxyRowUser['ally_id'] && $GalaxyRowUser['ally_id'] != 0) {
|
||||
|
|
@ -77,7 +81,7 @@ function GalaxyRowAlly ( $GalaxyRow, $GalaxyRowPlanet, $GalaxyRowUser, $Galaxy,
|
|||
$Result .= "</table>\"";
|
||||
$Result .= ", STICKY, MOUSEOFF, DELAY, 750, CENTER, OFFSETX, -40, OFFSETY, -40 );'";
|
||||
$Result .= " onmouseout='return nd();'>";
|
||||
if ($user['ally_id'] == $GalaxyRowPlayer['ally_id']) {
|
||||
if ($user['ally_id'] == $GalaxyRowUser['ally_id']) {
|
||||
$Result .= "<span class=\"allymember\">". $allyquery['ally_tag'] ."</span></a>";
|
||||
} else {
|
||||
$Result .= $allyquery['ally_tag'] ."</a>";
|
||||
|
|
|
|||
|
|
@ -39,9 +39,13 @@
|
|||
* @param unknown_type $Planet
|
||||
* @param unknown_type $PlanetType
|
||||
*/
|
||||
function GalaxyRowMoon ( $GalaxyRow, $GalaxyRowPlanet, $GalaxyRowUser, $Galaxy, $System, $Planet, $PlanetType ) {
|
||||
function GalaxyRowMoon($GalaxyRow, $GalaxyRowPlanet, $GalaxyRowUser, $Galaxy, $System, $Planet, $PlanetType ) {
|
||||
global $lang, $user, $dpath, $HavePhalanx, $CurrentSystem, $CurrentGalaxy, $CanDestroy;
|
||||
|
||||
if (empty($GalaxyRowPlanet)) {
|
||||
return '<th width="30"></th>';
|
||||
}
|
||||
|
||||
// Lune
|
||||
$Result = "<th style=\"white-space: nowrap;\" width=30>";
|
||||
if ($GalaxyRowUser['id'] != $user['id']) {
|
||||
|
|
@ -78,7 +82,7 @@ function GalaxyRowMoon ( $GalaxyRow, $GalaxyRowPlanet, $GalaxyRowUser, $Galaxy,
|
|||
|
||||
$MissionType3Link = "<a href=fleet.php?galaxy=".$Galaxy."&system=".$System."&planet=".$Planet."&planettype=".$PlanetType."&target_mission=3>". $lang['type_mission'][3] ."</a><br />";
|
||||
|
||||
if ($GalaxyRow && $GalaxyRowPlanet["destruyed"] == 0 && $GalaxyRow["id_luna"] != 0) {
|
||||
if ($GalaxyRow && (!isset($GalaxyRowPlanet["destruyed"]) || $GalaxyRowPlanet["destruyed"] == 0) && $GalaxyRow["id_luna"] != 0) {
|
||||
$Result .= "<a style=\"cursor: pointer;\"";
|
||||
$Result .= " onmouseover='return overlib(\"";
|
||||
$Result .= "<table width=240>";
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@
|
|||
function GalaxyRowPlanet ( $GalaxyRow, $GalaxyRowPlanet, $GalaxyRowUser, $Galaxy, $System, $Planet, $PlanetType ) {
|
||||
global $lang, $dpath, $user, $HavePhalanx, $CurrentSystem, $CurrentGalaxy;
|
||||
|
||||
if (empty($GalaxyRowPlanet)) {
|
||||
return '<th width="30"></th>';
|
||||
}
|
||||
// Planete (Image)
|
||||
$Result = "<th width=30>";
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@
|
|||
function GalaxyRowPlanetName ( $GalaxyRow, $GalaxyRowPlanet, $GalaxyRowUser, $Galaxy, $System, $Planet, $PlanetType ) {
|
||||
global $lang, $user, $HavePhalanx, $CurrentSystem, $CurrentGalaxy;
|
||||
|
||||
if (empty($GalaxyRowPlanet)) {
|
||||
return '<th width="130"></th>';
|
||||
}
|
||||
|
||||
// Planete (Nom)
|
||||
$Result = "<th style=\"white-space: nowrap;\" width=130>";
|
||||
|
||||
|
|
|
|||
|
|
@ -39,10 +39,11 @@ function ShowGalaxyRows ($Galaxy, $System) {
|
|||
|
||||
$Result = "";
|
||||
for ($Planet = 1; $Planet <= MAX_PLANET_IN_SYSTEM; $Planet++) {
|
||||
unset($GalaxyRowPlanet);
|
||||
unset($GalaxyRowMoon);
|
||||
unset($GalaxyRowPlayer);
|
||||
unset($GalaxyRowAlly);
|
||||
|
||||
$GalaxyRowPlanet = array();
|
||||
$GalaxyRowMoon = array();
|
||||
$GalaxyRowPlayer = array();
|
||||
$GalaxyRowAlly = array();
|
||||
|
||||
$GalaxyRow = doquery("SELECT * FROM {{table}} WHERE `galaxy` = '".$Galaxy."' AND `system` = '".$System."' AND `planet` = '".$Planet."';", 'galaxy', true);
|
||||
|
||||
|
|
|
|||
|
|
@ -33,4 +33,4 @@ if (filesize('config.php') == 0) {
|
|||
exit();
|
||||
}
|
||||
|
||||
header('location: frames.php');
|
||||
header('location: overview.php');
|
||||
|
|
|
|||
|
|
@ -40,9 +40,11 @@ if (!empty($_POST) && isset($_POST['username']) && isset($_POST['password'])) {
|
|||
|
||||
$session = Wootook::getSession(Wootook_Empire_Model_User::SESSION_KEY);
|
||||
if ($user !== null && $user->getId()) {
|
||||
header("Location: frames.php");
|
||||
$url = Wootook::getUrl('overview.php');
|
||||
header("Location: $url");
|
||||
} else {
|
||||
header("Location: login.php");
|
||||
$url = Wootook::getUrl('login.php');
|
||||
header("Location: $url");
|
||||
}
|
||||
Wootook_Core_ErrorProfiler::unregister(true);
|
||||
exit(0);
|
||||
|
|
|
|||
|
|
@ -34,6 +34,6 @@ require_once dirname(__FILE__) . '/application/bootstrap.php';
|
|||
|
||||
includeLang('logout');
|
||||
|
||||
Legacies_Empire_Model_User::getSingleton()->logout();
|
||||
Wootook_Empire_Model_User::getSingleton()->logout();
|
||||
|
||||
message($lang['see_you'], $lang['session_closed'], 'login.php');
|
||||
|
|
|
|||
37
overview.php
37
overview.php
|
|
@ -103,6 +103,7 @@ if (isset($_POST) && !empty($_POST)) {
|
|||
$planetList = $layout->createBlock('core/concat', 'planet.list');
|
||||
$planetBlock->planetList = $planetList;
|
||||
|
||||
$i = 0;
|
||||
foreach ($planetCollection as $userPlanet) {
|
||||
if ($userPlanet->getId() == $planet->getId()) {
|
||||
continue;
|
||||
|
|
@ -126,6 +127,7 @@ if (isset($_POST) && !empty($_POST)) {
|
|||
$buildingQueue->rewind();
|
||||
$currentItem = $buildingQueue->current();
|
||||
$block['queue_item'] = $currentItem;
|
||||
$block['even'] = (($i++ % 4) == 3);
|
||||
|
||||
$planetList->$id = $block;
|
||||
}
|
||||
|
|
@ -206,29 +208,6 @@ if (isset($_POST) && !empty($_POST)) {
|
|||
$newMessages->setTemplate('empire/overview/messages.phtml');
|
||||
$newMessages['count'] = (int) $count;
|
||||
|
||||
/** Gestion des officiers
|
||||
* Update miner and raider level
|
||||
*
|
||||
*/
|
||||
$Xp_Next_Level_Miner = $user->getData('lvl_minier') * 5000;
|
||||
$Xp_Next_Level_Raider = $user->getData('lvl_raid') * 10;
|
||||
$Xp_Miner = $user->getData('xpminier');
|
||||
$Xp_Raider = $user->getData('xpraid');
|
||||
if ($Xp_Miner >= $Xp_Next_Level_Miner) {
|
||||
$HaveNewLevelMineur = "<tr>";
|
||||
$HaveNewLevelMineur .= "<th colspan=4><a href=officier.php>" . $lang['Have_new_level_mineur'] . "</a></th></tr>";
|
||||
$user->setData('lvl_minier', $user->getData('lvl_minier') + 1);
|
||||
$user->setData('rpg_points', $user->getData('rpg_points')+1);
|
||||
$user->save();
|
||||
}
|
||||
if ($Xp_Raider >= $Xp_Next_Level_Raider) {
|
||||
$HaveNewLevelRaider = "<tr>";
|
||||
$HaveNewLevelRaider .= "<th colspan=4><a href=officier.php>". $lang['Have_new_level_raid'] . "</a></th></tr>";
|
||||
$user->setData('lvl_raid', $user->getData('lvl_raid') + 1);
|
||||
$user->setData('rpg_points', $user->getData('rpg_points') +1);
|
||||
$user->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Page display
|
||||
* Refactoring needed
|
||||
|
|
@ -251,16 +230,16 @@ if (isset($_POST) && !empty($_POST)) {
|
|||
}
|
||||
if ($gameConfig['ForumBannerFrame'] == '1') {
|
||||
|
||||
$BannerURL = "scripts/createbanner.php?id=".$user['id']."";
|
||||
$BannerURL = Wootook::getUrl('scripts/createbanner.php', array('id' => $user['id']));
|
||||
|
||||
$parse['bannerframe'] = "<th colspan=\"4\"><img src=\"scripts/createbanner.php?id=".$user['id']."\"><br>".$lang['InfoBanner']."<br><input name=\"bannerlink\" type=\"text\" id=\"bannerlink\" value=\"[img]".$BannerURL."[/img]\" size=\"62\"></th></tr>";
|
||||
$parse['bannerframe'] = "<th colspan=\"4\"><img src=\"{$BannerURL}\"><br>".$lang['InfoBanner']."<br><input name=\"bannerlink\" type=\"text\" id=\"bannerlink\" value=\"[img]".$BannerURL."[/img]\" size=\"62\"></th></tr>";
|
||||
}
|
||||
// --- Gestion de l'affichage d'une lune ---------------------------------------------------------
|
||||
if ($moon['id'] <> 0) {
|
||||
if ($planet['planet_type'] == 1) {
|
||||
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'] = "<a href=\"?cp=" . $lune['id'] . "&re=0\" title=\"" . $lune['name'] . "\"><img src=\"" . $dpath . "planeten/" . $lune['image'] . ".jpg\" height=\"50\" width=\"50\"></a>";
|
||||
$parse['moon'] = $lune['name'];
|
||||
$parse['moon_img'] = "<a href=\"?cp=" . $lune['id'] . "&re=0\" title=\"" . $lune['name'] . "\"><img src=\"" . Wootook::getSkinUrl('base', 'default', "graphics/planeten/{$lune['image']}.jpg") . '" height="50" width="50"></a>';
|
||||
$parse['moon'] = $planet->getMoon()->getName();
|
||||
} else {
|
||||
$parse['moon_img'] = "";
|
||||
$parse['moon'] = "";
|
||||
|
|
|
|||
16
reg.php
16
reg.php
|
|
@ -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(Legacies_Empire_Model_User::SESSION_KEY);
|
||||
$session = Wootook::getSession(Wootook_Empire_Model_User::SESSION_KEY);
|
||||
if ($_POST['password'] !== $_POST['password_confirm']) {
|
||||
$session->addError('Password and password confirmation does not match.');
|
||||
}
|
||||
|
|
@ -46,24 +46,26 @@ if (!empty($_POST) && isset($_POST['username']) && isset($_POST['planet_name'])
|
|||
|
||||
$user = null;
|
||||
if (true || count($session->getMessages(false)) === 0) {
|
||||
$user = Legacies_Empire_Model_User::register($_POST['username'], $_POST['email'], $_POST['password']);
|
||||
$user = Wootook_Empire_Model_User::register($_POST['username'], $_POST['email'], $_POST['password']);
|
||||
|
||||
$user->getHomePlanet()->setName($_POST['planet_name'])->save();
|
||||
if ($user !== null) {
|
||||
$user->getHomePlanet()->setName($_POST['planet_name'])->save();
|
||||
}
|
||||
}
|
||||
|
||||
if ($user !== null && $user->getId()) {
|
||||
header("HTTP/1.1 302 Found");
|
||||
//header("Location: welcome.php");
|
||||
header("Location: frames.php");
|
||||
header("Location: overview.php");
|
||||
} else {
|
||||
header("HTTP/1.1 302 Found");
|
||||
header("Location: reg.php");
|
||||
}
|
||||
Legacies_Core_ErrorProfiler::unregister(true);
|
||||
Wootook_Core_ErrorProfiler::unregister(true);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$layout = new Legacies_Core_Layout();
|
||||
$layout = new Wootook_Core_Layout();
|
||||
$layout->load('registration');
|
||||
$block = $layout->getBlock('registration');
|
||||
|
||||
|
|
@ -73,7 +75,7 @@ function sendpassemail($emailaddress, $password)
|
|||
{
|
||||
global $lang;
|
||||
|
||||
$parse['gameurl'] = GAMEURL;
|
||||
$parse['gameurl'] = Wootook::getUrl('/');
|
||||
$parse['password'] = $password;
|
||||
$email = parsetemplate($lang['mail_welcome'], $parse);
|
||||
$status = mymail($emailaddress, $lang['mail_title'], $email);
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@
|
|||
* documentation for further information about customizing Wootook.
|
||||
*
|
||||
*/
|
||||
define('DISABLE_IDENTITY_CHECK', true);
|
||||
require_once dirname(dirname(__FILE__)) . '/application/bootstrap.php';
|
||||
|
||||
define('FONT_FILE', dirname(__FILE__) . '/resources/fonts/visitor/visitor.ttf');
|
||||
define('BACKGROUND_FILE', dirname(__FILE__) . '/resources/backgrounds/default.png');
|
||||
|
|
@ -46,201 +48,6 @@ define('TIMEZONE', 'Europe/Paris');
|
|||
|
||||
date_default_timezone_set(TIMEZONE);
|
||||
|
||||
require_once dirname(dirname(__FILE__)) . '/db/mysql.php';
|
||||
|
||||
/**
|
||||
*
|
||||
* @todo Update the position alignment management.
|
||||
* @author Greg
|
||||
*
|
||||
*/
|
||||
class Legacies_Block_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;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_GET['id'])) {
|
||||
$id = (int) $_GET['id'];
|
||||
} else {
|
||||
|
|
@ -249,11 +56,12 @@ if (isset($_GET['id'])) {
|
|||
}
|
||||
|
||||
$textColor = array(
|
||||
Legacies_Block_Image_Png::COLOR_RED => 0xEF,
|
||||
Legacies_Block_Image_Png::COLOR_GREEN => 0xEF,
|
||||
Legacies_Block_Image_Png::COLOR_BLUE => 0xEF
|
||||
Wootook_Core_Model_Image_Png::COLOR_RED => 0xEF,
|
||||
Wootook_Core_Model_Image_Png::COLOR_GREEN => 0xEF,
|
||||
Wootook_Core_Model_Image_Png::COLOR_BLUE => 0xEF
|
||||
);
|
||||
|
||||
$db = Wootook_Database::getSingleton();
|
||||
$sql = <<<EOF
|
||||
SELECT
|
||||
users.username AS username,
|
||||
|
|
@ -268,21 +76,17 @@ LEFT JOIN {{table}}planets AS planets ON planets.id_owner=users.id
|
|||
WHERE users.id={$id}
|
||||
EOF;
|
||||
|
||||
$config = Wootook_Core_Model_Config::getSingleton();
|
||||
|
||||
$data = array_merge(
|
||||
array(
|
||||
'game_name' => 'Wootook:Legacies',
|
||||
'game_name' => $config['game_name'],
|
||||
'date' => date('d M Y')
|
||||
),
|
||||
doquery($sql, '', true)
|
||||
);
|
||||
|
||||
function number_format_custom($number)
|
||||
{
|
||||
return number_format($number, 0, ',', '.');
|
||||
}
|
||||
|
||||
$image = new Legacies_Block_Image_Png();
|
||||
$image = new Wootook_Core_Model_Image_Png();
|
||||
$image
|
||||
->setBackground(BACKGROUND_FILE)
|
||||
->addText($data['game_name'], 24, FONT_FILE, 5, 37, 0, $textColor)
|
||||
|
|
@ -290,14 +94,14 @@ $image
|
|||
|
||||
->addText('Batiments:',
|
||||
14, FONT_FILE, 5, 50, 0, $textColor)
|
||||
->addText(number_format_custom($data['build_points']), 14, FONT_FILE, 100, 50, 0, $textColor)
|
||||
->addText(Math::render($data['build_points']), 14, FONT_FILE, 100, 50, 0, $textColor)
|
||||
->addText('Flottes:', 14, FONT_FILE, 5, 70, 0, $textColor)
|
||||
->addText(number_format_custom($data['fleet_points']), 14, FONT_FILE, 100, 70, 0, $textColor)
|
||||
->addText(Math::render($data['fleet_points']), 14, FONT_FILE, 100, 70, 0, $textColor)
|
||||
|
||||
->addText('Technologies:', 14, FONT_FILE, 205, 50, 0, $textColor)
|
||||
->addText(number_format_custom($data['tech_points']), 14, FONT_FILE, 320, 50, 0, $textColor)
|
||||
->addText(Math::render($data['tech_points']), 14, FONT_FILE, 320, 50, 0, $textColor)
|
||||
->addText('Total:', 14, FONT_FILE, 205, 70, 0, $textColor)
|
||||
->addText(number_format_custom($data['total_points']), 14, FONT_FILE, 320, 70, 0, $textColor)
|
||||
->addText(Math::render($data['total_points']), 14, FONT_FILE, 320, 70, 0, $textColor)
|
||||
;
|
||||
|
||||
foreach ($image->getHeaders() as $headerName => $headerValue) {
|
||||
|
|
|
|||
9046
scripts/jquery/jquery-1.6.4.js
vendored
Normal file
9046
scripts/jquery/jquery-1.6.4.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
4
scripts/jquery/jquery-1.6.4.min.js
vendored
Normal file
4
scripts/jquery/jquery-1.6.4.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,10 +1,22 @@
|
|||
@CHARSET "UTF-8";
|
||||
|
||||
.global .content .navigation {margin:0pt auto;width:1000px;height:30px;display:block;padding:0 40px;position:relative;border-width:0 1px;border-style:none solid;border-color:#FFF;background-color:#933;border-radius:10px;}
|
||||
.global .content .navigation .navigation-node {margin:0;height:30px;width:250px;color:#FFF;float:left;}
|
||||
.global .content .navigation .navigation-node .title {margin:5px 20px;font-size:1.5em;}
|
||||
.global .content .navigation .navigation-link {display:none;margin:0pt 10px;width:200px;background-color:#FFF;float:left;padding:5px 10px;border:0 solid #933;border-left-width:4px;border-right-width:1px;}
|
||||
.global .content .navigation .navigation-node .last {width:225px;margin:0 10px;float:left;display:none;border:0 solid #933;border-bottom-width:1px;}
|
||||
|
||||
.global .content .planet-carrousel {width:950px;height:100px;margin:0 auto;padding:0 30px;color:#000;background:#FFF;border:1px solid #FFF;border-top:none;box-shadow:0 -4px 8px #115566 inset, 20px 20px 40px #115566, -20px 20px 40px #115566, 0 -20px 40px #115566;border-bottom-left-radius:50px;border-bottom-right-radius:50px;}
|
||||
.global .content .planet-carrousel .items {width:900px;height:100px;overflow:hidden;float:left;}
|
||||
.global .content .planet-carrousel .arrow {height:40px;width:25px;float:left;font-size:20px;font-weight:bold;margin:30px 0;}
|
||||
.global .content .planet-carrousel .planet {color:#000;height:100px;width:100px;float:left;}
|
||||
.global .content .planet-carrousel div.planet {color:#000;height:100px;width:100px;float:left;}
|
||||
.global .content .planet-carrousel .selected {background-color:#EFEFEF;box-shadow:0 -4px 6px #115566 inset, 0 20px 40px #115566;}
|
||||
.global .content .planet-carrousel .planet a {color:#000;}
|
||||
.global .content .planet-carrousel .planet img {border:0;margin:0;}
|
||||
.global .content .planet-carrousel .planet a.moon img,.global .content .planet-carrousel .planet span.moon img {position:absolute;float:left;margin:0;border:1px solid #FFF;}
|
||||
.global .content .planet-carrousel .planet .planet-name {text-align:center;margin:2px 5px}
|
||||
.global .content .planet-carrousel .planet .planet-image {margin:0 25px;height:50px;}
|
||||
.global .content .planet-carrousel .planet .planet-position {text-align:center;margin:2px 5px}
|
||||
|
||||
.global .content .resources-display {width:770px;height:40px;margin:0 auto 30px;padding:0 50px;color:#000;background:#FFF;box-shadow:0 -4px 6px #115566 inset, 0 20px 40px #115566;border:1px solid #FFF;border-top:none;border-radius: 0 0 20px 20px;}
|
||||
.global .content .resources-display .resource,.global .content .resources-display .messages {height:22px;float:left;width:140px;margin:7px 0;}
|
||||
|
|
@ -12,8 +24,8 @@
|
|||
.global .content .resources-display .resource p,.global .content .resources-display .messages p {font-weight:bold;font-size:12px;margin:2px 0 2px 47px;}
|
||||
.global .content .resources-display .resource a,.global .content .resources-display .messages a {color:#000;text-decoration:underline;}
|
||||
.global .content .resources-display .resource .resource-capped {color:red;}
|
||||
.global .content .resources-display .messages {height:22px;float:left;width:160px;}
|
||||
.global .content .resources-display .energy {width:190px;}
|
||||
.global .content .resources-display .messages {height:22px;float:left;width:110px;}
|
||||
.global .content .resources-display .energy {width:240px;}
|
||||
|
||||
.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 #156 inset;}
|
||||
.global .content .queue h1 {color:#000;margin:10px 15px;width:570px;text-align:center;border-bottom:5px solid #9BC;}
|
||||
|
|
@ -27,6 +39,14 @@
|
|||
.global .content .item-list .item {width:780px;margin:0 10px;border:0;box-shadow:none;border-radius:0;}
|
||||
.global .content .item-list .item,.global .content .item-list .item * {color:#000;}
|
||||
|
||||
.global .content form.registration {background:#FFF;width:300px;margin:10px auto;padding:10px 0;border-radius:20px;box-shadow:0 -4px 8px #115566 inset, 20px 20px 40px #115566, -20px 20px 40px #115566, 0 -20px 40px #115566;}
|
||||
.global .content form.registration h1 {font-size:2em;}
|
||||
.global .content form.registration fieldset {margin:20px 30px;width:220px;border:1px solid #000;padding:4px 9px;}
|
||||
.global .content form.registration fieldset legend {font-size:1.2em;font-weight:bold;}
|
||||
.global .content form.registration fieldset p label {width:100px;display:block;float:left;margin:0 10px;text-align:right;}
|
||||
.global .content form.registration input {width:150px;display:block;margin:10px auto;}
|
||||
.global .content form.registration fieldset p input {width:100px;display:block;}
|
||||
|
||||
/**
|
||||
* Galaxy user name display colors
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue