Fixed mysql_* calls
Updated skin Fixed minor bugs in shipyard pages display Fixed various bugs in legacy fleet pages source code. Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
This commit is contained in:
parent
be8c6a6629
commit
cfeb6aca6d
68 changed files with 1561 additions and 1451 deletions
|
|
@ -37,7 +37,7 @@ function BuildFlyingFleetTable () {
|
|||
|
||||
$TableTPL = gettemplate('admin/fleet_rows');
|
||||
$FlyingFleets = doquery ("SELECT * FROM {{table}} ORDER BY `fleet_end_time` ASC;", 'fleets');
|
||||
while ( $CurrentFleet = mysql_fetch_assoc( $FlyingFleets ) ) {
|
||||
while ( $CurrentFleet = $FlyingFleets->fetch(PDO::FETCH_ASSOC) ) {
|
||||
$FleetOwner = doquery("SELECT `username` FROM {{table}} WHERE `id` = '". $CurrentFleet['fleet_owner'] ."';", 'users', true);
|
||||
$TargetOwner = doquery("SELECT `username` FROM {{table}} WHERE `id` = '". $CurrentFleet['fleet_target_owner'] ."';", 'users', true);
|
||||
$Bloc['Id'] = $CurrentFleet['fleet_id'];
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ function DeleteSelectedUser ( $UserID ) {
|
|||
doquery ( "DELETE FROM {{table}} WHERE `stat_type` = '1' AND `id_owner` = '" . $UserID . "';", 'statpoints' );
|
||||
|
||||
$ThePlanets = doquery ( "SELECT * FROM {{table}} WHERE `id_owner` = '" . $UserID . "';", 'planets' );
|
||||
while ( $OnePlanet = mysql_fetch_assoc ( $ThePlanets ) ) {
|
||||
while ( $OnePlanet = $ThePlanets->fetch(PDO::FETCH_ASSOC) ) {
|
||||
if ( $OnePlanet['planet_type'] == 1 ) {
|
||||
doquery ( "DELETE FROM {{table}} WHERE `galaxy` = '" . $OnePlanet['galaxy'] . "' AND `system` = '" . $OnePlanet['system'] . "' AND `planet` = '" . $OnePlanet['planet'] . "';", 'galaxy' );
|
||||
} elseif ( $OnePlanet['planet_type'] == 3 ) {
|
||||
|
|
|
|||
|
|
@ -36,10 +36,12 @@
|
|||
function MissionCaseColonisation ( $FleetRow ) {
|
||||
global $lang, $resource;
|
||||
|
||||
$iPlanetCount = mysql_result(doquery ("SELECT count(*) FROM {{table}} WHERE `id_owner` = '". $FleetRow['fleet_owner'] ."' AND `planet_type` = '1'", 'planets'), 0);
|
||||
$statement = doquery ("SELECT count(*) FROM {{table}} WHERE `id_owner` = '". $FleetRow['fleet_owner'] ."' AND `planet_type` = '1'", 'planets');
|
||||
$iPlanetCount = $statement->fetch(PDO::FETCH_ASSOC);
|
||||
if ($FleetRow['fleet_mess'] == 0) {
|
||||
// Déjà, sommes nous a l'aller ??
|
||||
$iGalaxyPlace = mysql_result(doquery ("SELECT count(*) FROM {{table}} WHERE `galaxy` = '". $FleetRow['fleet_end_galaxy']."' AND `system` = '". $FleetRow['fleet_end_system']."' AND `planet` = '". $FleetRow['fleet_end_planet']."';", 'galaxy'), 0);
|
||||
$statement2 = doquery ("SELECT count(*) FROM {{table}} WHERE `galaxy` = '". $FleetRow['fleet_end_galaxy']."' AND `system` = '". $FleetRow['fleet_end_system']."' AND `planet` = '". $FleetRow['fleet_end_planet']."';", 'galaxy');
|
||||
$iGalaxyPlace = $statement2->fetch(PDO::FETCH_ASSOC);
|
||||
$TargetAdress = sprintf ($lang['sys_adress_planet'], $FleetRow['fleet_end_galaxy'], $FleetRow['fleet_end_system'], $FleetRow['fleet_end_planet']);
|
||||
if ($iGalaxyPlace == 0) {
|
||||
// Y a personne qui s'y est mis avant que je ne debarque !
|
||||
|
|
|
|||
Loading…
Reference in a new issue