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:
Gregory PLANCHAT 2011-10-24 19:19:04 +02:00
commit 6d61e93c47
67 changed files with 10177 additions and 940 deletions

View file

@ -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