diff --git a/hwe/_admin1_submit.php b/hwe/_admin1_submit.php index 82d7fc9a..88b4c4ac 100644 --- a/hwe/_admin1_submit.php +++ b/hwe/_admin1_submit.php @@ -22,6 +22,7 @@ if (!$v->validate()) { Error($v->errorStr()); } +$msg = Util::getReq('msg'); $btn = Util::getReq('btn'); $log = Util::getReq('log'); $starttime = Util::getReq('starttime', 'string', (new \DateTime())->format('Y-m-d H:i:s')); diff --git a/hwe/_admin4_submit.php b/hwe/_admin4_submit.php index 19248da0..d4032440 100644 --- a/hwe/_admin4_submit.php +++ b/hwe/_admin4_submit.php @@ -12,7 +12,7 @@ if($session->userGrade < 5) { } $btn = Util::getReq('btn'); -$genlist = Util::getReq('genlist', 'int'); +$genlist = Util::getReq('genlist', 'array_int'); extractMissingPostToGlobals(); diff --git a/hwe/_admin5.php b/hwe/_admin5.php index c045a126..af822bf4 100644 --- a/hwe/_admin5.php +++ b/hwe/_admin5.php @@ -7,6 +7,13 @@ include "func.php"; $type = Util::getReq('type', 'int', 0); $type2 = Util::getReq('type2', 'int', 0); +if($type < 0 || $type > 17){ + $type = 0; +} +if($type2 < 0 || $type2 > 6){ + $type2 = 0; +} + extractMissingPostToGlobals(); //로그인 검사 @@ -35,12 +42,6 @@ if($session->userGrade < 5) { $db = DB::db(); $connect=$db->get(); -if($type == 0) { - $type = 0; -} -if($type2 == 0) { - $type2 = 0; -} $sel = []; $sel2 = []; $sel[$type] = "selected"; diff --git a/hwe/_admin6.php b/hwe/_admin6.php index 9102e875..8ad66ef1 100644 --- a/hwe/_admin6.php +++ b/hwe/_admin6.php @@ -4,8 +4,10 @@ namespace sammo; include "lib.php"; include "func.php"; -$type = Util::getReq('type', 'int'); - +$type = Util::getReq('type', 'int', 0); +if($type < 0 || $type > 4){ + $type = 0; +} extractMissingPostToGlobals(); //로그인 검사 @@ -34,9 +36,6 @@ if($session->userGrade < 5) { $db = DB::db(); $connect=$db->get(); -if($type == 0) { - $type = 0; -} $sel[$type] = "selected"; ?> diff --git a/hwe/_admin7.php b/hwe/_admin7.php index 98e65466..8be7c7ff 100644 --- a/hwe/_admin7.php +++ b/hwe/_admin7.php @@ -6,7 +6,11 @@ include "func.php"; $btn = Util::getReq('btn'); $gen = Util::getReq('gen', 'int', 0); -$type = Util::getReq('type', 'int'); +$type = Util::getReq('type', 'int', 0); + +if($type < 0 || $type > 3){ + $type = 0; +} extractMissingPostToGlobals(); @@ -40,9 +44,6 @@ if($btn == '정렬하기') { $gen = 0; } -if($type == 0) { - $type = 0; -} $sel[$type] = "selected"; ?> diff --git a/hwe/_admin8.php b/hwe/_admin8.php index c31d991f..cff5f832 100644 --- a/hwe/_admin8.php +++ b/hwe/_admin8.php @@ -6,7 +6,7 @@ include "func.php"; $btn = Util::getReq('btn'); $gen = Util::getReq('gen', 'int', 0); -$type = Util::getReq('type', 'int'); +$type = 0; extractMissingPostToGlobals(); @@ -40,9 +40,6 @@ if ($btn == '정렬하기') { $gen = 0; } -if ($type == 0) { - $type = 0; -} $sel[$type] = "selected"; ?> @@ -84,9 +81,9 @@ foreach (getAllNationStaticInfo() as $nation) { $nationColor[$nation['nation']] = $nation['color']; } -switch ($type) { -case 0: $query = "select * from diplomacy where me < you order by state desc"; break; -} + +$query = "select * from diplomacy where me < you order by state desc"; + $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); $dipcount = MYDB_num_rows($result); for ($i=0; $i < $dipcount; $i++) { diff --git a/hwe/b_battleCenter.php b/hwe/b_battleCenter.php index b0c0390c..c147d6ad 100644 --- a/hwe/b_battleCenter.php +++ b/hwe/b_battleCenter.php @@ -12,6 +12,10 @@ $btn = Util::getReq('btn'); $gen = Util::getReq('gen', 'int', 0); $type = Util::getReq('type', 'int', 0); +if ($type < 0 || $type > 3) { + $type = 0; +} + extractMissingPostToGlobals(); //로그인 검사 @@ -63,9 +67,6 @@ if ($btn == '정렬하기') { $gen = 0; } -if ($type <= 0 || $type > 3) { - $type = 0; -} $sel = []; $sel[$type] = "selected"; diff --git a/hwe/b_genList.php b/hwe/b_genList.php index 24d4fdee..209d6305 100644 --- a/hwe/b_genList.php +++ b/hwe/b_genList.php @@ -5,6 +5,9 @@ include "lib.php"; include "func.php"; $type = Util::getReq('type', 'int', 7); +if ($type <= 0 || $type > 8) { + $type = 7; +} extractMissingPostToGlobals(); @@ -40,9 +43,6 @@ if ($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretli exit(); } -if ($type <= 0 || $type > 8) { - $type = 7; -} $sel = []; $sel[$type] = "selected"; diff --git a/hwe/b_myCityInfo.php b/hwe/b_myCityInfo.php index 26230074..760e464b 100644 --- a/hwe/b_myCityInfo.php +++ b/hwe/b_myCityInfo.php @@ -5,6 +5,9 @@ include "lib.php"; include "func.php"; $type = Util::getReq('type', 'int', 10); +if ($type <= 0 || $type > 12) { + $type = 10; +} extractMissingPostToGlobals(); @@ -26,9 +29,6 @@ if ($me['level'] == 0) { exit(); } -if ($type <= 0 || $type > 12) { - $type = 10; -} $sel = [$type => "selected"]; ?> diff --git a/hwe/b_myGenInfo.php b/hwe/b_myGenInfo.php index ebfb0448..3e02e498 100644 --- a/hwe/b_myGenInfo.php +++ b/hwe/b_myGenInfo.php @@ -5,6 +5,9 @@ include "lib.php"; include "func.php"; $type = Util::getReq('type', 'int', 1); +if($type <= 0 || $type > 15) { + $type = 1; +} extractMissingPostToGlobals(); @@ -26,10 +29,6 @@ if($me['level'] == 0) { exit(); } - -if($type <= 0 || $type > 15) { - $type = 1; -} $sel = [$type => "selected"]; ?> diff --git a/hwe/b_myPage.php b/hwe/b_myPage.php index 987610f8..e6313c93 100644 --- a/hwe/b_myPage.php +++ b/hwe/b_myPage.php @@ -11,15 +11,15 @@ $tnmt = Util::getReq('tnmt', 'int', 1); extractMissingPostToGlobals(); -if($map < 0 && $map > 2){ +if($map < 0 || $map > 2){ $map = 0; } -if($mode < 0 && $mode > 2){ +if($mode < 0 || $mode > 2){ $mode = 2; } -if($tnmt < 0 && $tnmt > 1){ +if($tnmt < 0 || $tnmt > 1){ $tnmt = 1; } diff --git a/hwe/c_chiefboard.php b/hwe/c_chiefboard.php index 43003760..0b6f55ad 100644 --- a/hwe/c_chiefboard.php +++ b/hwe/c_chiefboard.php @@ -6,7 +6,7 @@ include "func.php"; $title = Util::getReq('title'); $msg = Util::getReq('msg'); -$num = Util::getReq('num'); +$num = Util::getReq('num', 'int'); $reply = Util::getReq('reply'); // $title, $msg, $num diff --git a/hwe/c_troop.php b/hwe/c_troop.php index 94c6f5cf..bf4f0a69 100644 --- a/hwe/c_troop.php +++ b/hwe/c_troop.php @@ -6,6 +6,7 @@ include "func.php"; // $btn, $name, $troop $btn = Util::getReq('btn'); $name = Util::getReq('name'); +$gen = Util::getReq('gen', 'int'); $troop = Util::getReq('troop', 'int'); extractMissingPostToGlobals();