Skip to content
This repository has been archived by the owner on Oct 4, 2020. It is now read-only.

Commit

Permalink
2.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaro2709 committed Jan 12, 2020
1 parent 4726277 commit 773bb04
Show file tree
Hide file tree
Showing 1,403 changed files with 13,127 additions and 19,923 deletions.
9 changes: 2 additions & 7 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ Order Allow,Deny
Deny from All
</Files>

<Files "common.php">
<Files "global.php">
Order Allow,Deny
Deny from All
</Files>

<Files "extension.inc.php">
Order Allow,Deny
Deny from All
</Files>
</Files>
40 changes: 13 additions & 27 deletions CombatReport.php
Original file line number Diff line number Diff line change
@@ -1,35 +1,21 @@
<?php

##############################################################################
# * #
# * XG PROYECT #
# * #
# * @copyright Copyright (C) 2008 - 2009 By lucky from xgproyect.net #
# * #
# * #
# * 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. #
# * #
##############################################################################

define('INSIDE' , true);
define('INSTALL' , false);

$xgp_root = './';
include($xgp_root . 'extension.inc.php');
include($xgp_root . 'common.'.$phpEx);
/**
* @project XG Proyect
* @version 2.10.x build 0000
* @copyright Copyright (C) 2008 - 2016
*/

define('INSIDE' , TRUE);
define('INSTALL' , FALSE);
define('XGP_ROOT', './');

include(XGP_ROOT . 'global.php');

includeLang('INGAME');
$Page .= "<div id=\"content\">";

$raportrow = doquery("SELECT * FROM {{table}} WHERE `rid` = '".(mysql_escape_string($_GET["raport"]))."';", 'rw', true);
$raportrow = doquery("SELECT * FROM {{table}} WHERE `rid` = '".(mysql_escape_string($_GET["raport"]))."';", 'rw', TRUE);


$owners = explode(",", $raportrow["owners"]);
Expand All @@ -56,5 +42,5 @@
$Page .= $report;
}

display($Page, false, '', false, false);
display($Page, FALSE, '', FALSE, FALSE);
?>
90 changes: 45 additions & 45 deletions FleetAjax.php
Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
<?php

##############################################################################
# * #
# * XG PROYECT #
# * #
# * @copyright Copyright (C) 2008 - 2009 By lucky from xgproyect.net #
# * #
# * #
# * 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. #
# * #
##############################################################################

define('INSIDE' , true);
define('INSTALL' , false);

$xgp_root = './';
include($xgp_root . 'extension.inc.php');
include($xgp_root . 'common.' . $phpEx);
/**
* @project XG Proyect
* @version 2.10.x build 0000
* @copyright Copyright (C) 2008 - 2016
*/

define('INSIDE' , TRUE);
define('INSTALL' , FALSE);
define('XGP_ROOT', './');

include(XGP_ROOT . 'global.php');

$UserSpyProbes = $planetrow['spy_sonde'];
$UserRecycles = $planetrow['recycler'];
Expand All @@ -33,7 +19,7 @@

$fleet = array();
$speedalls = array();
$PartialFleet = false;
$PartialFleet = FALSE;
$PartialCount = 0;

foreach ($reslist['fleet'] as $Node => $ShipID)
Expand All @@ -47,7 +33,7 @@
$fleet['fleetlist'] .= $ShipID .",". $planetrow[$resource[$ShipID]] .";";
$fleet['amount'] += $planetrow[$resource[$ShipID]];
$PartialCount += $planetrow[$resource[$ShipID]];
$PartialFleet = true;
$PartialFleet = TRUE;
}
else
{
Expand All @@ -59,7 +45,7 @@
}
}

if ($PartialFleet == true)
if ($PartialFleet == TRUE)
{
if ( $PartialCount < 1 )
{
Expand All @@ -68,9 +54,9 @@
}
}

$PrNoob = $game_config['noobprotection'];
$PrNoobTime = $game_config['noobprotectiontime'];
$PrNoobMulti = $game_config['noobprotectionmulti'];
$PrNoob = read_config ( 'noobprotection' );
$PrNoobTime = read_config ( 'noobprotectiontime' );
$PrNoobMulti = read_config ( 'noobprotectionmulti' );

$galaxy = intval($_POST['galaxy']);
if ($galaxy > MAX_GALAXY_IN_WORLD || $galaxy < 1)
Expand All @@ -97,32 +83,46 @@

$FleetArray = $fleet['fleetarray'];

$CurrentFlyingFleets = doquery("SELECT COUNT(fleet_id) AS `Nbre` FROM {{table}} WHERE `fleet_owner` = '".$user['id']."';", 'fleets', true);
$CurrentFlyingFleets = doquery("SELECT COUNT(fleet_id) AS `Nbre` FROM {{table}} WHERE `fleet_owner` = '".$user['id']."';", 'fleets', TRUE);
$CurrentFlyingFleets = $CurrentFlyingFleets["Nbre"];

$QrySelectEnemy = "SELECT * FROM {{table}} ";
$QrySelectEnemy .= "WHERE ";
$QrySelectEnemy .= "`galaxy` = '". $_POST['galaxy'] ."' AND ";
$QrySelectEnemy .= "`system` = '". $_POST['system'] ."' AND ";
$QrySelectEnemy .= "`planet` = '". $_POST['planet'] ."' AND ";
$QrySelectEnemy .= "`planet_type` = '". $_POST['planettype'] ."';";
$TargetRow = doquery( $QrySelectEnemy, 'planets', true);
$QrySelectEnemy .= "`galaxy` = '". intval($_POST['galaxy']) ."' AND ";
$QrySelectEnemy .= "`system` = '". intval($_POST['system']) ."' AND ";
$QrySelectEnemy .= "`planet` = '". intval($_POST['planet']) ."' AND ";
$QrySelectEnemy .= "`planet_type` = '". intval($_POST['planettype']) ."';";
$TargetRow = doquery( $QrySelectEnemy, 'planets', TRUE);

if ($TargetRow['id_owner'] == '')
{
$TargetUser = $user;
}
elseif ($TargetRow['id_owner'] != '')
$TargetUser = doquery("SELECT * FROM {{table}} WHERE `id` = '". $TargetRow['id_owner'] ."';", 'users', true);
{
$TargetUser = doquery("SELECT * FROM {{table}} WHERE `id` = '". $TargetRow['id_owner'] ."';", 'users', TRUE);
}

// invisible debris by jstar
if ($_POST['mission']== 8)
{
$TargetGPlanet = doquery("SELECT invisible_start_time, metal, crystal FROM {{table}} WHERE galaxy = '". intval($_POST['galaxy']) ."' AND system = '". intval($_POST['system']) ."' AND planet = '". intval($_POST['planet']) ."'", "galaxy",TRUE);

if($TargetGPlanet['metal'] == 0 && $TargetGPlanet['crystal'] == 0 && time() > ($TargetGPlanet['invisible_start_time']+DEBRIS_LIFE_TIME))
{
die();
}
}

$UserPoints = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '". $user['id'] ."';", 'statpoints', true);
$User2Points = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '". $TargetUser['id'] ."';", 'statpoints', true);
$UserPoints = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '". $user['id'] ."';", 'statpoints', TRUE);
$User2Points = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '". $TargetUser['id'] ."';", 'statpoints', TRUE);

$CurrentPoints = $UserPoints['total_points'];
$TargetPoints = $User2Points['total_points'];

$TargetVacat = $TargetUser['urlaubs_modus'];

if ((($user[$resource[108]] + 1) + ($user['rpg_commandant'] * COMMANDANT)) <= $CurrentFlyingFleets)
if ((get_max_fleets ( $CurrentUser[$resource[108]] , $CurrentUser['rpg_amiral'] )) <= $CurrentFlyingFleets)
{
$ResultMessage = "612; ".$lang['fa_no_more_slots']." |".$CurrentFlyingFleets." ".$UserSpyProbes." ".$UserRecycles." ".$UserMissiles;
die ($ResultMessage);
Expand Down Expand Up @@ -234,14 +234,14 @@

if ($TargetRow['id_level'] > $user['authlevel'])
{
$Allowed = true;
$Allowed = TRUE;
switch ($_POST['mission'])
{
case 1:
case 2:
case 6:
case 9:
$Allowed = false;
$Allowed = FALSE;
break;
case 3:
case 4:
Expand All @@ -252,7 +252,7 @@
break;
default:
}
if ($Allowed == false)
if ($Allowed == FALSE)
{
$ResultMessage = "619; ".$lang['fa_action_not_allowed']." |".$CurrentFlyingFleets." ".$UserSpyProbes." ".$UserRecycles." ".$UserMissiles;
die ( $ResultMessage );
Expand Down Expand Up @@ -292,7 +292,7 @@

$CurrentFlyingFleets++;

$planetrow = doquery("SELECT * FROM {{table}} WHERE `id` = '". $user['current_planet'] ."';", 'planets', true);
$planetrow = doquery("SELECT * FROM {{table}} WHERE `id` = '". $user['current_planet'] ."';", 'planets', TRUE);
$ResultMessage = "600; ".$lang['fa_sending']." ". $FleetShipCount ." ". $lang['tech'][$Ship] ." a ". $_POST['galaxy'] .":". $_POST['system'] .":". $_POST['planet'] ."...|";
$ResultMessage .= $CurrentFlyingFleets ." ".$UserSpyProbes." ".$UserRecycles." ".$UserMissiles;

Expand Down
Loading

0 comments on commit 773bb04

Please sign in to comment.