diff --git a/.gitignore b/.gitignore index f160c7b6..b11fcef9 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ d_pic/*.png d_setting/*.php */d_setting/*.php +*/d_setting/templates/*.php **/old/* test.php diff --git a/css/config.css b/css/config.css index e80690c4..a4cf8686 100644 --- a/css/config.css +++ b/css/config.css @@ -8,7 +8,7 @@ table { font-size: 13px; word-break: break-all; text-align: center; - font-family: '맑은 고딕'; line-height: 110%; + font-family: '맑은 고딕'; } th, td { border: solid 1px; border-spacing: 0px; border-collapse: separate; border-top-color: gray; border-left-color: gray; border-right-color: black; border-bottom-color: black; @@ -16,7 +16,7 @@ th, td { font-size: 13px; word-break: break-all; text-align: center; - font-family: '맑은 고딕'; line-height: 110%; + font-family: '맑은 고딕'; } a.just_link { @@ -53,19 +53,10 @@ div { font-size: 13px; word-break: break-all; text-align: center; - font-family: '맑은 고딕'; line-height: 110%; + font-family: '맑은 고딕';; } -font { font-family: '맑은 고딕'; line-height: 110%; } -/* -input { - width: 100px; height: 18px; - background-color: black; color: white; - font-family: '맑은 고딕'; - font-size: 13px; - line-height: 110%; -} -*/ +font { font-family: '맑은 고딕';} .obj_fill{ display:block; @@ -77,14 +68,12 @@ button.with_skin { background-color: black; color: white; font-family: '맑은 고딕'; font-size: 13px; - line-height: 110%; } input.with_skin { background-color: black; color: white; font-family: '맑은 고딕'; font-size: 13px; - line-height: 110%; } select { @@ -92,7 +81,6 @@ select { background-color: black; color: white; font-family: '맑은 고딕'; font-size: 13px; - line-height: 110%; } button { width: 100px; height: 20px; diff --git a/css/login.css b/css/login.css index 14439c99..dc20a94d 100644 --- a/css/login.css +++ b/css/login.css @@ -62,8 +62,21 @@ input::-webkit-input-placeholder { } +.col-form-label{ + text-align:center; +} + .terms{ - max-height: 200px; overflow: auto; + max-height: 200px; overflow-y: auto; +} + +.terms pre{ + width:100%; + white-space: pre-wrap; /* Since CSS 2.1 */ + white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* Internet Explorer 5.5+ */ } .vertical-center { @@ -72,4 +85,32 @@ input::-webkit-input-placeholder { display: flex; align-items: center; +} + +#btn_kakao_login{ + cursor: pointer; + height:46px; + width:116px; + background-color: transparent; + color:transparent; + border:0; + background-size: 100%; /* To fill the dimensions of container (button), or */ + background-repeat: no-repeat; + background-position: bottom center; + margin-top:5px; + background-image:url('../oauth_kakao/kakao_login_join.png'); +} + +#btn_kakao_login:hover { + background-image:url('../oauth_kakao/kakao_login_join_ov.png'); +} + +#bottom_box{ + position:fixed; + bottom:0; + width:100%; + left:0; +} +#bottom_box .container{ + text-align:center; } \ No newline at end of file diff --git a/css/user_info.css b/css/user_info.css index 436f22b8..92665087 100644 --- a/css/user_info.css +++ b/css/user_info.css @@ -81,168 +81,8 @@ height:20px; } -#EntranceManage_00 { - width: 500px; height: 409px; - z-index: 2; -} - -#EntranceManage_0000 { - width: 498px; height: 50px; -} - -#EntranceManage_0001 { - width: 100px; height: 30px; -} - -#EntranceManage_0002 { - width: 498px; height: 25px; -} - -#EntranceManage_0003 { - width: 98px; height: 84px; - line-height: 84px; -} - -#EntranceManage_0004 { - width: 148px; height: 84px; - line-height: 84px; -} - -#EntranceManage_0005 { - width: 98px; height: 84px; - line-height: 84px; -} - -#EntranceManage_0006 { - width: 148px; height: 84px; - text-align: left; -} - -#EntranceManage_000600 { - width: 80px; height: 17px; -} - -#EntranceManage_000601 { - width: 80px; height: 17px; -} - -#EntranceManage_000602 { - width: 80px; height: 17px; -} - -#EntranceManage_000603 { - width: 144px; height: 20px; -} - -#EntranceManage_0007 { - width: 98px; height: 64px; - line-height: 64px; -} - -#EntranceManage_0008 { - width: 148px; height: 64px; - line-height: 64px; -} - -#EntranceManage_0009 { - width: 98px; height: 64px; - line-height: 64px; -} - -#EntranceManage_0010 { - width: 148px; height: 64px; - line-height: 64px; -} - -#EntranceManage_0011 { - width: 98px; height: 20px; -} - -#EntranceManage_0012 { - width: 148px; height: 20px; -} - -#EntranceManage_0013 { - width: 248px; height: 20px; -} - -#EntranceManage_0014 { - width: 98px; height: 64px; - line-height: 64px; -} - -#EntranceManage_0015 { - width: 148px; height: 64px; -} - -#EntranceManage_001500 { - width: 64px; height: 64px; -} - -#EntranceManage_001501 { - width: 64px; height: 64px; -} - -#EntranceManage_0016 { - width: 248px; height: 64px; -} - -#EntranceManage_001600 { - width: 100px; height: 16px; - display: none; -} - -#EntranceManage_001601 { - width: 70px; height: 20px; -} - -#EntranceManage_001602 { - width: 85px; height: 20px; -} - -#EntranceManage_001603 { - width: 85px; height: 20px; -} - -#EntranceManage_0017 { - width: 98px; height: 100px; - line-height: 100px; -} - -#EntranceManage_0018 { - width: 398px; height: 100px; - text-align: left; -} - -#EntranceManage_0019 { - width: 149px; height: 20px; -} - -#EntranceManage_0020 { - width: 500px; height: 20px; - border: none; -} - -#EntranceManage_002000 { - width: 500px; -} - -#EntranceManage_00200000 { - width: 498px; height: 20px; -} - -.EntranceManage_Sequence { - width: 48px; height: 20px; -} - -.EntranceManage_Date { - width: 148px; height: 20px; -} - -.EntranceManage_Amount { - width: 148px; height: 20px; -} - -.EntranceManage_Cumul { - width: 148px; height: 20px; -} +#third_use_disallow{ + display:none; + margin-left:10px; + width:40px; +} \ No newline at end of file diff --git a/f_config/config.php b/f_config/config.php index ce147685..217c995b 100644 --- a/f_config/config.php +++ b/f_config/config.php @@ -2,11 +2,14 @@ namespace sammo; define('ROOT', realpath(__dir__.'/..')); - +date_default_timezone_set('Asia/Seoul'); mb_internal_encoding("UTF-8"); mb_http_output('UTF-8'); mb_regex_encoding('UTF-8'); +ini_set("session.cache_expire", 10080); // minutes +ini_set("session.gc_maxlifetime", 604800); // seconds + function getFriendlyErrorType($type) { switch($type) diff --git a/f_install/sql/common_schema.sql b/f_install/sql/common_schema.sql index 236442a7..52b5a75b 100644 --- a/f_install/sql/common_schema.sql +++ b/f_install/sql/common_schema.sql @@ -2,6 +2,7 @@ DROP TABLE IF EXISTS `system`; DROP TABLE IF EXISTS `member`; DROP TABLE IF EXISTS `member_log`; +DROP TABLE IF EXISTS `config`; -- 시스템 테이블 -- TODO:장기적으로는 key-value(json) storage 형태로 바꾸는게 나을 듯. @@ -25,6 +26,7 @@ CREATE TABLE `member` ( `EMAIL` VARCHAR(64) NULL DEFAULT NULL, `PW` CHAR(128) NOT NULL, `salt` CHAR(16) NOT NULL, + `third_use` INT(1) NOT NULL DEFAULT '0', `NAME` VARCHAR(64) NOT NULL, `PICTURE` VARCHAR(64) NULL DEFAULT 'default.jpg', `IMGSVR` INT(1) NULL DEFAULT '0', @@ -53,4 +55,13 @@ CREATE TABLE `member_log` ( INDEX `action` (`member_no`, `action_type`, `date`), INDEX `member` (`member_no`, `date`) ) +ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; + +CREATE TABLE `config` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `key` VARCHAR(50) NOT NULL, + `value` VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE INDEX `key` (`key`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; \ No newline at end of file diff --git a/hwe/_119.php b/hwe/_119.php index b73d8c0e..9ac164fc 100644 --- a/hwe/_119.php +++ b/hwe/_119.php @@ -5,7 +5,7 @@ include "lib.php"; include "func.php"; $session = Session::requireGameLogin()->setReadOnly(); -if($session->userGrade < 5) { +if($session->userGrade < 4) { ?> diff --git a/hwe/_119_b.php b/hwe/_119_b.php index 34ba6505..fd154c62 100644 --- a/hwe/_119_b.php +++ b/hwe/_119_b.php @@ -6,7 +6,7 @@ include "func.php"; $session = Session::requireGameLogin()->setReadOnly(); -if($session->userGrade < 5){ +if($session->userGrade < 4){ header('location:_119.php'); die(); } diff --git a/hwe/_admin2_submit.php b/hwe/_admin2_submit.php index c36380c2..a14bab7f 100644 --- a/hwe/_admin2_submit.php +++ b/hwe/_admin2_submit.php @@ -24,6 +24,8 @@ if(!$generalID){ $db = DB::db(); $connect=$db->get(); +$src = MessageTarget::buildQuick($session->generalID); + switch($btn) { case "전체 접속허용": $db->update('general', [ @@ -96,12 +98,10 @@ switch($btn) { break; case "특기 부여": list($year, $month) = $db->queryFirstList('select `year`, `month` from `game` where `no`=1'); - - $src = MessageTarget::buildQuick($session->generalID); $text = "특기 부여!"; foreach($db->query("SELECT `no`,leader,power,intel,dex0,dex10,dex20,dex30,dex40 FROM general WHERE `no` IN %li", $genlist) as $general){ - $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($general['no']), $text, new DateTime(), new DateTime('9999-12-31'), []); + $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($general['no']), $text, new \DateTime(), new \DateTime('9999-12-31'), []); $msg->send(true); $specialWar = SpecialityConst::pickSpecialWar($general); @@ -116,10 +116,9 @@ switch($btn) { break; case "경험치1000": - $src = MessageTarget::buildQuick($session->generalID); $text = $btn." 지급!"; foreach($genlist as $generalID){ - $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []); + $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []); $msg->send(true); } $db->update('general',[ @@ -128,10 +127,9 @@ switch($btn) { break; case "공헌치1000": - $src = MessageTarget::buildQuick($session->generalID); $text = $btn." 지급!"; foreach($genlist as $generalID){ - $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []); + $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []); $msg->send(true); } $db->update('general',[ @@ -140,10 +138,9 @@ switch($btn) { break; case "보숙10000": - $src = MessageTarget::buildQuick($session->generalID); $text = "보병숙련도+10000 지급!"; foreach($genlist as $generalID){ - $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []); + $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []); $msg->send(true); } $db->update('general',[ @@ -151,10 +148,9 @@ switch($btn) { ], '`no` IN %li', $genlist); break; case "궁숙10000": - $src = MessageTarget::buildQuick($session->generalID); $text = "궁병숙련도+10000 지급!"; foreach($genlist as $generalID){ - $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []); + $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []); $msg->send(true); } $db->update('general',[ @@ -165,7 +161,7 @@ switch($btn) { $src = MessageTarget::buildQuick($session->generalID); $text = "기병숙련도+10000 지급!"; foreach($genlist as $generalID){ - $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []); + $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []); $msg->send(true); } $db->update('general',[ @@ -176,7 +172,7 @@ switch($btn) { $src = MessageTarget::buildQuick($session->generalID); $text = "귀병숙련도+10000 지급!"; foreach($genlist as $generalID){ - $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []); + $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []); $msg->send(true); } $db->update('general',[ @@ -187,7 +183,7 @@ switch($btn) { $src = MessageTarget::buildQuick($session->generalID); $text = "차병숙련도+10000 지급!"; foreach($genlist as $generalID){ - $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []); + $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []); $msg->send(true); } $db->update('general',[ @@ -207,7 +203,7 @@ switch($btn) { case "메세지 전달": $text = $msg; foreach($genlist as $generalID){ - $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []); + $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []); $msg->send(true); } break; @@ -221,7 +217,7 @@ switch($btn) { } foreach($genlist as $generalID){ - $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []); + $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []); $msg->send(true); } @@ -245,7 +241,7 @@ switch($btn) { } foreach($genlist as $generalID){ - $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []); + $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []); $msg->send(true); } @@ -269,7 +265,7 @@ switch($btn) { } foreach($genlist as $generalID){ - $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []); + $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []); $msg->send(true); } @@ -293,7 +289,7 @@ switch($btn) { } foreach($genlist as $generalID){ - $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new DateTime(), new DateTime('9999-12-31'), []); + $msg = new Message(Message::MSGTYPE_PRIVATE, $src, MessageTarget::buildQuick($generalID), $text, new \DateTime(), new \DateTime('9999-12-31'), []); $msg->send(true); } diff --git a/hwe/_simul.php b/hwe/_simul.php index 66e07838..fe992f6f 100644 --- a/hwe/_simul.php +++ b/hwe/_simul.php @@ -1630,7 +1630,6 @@ if($isgen == "장수공격" || $isgen == "성벽공격") { - = 2) { -명장일람 +<?=UniqueConst::$serverName?>: 명장일람 @@ -344,7 +344,6 @@ for ($i=0; $i < 4; $i++) { - diff --git a/hwe/a_emperior.php b/hwe/a_emperior.php index c09d1205..0e4ff6a3 100644 --- a/hwe/a_emperior.php +++ b/hwe/a_emperior.php @@ -18,7 +18,7 @@ increaseRefresh("왕조일람", 2); -왕조일람 +<?=UniqueConst::$serverName?>: 왕조일람 @@ -201,7 +201,6 @@ if ($select == 0) { - diff --git a/hwe/a_emperior2.php b/hwe/a_emperior2.php index eae1b186..58edb395 100644 --- a/hwe/a_emperior2.php +++ b/hwe/a_emperior2.php @@ -18,7 +18,7 @@ increaseRefresh("왕조일람", 2); -왕조일람 +<?=UniqueConst::$serverName?>: 왕조일람 @@ -202,7 +202,6 @@ if ($select == 0) { - diff --git a/hwe/a_genList.php b/hwe/a_genList.php index d7765c16..555af902 100644 --- a/hwe/a_genList.php +++ b/hwe/a_genList.php @@ -41,7 +41,7 @@ if ($type <= 0 || $type > 15) { -장수일람 +<?=UniqueConst::$serverName?>: 장수일람 @@ -194,7 +194,6 @@ echo " - @@ -159,6 +159,5 @@ reloadWorldMap({ neutralView:true }); - diff --git a/hwe/a_kingdomList.php b/hwe/a_kingdomList.php index 39c93b78..bca592c2 100644 --- a/hwe/a_kingdomList.php +++ b/hwe/a_kingdomList.php @@ -28,7 +28,7 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); } -세력일람 +<?=UniqueConst::$serverName?>: 세력일람 @@ -248,7 +248,6 @@ echo" - diff --git a/hwe/a_npcList.php b/hwe/a_npcList.php index 09963a91..94a914fb 100644 --- a/hwe/a_npcList.php +++ b/hwe/a_npcList.php @@ -26,7 +26,7 @@ $sel[$type] = "selected"; -빙의일람 +<?=UniqueConst::$serverName?>: 빙의일람 @@ -124,7 +124,6 @@ echo " - diff --git a/hwe/a_status.php b/hwe/a_status.php index 342e828d..74ca2334 100644 --- a/hwe/a_status.php +++ b/hwe/a_status.php @@ -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); @@ -29,7 +29,7 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); } -세력도 +<?=UniqueConst::$serverName?>: 세력도 @@ -67,7 +67,7 @@ $(function(){ - + @@ -75,7 +75,6 @@ $(function(){ - diff --git a/hwe/a_traffic.php b/hwe/a_traffic.php index 5cee826b..cb52d2b5 100644 --- a/hwe/a_traffic.php +++ b/hwe/a_traffic.php @@ -22,15 +22,15 @@ $refresh = []; $online = []; $curonline = getOnlineNum(); -$visibleLogs = min(11, count($log)); -for ($i=0; $i < $visibleLogs; $i++) { - $parse = explode("|", $log[count($log)-$visibleLogs+$i]); - $date[$i] = trim($parse[0]); - $year[$i] = trim($parse[1]); - $month[$i] = trim($parse[2]); - $refresh[$i] = trim($parse[3]); - $online[$i] = trim($parse[4]); +foreach($log as $i=>$value){ + $parse = Json::decode($value); + $date[$i] = $parse[0]; + $year[$i] = $parse[1]; + $month[$i] = $parse[2]; + $refresh[$i] = $parse[3]; + $online[$i] = $parse[4]; } + if ($game['maxrefresh'] == 0) { $game['maxrefresh'] = 1; } @@ -47,7 +47,7 @@ if ($game['maxonline'] < $curonline) { -트래픽정보 +<?=UniqueConst::$serverName?>: 트래픽정보 @@ -63,7 +63,7 @@ if ($game['maxonline'] < $curonline) { $value){ $w = round($refresh[$i] / $game['maxrefresh'] * 100, 1); if ($w >= 100) { $w -= 0.1; @@ -133,7 +133,7 @@ $dt = date('H:i');
접 속 량
$value){ $w = round($online[$i] / $game['maxonline'] * 100, 1); if ($w >= 100) { $w -= 0.1; @@ -264,7 +264,6 @@ for ($i=0; $i < $count; $i++) {
접 속 자
- diff --git a/hwe/a_vote.php b/hwe/a_vote.php index 0ee75066..4b6c08d3 100644 --- a/hwe/a_vote.php +++ b/hwe/a_vote.php @@ -28,7 +28,7 @@ if ($vote[0] == "") { -설문조사 +<?=UniqueConst::$serverName?>: 설문조사 @@ -198,22 +198,19 @@ if ($admin['voteopen'] >= 1 || $session->userGrade >= 5) { "; - $memCount = $db->queryFirstField('SELECT count(`no`) FROM general WHERE npc<2'); - if ($memCount == 0) { - $memCount = 1; - } + $memCount = max(1, $db->queryFirstField('SELECT count(`no`) FROM general WHERE npc<2')); $totalVote = []; - $nationVoteCount = [[0]]; - $nationVote = [[]]; + $nationVoteCount = []; + $nationVote = []; foreach ($db->query("SELECT nation, vote, count(`no`) as cnt FROM general WHERE npc<2 GROUP BY nation, vote") as $row) { $nation = $row['nation']; - $vote = $row['vote']; + $ownVote = $row['vote']; $cnt = $row['cnt']; - if (!isset($totalVote[$vote])) { - $totalVote[$vote] = 0; + if (!isset($totalVote[$ownVote])) { + $totalVote[$ownVote] = 0; } if (!isset($nationVoteCount[$nation])) { @@ -221,20 +218,20 @@ if ($admin['voteopen'] >= 1 || $session->userGrade >= 5) { $nationVote[$nation] = []; } - if (!isset($nationVote[$nation][$vote])) { - $nationVote[$nation][$vote] = 0; + if (!isset($nationVote[$nation][$ownVote])) { + $nationVote[$nation][$ownVote] = 0; } - $totalVote[$vote] += $cnt; + $totalVote[$ownVote] += $cnt; $nationVoteCount[$nation] += $cnt; - $nationVote[$nation][$vote] += $cnt; + $nationVote[$nation][$ownVote] += $cnt; } for ($i=0; $i < $voteTypeCount; $i++) { - $per = round(($totalVote[$i]??0) / $memCount * 100, 1); + $per = round(($totalVote[$i]??0) * 100 / $memCount, 1); // if($per < 5) { $vote['cnt'] = " "; } echo " - {$totalVote[$i]} + {$totalVote[$i]} "; } @@ -293,8 +290,16 @@ if ($admin['voteopen'] >= 2 || $session->userGrade >= 5) { $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); $memCount = MYDB_num_rows($result); + + $voteCount = $nationVoteCount[$nation['nation']] ?? 0; - $percentage = round($voteCount / $memCount * 100, 1); + if($memCount == 0){ + $percentage = 100; + } + else{ + $percentage = round($voteCount / $memCount * 100, 1); + } + echo " @@ -328,7 +333,6 @@ if ($admin['voteopen'] >= 2 || $session->userGrade >= 5) { - diff --git a/hwe/b_auction.php b/hwe/b_auction.php index 9690c1ab..248f4d09 100644 --- a/hwe/b_auction.php +++ b/hwe/b_auction.php @@ -58,7 +58,7 @@ if ($msg2 == "") { -거래장 +<?=UniqueConst::$serverName?>: 거래장 @@ -299,6 +299,5 @@ for ($i=0; $i < $count; $i++) { - diff --git a/hwe/b_battleCenter.php b/hwe/b_battleCenter.php index c147d6ad..fcc64e31 100644 --- a/hwe/b_battleCenter.php +++ b/hwe/b_battleCenter.php @@ -75,7 +75,7 @@ $sel[$type] = "selected"; -감찰부 +<?=UniqueConst::$serverName?>: 감찰부 @@ -100,20 +100,23 @@ $sel[$type] = "selected"; {$general['name']}"; @@ -153,11 +156,23 @@ for ($i=0; $i < $gencount; $i++) { + 1): ?> + + 개인 기록 +   + + + + + + + + +
- diff --git a/hwe/b_betting.php b/hwe/b_betting.php index a1ab5642..0d224bd2 100644 --- a/hwe/b_betting.php +++ b/hwe/b_betting.php @@ -37,7 +37,13 @@ case 3: $tnmt_type = "설전"; $tp = "itl"; $tp2 = " $str1 = getTournament($admin['tournament']); $str2 = getTournamentTime(); +if($str2){ + $str2 = ', '.$str2; +} $str3 = getTournamentTerm(); +if($str3){ + $str3 = ', '.$str3; +} ?> @@ -47,13 +53,13 @@ $str3 = getTournamentTerm(); } ?> -베팅장 +<?=UniqueConst::$serverName?>: 베팅장 - +
도 시 정 보
- +
도시선택 : @@ -160,44 +175,44 @@ if($city['trade'] == 0) { } ?> - +
- +
- + - + - + - + - + - + - + - + - + - + - + - + - +
"; bgcolor=>【 |
주민주민 /농업농업 /상업상업 /치안치안 /수비수비 /성벽성벽 /
민심민심 시세시세 %인구인구 %태수태수 군사군사 시중시중
장수장수
+ + +
+ + + + + + + + + + + + + + + + + -
얼 굴이 름통솔무력지력관 직병 종병 사훈련사기명 령
- - - - - - - - - - - - - - "; -} for($j=0; $j < $gencount; $j++) { $general = MYDB_fetch_array($genresult); + $nationInfo = getNationStaticInfo($general['nation']); + + if($general['nation'] != 0 && $general['nation'] == $myNation['nation']){ + $ourGeneral = true; + } + else{ + $ourGeneral = false; + } + + $isNPC = $general['npc']>1; + $wounded = $general['injury']; + + + $name = $general['name']; + $nameText = formatName($name, $general['npc']); + + $leadership = $general['leader']; + $power = $general['power']; + $intel = $general['intel']; + + $leadershipText = formatWounded($leadership, $general['injury']); + $powerText = formatWounded($power, $general['injury']); + $intelText = formatWounded($intel, $general['injury']); + + $level = $general['level']; + $levelText = getLevel($general['level']); + if($general['level'] == 12) { - $lbonus = $nationlevel[$general['nation']] * 2; + $leadershipBonus = $nationInfo['level'] * 2; } elseif($general['level'] >= 5) { - $lbonus = $nationlevel[$general['nation']]; + $leadershipBonus = $nationInfo['level']; } else { - $lbonus = 0; + $leadershipBonus = 0; } - if($lbonus > 0) { - $lbonus = "+{$lbonus}"; - } else { - $lbonus = ""; + $leadershipBonusText = formatLeadershipBonus($leadershipBonus); + + if($ourGeneral){ + $defenceMode = $general['mode']; + $defenceModeText = formatDefenceMode($defenceMode); + $crewType = $general['crewtype']; + $crewTypeText = GameUnitConst::byId($crewType)->name; + $crew = $general['crew']; + $train = $general['train']; + $atmos = $general['atmos']; + } + else{ + $defenceMode = 0; + $defenceModeText = ''; + $crewType = 0; + $crewTypeText = ''; + $crew = $general['crew']; + $train = -1; + $atmos = -1; } - if($general['injury'] > 0) { - $leader = intdiv($general['leader'] * (100 - $general['injury']), 100); - $power = intdiv($general['power'] * (100 - $general['injury']), 100); - $intel = intdiv($general['intel'] * (100 - $general['injury']), 100); - $leader = "{$leader}{$lbonus}"; - $power = "{$power}"; - $intel = "{$intel}"; - } else { - $leader = "{$general['leader']}{$lbonus}"; - $power = "{$general['power']}"; - $intel = "{$general['intel']}"; - } + $nation = $general['nation']; + $nationName = $nationInfo['name']; - if($general['npc'] >= 2) { $general['name'] = "{$general['name']}"; } - elseif($general['npc'] == 1) { $general['name'] = "{$general['name']}"; } - $imageTemp = GetImageURL($general['imgsvr']); - echo " - - - - - - - "; - //아국장수이거나 보는 사람이 운영자일때 보여줌 - if(($general['nation'] != 0 && $general['nation'] == $myNation['nation']) || $session->userGrade >= 5) { - switch($general['mode']) { - case 0: $mode = "×"; break; - case 1: $mode = "○"; break; - case 2: $mode = "◎"; break; + if($ourGeneral && !$isNPC){ + $turnText = []; + foreach(getTurn($general, 1) as $turnRawIdx=>$turn){ + $turnIdx = $turnRawIdx+1; + $turnText[] = "{$turnIdx} : $turn"; } - - echo " - - - - - "; - if($general['npc'] >= 2) { - echo " - - - - - - - - - - - - "; + else{ + $turnText = ''; + } + + echo $templates->render('cityGeneral', [ + 'ourGeneral'=>$ourGeneral, + 'isNPC'=>$isNPC, + 'wounded'=>$wounded, + 'name'=>$name, + 'nameText'=>$nameText, + 'leadership'=>$leadership, + 'leadershipText'=>$leadershipText, + 'leadershipBonus'=>$leadershipBonus, + 'leadershipBonusText'=>$leadershipBonusText, + 'level'=>$level, + 'levelText'=>$levelText, + 'power'=>$power, + 'powerText'=>$powerText, + 'intel'=>$intel, + 'intelText'=>$intelText, + 'defenceMode'=>$defenceMode, + 'defenceModeText'=>$defenceModeText, + 'crewType'=>$crewType, + 'crewTypeText'=>$crewTypeText, + 'crew'=>$crew, + 'train'=>$train, + 'atmos'=>$atmos, + 'nation'=>$nation, + 'nationName'=>$nationName, + 'turnText'=>$turnText + ]); } ?> +
얼 굴이 름통솔무력지력관 직병 종병 사훈련사기명 령
{$general['name']}$leader$power$intel".getLevel($general['level'])."$mode".GameUnitConst::byId($general['crewtype'])->name."{$general['crew']}{$general['train']}{$general['atmos']}NPC 장수"; - } else { - echo " - - "; - $turn = getTurn($general, 1); - - for($i=0; $i < 4; $i++) { - $k = $i+1; - echo " -   $k : $turn[$i]
"; - } - echo " -
"; - } - } elseif($general['nation'] != 0) { - echo " -
??{$general['crew']}??【{$nationname[$general['nation']]}】 장수"; - } else { - echo " - ??{$general['crew']}??  재 야"; + $turnText = join('
', $turnText); } - - echo " -
- +
- diff --git a/hwe/b_dipcenter.php b/hwe/b_dipcenter.php index 72d37097..e5c52774 100644 --- a/hwe/b_dipcenter.php +++ b/hwe/b_dipcenter.php @@ -48,27 +48,27 @@ if ($me['level'] >= 5) { -내무부 +<?=UniqueConst::$serverName?>: 내무부 - +
내 무 부
- +
- - - - - - - - + + + + + + + + 0) { } ?> -
외 교 관 계
국 가 명국력장수속령상태기간종 료 시 점비 고국 가 명국력장수속령상태기간종 료 시 점비 고
+
- - + + - + - +
국 가 방 침 & 임관 권유 메세지
국가 방침 maxlength=500 style=color:white;background-color:black;width:830px; name=msg value=''> name=btn value=국가방침>
임관 권유 maxlength=500 style=color:white;background-color:black;width:830px; name=scoutmsg value=''> name=btn value=임관권유>
국가 방침 name=btn value=국가방침>
임관 권유 maxlength=500 style=color:white;background-color:black;width:830px; name=scoutmsg value=''> name=btn value=임관권유>
900 x 200px 넘는 크기를 점유할 시 통보없이 제한될 수 있습니다.
예 산 & 정 책
- - - - + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - "; -?> + + + + + - + - + - + - + @@ -307,10 +304,9 @@ if ($nation['war'] == 0) {
자금 예산병량 예산자금 예산병량 예산
현 재   {$nation['gold']}현 재   {$nation['rice']}현 재   현 재   
단기수입   +$deadIncome둔전수입   +$riceincomeList[1]단기수입   +둔전수입   +
세 금   +$goldincomeList[0]세 곡   +$riceincomeList[0]세 금   +세 곡   +
수입 / 지출   +$goldincome / -$goldoutcome수입 / 지출   +$riceincome / -$riceoutcome수입 / 지출   + / -수입 / 지출   + / -
국고 예산   {$budgetgold} ({$budgetgolddiff})병량 예산   {$budgetrice} ({$budgetricediff})
국고 예산    ()병량 예산    ()
세율 (5 ~ 30%)   세율 (5 ~ 30%)    name=rate style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>% name=btn value=세율>봉급 지급율 (20 ~ 200%)   봉급 지급율 (20 ~ 200%)    name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>% name=btn value=지급율>
기밀 권한 (1 ~ 99년)   기밀 권한 (1 ~ 99년)    name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>년 name=btn value=기밀권한>임관&전쟁 변경 가능임관&전쟁 변경 가능 무제한
- +
- diff --git a/hwe/b_diplomacy.php b/hwe/b_diplomacy.php index f91cc616..3cdd9d92 100644 --- a/hwe/b_diplomacy.php +++ b/hwe/b_diplomacy.php @@ -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); @@ -78,7 +78,7 @@ foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE confl -중원정보 +<?=UniqueConst::$serverName?>: 중원 정보 @@ -236,10 +236,10 @@ for($i=0; $i < $nationcount; $i++) {

@@ -248,6 +248,5 @@ for($i=0; $i < $nationcount; $i++) {
- diff --git a/hwe/b_genList.php b/hwe/b_genList.php index 209d6305..a38ba92d 100644 --- a/hwe/b_genList.php +++ b/hwe/b_genList.php @@ -54,7 +54,7 @@ $sel[$type] = "selected"; } ?> -암행부 +<?=UniqueConst::$serverName?>: 암행부 @@ -210,6 +210,5 @@ echo " - diff --git a/hwe/b_myBossInfo.php b/hwe/b_myBossInfo.php index 06fe7f51..89ecd255 100644 --- a/hwe/b_myBossInfo.php +++ b/hwe/b_myBossInfo.php @@ -30,7 +30,7 @@ if($meLevel == 0) { -인사부 +<?=UniqueConst::$serverName?>: 인사부 @@ -74,6 +74,10 @@ $(function(){ reloadWorldMap({ hrefTemplate:'b_currentCity.php?citylist={0}' }); + + setInterval(function(){ + refreshMsg(); + }, 10000); }); @@ -211,6 +215,14 @@ if ($session->userGrade >= 5) { "; } +else if($session->userGrade == 4){ + echo " + + + + +"; +} ?> @@ -249,7 +261,7 @@ if ($session->userGrade >= 5) { - ;color:white;width:110px;font-size:13px; value='실 행' onclick='refreshing(this, 3,form2)'>;color:white;width:110px;font-size:13px; value='갱 신' onclick='refreshing(this, 0,0)'>;color:white;width:160px;font-size:13px; value='로그아웃' onclick=location.replace('logout_process.php')>
+ ;color:white;width:110px;font-size:13px; value='실 행' onclick='refreshing(this, 3,form2)'>;color:white;width:110px;font-size:13px; value='갱 신' onclick='refreshing(this, 0,0)'>;color:white;width:160px;font-size:13px; value='로비로' onclick=location.replace('../')>
@@ -286,12 +298,12 @@ if ($session->userGrade >= 5) { 내용 없이 '서신전달&갱신'을 누르면 메세지창이 갱신됩니다.
-
+
전체 메시지(최고99자)
개인 메시지(최고99자)
-
+
@@ -299,7 +311,6 @@ if ($session->userGrade >= 5) {
-
userGrade < 5){ 전콘
+
+ +
+
+ + + + + + + + +
+
+
+ +
+ +
+ +
+
+
diff --git a/hwe/j_autoreset.php b/hwe/j_autoreset.php new file mode 100644 index 00000000..36e6360f --- /dev/null +++ b/hwe/j_autoreset.php @@ -0,0 +1,39 @@ +queryFirstRow( + 'SELECT * FROM reserved_open WHERE `date` <= %s LIMIT 1', + (new \DateTime())->format('Y-m-d H:i:s') +); + +if(!$reserved){ + Json::die([ + 'result'=>true, + 'affected'=>0 + ]); +} + +$options = Json::decode($reserved['options']); + +$result = ResetHelper::buildScenario( + $options['turnterm'], + $options['sync'], + $options['scenario'], + $options['fiction'], + $options['extend'], + $options['npcmode'], + $options['show_img_level'], + $options['tournament_trig'] +); + +$result['affected']=1; + +$prefix = DB::prefix(); +AppConf::getList()[$prefix]->openServer(); + +Json::die($result); \ No newline at end of file diff --git a/hwe/j_basic_info.php b/hwe/j_basic_info.php index 60a799c1..3d597164 100644 --- a/hwe/j_basic_info.php +++ b/hwe/j_basic_info.php @@ -19,5 +19,6 @@ if(!$generalInfo){ $result['generalID'] = $generalInfo['no']; $result['myNationID'] = $generalInfo['nation']; $result['isChief'] = ($generalInfo['level'] == 12); +$result['generalLevel'] = $generalInfo['level']; Json::die($result); \ No newline at end of file diff --git a/hwe/j_install.php b/hwe/j_install.php index 97d5a8fc..4b535e53 100644 --- a/hwe/j_install.php +++ b/hwe/j_install.php @@ -28,7 +28,8 @@ $v->rule('required', [ 'fiction', 'extend', 'npcmode', - 'show_img_level' + 'show_img_level', + 'tournament_trig' ]); if(!$v->validate()){ Json::die([ @@ -44,173 +45,47 @@ $fiction = (int)$_POST['fiction']; $extend = (int)$_POST['extend']; $npcmode = (int)$_POST['npcmode']; $show_img_level = (int)$_POST['show_img_level']; +$tournament_trig = (int)$_POST['tournament_trig']; -if(120 % $turnterm != 0){ +$reserve_open = Util::getReq('reserve_open'); +if($reserve_open){ + $reserve_open = new \DateTime($reserve_open); + $db = DB::db(); + + $clearResult = ResetHelper::clearDB(); + if(!$clearResult['result']){ + Json::die($clearResult); + } + + $scenarioObj = new Scenario($scenario, true); + $db->delete('reserved_open', true); + $db->insert('reserved_open', [ + 'options'=>Json::encode([ + 'turnterm'=>$turnterm, + 'sync'=>$sync, + 'scenario'=>$scenario, + 'scenarioName'=>$scenarioObj->getTitle(), + 'fiction'=>$fiction, + 'extend'=>$extend, + 'npcmode'=>$npcmode, + 'show_img_level'=>$show_img_level, + 'tournament_trig'=>$tournament_trig + ]), + 'date'=>$reserve_open->format('Y-m-d H:i:s') + ]); Json::die([ - 'result'=>false, - 'reason'=>'turnterm은 120의 약수여야 합니다.' + 'result'=>true, + 'reason'=>'예약' ]); } -if(!file_exists(__dir__.'/logs') || !file_exists(__dir__.'/data')){ - if(!is_writable(__dir__)){ - Json::die([ - 'result'=>false, - 'reason'=>'logs, data 디렉토리를 생성할 권한이 없습니다.' - ]); - } - mkdir(__dir__.'/logs', 0644); - mkdir(__dir__.'/data', 0644); -} - -if(!is_writable(__dir__.'/logs')){ - Json::die([ - 'result'=>false, - 'reason'=>'logs 디렉토리의 쓰기 권한이 없습니다' - ]); -} - -if(!is_writable(__dir__.'/data')){ - Json::die([ - 'result'=>false, - 'reason'=>'data 디렉토리의 쓰기 권한이 없습니다' - ]); -} - -if(!is_writable(__dir__.'/d_setting')){ - Json::die([ - 'result'=>false, - 'reason'=>'d_setting 디렉토리의 쓰기 권한이 없습니다' - ]); -} - -if(!file_exists(__dir__.'/logs/.htaccess')){ - @file_put_contents(__dir__.'/logs/.htaccess', 'Deny from all'); -} - -if(!file_exists(__dir__.'/data/.htaccess')){ - @file_put_contents(__dir__.'/data/.htaccess', 'Deny from all'); -} - - -$db = DB::db(); -$mysqli_obj = $db->get(); - - -$scenarioObj = new Scenario($scenario, false); -$startyear = $scenarioObj->getYear()??GameConst::$defaultStartYear; - -FileUtil::delInDir("logs"); -FileUtil::delInDir("data"); - -$result = Util::generateFileUsingSimpleTemplate( - __DIR__.'/d_setting/UniqueConst.orig.php', - __DIR__.'/d_setting/UniqueConst.php',[ - 'serverID'=>DB::prefix().'_'.Util::randomStr(8) - ], true -); - -if($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/reset.sql'))){ - while(true){ - if (!$mysqli_obj->more_results()) { - break; - } - if(!$mysqli_obj->next_result()){ - break; - } - } - -} - -if($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/schema.sql'))){ - while(true){ - if (!$mysqli_obj->more_results()) { - break; - } - if(!$mysqli_obj->next_result()){ - break; - } - } -} - - -$db->insert('plock', [ - 'plock'=>1 -]); - -CityConst::build(); - - - - -$turntime = date('Y-m-d H:i:s'); -$time = substr($turntime, 11, 2); -if($sync == 0) { - // 현재 시간을 1월로 맞춤 - $starttime = cutTurn($turntime, $turnterm); - $month = 1; - $year = $startyear; -} else { - // 현재 시간과 동기화 - list($starttime, $yearPulled, $month) = cutDay($turntime, $turnterm); - if($yearPulled){ - $year = $startyear-1; - } - else{ - $year = $startyear; - } -} - -$killturn = 4800 / $turnterm; -if($npcmode == 1) { $killturn = intdiv($killturn, 3); } - -$env = [ - 'scenario'=>$scenario, - 'scenario_text'=>$scenarioObj->getTitle(), - 'startyear'=>$startyear, - 'year'=> $year, - 'month'=> $month, - 'msg'=>'공지사항',//TODO:공지사항 - 'maxgeneral'=>GameConst::$defaultMaxGeneral, - 'maxnation'=>GameConst::$defaultMaxNation, - 'conlimit'=>300, - 'gold_rate'=>100, - 'rice_rate'=>100, - 'turntime'=>$turntime, - 'starttime'=>$starttime, - 'turnterm'=>$turnterm, - 'killturn'=>$killturn, - 'genius'=>GameConst::$defaultMaxGenius, - 'show_img_level'=>$show_img_level, - 'npcmode'=>$npcmode, - 'extended_general'=>$extend, - 'fiction'=>$fiction -]; - -foreach(RootDB::db()->query('SELECT `no`, `name`, `picture`, `imgsvr` FROM member WHERE grade >= 5') as $admin){ - $db->insert('general', [ - 'owner'=>$admin['no'], - 'name'=>$admin['name'], - 'picture'=>$admin['picture'], - 'imgsvr'=>$admin['imgsvr'], - 'turntime'=>$turntime, - 'killturn'=>null - ]); -} - -$db->insert('game', $env); - -$scenarioObj->build($env); - -$db->update('plock', [ - 'plock'=>0 -], true); - -LogHistory(1); - -$prefix = DB::prefix(); -AppConf::getList()[$prefix]->closeServer(); - -Json::die([ - 'result'=>true -]); \ No newline at end of file +Json::die(ResetHelper::buildScenario( + $turnterm, + $sync, + $scenario, + $fiction, + $extend, + $npcmode, + $show_img_level, + $tournament_trig +)); \ No newline at end of file diff --git a/hwe/j_install_db.php b/hwe/j_install_db.php index e104c449..1aedad7f 100644 --- a/hwe/j_install_db.php +++ b/hwe/j_install_db.php @@ -93,6 +93,8 @@ if($result !== true){ ]); } +ResetHelper::clearDB(); + AppConf::getList()[$prefix]->closeServer(); Json::die([ diff --git a/hwe/j_msg_decide_opt.php b/hwe/j_msg_decide_opt.php index 466159de..d0e438ef 100644 --- a/hwe/j_msg_decide_opt.php +++ b/hwe/j_msg_decide_opt.php @@ -44,16 +44,16 @@ if($msg === null){ 'reason'=>'올바르지 않은 메시지' ]); } - +$reason = 'success'; if($msgResponse){ - $result = $msg->agreeMessage($general['no']); + $result = $msg->agreeMessage($general['no'], $reason); } else{ - $result = $msg->declineMessage($general['no']); + $result = $msg->declineMessage($general['no'], $reason); } Json::die([ 'result' => $result===DiplomaticMessage::ACCEPTED, - 'reason' => 'result' + 'reason' => $reason ]); \ No newline at end of file diff --git a/hwe/j_server_basic_info.php b/hwe/j_server_basic_info.php index 480978bb..6877b4fe 100644 --- a/hwe/j_server_basic_info.php +++ b/hwe/j_server_basic_info.php @@ -4,13 +4,48 @@ namespace sammo; include "lib.php"; $session = Session::requireLogin([ - 'game'=>'x', + 'game'=>null, 'me'=>null ])->setReadOnly(); $userID = Session::getUserID(); +if(!class_exists('\\sammo\\DB')){ + Json::die([ + 'game'=>null, + 'me'=>null + ]); +} + $db = DB::db(); +if(file_exists(__dir__.'/.htaccess')){ + $reserved = $db->queryFirstRow( + 'SELECT * FROM reserved_open ORDER BY `date` ASC LIMIT 1' + ); + if(!$reserved){ + Json::die([ + 'game'=>null, + 'me'=>null + ]); + } + + $options = Json::decode($reserved['options']); + + Json::die([ + 'reserved'=>[ + 'scenarioName'=>$options['scenarioName'], + 'turnterm'=>$options['turnterm'], + 'fictionMode'=>($options['fiction']?'가상':'사실'), + 'npcMode'=>($options['npcmode']?'가능':'불가'), + 'openDatetime'=>$reserved['date'] + ], + 'game'=>null, + 'me'=>null + ]); +} + +//TODO: 천통시에도 예약 오픈 알림이 필요..? + $game = $db->queryFirstRow('SELECT isUnited, npcMode, year, month, scenario, scenario_text, maxgeneral as maxUserCnt, turnTerm from game where `no`=1'); $nationCnt = $db->queryFirstField('SELECT count(`nation`) from nation where `level` > 0'); diff --git a/hwe/join.php b/hwe/join.php index 759c1373..3e291dbf 100644 --- a/hwe/join.php +++ b/hwe/join.php @@ -29,7 +29,7 @@ $connect=$db->get(); -장수생성 +<?=UniqueConst::$serverName?>: 장수생성 @@ -71,10 +71,10 @@ for ($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($nationresult); if ($nation['scoutmsg'] == "") { echo " - {$nation['name']}-"; + {$nation['name']}-"; } else { echo " - {$nation['name']}{$nation['scoutmsg']}"; + {$nation['name']}{$nation['scoutmsg']}"; } } ?> diff --git a/hwe/join_post.php b/hwe/join_post.php index 98e3e536..76c155bf 100644 --- a/hwe/join_post.php +++ b/hwe/join_post.php @@ -8,7 +8,6 @@ $v = new Validator($_POST + $_GET); $v ->rule('required', [ 'name', - 'pic', 'leader', 'power', 'intel' @@ -18,7 +17,6 @@ $v 'power', 'intel', 'character', - 'pic' ]) ->rule('lengthBetween', 'name', 1, 6) ->rule('min', [ @@ -46,7 +44,7 @@ $userID = Session::getUserID(); $name = Util::getReq('name'); $name = StringUtil::removeSpecialCharacter($name); -$pic = Util::getReq('pic', 'int', 0); +$pic = (int)Util::getReq('pic', 'bool', 0); $character = Util::getReq('character', 'int', 0); $leader = Util::getReq('leader', 'int', 50); @@ -59,7 +57,7 @@ extractMissingPostToGlobals(); $rootDB = RootDB::db(); //회원 테이블에서 정보확인 -$member = $rootDB->queryFirstRow('SELECT `no`, id, picture, grade, `name` FROM member WHERE no=%i', $userID); +$member = $rootDB->queryFirstRow('SELECT `no`, id, picture, grade, `name`, imgsvr FROM member WHERE no=%i', $userID); if (!$member) { MessageBox("잘못된 접근입니다!!!"); @@ -70,7 +68,7 @@ if (!$member) { $db = DB::db(); ########## 동일 정보 존재여부 확인. ########## -$admin = $db->queryFirstRow('SELECT year,month,maxgeneral,turnterm,genius,npcmode from game limit 1'); +$admin = $db->queryFirstRow('SELECT year,month,maxgeneral,scenario,show_img_level,turnterm,genius,npcmode from game limit 1'); $gencount = $db->queryFirstField('SELECT count(`no`) FROM general WHERE npc<2'); $oldGeneral = $db->queryFirstField('SELECT `no` FROM general WHERE `owner`=%i', $userID); $oldName = $db->queryFirstField('SELECT `no` FROM general WHERE `name`=%s', $name); diff --git a/hwe/js/install.js b/hwe/js/install.js index 6f76bf75..2e2e2719 100644 --- a/hwe/js/install.js +++ b/hwe/js/install.js @@ -113,6 +113,7 @@ function formSetup(){ extend:"required", npcmode:"required", show_img_level:"required", + tournament_trig:"required" }, errorElement: "div", errorPlacement: function ( error, element ) { @@ -149,7 +150,9 @@ function formSetup(){ fiction:$('#fiction input:radio:checked').val(), extend:$('#extend input:radio:checked').val(), npcmode:$('#npcmode input:radio:checked').val(), - show_img_level:$('#show_img_level input:radio:checked').val() + show_img_level:$('#show_img_level input:radio:checked').val(), + tournament_trig:$('#tournament_trig input:radio:checked').val(), + reserve_open:$('#reserve_open').val() } }).then(function(result){ var deferred = $.Deferred(); diff --git a/hwe/js/map.js b/hwe/js/map.js index 8cdc9d02..23ac1e9a 100644 --- a/hwe/js/map.js +++ b/hwe/js/map.js @@ -84,7 +84,7 @@ function reloadWorldMap(option){ else if(month <= 6){ $world_map.addClass('map_summer'); } - else if(month <= 6){ + else if(month <= 9){ $world_map.addClass('map_fall'); } else{ @@ -366,65 +366,8 @@ function reloadWorldMap(option){ var $map_body = $('.world_map .map_body'); - //터치스크린 탭 - - $objs.on('touchstart', function(e){ - var $this = $(this); - - var touchMode = $this.data('touchMode'); - if($tooltip_city.data('target') != $this.data('id')){ - $this.data('touchMode', 1); - } - else if(touchMode === undefined){ - $this.data('touchMode', 1); - } - else{ - $this.data('touchMode', touchMode + 1); - } - $map_body.data('touchMode', 1); - - $tooltip_city.data('target', $this.data('id')); - - - }); - - $objs.on('touchend', function(e){ - var $this = $(this); - var position = $this.parent().position(); - $tooltip_city.html($this.data('text')); - - var nation_text = $this.data('nation'); - if(nation_text){ - $tooltip_nation.html(nation_text).show(); - } - else{ - $tooltip_nation.html('').hide(); - } - - $tooltip.css({'top': position.top + 25, 'left': position.left + 35}).show(); - - var touchMode = $this.data('touchMode'); - if(touchMode <= 1){ - return false; - } - - //xxx: touchend 다음 click 이벤트가 갈 수도 있고, 안 갈 수도 있다. - $this.data('touchMode', 0); - }); - - $map_body.on('touchend',function(e){ - - //위의 touchend bind에 해당하지 않는 경우 -> 빈 지도 터치 - $tooltip.hide(); - }); - //Mouse over 모드 작동 - $map_body.on('mousemove', function(e){ - if($(this).data('touchMode')){ - return true; - } - var parentOffset = $map_body.offset(); var relX = e.pageX - parentOffset.left; var relY = e.pageY - parentOffset.top; @@ -433,10 +376,6 @@ function reloadWorldMap(option){ }); $objs.on('mouseenter', function(e){ - if($map_body.data('touchMode')){ - return true; - } - var $this = $(this); $tooltip_city.data('target', $this.data('id')); @@ -457,15 +396,7 @@ function reloadWorldMap(option){ }); $objs.on('click', function(e){ - //xxx: touchend 다음 click 이벤트가 갈 수도 있고, 안 갈 수도 있다. - var touchMode = $(this).data('touchMode'); - if(touchMode === undefined){ - return; - } - - if(touchMode === 1){ - return false; - } + return; }); diff --git a/hwe/js/msg.js b/hwe/js/msg.js index 93bd0c00..39dfd38f 100644 --- a/hwe/js/msg.js +++ b/hwe/js/msg.js @@ -42,7 +42,10 @@ function responseMessage(msgID, response){ }).then(refreshMsg); } -function refreshMsg(){ +function refreshMsg(result){ + if(result && !result.result){ + alert(result.reason); + } return redrawMsg(fetchMsg()); } @@ -59,8 +62,6 @@ function fetchMsg(){ } function redrawMsg(deferred){ - - console.log(deferred); function registerSequence(obj){ if(!obj.result){ @@ -216,7 +217,8 @@ function refreshMailboxList(obj){ generalList = {}; - //TODO:수뇌인 경우 각국에 대해 외교 국메를 넣을 수 있어야함. + + $.each(obj.nation, function(){ var nation = this; @@ -284,6 +286,25 @@ function refreshMailboxList(obj){ $favorite.append($lastContact); //TODO:운영자를 추가하는 코드도 넣을 것. + if(myGeneralLevel >= 5){ + $.each(obj.nation, function(){ + var nation = this; + //console.log(nation); + var $nation = $(''.format(nation.mailbox,nation.name)); + $nation.css('background-color', nation.color); + + if(isBrightColor(nation.color)){ + $nation.css('color', 'black'); + } + else{ + $nation.css('color', 'white'); + } + $favorite.append($nation); + }); + + } + + $mailboxList.prepend($favorite); if(!oldSelected){ @@ -307,6 +328,7 @@ function registerGlobal(basicInfo){ }; myGeneralID = basicInfo.generalID; isChief = basicInfo.isChief; + myGeneralLevel = basicInfo.generalLevel; } function activateMessageForm(){ diff --git a/hwe/lib.php b/hwe/lib.php index 06047ae1..5f82b4ad 100644 --- a/hwe/lib.php +++ b/hwe/lib.php @@ -26,7 +26,6 @@ include "MYDB.php"; // 각종 변수 define('STEP_LOG', true); define('PROCESS_LOG', true); -$_startTime = microtime(true); ob_start(); session_cache_limiter('nocache');//NOTE: 캐시가 가능하도록 설정해야 할 수도 있음. 주의! @@ -55,13 +54,6 @@ function MessageBox($str) echo ""; } -function PrintElapsedTime() -{ - global $_startTime; - $_endTime = round(microtime(true) - $_startTime, 3); - echo "
경과시간 : {$_endTime}초
"; -} - function LogText($prefix, $variable) { $text = sprintf('%s : %s'."\n", $prefix, var_export($variable, true)); diff --git a/hwe/preprocessing.php b/hwe/preprocessing.php index 3bc5ecb5..8f807e08 100644 --- a/hwe/preprocessing.php +++ b/hwe/preprocessing.php @@ -19,24 +19,10 @@ extractMissingPostToGlobals(); increaseRefresh("턴입력", 1); if(!$turn || $commandtype === null){ - header('location:./'); + header('location:commandlist.php'); die(); } -$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 no,name,nation,con from general where owner='{$userID}'"; -$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); -$me = MYDB_fetch_array($result); - -$con = checkLimit($me['con'], $admin['conlimit']); -if($con >= 2) { - header('location:./'); - exit(); - } - $count = count($turn); for($i=0; $i < $count; $i++) { if($turn[$i] == 100 || $turn[$i] == 99 || $turn[$i] == 98) { diff --git a/hwe/proc.php b/hwe/proc.php index b64ab090..008db50c 100644 --- a/hwe/proc.php +++ b/hwe/proc.php @@ -4,8 +4,10 @@ namespace sammo; include "lib.php"; include "func.php"; +$session = Session::getInstance()->setReadOnly(); + $db = DB::db(); $connect=$db->get(); -increaseRefresh("자동", 2); +//increaseRefresh("자동", 2); checkTurn(); diff --git a/hwe/process_war.php b/hwe/process_war.php index 41d84416..f47e0e9b 100644 --- a/hwe/process_war.php +++ b/hwe/process_war.php @@ -1159,7 +1159,7 @@ function processWar($general, $city) { } //회피 $ratio = rand() % 100; // 0 ~ 99 - $ratio2 = GameUnitConst::byID($oppose['crewtype'])->defence; //회피율 + $ratio2 = GameUnitConst::byID($oppose['crewtype'])->avoid; //회피율 $ratio2 = Util::round($ratio2 * $oppose['train'] / 100); //훈련 반영 // 특기보정 : 돌격, 궁병 if($general['special2'] == 60) { $ratio2 -= 100; } diff --git a/hwe/processing.php b/hwe/processing.php index 8533a760..c2ed4bc1 100644 --- a/hwe/processing.php +++ b/hwe/processing.php @@ -58,7 +58,7 @@ switch($commandtype) { case 17: command_Single($turn, 17); break; //소집해제 case 21: command_21( $turn, 21); break; //이동 - //case 22: command_22( $turn, 22); break; //등용 //TODO:등용장 재 디자인 + case 22: command_22( $turn, 22); break; //등용 //TODO:등용장 재 디자인 case 23: command_23( $turn, 23); break; //포상 case 24: command_24( $turn, 24); break; //몰수 case 25: command_25( $turn, 25); break; //임관 @@ -166,11 +166,7 @@ function ender($type=0) { echo banner(); echo " -"; - - PrintElapsedTime(); - - echo " + "; @@ -594,7 +590,7 @@ function calc(cost, formnum) {
00명
- + "; @@ -860,7 +856,10 @@ function command_23($turn, $command) { + + + @@ -935,7 +934,10 @@ function command_24($turn, $command) { + + + @@ -1448,7 +1450,10 @@ function command_43($turn, $command) { + + + @@ -1496,7 +1501,10 @@ function command_44($turn, $command) { + + + @@ -1540,7 +1548,7 @@ function command_46($turn, $command) { continue; } - if(isset($nationcolor[$nation['color']])){ + if(!isset($nationcolor[$nation['color']])){ $nationcolor[$nation['color']] = 1; } else{ @@ -1720,7 +1728,10 @@ function command_49($turn, $command) { + + + @@ -1774,7 +1785,7 @@ function command_51($turn, $command) { for($i=1; $i <= $count; $i++) { $nation = MYDB_fetch_array($result); - if($myNation['power'] / $nation['power'] <= 3 || !isClose($me['nation'], $nation['nation'])) { + if($myNation['power'] <= $nation['power'] * 3 || !isClose($me['nation'], $nation['nation'])) { echo ""; } else { echo ""; @@ -2758,13 +2769,8 @@ function command_81($turn, $command) { if($nation['level'] <= 0){ continue; } - - if(isset($nationcolor[$nation['color']])){ - $nationcolor[$nation['color']] = 1; - } - else{ - $nationcolor[$nation['color']]++; - } + + $colorUsed[$nation['color']]+=1; } $colorUsedCnt = 0; @@ -2787,7 +2793,7 @@ function command_81($turn, $command) { 색깔 : + name="username" id="username" autofocus="autofocus" placeholder="계정명"/>
@@ -132,7 +137,7 @@ function postOAuthResult(result){
-
+
@@ -152,5 +157,8 @@ function postOAuthResult(result){
+
+
개인정보처리방침 & 이용약관
© 2018 • HideD +
diff --git a/j_updateServer.php b/j_updateServer.php index 8d187a02..5d483b09 100644 --- a/j_updateServer.php +++ b/j_updateServer.php @@ -19,7 +19,7 @@ function getVersion($target=null){ } $session = Session::requireLogin(null)->setReadOnly(); -if($session->userGrade < 6){ +if($session->userGrade < 5){ Json::die([ 'result'=>false, 'reason'=>'권한이 충분하지 않습니다' @@ -28,12 +28,13 @@ if($session->userGrade < 6){ $request = $_POST + $_GET; +$rootDB = RootDB::db(); $tmpFile = 'd_log/arc.zip'; $v = new Validator($request); + $v->rule('required', [ - 'server', - 'target' + 'server' ])->rule('regex', 'target', '/^[0-9a-zA-Z^{}\\/\-_,.@]+$/'); if(!$v->validate()){ @@ -43,8 +44,26 @@ if(!$v->validate()){ ]); } +$target = Util::getReq('target'); + $server = basename($request['server']); -$target = $request['target']; +if($session->userGrade <= 5 || !$target){ + $target = Json::decode($rootDB->queryFirstField('SELECT `key`=%s FROM `config`', "git_path_$server")); + if($target){ + $target = $target[0]; + } +} +else{ + $target = $request['target']; +} + +if(!$target){ + Json::die([ + 'result'=>false, + 'reason'=>'git -ish target이 제대로 지정되지 않았습니다.' + ]); +} + $baseServerName = Util::array_last_key(AppConf::getList()); @@ -78,12 +97,12 @@ if(!file_exists($server)){ 'reason'=>$server.' 디렉토리가 없지만 생성할 권한이 없습니다.' ]); } - mkdir($server, 0644); + mkdir($server, 0755); } if($server == $baseServerName){ - exec("git pull 2>&1", $output); + exec("git pull -q 2>&1", $output); if($output && $output[0] != 'Already up-to-date.'){ Json::die([ 'result'=>false, @@ -99,8 +118,6 @@ if($server == $baseServerName){ ], true ); - AppConf::getList()[$server]->closeServer(); - Json::die([ 'server'=>$server, 'result'=>true, @@ -109,13 +126,6 @@ if($server == $baseServerName){ } -exec("git fetch 2>&1", $output); -if($output){ - Json::die([ - 'result'=>false, - 'reason'=>'git fetch 작업 : '.join(', ', $output) - ]); -} $command = sprintf('git archive --format=zip -o %s %s', escapeshellarg($tmpFile), escapeshellarg($targetDir)); exec("$command 2>&1", $output); if($output){ @@ -143,7 +153,7 @@ if(!$zip->extractTo($server)){ $zip->close(); @unlink($tmpFile); -$version = getVersion(); +$version = getVersion($target); $result = Util::generateFileUsingSimpleTemplate( __DIR__.'/'.$server.'/d_setting/VersionGit.orig.php', __DIR__.'/'.$server.'/d_setting/VersionGit.php',[ @@ -151,8 +161,12 @@ $result = Util::generateFileUsingSimpleTemplate( ], true ); +$rootDB->insertUpdate('config', [ + "key" => "git_path_$server", + "value" =>Json::encode([$target, $version]) +]); -AppConf::getList()[$server]->closeServer(); +//AppConf::getList()[$server]->closeServer(); Json::die([ 'server'=>$server, diff --git a/js/admin_server.js b/js/admin_server.js index 459aa279..e8ab64cc 100644 --- a/js/admin_server.js +++ b/js/admin_server.js @@ -20,7 +20,7 @@ function serverUpdate(caller){ var server = $tr.data('server_name'); var isRoot = $tr.data('is_root'); - var target = 'master'; + var target = 'origin/master'; if(typeof isRoot !== 'boolean'){ isRoot = (isRoot != 'false'); diff --git a/js/entrance.js b/js/entrance.js index 93b47a18..6b1c734e 100644 --- a/js/entrance.js +++ b/js/entrance.js @@ -42,6 +42,14 @@ var serverLoginTemplate = "\ \ "; + +var serverReservedTemplate = "\ +\ +- 오픈 일시 : <%openDatetime%> -
\ +<%scenarioName%> <%turnterm%>분 턴 서버
\ +(상성 설정:<%fictionMode%>), (빙의 여부:<%npcMode%>)\ +"; + $(function(){ $("#btn_logout").click(Entrance_Logout); Entrance_UpdateServer(); @@ -64,7 +72,7 @@ function Entrance_drawServerList(serverInfos){ $.each(serverInfos, function(idx, serverInfo){ var $serverHtml = $(TemplateEngine(serverListTemplate, serverInfo)); $serverList.append($serverHtml); - if(!serverInfo.enable){ + if(!serverInfo.exists){ return true; } @@ -72,6 +80,14 @@ function Entrance_drawServerList(serverInfos){ $.getJSON("../"+serverInfo.name+'/j_server_basic_info.php',{}, function(result){ + if(result.reserved){ + $serverHtml.find('.server_down').detach(); + $serverHtml.append( + TemplateEngine(serverReservedTemplate, result.reserved) + ); + return; + } + if(!result.game){ return; } diff --git a/js/join.js b/js/join.js index 6e886a74..4d50dc4d 100644 --- a/js/join.js +++ b/js/join.js @@ -41,7 +41,8 @@ $(document).ready( function () { dataType: 'json' } }, - secret_agree: "required" + secret_agree: "required", + secret_agree2: "required" }, messages: { username: { @@ -62,7 +63,8 @@ $(document).ready( function () { required: "닉네임을 입력해주세요", maxlength: '닉네임은 {0}자를 넘을 수 없습니다' }, - secret_agree: "동의해야만 가입하실 수 있습니다." + secret_agree: "동의해야만 가입하실 수 있습니다.", + secret_agree2: "동의해야만 가입하실 수 있습니다." }, errorElement: "div", errorPlacement: function ( error, element ) { @@ -96,7 +98,9 @@ $(document).ready( function () { url:'j_join_process.php', dataType:'json', data:{ - 'secret_agree':$('#secret_agree').val(), + 'secret_agree':$('#secret_agree').prop("checked"), + 'secret_agree2':$('#secret_agree2').prop("checked"), + 'third_use':$('#third_use').prop("checked"), 'username':$('#username').val(), 'password':hash_pw, 'nickname':$('#nickname').val(), @@ -120,7 +124,11 @@ $(document).ready( function () { $(function($){ - $.get('terms.html').then(function(txt){ - $('#terms').html(txt); + $.get('terms.1.html').then(function(txt){ + $('#terms1').html(txt); + }); + + $.get('terms.2.html').then(function(txt){ + $('#terms2').html(txt); }); }); \ No newline at end of file diff --git a/js/user_info.js b/js/user_info.js index a3119784..f825f1df 100644 --- a/js/user_info.js +++ b/js/user_info.js @@ -14,6 +14,11 @@ function fillUserInfo(result){ $('#slot_grade').html(result.grade); $('#slot_icon').attr('src', result.picture); $('#global_salt').val(result.global_salt); + $('#slot_join_date').html(result.join_date); + $('#slot_third_use').html(result.third_use?'○':'×'); + if(result.third_use){ + $('#third_use_disallow').show(); + } } function changeIconPreview(){ @@ -66,6 +71,20 @@ function deleteIcon(){ }); } +function disallowThirdUse(){ + $.ajax({ + type:'post', + url:'j_disallow_third_use.php', + dataType:'json' + }).then(function(result){ + alert('철회했습니다.'); + location.reload(); + },function(){ + alert('알 수 없는 이유로 철회를 실패했습니다.'); + location.reload(); + }); +} + function changeIcon(e){ e.preventDefault(); var $icon = $('#image_upload'); @@ -219,6 +238,12 @@ $(function(){ return false; }); + $('#third_use_disallow').click(function(){ + if(confirm('개인정보 3자 제공 동의를 철회할까요?')){ + disallowThirdUse(); + } + }); + $('#change_pw_form').submit(changePassword); $('#change_icon_form').submit(changeIcon); diff --git a/oauth_kakao/index.php b/oauth_kakao/index.php index 09ca64ef..0f5226fe 100644 --- a/oauth_kakao/index.php +++ b/oauth_kakao/index.php @@ -1,6 +1,8 @@ diff --git a/oauth_kakao/j_change_pw.php b/oauth_kakao/j_change_pw.php index 8d7c5155..aa950fd8 100644 --- a/oauth_kakao/j_change_pw.php +++ b/oauth_kakao/j_change_pw.php @@ -74,8 +74,8 @@ $sendResult = $restAPI->talk_to_me_default([ "object_type"=> "text", "text"=> "임시 비밀번호는 $newPassword 입니다. 로그인 후 바로 다른 비밀번호로 변경해주세요.", "link"=> [ - "web_url"=> RootDB::getServerBasepath(), - "mobile_web_url" => RootDB::getServerBasepath() + "web_url"=> ServConfig::getServerBasepath(), + "mobile_web_url" => ServConfig::getServerBasepath() ], "button_title"=> "로그인 페이지 열기" ]); diff --git a/oauth_kakao/j_join_process.php b/oauth_kakao/j_join_process.php index c4c37985..da51e1e7 100644 --- a/oauth_kakao/j_join_process.php +++ b/oauth_kakao/j_join_process.php @@ -18,10 +18,10 @@ if($canJoin != 'Y'){ $nowDate = TimeUtil::DatetimeNow(); -$access_token = Util::array_get($session->access_token); -$expires = Util::array_get($session->expires); -$refresh_token = Util::array_get($session->refresh_token); -$refresh_token_expires = Util::array_get($session->refresh_token_expires); +$access_token = $session->access_token; +$expires = $session->expires; +$refresh_token = $session->refresh_token; +$refresh_token_expires = $session->refresh_token_expires; if(!$access_token){ Json::die([ 'result'=>false, @@ -36,6 +36,8 @@ if($expires < $nowDate && (!$refresh_token || ($refresh_token_expires < $nowDate ]); } $secret_agree = Util::getReq('secret_agree', 'bool'); +$secret_agree2 = Util::getReq('secret_agree2', 'bool'); +$third_use = Util::getReq('third_use', 'bool'); $username = mb_strtolower(Util::getReq('username'), 'utf-8'); $password = Util::getReq('password'); $nickname = Util::getReq('nickname'); @@ -63,6 +65,13 @@ if(!$secret_agree){ ]); } +if(!$secret_agree2){ + Json::die([ + 'result'=>false, + 'reason'=>'개인정보 제공 및 이용에 대해 동의해야 가입하실 수 있습니다.' + ]); +} + $usernameChk = checkUsernameDup($username); if($usernameChk !== true){ Json::die([ @@ -149,6 +158,7 @@ RootDB::db()->insert('member',[ 'oauth_type' => 'KAKAO', 'id' => $username, 'email' => $email, + 'third_use'=> $third_use, 'pw' => $finalPassword, 'salt' => $userSalt, 'name'=>$nickname, diff --git a/oauth_kakao/join.php b/oauth_kakao/join.php index 48c1403b..08d988f6 100644 --- a/oauth_kakao/join.php +++ b/oauth_kakao/join.php @@ -39,7 +39,7 @@ if($canJoin != 'Y'){

삼국지 모의전투 HiDCHe

-
+

회원가입 @@ -80,10 +80,10 @@ if($canJoin != 'Y'){

- +
-
+
@@ -97,6 +97,34 @@ if($canJoin != 'Y'){
+
+ +
+
+
+ +
+
+
+ + +
+ 동의해야만 가입하실 수 있습니다. +
+
+
+
+ +
+ +
+
+ + +
+
+
+
diff --git a/oauth_kakao/kakao_login_join.png b/oauth_kakao/kakao_login_join.png new file mode 100644 index 00000000..a172590e Binary files /dev/null and b/oauth_kakao/kakao_login_join.png differ diff --git a/oauth_kakao/kakao_login_join_ov.png b/oauth_kakao/kakao_login_join_ov.png new file mode 100644 index 00000000..aca78b73 Binary files /dev/null and b/oauth_kakao/kakao_login_join_ov.png differ diff --git a/oauth_kakao/oauth.php b/oauth_kakao/oauth.php index 7ffe10a9..5ddccb65 100644 --- a/oauth_kakao/oauth.php +++ b/oauth_kakao/oauth.php @@ -27,7 +27,7 @@ $result = $restAPI->create_access_token($auth_code); if (Util::array_get($result['expires_in'], -1) <= 0) { - die('알 수 없는 에러:'.$me['msg']); + die('알 수 없는 에러:'.Util::array_get($result['msg'], '')); } $session = Session::getInstance(); @@ -48,7 +48,7 @@ $oauth_mode = 'login'; $me['code'] = Util::array_get($me['code'], 0); if($me['code']< 0){ - switch($me['msg']){ + switch(Util::array_get($me['msg'])){ case 'NotRegisteredUserException': $oauth_mode = 'join'; break; diff --git a/oauth_kakao/terms.1.html b/oauth_kakao/terms.1.html new file mode 100644 index 00000000..74cfb242 --- /dev/null +++ b/oauth_kakao/terms.1.html @@ -0,0 +1,143 @@ +
+    HiDCHe서버 이용 약관
+
+    제1조 (목적)
+    이 약관은 HiDCHe서버 서비스 제공자(이하 “서비스 제공자”)가 제공하는 삼국지 모의전투 서비스와 관련하여 서비스 제공자와 이용자의 권리, 의무, 책임사항 및 기타 필요 사항을 규정함을 그 목적으로 한다. 
+    
+    제2조 (정의)
+    이 약관에서 사용하는 용어의 정의는 다음과 같다. 
+      1. “서비스”라 함은 디스플레이가 구현되는 단말 장치(PC, 휴대폰, TV 등 각종 유무선 장치를 포함하나 이에 제한되지 아니한)에서 제공되는 삼국지 모의전투 서비스 및 관련 제반 서비스를 의미한다. 
+      2. “이용자”라 함은 서비스에 접속하여 본 약관에 따라 서비스 제공자와 이용계약을 체결하고 서비스 이용자가 제공하는 서비스를 이용하는 자를 의미한다. 
+      3. “아이디”라 함은 이용자의 식별과 서비스 이용을 위하여 사용자가 정한 일련의 문자(한글, 영문, 숫자 등) 조합을 의미한다. 
+      4. “비밀번호” 또는 “패스워드”란 아이디와 1:1로 매칭되어 이용자가 해당 아이디와 일치되는 이용자임을 확인하고 보호하는 이용자 본인이 지정한 일련의 문자 조합을 의미한다. 
+      5. “게시물”이라 함은 이용자가 서비스를 이용함에 있어서 서비스 상에 게시한 문자, 문서, 그림, 영상 등 시청각적 요소를 의미한다. 
+      6. “운영자”란 서비스 제공자 및 서비스 제공자에 의하여 권한을 위임받은 자로써, 안정적이고 쾌적한 서비스 제공을 위하여 노력 할 의무를 가지는 자를 의미한다. 
+      7. 본 약관에서 정의하지 않은 용어는 서비스 세부 지침(약관) 내지는 관계 법령 등에서 정하는 바에 따르며, 이에 정하지 아니한 것은 사회적 통념상 따르는 관습에 따라 해석한다. 단, 이용자 간의 분쟁에서 명확하게 해석되지 아니하는 용어 및 관습은 운영자 과반 이상의 동의에 따라 해석한다. 
+    
+    제3조(약관의 개정)
+    ⓵ 서비스 제공자는 “약관의 규제에 관한 법률” 및 “정보통신망 이용촉진 및 정보보호 등에 관한 법률” 등 현행법을 위배하지 않는 범위 내에서 본 약관을 개정할 수 있다. 
+    ⓶ 서비스 제공자가 본 약관을 개정할 경우, 적용일자 및 개정 사유를 명시하여 최소 적용일자 30일 전부터 적용일자 전 까지 게시 할 의무를 가진다. 단, 이용자에게 현저하게 불리하게 개정되는 경우 개정의 게시 이외에 전자우편 등의 전자적 수단을 이용하여 별도로 통지 할 의무를 가진다. 
+    ⓷ 이용자는 30일 기간 내에 서비스 탈퇴 및 기타 전자적 수단을 통한 명시적 거부의 의사표시를 하지 아니한 경우, 이용자는 개정된 약관에 동의를 한 것으로 간주한다. 
+    ⓸ 이용자가 개정된 약관에 동의하지 않는 경우, 서비스 제공자는 개정 약관을 해당 이용자에게 적용할 수 없으며, 기존 약관을 적용하기 현저하게 곤란한 사정이 있거나 적용할 수 없는 특별한 사정이 있는 경우, 서비스 제공자는 이용계약을 해지할 수 있다. 
+    
+    제4조(약관의 게시)
+    ⓵ 서비스 제공자는 본 약관을 내용을 이용자들이 쉽게 알 수 있도록 제공 할 의무가 있으며, 이용자는 본 약관을 언제든지 열람 할 권리를 가진다. 
+    ⓶ 약관은 서비스 초기 화면을 통하여 접근할 수 있으며, 서비스 초기 화면에서 제공되는 약관 이외의 약관의 내용은 효력이 없다. 
+    
+    제5조(이용계약의 체결)
+    ⓵ 이용계약은 이용자가 되고자 하는 자(이하 “가입희망자”)가 약관에 대하여 동의를 한 다음 회원가입 신청을 하고, 서비스 제공자가 승낙함으로써 체결된다. 
+    ⓶ 서비스 제공자는 원칙적으로 가입희망자가 적법하게 한 회원가입에 대해서는 승낙한다. 다만, 서비스 제공자는 아래 각 호에 해당하는 신청에 대하여서는 승낙을 거부하거나, 사후 거부 사유가 발견되는 경우 이용계약을 해지할 수 있다. 
+      1. 실명이 아니거나 타인의 명의를 도용하여 가입한 경우
+      2. 14세 미만 아동이 법정대리인의 동의를 얻지 아니한 경우
+      3. 허위 정보 또는 서비스 제공자를 기망하고자 하는 의도를 가지고 서비스 제공자가 제시하는 내용을 기재하지 않은 경우
+      4. 본 약관에서 규정한 제반 사항을 위반한 자로써, 서비스 제공자에 의하여 가입희망자가 그 이용 권한을 영구적으로 박탈당한 경우
+      5. 기타 운영자 과반 이상의 판단에 따라 가입희망자를 승인함으로써 원활한 서비스 제공을 하는데 문제가 있을 것으로 판단되는 사유가 있는 경우
+    ⓷ 이용계약은 서비스 제공자가 회원가입완료를 표시 한 시점으로 한다. 
+    ⓸ 서비스 제공자는 “청소년보호법” 등 기타 법령에 따라 등급 및 연령 준수를 위하여 이용제한이나 등급별 제한을 할 수 있다. 
+    
+    제6조(회원정보)
+    ⓵ 회원정보란 서비스 이용자 개인이 서비스 제공자에게 제공한 이용자의 정보로, 개인정보를 포함하는 정보이다. 
+    ⓶ 이용자는 개인정보 관리 화면을 통하여 언제든지 본인의 정보를 열람하고 수정할 수 있다. 단, 원활한 서비스 관리를 위하여 아이디, 생년월일 등은 수정을 제한할 수 있다. 
+    ⓷ 이용자는 본인의 회원정보를 관리 할 의무를 가지며, 변경이 발생하는 경우 지체없이 서비스 제공자에게 온라인 수정 등을 통하여 통보 하여야 한다. 
+    ⓸ 제3항의 의무를 태만하게 하여 발생한 불이익에 대하여 서비스 제공자는 책임지지 않는다. 
+    
+    제7조(개인정보보호의 의무)
+    ⓵ 서비스 제공자는 “정보통신망법” 등 관계 법령에 정하는 바에 따라 이용자의 개인정보를 보호 할 의무를 가진다.
+    
+    제8조(이용자의 아이디 및 비밀번호 관리 의무)
+    ⓵ 서버에 저장된 개인정보 이외의 개인정보(아이디 및 비밀번호를 포함한다)에 대한 관리책임은 이용자에게 있다. 
+    ⓶ 서비스 제공자 및 운영자는 공공의 질서 및 선량한 사회 풍속을 해칠 염려가 있는 아이디, 또는 운영자로 오인할 염려가 큰 아이디에 대해서 이용을 제한할 수 있다. 
+    제9조(서비스 제공자의 의무)
+    ⓵ 서비스 제공자는 관련 법령과 본 약관이 금지하는 행위, 또는 사회질서 및 선량한 풍속을 해칠 염려가 있는 행위를 하지 않으며, 계속적이고 안정적으로 서비스를 제공하기 위하여 최선의 노력을 다 할 의무를 가진다. 
+    ⓶ 서비스 제공자는 이용자가 안전하게 서비스를 이용할 수 있도록 개인정보를 취급하는데 있어서 적합한 관리를 해야 하며, 개인정보 제공 및 이용에 대한 방침을 공시하고 준주 할 의무를 가진다. 
+    ⓷ 서비스 제공자는 서비스 이용과 관련하여 발생하는 이용자의 불만, 불편, 피해구제요청 및 이용자간의 분쟁을 적절하게 처리 할 수 있도록 필요한 인력 및 시스템을 마련하여야 할 의무를 가진다. 
+    ⓸ 서비스 제공자는 서비스 이용과 관련하여 이용자로부터 제기된 의견이 정당하다고 인정되는 경우 이를 가능한 조속히 처리 할 의무를 가지며, 처리 과정 및 결과를 통보 할 의무를 가진다. 
+    ⓹ 서비스 제공자는 상기 의무를 수행함에 있어서 적합하다고 판단되는 자를 운영자로 선임할 수 있으며, 원활한 서비스 제공을 위하여 적합한 수의 운영자를 선임 할 의무를 가진다. 
+    
+    제10조(이용자의 의무)
+    ⓵ 이용자는 원활한 서비스를 위하여 다음과 각 호의 행위를 해서는 안 된다. 
+      1. 신청 또는 변경 시 허위 정보를 등록하는 행위
+      2. 타인의 정보를 도용하는 행위
+      3. 서비스 제공자의 저작권 등의 산업지식재산권의 침해 행위
+      4. 서비스 제공자의 업무를 방해하는 행위
+      5. 기타 선량한 공공의 질서를 어지럽히는 행위
+      6. 기타 불법적이거나 부당한 행위
+      7. 의도적으로 서비스 이용자들 간의 불화를 일으키는 행위
+      8. 서비스 제공자 및 운영자 과반 이상의 동의에 따라 원활한 서비스 제공을 하는데 곤란한 사유를 발생시키는 행위
+    ⓶ 이용자는 본 약관 및 관련 법령, 서비스 제공자 및 운영자에 의하여 게시된 공지사항 및 통지사항 등을 준수 할 의무를 가진다. 
+    
+    제11조(서비스의 제공)
+    ⓵ 서비스 제공자는 다음 각 호의 서비스를 이용자에게 제공한다. 
+      1. 삼국지 모의전투
+      2. 게시판 커뮤니티
+      3. 삼국지 모의전투 내 채팅
+      4. 기타 서비스 제공자가 추가 개발하거나 제휴/라이센싱 등을 통해 이용자에게 제공하는 서비스
+    ⓶ 서비스 제공자는 서비스 이용가능시간을 별도로 지정할 수 있으며, 해당 시간은 사전에 공지되어야한다. 
+    ⓷ 서비스는 연중무휴, 1일 24시간 제공함을 원칙으로 한다. 
+    ⓸ 서비스 제공자는 서비스 기능개선, 컴퓨터 등 정보통신장비의 유지보수, 점검, 고장, 통신두절, 천재지변 등 운영상 상당한 이유가 있는 경우 서비스의 제공을 일시적으로 중단할 수 있다. 이 경우, 서비스 제공자는 사전에 전자우편, 공지사항 등 적합한 방법으로 이용자들에게 고지 할 의무가 있다. 단, 서비스 제공자가 사전에 통지할 수 없는 부득이한 사유가 있는 경우 그렇지 않다. 
+    
+    제12조(계약해제, 해지 등)
+    ⓵ 이용자는 언제든지 “회원탈퇴”기능을 통하여 이용계약 해지신청을 할 수 있으며, 서비스 제공자는 관련 법령이 정하는 바에 따라 지체 없이 처리하여야 한다. 
+    ⓶ 이용자가 이용계약을 해지할 경우, 개인정보처리방침에 따라 회사가 이용자의 정보를 보유하는 경우를 제외하고는 지체 없이 모든 데이터를 삭제하여야 한다. 
+    ⓷ 이용자가 이용계약을 해지하는 경우, 이용자가 작성한 게시물 중 본인만 조회 가능한 게시물 일체는 삭제된다. 단, 타인에 의하여 스크랩 되거나, 공용게시판, 타인의 쪽지함 등록된 게시물 등 타인에게 노출되는 게시물 등은 삭제되지 않을 수 있다. 
+    ⓸ 이용자가 이용계약을 해제하는 경우, 서비스 제공자는 일정 기간 내 동일한 정보로 회원 가입을 제한할 수 있다. 
+    
+    제13조(이용제한)
+    ⓵ 서비스 제공자는 이용자가 본 약관의 의무를 위반하거나, 서비스의 정상적인 운영을 방해하는 경우 그 경중 및 반복횟수에 따라 경고, 일시정지, 영구정지 등 단계적으로 서비스의 이용을 제한할 수 있다. 
+    ⓶ 서비스 제공자는 제1조에도 불구하고, 아래 각 호의 위반이 발견되는 경우 즉시 영구이용정지를 할 수 있으며, 본 항에 따른 이용정지 시 발생하는 손해에 대해서 서비스 제공자는 책임을 지지 않는다. 
+      1. 정보통신망법 소정의 불법통신, 해킹, 악성프로그램 배포 등 보안에 중대한 위협을 주는 행위
+      2. 주민등록법 소정의 명의도용을 하는 행위
+      3. 저작권법 소정의 불법프로그램의 제공/배포 및 운영방해 행위
+      4. 기타 서비스 제공에 중대한 지장을 주는 것으로 운영자 과반 이상의 동의를 받는 행위
+    
+    제14조(이용제한에 대한 이의신청)
+    ⓵ 이용자는 제13조에 따른 이용제한이 부당하다고 생각되는 경우, 이를 통보받은 날로부터 5일 이내에 서비스 제공자의 이용제한에 대한 불복사유를 기재한 이의신청서를 게시글 또는 전자우편, 혹은 이에 준하는 방법으로 서비스 제공자에게 제출하여야 한다. 
+    ⓶ 제1항의 이의신청서를 접수한 서비스 제공자는 지체 없이 이용자에게 접수에 대한 통보를 하여야 하며, 접수 한 날로부터 5일 이내에 불복 사유에 대하여 게시글에 대한 답글, 전자우편, 또는 이에 준하는 방법으로 답변하여야 한다. 단, 5일 이내에 답변이 현저하게 곤란한 경우 그 사유와 처리예정일정을 통보하여야 한다. 
+    ⓷ 서비스 제공자는 제2항의 답변에 따라 상응하는 조치를 즉시 취하여야 한다. 
+    
+    제15조(서비스 제공자의 책임제한)
+    ⓵ 서비스 제공자는 천재지변, 또는 이에 준하는 불가항력으로 인하여 서비스를 제공할 수 없는 경우 서비스 제공에 대한 책임이 면제된다. 
+    ⓶ 서비스 제공자는 이용자의 귀책사유로 인한 서비스 이용 장애에 대하여서는 책임지지 않는다. 
+    ⓷ 서비스 제공자는 회원이 서비스와 관련하여 게재한 정보에 대해서 그 신뢰성과 정확성에 대해서 책임지지 않으며, 이를 정정 할 의무를 가지지 않는다. 
+    ⓸ 서비스 제공자는 이용자 간 서비스의 내용을 매개로 하여 서비스 제공자가 원본 데이터에 접근할 수 없는 방법으로 거래 등 이에 준하는 행위를 한 경우 그 내용에 대해서 책임지지 않는다. 
+    ⓹ 서비스 제공자는 무료로 제공되는 서비스 이용과 관련하여 관련 법령에 특별한 규정이 없는 한 책임지지 않는다. 
+    ⓺ 서비스 제공자는 기간통신 사업자가 전기통신서비스를 중지하거나, 정상적으로 제공하지 아니하여 이용자에게 유·무형적 손해가 발생한 경우, 서비스 제공자에게 고의 또는 중대한 과실이 없는 한 책임지지 않는다. 
+    ⓻ 서비스 제공자는 사전에 공지된 서비스 중단으로 인하여 장애가 발생한 경우 서비스 제공자의 고의 또는 중대한 과실이 없는 한 책임지지 않는다. 
+    ⓼ 서비스 제공자는 이용자의 서비스 이용 환경(네트워크, PC설정 등)으로 인하여 발생하는 문제에 대해서 책임지지 않는다. 
+    
+    제16조(분쟁조정)
+    ⓵ 서비스 제공자는 서비스 내의 이용자 간의 분쟁에 대해서는 개입하지 않고, 이용자간의 합의를 수용하는 것을 원칙으로 한다. 
+    ⓶ 제1항에도 불구하고, 아래 각 호의 경우에 대해서 서비스 제공자는 이용자 간의 분쟁 조정을 위하여 개입할 수 있다. 
+      1. 분쟁 양 당사자 간의 합의가 이루어지지 않아 양 당사자 모두 서비스 제공자에게 게시물, 전자우편 또는 이에 준하는 방법으로 분쟁조정을 요청하는 경우
+      2. 본 약관 또는 관련 법령을 분쟁 당사자중 일방 또는 양방이 위배하는 경우
+      3. 분쟁이 합리적인 시간 이상 지속되어 원활한 서비스를 방해한다고 판단되는 경우
+      4. 기타 원활하고 쾌적한 서비스를 제공하는데 문제가 될 소지가 있다고 판단되는 경우
+    ⓷ 제2항의 분쟁조정자는 서비스 제공자가 판단하는 경중에 따라서 선임된 1인의 운영자 혹은 운영자 전원합의체에 의하여 분쟁조정을 개시한다. 이 때, 분쟁조정의 결과는 분쟁조정 개시로부터 5일 이내에 게시물에 대한 답글, 공지사항, 전자우편 또는 이에 준하는 공개적인 방법으로 게시되어야 한다. 
+    ⓸ 분쟁조정의 판단 결과는 오직 재심청구에 의해서만 번복될 수 있다. 단, 운영자 전원합의체에서 판단된 분쟁조정은 재심청구 할 수 없다. 
+    ⓹ 분쟁의 당사자는 운영자 1인 이상에게 제척사유가 있다고 판단되는 경우 제2항 제1호 소정의 분쟁조정 신청 시 서비스 제공자에게 제척신청을 하여야 한다. 
+    
+    제17조(분쟁조정 재심청구)
+    ⓵ 이용자는 제16조 소정의 분쟁조정에서 운영자 1인의 분쟁조정이 불합리하거나, 문제가 있다고 판단되는 경우 게시물, 전자우편, 또는 이에 준하는 방법으로 서비스 제공자에게 재심청구를 할 수 있다. 
+    ⓶ 제1항 소정의 재심청구 시, 서비스 제공자는 반드시 운영자 전원합의체를 구성하여야 하며, 3일 이내에 재심에 대한 결과를 이용자에게 통보하여야 한다. 이 때, 분쟁조정에 참여한 운영자 1인은 중대한 문제가 있다고 판단되지 않는 이상 제척대상이 아니다. 
+    ⓷ 재심청구에 대한 판단 결과의 게시는 분쟁조정의 게시를 준용한다. 
+    
+    제18조(운영자 전원합의체)
+    ⓵ 운영자 전원합의체는 서비스 운영에 있어서 중대한 판단을 수행하는 합의체로, 다음과 같이 구성된다.
+      1. 서비스 제공자(의장)
+      2. 서비스 제공자에 의하여 선임된 1인 이상의 운영자
+    ⓶ 운영자 전원합의체는 원활한 서비스 운영을 유지하기 위한 업무를 담당하며, 다음 각 호의 업무를 수행한다. 
+      1. 분쟁조정의 재심청구
+      2. 제16조 제2항 제4호 해당 여부 판단
+      3. 이용자 1인의 제10조 제1항 제3호 내지 제5호, 제7호, 제8호 해당 여부 판단
+      4. 기타 서비스 운영에 있어 서비스 제공자가 중대하다고 판단한 안건에 대한 판단
+    ⓷ 서비스 제공자는 제2호 각호의 사유가 발생한 경우, 지체 없이 운영자 전원합의체를 구성하여 판단을 내려야 한다. 단, 운영자 1인 이상의 부재로 정족수(운영자 전원합의체 구성인원의 2/3 이상)를 만족하지 못 하는 경우, 게시물, 전자우편 또는 이에 준하는 방법으로 소집일을 기재하여 통보하여야 한다. 
+    ⓸ 운영자 전원합의체는 반드시 서비스에서 제공하는 채팅, 또는 서비스 제공자가 공인한 공개적 방법을 통해서 진행해야하며, 전원합의체 종료 시 서비스 제공자는 모든 로그 파일을 이용자에게 공개 할 의무를 가진다. 
+    ⓹ 전원합의체는 만장일치를 원칙으로 한다. 단, 다음 각 호의 경우 의장은 다수결을 진행할 수 있다. 단, 다수결로 진행된 전원합의체 판단은 사후 전원합의체의 만장일치로 파기될 수 있다. 
+      1. 개인 간의 가치판단이 충돌하여 합의에 이르기 불가능하다고 판단되는 경우
+      2. 기타 판단에 시급성을 요하는 경우
+    ⓺ 운영자 전원합의체는 필요하다고 판단되는 경우, 이용자 및 관련자를 증인으로 하여 판단의 참고자료로 이용할 수 있다. 
+    
+    
+    부칙 <2018.4.17.>
+    ⓵ 본 약관은 2018.4.17.부터 적용된다.     
+
\ No newline at end of file diff --git a/oauth_kakao/terms.2.html b/oauth_kakao/terms.2.html new file mode 100644 index 00000000..e8609953 --- /dev/null +++ b/oauth_kakao/terms.2.html @@ -0,0 +1,22 @@ +
+개인정보 제공 및 이용에 대한 동의
+
+0. 아래 내용을 자세히 읽으신 후, 개인정보 제공 및 이용, 그리고 제3자 제공에 대한 동의 여부를 결정하여 주십시오. 
+
+1. HiDCHe서버 서비스(이하 ‘본 서비스’) 이용에 있어, 서비스 이용자(이하 ‘이용자)개인정보를 다음과 같이 전산망 등에 수집·관리 하고 있습니다. 
+  ○ 개인정보의 수집·이용 목적 	: 셧다운제 영향에 따른 이용자 연령 확인, 중복 가입 여부, 개인별 참여 이력 관리 등 서비스 제공에 따른 활용
+  ○ 수집하는 개인정보 항목	: 아이디, 이메일, 생년월일, 전화번호
+  ○ 개인정보의 보유 및 이용기간	: 보유기간은 서비스 이용 기간 및 서비스 탈퇴 후 1개월
+
+2. 원활한 서비스 제공을 위하여, 본 서비스는 위와 같은 개인정보가 필요하며, 「개인정보보호법」에 따라 이용자로부터 제공받는 개인정보를 보호합니다. 
+
+3. 서비스 제공자는 개인정보를 처리 목적에 필요한 범위 내에서 적합하게 관리·이용하고, 그 목적 외의 용도로는 사용하지 않으며, 개인정보를 제공한 이용자는 언제나 자신이 입력한 개인정보의 열람 및 수정을 신청할 수 있습니다. 다만, 기타 법령 및 고시 등 공적인 사유에 의거하여 정보의 보존이 필요하다 판단되거나 강제되는 경우 서비스 제공자는 개인정보의 수정을 거부할 수 있습니다. 
+
+4. 개인정보 3자 제공 내역
+  * 없음
+
+5. 이용자는 개인정보 제공에 대한 동의를 거부할 권리가 있습니다. 그러나 동의를 거부할 경우, 원활한 서비스 제공에 제한을 받을 수 있습니다. 
+
+개인정보 관리자 : 이동수
+연락처 : hided62@gmail.com
+
\ No newline at end of file diff --git a/oauth_kakao/terms.html b/oauth_kakao/terms.html deleted file mode 100644 index 0f0a471d..00000000 --- a/oauth_kakao/terms.html +++ /dev/null @@ -1,5 +0,0 @@ -

개인정보로써 이메일, 계정명, 닉네임을 수집하며, 유저 로그인 및 다중 접속 탐지를 위해 사용함. 이메일은 필요에 따라 공지사항 등 본 사이트의 정보를 전파하는데 사용될 수 있음. 위의 언급한 내용 이외의 용도로 개인정보를 사용하지 않음.

-

수집된 개인정보는 탈퇴 후 1개월간 보관됨.

-

게임 시스템을 오용하거나, 서버에 해킹시도하거나, 분란을 야기하는 경우 경고 처리 후 차단될 수 있으며, 경중에 따라 경고 처리 없이 바로 차단될 수 있음.

-

개인정보 관리자 : Hide_D

-

문의는 hided62@gmail.com 으로.

\ No newline at end of file diff --git a/src/run_daemon.py b/src/run_daemon.py new file mode 100644 index 00000000..78d0268f --- /dev/null +++ b/src/run_daemon.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python3 + +import os +import time +import glob +import urllib.request +import concurrent.futures + +def run(webPath): + print(webPath) + obj = urllib.request.urlopen(webPath) + obj.read() + +def main(): + basepath = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + hiddenList = [] + + for path in glob.glob(basepath+'/*/.htaccess'): + hiddenList.append(os.path.dirname(path)) + + webBase = 'http://127.0.0.1' + for line in open(basepath+'/d_shared/common_path.js'): + if not "root:" in line: + continue + webBase = line[line.find('root:')+5:-1] + webBase = webBase.strip(' \'",') + break + + servList = [] + autoResetList = [] + for path in glob.glob(basepath+'/*/d_setting/DB.php'): + servPath = os.path.dirname(os.path.dirname(path)) + servRelPath = os.path.relpath(servPath, basepath) + + resetAbsPath = servPath + '/j_autoreset.php' + resetPath = webBase + '/' + servRelPath + '/j_autoreset.php' + if os.path.exists(resetAbsPath): + autoResetList.append(resetPath) + + if servPath in hiddenList: + continue + + webPath = webBase + '/' + servRelPath + '/proc.php' + + servList.append(webPath) + + with concurrent.futures.ThreadPoolExecutor(max_workers=len(servList)) as executor: + waiters=[] + for resetPath in autoResetList: + future = executor.submit(run, resetPath) + waiters.append(future) + for _ in range(4): + for webPath in servList: + future = executor.submit(run, webPath) + waiters.append(future) + time.sleep(15) + for future in waiters: + future.done() + +if __name__ == "__main__": + # execute only if run as a script + main() diff --git a/src/sammo/Session.php b/src/sammo/Session.php index 97ff110d..6bd6de08 100644 --- a/src/sammo/Session.php +++ b/src/sammo/Session.php @@ -47,7 +47,8 @@ class Session ini_set('session.use_cookies', false); ini_set('session.use_trans_sid', false); ini_set('session.cache_limiter', "none"); - session_start($this->sessionID); // second session_start + session_id($this->sessionID); + session_start(); // second session_start $this->writeClosed = false; return $this; } @@ -121,7 +122,7 @@ class Session public function __set(string $name, $value) { - if (key_exists($name, $this->PROTECED_NAMES)) { + if (key_exists($name, self::PROTECTED_NAMES)) { trigger_error("{$name}은 외부에서 쓰기 금지된 Session 변수입니다.", E_USER_NOTICE); return; } diff --git a/src/sammo/StringUtil.php b/src/sammo/StringUtil.php index 7b0ce9c2..30d4e9a8 100644 --- a/src/sammo/StringUtil.php +++ b/src/sammo/StringUtil.php @@ -27,6 +27,9 @@ class StringUtil $currentPos = 0; $currentWidth = 0; + $rawStart = 0; + $rawWidth = 0; + $strings = static::splitString($str); foreach($strings as $idx=>$char){ $charWidth = mb_strwidth($char, 'UTF-8'); @@ -34,10 +37,11 @@ class StringUtil break; } $currentPos += $charWidth; + $rawStart += strlen($char); } if($currentPos + $width >= $length){ - return substr($str, $currentPos); + return substr($str, $rawStart); } for($idx = $currentPos; $idx < count($strings); $idx++){ @@ -48,9 +52,10 @@ class StringUtil break; } $currentWidth += $charWidth; + $rawWidth += strlen($char); } - return substr($str, $currentPos, $currentWidth); + return substr($str, $rawStart, $rawWidth); } public static function cutStringForWidth(string $str, int $width, string $endFill='..') diff --git a/src/sammo/Util.php b/src/sammo/Util.php index d6aeab9f..2b0a3bce 100644 --- a/src/sammo/Util.php +++ b/src/sammo/Util.php @@ -34,7 +34,7 @@ class Util extends \utilphp\util if ($type === 'bool') { $value = strtolower($value); - if ($value === 'false' || $value === 'no' || $value === 'n' || $value === 'x' || $value === 'null') { + if ($value === null || $value === '' || $value === 'off' || $value === 'false' || $value === 'no' || $value === 'n' || $value === 'x' || $value === 'null') { return false; } return !!$value; diff --git a/src/sammo/templates/block_htaccess.php b/src/sammo/templates/block_htaccess.php index d3c18fb2..f544d747 100644 --- a/src/sammo/templates/block_htaccess.php +++ b/src/sammo/templates/block_htaccess.php @@ -7,4 +7,24 @@ Deny from all SetEnvIf X-Forwarded-For ^ env_allow_1 Allow from env=env_allow_1 Allow from - \ No newline at end of file + + + + Allow from 127.0.0.1 ::1 localhost + + + + Allow from all + + + Allow from all + + + Allow from all + + + Allow from all + + + Allow from all + \ No newline at end of file diff --git a/tmp_msg/msg.js b/tmp_msg/msg.js index 9cea74b8..6edb5e9d 100644 --- a/tmp_msg/msg.js +++ b/tmp_msg/msg.js @@ -59,9 +59,6 @@ function fetchMsg(){ } function redrawMsg(deferred){ - - console.log(deferred); - function registerSequence(obj){ if(!obj.result){ deferred.reject();