지도 수준을 없앰

This commit is contained in:
2018-04-18 22:57:38 +09:00
parent e701540d7f
commit 7fea0a41c6
7 changed files with 8 additions and 21 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ $query = "select startyear,year,month,conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$query = "select map,con,turntime from general where owner='{$userID}'";
$query = "select con,turntime from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
+1 -1
View File
@@ -17,7 +17,7 @@ $query = "select conlimit from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
$query = "select map,con,turntime from general where owner='{$userID}'";
$query = "select con,turntime from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
+1 -1
View File
@@ -16,7 +16,7 @@ $query = "select turnterm from game limit 1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
$query = "select no,nation,map from general where owner='{$userID}'";
$query = "select no,nation from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$me = MYDB_fetch_array($result);
+3 -14
View File
@@ -5,18 +5,13 @@ include "lib.php";
include "func.php";
$btn = Util::getReq('btn');
$map = Util::getReq('map', 'int', 0);
$mode = Util::getReq('mode', 'int', 2);
$tnmt = Util::getReq('tnmt', 'int', 1);
extractMissingPostToGlobals();
if($map < 0 || $map > 2){
$map = 0;
}
if($mode < 0 || $mode > 2){
$mode = 2;
if($mode < 0 || $mode > 1){
$mode = 1;
}
if($tnmt < 0 || $tnmt > 1){
@@ -51,13 +46,12 @@ if ($btn == "설정저장" && $me['myset'] > 0) {
$db->update('general', [
'myset'=>$db->sqleval('myset-1'),
'map'=>$map,
'mode'=>$mode,
'tnmt'=>$tnmt
], 'owner=%i', $userID);
}
$query = "select no,map,mode,tnmt,myset from general where owner='{$userID}'";
$query = "select no,mode,tnmt,myset from general where owner='{$userID}'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
@@ -91,11 +85,6 @@ function go(type) {
</td>
<td width=50% valign=top>
<form name=form1 action=b_myPage.php method=post>
&nbsp;&nbsp;&nbsp;&nbsp;지도수준 【
<input type=radio name=map value=0 <?=$me['map']==0?"checked":""; ?>>상세
<input type=radio name=map value=1 <?=$me['map']==1?"checked":""; ?>>간단
<input type=radio name=map value=2 <?=$me['map']==2?"checked":""; ?>>생략
】<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;토너먼트 【
<input type=radio name=tnmt value=0 <?=$me['tnmt']==0?"checked":""; ?>>수동참여
<input type=radio name=tnmt value=1 <?=$me['tnmt']==1?"checked":""; ?>>자동참여
+1 -1
View File
@@ -18,7 +18,7 @@ if (!$userID) {
}
$me = $db->queryFirstRow(
'SELECT no,con,turntime,newmsg,newvote,map from general where owner = %i',
'SELECT no,con,turntime,newmsg,newvote from general where owner = %i',
$userID
);
-1
View File
@@ -101,7 +101,6 @@ $db->update('general', [
'npc'=>1,
'killturn'=>6,
'mode'=>2,
'map'=>0,
'owner'=>$userID
], 'no=%i and npc=2', $npcID);
$affected = $db->affectedRows();
+1 -2
View File
@@ -80,7 +80,6 @@ CREATE TABLE `general` (
`specage2` INT(2) NULL DEFAULT '0',
`mode` INT(1) NULL DEFAULT '2',
`tnmt` INT(1) NULL DEFAULT '1',
`map` INT(1) NULL DEFAULT '0',
`myset` INT(1) NULL DEFAULT '3',
`tournament` INT(1) NULL DEFAULT '0',
`vote` INT(1) NULL DEFAULT '0',
@@ -152,7 +151,7 @@ CREATE TABLE `general` (
`recturn` CHAR(14) NULL DEFAULT '',
`resturn` CHAR(14) NULL DEFAULT '',
PRIMARY KEY (`no`),
INDEX `nation` (`nation`),
INDEX `nation` (`nation`, `npc`)
INDEX `city` (`city`),
INDEX `turntime` (`turntime`, `no`),
INDEX `no_member` (`owner`),