diff --git a/webapp/controller/TempToolsController.class.php b/webapp/controller/TempToolsController.class.php index 87cbf733..f2230ff0 100644 --- a/webapp/controller/TempToolsController.class.php +++ b/webapp/controller/TempToolsController.class.php @@ -578,8 +578,9 @@ EOD; )); } - public function reward() + public function punish() { + return; $gameDbConn = myself()->_getMysql(''); $rows = SqlHelper::ormSelect( $gameDbConn, @@ -642,4 +643,40 @@ EOD; return empty($row) ? 0 : $row['gold']; } + public function reward() + { + $gameDbConn = myself()->_getMysql(''); + $rows = SqlHelper::ormSelect( + $gameDbConn, + 't_test_reward070901', + array( + ) + ); + foreach ($rows as $row) { + if ($row['pre_send'] == 0) { + SqlHelper::update( + $gameDbConn, + 't_test_reward070901', + array( + 'account_id' => $row['account_id'], + ), + array( + 'pre_send' => 1 + ) + ); + SqlHelper::update( + $gameDbConn, + 't_test_reward070901', + array( + 'account_id' => $row['account_id'], + ), + array( + 'post_send' => 1 + ) + ); + } + } + echo 'ok'; + } + }