diff --git a/webapp/controller/TempToolsController.class.php b/webapp/controller/TempToolsController.class.php index 91dbf1ee..8d1b8e00 100644 --- a/webapp/controller/TempToolsController.class.php +++ b/webapp/controller/TempToolsController.class.php @@ -461,4 +461,40 @@ EOD; } } + public function exportBattleLog() + { + $accountConn = null; + { + $mysql_conf = getMysqlConfig(crc32('')); + if (SERVER_ENV == _ONLINE) { + $mysql_conf['database'] = 'accountdb_prod_1'; + } else { + $mysql_conf['database'] = 'accountdb1'; + } + $accountConn = new phpcommon\Mysql(array( + 'host' => $mysql_conf['host'], + 'port' => $mysql_conf['port'], + 'user' => $mysql_conf['user'], + 'passwd' => $mysql_conf['passwd'], + 'dbname' => $mysql_conf['database'], + )); + } + $data = file_get_contents('php://input'); + $array = explode("\r\n", $data); + foreach ($array as $accountId) { + $row = SqlHelper::ormSelectOne( + $accountConn, + 't_immutable_account', + array( + 'account_id' => $accountId + ) + ); + if (empty($row)) { + echo "\n"; + } else { + echo $row['address'] . "\n"; + } + } + } + }