누락된 getReq 추가. 버그 수정

This commit is contained in:
2018-04-14 02:42:58 +09:00
parent a03d2cee63
commit b797bab7e0
13 changed files with 40 additions and 40 deletions
+1
View File
@@ -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'));
+1 -1
View File
@@ -12,7 +12,7 @@ if($session->userGrade < 5) {
}
$btn = Util::getReq('btn');
$genlist = Util::getReq('genlist', 'int');
$genlist = Util::getReq('genlist', 'array_int');
extractMissingPostToGlobals();
+7 -6
View File
@@ -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";
+4 -5
View File
@@ -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";
?>
+5 -4
View File
@@ -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";
?>
<!DOCTYPE html>
+4 -7
View File
@@ -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";
?>
<!DOCTYPE html>
@@ -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++) {
+4 -3
View File
@@ -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";
+3 -3
View File
@@ -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";
+3 -3
View File
@@ -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"];
?>
+3 -4
View File
@@ -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"];
?>
+3 -3
View File
@@ -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;
}
+1 -1
View File
@@ -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
+1
View File
@@ -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();