/** * @return troops */ public static function getinstance() { if (!self::$instance) { self::$instance = new self(); self::$instance->lng = language::getinstance()->GetLngBlock('pillage'); } return self::$instance; }
break; case 'troop_log': //-------------------------------------------------------- if (!Members::CheckPerms('PERSO_TROOPS_BATTLE')) { $carto->AddErreur($lng['err_noaxx']); break; } require_once CLASS_PATH . 'map.class.php'; require_once CLASS_PATH . 'ownuniverse.class.php'; require_once CLASS_PATH . 'troops.class.php'; $mode = gpc_esc($_POST['mode']); $date = gpc_esc($_POST['date']); preg_match('/(\\d{2})\\.(\\d{2})\\.(\\d{4}) (\\d{2}):(\\d{2})/', $date, $adate); $idate = mktime($adate[4], $adate[5], 0, $adate[2], $adate[1], $adate[3]); $smsg = gpc_esc($_POST['msg']); $xml['log'] = troops::getinstance()->AddPillage_log($mode, $idate, $smsg); break; case 'troop_howmany': //-------------------------------------------------------- if (!Members::CheckPerms('CARTOGRAPHIE_PLAYERS')) { $carto->AddErreur($lng['err_noaxx']); break; } $lastcoords = gpc_esc($_POST['lastcoords']); $carto->Edit_Entry($lastcoords, array('TROOP' => DataEngine::strip_number($_POST['EnnemyTroops'])), $lng['players_troopnb']); $xml['log'] = sprintf($lng['players_troopnb2'], $lastcoords); break; case 'wormhole': //--------------------------------------------------------- $carto->add_vortex($_POST['IN'], $_POST['OUT']); $xml['log'] = sprintf($lng['wormhole'], $_POST['IN'], $_POST['OUT']);