<?php
class ShowMadenToplamaPage extends AbstractPage {
public static $requireModule = 0;
function __construct() {
parent::__construct();
}
function show() {
global $CONF, $LNG, $PLANET, $USER, $resource, $UNI;
if( $USER['urlaubs_modus'] == 1){
$this->printMessage($LNG['tatil_modu_korumasi'], true, array('game.php?page=MadenToplama', 100));
exit;
}
$act = HTTP::_GP('act', '');
$transCoasts = 1000;
if ($act == "take") {
if (!isset($_POST['check_planet']) && !isset($_POST['check_moons']))
$this->redirectTo('game.php?page=MadenToplama');
if(!(isset($_SESSION["rand"]) && $_POST["rand"] == $_SESSION["rand"]))
$this->redirectTo('game.php?page=MadenToplama');
if(!isset($_POST['check_planet']))
$_POST['check_planet'] = array();
if(!isset($_POST['check_moons']))
$_POST['check_moons'] = array();
unset($_SESSION["rand"]);
if($transCoasts > $USER['darkmatter']){$this->printMessage($LNG['error_3'], true, array('game.php?page=MadenToplama', 2)); }
else
$USER['darkmatter'] -= $transCoasts;
foreach($_POST['check_planet'] as $ID => $Value) {
$sur = $GLOBALS['DATABASE']->uniquequery("SELECT metal, crystal, deuterium FROM ".PLANETS." where `id` = {$Value} AND id_owner = {$USER['id']};");
$GLOBALS['DATABASE']->multi_query("LOCK TABLE ".PLANETS." WRITE; UPDATE ".PLANETS." SET `metal` = 0, `crystal` = 0 , `deuterium` = 0 WHERE `id` = {$Value} AND id_owner = {$USER['id']}; UNLOCK TABLES;");
$PLANET['metal'] += $sur['metal'];
$PLANET['crystal'] += $sur['crystal'];
$PLANET['deuterium'] += $sur['deuterium'];
}
foreach($_POST['check_moons'] as $ID => $Value) {
$sur = $GLOBALS['DATABASE']->uniquequery("SELECT metal, crystal, deuterium FROM ".PLANETS." where `id` = {$Value} AND id_owner = {$USER['id']};");
$GLOBALS['DATABASE']->multi_query("LOCK TABLE ".PLANETS." WRITE; UPDATE ".PLANETS." SET `metal` = 0, `crystal` = 0 , `deuterium` = 0 WHERE `id` = {$Value} AND id_owner = {$USER['id']}; UNLOCK TABLES;");
$PLANET['metal'] += $sur['metal'];
$PLANET['crystal'] += $sur['crystal'];
$PLANET['deuterium'] += $sur['deuterium'];
}
$this->printMessage($LNG['h_ok'], true, array('game.php?page=MadenToplama', 2));
} else {
$rand=rand();
$_SESSION['rand']=$rand;
$Planets = array();
$Moons = array();
if (isset($USER['PLANETS'])) {
$USER['PLANETS'] = getPlanets($USER);
}
foreach($USER['PLANETS'] as $ID => $PlanetQuery) {
if ($ID == $PLANET['id']) continue;
if ($PlanetQuery['planet_type'] == 3) {
$Moons[$PlanetQuery['id']] = $PlanetQuery['name'] . " [" . $PlanetQuery['galaxy'] . ":" . $PlanetQuery['system'] . ":" . $PlanetQuery['planet'] . "]";
} elseif ($PlanetQuery['planet_type'] == 1) {
$Planets[$PlanetQuery['id']] = $PlanetQuery['name'] . " [".$PlanetQuery['galaxy'] . ":" . $PlanetQuery['system'] . ":" . $PlanetQuery['planet'] . "]";
}
}
// $this->tplObj->loadscript("jquery.countdown.js");
$this->tplObj->assign_vars(array(
'PlanetsList' => $Planets,
'MoonsList' => $Moons,
'rand' => $rand
));
$this->display('page.harvest.default2.tpl');
}
}
}
?> Bu sayfada bug var mı?
8
●230
- 02-01-2026, 18:09:59OGame scriptinde diğer gezegenlerdeki kaynakları mevcut gezegene topluyor bu sayfa.
- 02-01-2026, 18:16:17hocam anlamadınızmı {$Value} direkt sql bağlı id yerine sql yapılabilir kötü niyetli kişilermotoworld adlı üyeden alıntı: mesajı görüntüle
- 02-01-2026, 18:16:55Anlasam buraya sormazdım zaten hocam.Sirkaos adlı üyeden alıntı: mesajı görüntüle
Sayfayı nasıl düzenlemem gerekiyor. - 02-01-2026, 18:19:30$Value değil (int)$Valuemotoworld adlı üyeden alıntı: mesajı görüntüle
integer kullanacak şekilde düzenlenmeli
bir de oyunu çok bilmiyorum ama
boş döndüğünde de bakiye kesilme durumu var.
bir de ana gezegen de hangi seviyedeyiz bunu kontrol edecek bir fonksiyon şart.
dyelim ana gezegenden sildik nesneleri. kendi dünyamıza aktardık. ama
ondan sonra bir sorun oldu, sunucu kapandı, internet gitti. bir şey oldu.
yazılım açılıp kapandı, ana gezegende nesne yok, ama bot sanıyor ki nesneler ana gezegende değil. hafızası sıfırlandı çünkü. - 02-01-2026, 18:32:02bu kodda şu an bu soruna karşı bir çözüm var ama kesin bir çözüm değilmotoworld adlı üyeden alıntı: mesajı görüntüle
şu an burada sadece geri koruması var. katlanma koruması yok.
$hedefID = (int)$Value; // güvenlik için bu
if ($hedefID == $PLANET['id']) continue; // bu da katlama sorunu çözümü - 30-01-2026, 15:50:37hocam kodları düzenleyebilir misiniz belirttiğiniz şekilde?fatihanily adlı üyeden alıntı: mesajı görüntüle