diff --git a/hwe/a_traffic.php b/hwe/a_traffic.php
index 70922d0c..23eb4b97 100644
--- a/hwe/a_traffic.php
+++ b/hwe/a_traffic.php
@@ -10,11 +10,13 @@ $connect=$db->get();
increaseRefresh("갱신정보", 2);
$query = "select year,month,refresh,maxrefresh,maxonline from game limit 1";
-$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
+$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$game = MYDB_fetch_array($result);
+$log = [];
+
$curonline = getOnlineNum();
-for($i=0; $i < 11; $i++) {
+for ($i=0; $i < 11; $i++) {
$parse = explode("|", $log[count($log)-12+$i]);
$date[$i] = trim($parse[0]);
$year[$i] = trim($parse[1]);
@@ -22,10 +24,18 @@ for($i=0; $i < 11; $i++) {
$refresh[$i] = trim($parse[3]);
$online[$i] = trim($parse[4]);
}
-if($game['maxrefresh'] == 0) { $game['maxrefresh'] = 1; }
-if($game['maxrefresh'] < $game['refresh']) { $game['maxrefresh'] = $game['refresh']; }
-if($game['maxonline'] == 0) { $game['maxonline'] = 1; }
-if($game['maxonline'] < $curonline) { $game['maxonline'] = $curonline; }
+if ($game['maxrefresh'] == 0) {
+ $game['maxrefresh'] = 1;
+}
+if ($game['maxrefresh'] < $game['refresh']) {
+ $game['maxrefresh'] = $game['refresh'];
+}
+if ($game['maxonline'] == 0) {
+ $game['maxonline'] = 1;
+}
+if ($game['maxonline'] < $curonline) {
+ $game['maxonline'] = $curonline;
+}
?>
@@ -45,97 +55,119 @@ if($game['maxonline'] < $curonline) { $game['maxonline'] = $curonline; }
접 속 량
= 100) { $w -= 0.1; }
- if($refresh[$i] < 10 && $w < 3) { $w = 3; }
- elseif($refresh[$i] < 100 && $w < 6) { $w = 6; }
- elseif($refresh[$i] < 1000 && $w < 9) { $w = 9; }
+ if ($w >= 100) {
+ $w -= 0.1;
+ }
+ if ($refresh[$i] < 10 && $w < 3) {
+ $w = 3;
+ } elseif ($refresh[$i] < 100 && $w < 6) {
+ $w = 6;
+ } elseif ($refresh[$i] < 1000 && $w < 9) {
+ $w = 9;
+ }
$w2 = round(100 - $w, 1);
- $color = getColor($w);
- $dt = substr($date[$i], 11, 5);
- echo "
+ $color = getTrafficColor($w);
+ $dt = substr($date[$i], 11, 5); ?>
- {$year[$i]}년 {$month[$i]}월
- {$dt}
+ =$year[$i]?>년 =$month[$i]?>월
+ =$dt?>
- {$refresh[$i]}
-
+ % bgcolor==$color?> align=right>=$refresh[$i]?>
+ % id=bg0>
- ";
+= 100) { $w -= 0.1; }
-if($game['refresh'] < 10 && $w < 3) { $w = 3; }
-elseif($game['refresh'] < 100 && $w < 6) { $w = 6; }
-elseif($game['refresh'] < 1000 && $w < 9) { $w = 9; }
+if ($w >= 100) {
+ $w -= 0.1;
+}
+if ($game['refresh'] < 10 && $w < 3) {
+ $w = 3;
+} elseif ($game['refresh'] < 100 && $w < 6) {
+ $w = 6;
+} elseif ($game['refresh'] < 1000 && $w < 9) {
+ $w = 9;
+}
$w2 = round(100 - $w, 1);
-$color = getColor($w);
+$color = getTrafficColor($w);
$dt = date('H:i');
-echo "
+?>
- {$game['year']}년 {$game['month']}월
- {$dt}
+ =$game['year']?>년 =$game['month']?>월
+ =$dt?>
- {$game['refresh']}
-
+ % bgcolor==$color?> align=right>=$game['refresh']?>
+ % id=bg0>
- 최고기록: {$game['maxrefresh']}
+ 최고기록: =$game['maxrefresh']?>
-";
-?>
+
+
접 속 자
= 100) { $w -= 0.1; }
- if($online[$i] < 10 && $w < 3) { $w = 3; }
- elseif($online[$i] < 100 && $w < 6) { $w = 6; }
- elseif($online[$i] < 1000 && $w < 9) { $w = 9; }
+ if ($w >= 100) {
+ $w -= 0.1;
+ }
+ if ($online[$i] < 10 && $w < 3) {
+ $w = 3;
+ } elseif ($online[$i] < 100 && $w < 6) {
+ $w = 6;
+ } elseif ($online[$i] < 1000 && $w < 9) {
+ $w = 9;
+ }
$w2 = round(100 - $w, 1);
- $color = getColor($w);
- $dt = substr($date[$i], 11, 5);
- echo "
+ $color = getTrafficColor($w);
+ $dt = substr($date[$i], 11, 5); ?>
- {$year[$i]}년 {$month[$i]}월
- {$dt}
+ =$year[$i]?>년 =$month[$i]?>월
+ =$dt?>
- {$online[$i]}
-
+ % bgcolor==$color?> align=right>=$online[$i]?>
+ % id=bg0>
- ";
+= 100) { $w -= 0.1; }
-if($curonline < 10 && $w < 3) { $w = 3; }
-elseif($curonline < 100 && $w < 6) { $w = 6; }
-elseif($curonline < 1000 && $w < 9) { $w = 9; }
+if ($w >= 100) {
+ $w -= 0.1;
+}
+if ($curonline < 10 && $w < 3) {
+ $w = 3;
+} elseif ($curonline < 100 && $w < 6) {
+ $w = 6;
+} elseif ($curonline < 1000 && $w < 9) {
+ $w = 9;
+}
$w2 = round(100 - $w, 1);
-$color = getColor($w);
+$color = getTrafficColor($w);
$dt = date('H:i');
echo "
@@ -165,14 +197,14 @@ echo "
주 의 대 상 자 (순간과도갱신)
주의대상자
@@ -194,14 +226,14 @@ echo "
";
$query = "select name,refresh,connect from general order by refresh desc limit 0,5";
-$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
+$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$count = MYDB_num_rows($result);
-for($i=0; $i < $count; $i++) {
+for ($i=0; $i < $count; $i++) {
$user = MYDB_fetch_array($result);
$w = round($user['refresh'] / $maxrefresh * 100, 1);
$w2 = round(100 - $w, 1);
- $color = getColor($w);
+ $color = getTrafficColor($w);
echo "
{$user['name']}
@@ -229,26 +261,28 @@ for($i=0; $i < $count; $i++) {
get();
increaseRefresh("설문조사", 1);
$query = "select no,vote from general where owner='{$userID}'";
-$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
+$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
$query = "select develcost,voteopen,vote,votecomment from game limit 1";
-$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
+$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$admin = MYDB_fetch_array($result);
$vote = explode("|", $admin['vote']);
-if($vote[0] == "") {
+if ($vote[0] == "") {
$vote[0] = "-";
}
@@ -51,7 +51,7 @@ function captureKey(e) {
설 문 조 사 (=$admin['develcost']*5?>금과 추첨으로 유니크템 증정!)
userGrade >= 5) {
+if ($session->userGrade >= 5) {
echo "
@@ -70,29 +70,29 @@ echo "
";
$query = "select no from general where vote>0 and npc<2";
-$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
+$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$voteCount = MYDB_num_rows($result);
$query = "select no from general where npc<2";
-$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
+$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$allCount = MYDB_num_rows($result);
$percentage = round($voteCount / $allCount * 100, 1);
$voteTypeCount = count($vote);
-for($i=1; $i < $voteTypeCount; $i++) {
+for ($i=1; $i < $voteTypeCount; $i++) {
echo "
- {$i}.
+ {$i}.
";
- if($me['vote'] == 0 && $me['no'] > 0) {
+ if ($me['vote'] == 0 && $me['no'] > 0) {
echo "
";
- } elseif($admin['voteopen'] >= 1 || $session->userGrade >= 5) {
+ } elseif ($admin['voteopen'] >= 1 || $session->userGrade >= 5) {
$query = "select no from general where vote='{$i}'";
- $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
+ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$vCount = MYDB_num_rows($result);
$per = @round($vCount / $voteCount * 100, 1);
@@ -111,7 +111,7 @@ for($i=1; $i < $voteTypeCount; $i++) {
echo "
";
-if($me['vote'] == 0 && $me['no'] > 0) {
+if ($me['vote'] == 0 && $me['no'] > 0) {
echo "
투표
@@ -126,7 +126,7 @@ echo "
";
-if($session->userGrade >= 5) {
+if ($session->userGrade >= 5) {
echo "
@@ -136,7 +136,7 @@ if($session->userGrade >= 5) {
";
}
-if($admin['votecomment'] != "") {
+if ($admin['votecomment'] != "") {
$comment = explode("|", $admin['votecomment']);
$commentCount = count($comment);
} else {
@@ -149,7 +149,7 @@ echo "
댓 글
";
-for($i=0; $i < $commentCount; $i++) {
+for ($i=0; $i < $commentCount; $i++) {
$cmt = explode(":", $comment[$i]);
$cmt[2] = Tag2Code($cmt[2]);
$j = $i+1;
@@ -162,7 +162,7 @@ for($i=0; $i < $commentCount; $i++) {
";
}
-if($me['no'] > 0) {
+if ($me['no'] > 0) {
echo "
-
@@ -178,7 +178,7 @@ if($me['no'] > 0) {
전 체 통 계
userGrade >= 5) {
+if ($session->userGrade >= 5) {
echo "
@@ -187,7 +187,7 @@ if($session->userGrade >= 5) {
echo "
";
-if($admin['voteopen'] >= 1 || $session->userGrade >= 5) {
+if ($admin['voteopen'] >= 1 || $session->userGrade >= 5) {
echo "
전 체
@@ -197,26 +197,43 @@ if($admin['voteopen'] >= 1 || $session->userGrade >= 5) {
";
- $query = "select no from general where npc<2";
- $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
- $memCount = MYDB_num_rows($result);
-
- $query = "select nation,vote from general where npc<2";
- $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
- $count = MYDB_num_rows($result);
- for($i=0; $i < $count; $i++) {
- $vote = MYDB_fetch_array($result);
-
- $totalVote[$vote['vote']]++;
- if($vote['vote'] > 0) { $nationVoteCount[$vote['nation']]++; }
- $nationVote[$vote['nation']][$vote['vote']]++;
+ $memCount = $db->queryFirstField('SELECT count(`no`) FROM general WHERE npc<2');
+ if ($memCount == 0) {
+ $memCount = 1;
}
- for($i=0; $i < $voteTypeCount; $i++) {
- $per = @round($totalVote[$i] / $memCount * 100, 1);
+ $totalVote = [];
+ $nationVoteCount = [[0]];
+ $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'];
+ $cnt = $row['cnt'];
+
+ if (!isset($totalVote[$vote])) {
+ $totalVote[$vote] = 0;
+ }
+
+ if (!isset($nationVoteCount[$nation])) {
+ $nationVoteCount[$nation] = 0;
+ $nationVote[$nation] = [];
+ }
+
+ if (!isset($nationVote[$nation][$vote])) {
+ $nationVote[$nation][$vote] = 0;
+ }
+
+ $totalVote[$vote] += $cnt;
+ $nationVoteCount[$nation] += $cnt;
+ $nationVote[$nation][$vote] += $cnt;
+ }
+
+ for ($i=0; $i < $voteTypeCount; $i++) {
+ $per = round(($totalVote[$i]??0) / $memCount * 100, 1);
// if($per < 5) { $vote['cnt'] = " "; }
echo "
- {$totalVote[$i]}
+ {$totalVote[$i]}
";
}
@@ -228,13 +245,18 @@ if($admin['voteopen'] >= 1 || $session->userGrade >= 5) {
";
}
-if($admin['voteopen'] >= 2 || $session->userGrade >= 5) {
+if ($admin['voteopen'] >= 2 || $session->userGrade >= 5) {
$query = "select no from general where nation=0 and npc<2";
- $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
+ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$memCount = MYDB_num_rows($result);
+ if ($memCount == 0) {
+ $memCount = 1;
+ }
- if(!$nationVoteCount[0]) { $nationVoteCount[0] = 0; }
- $percentage = @round($nationVoteCount[0] / $memCount * 100, 1);
+ if (!isset($nationVoteCount[0])) {
+ $nationVoteCount[0] = 0;
+ }
+ $percentage = round($nationVoteCount[0] / $memCount * 100, 1);
echo "
@@ -245,11 +267,11 @@ if($admin['voteopen'] >= 2 || $session->userGrade >= 5) {
";
- for($i=0; $i < $voteTypeCount; $i++) {
- $per = @round($nationVote[0][$i] / $memCount * 100, 1);
+ for ($i=0; $i < $voteTypeCount; $i++) {
+ $per = round(Util::array_get($nationVote[0][$i], 0) / $memCount * 100, 1);
// if($per < 5) { $vote['cnt'] = " "; }
echo "
- {$nationVote[0][$i]}
+ {$nationVote[0][$i]}
";
}
@@ -261,32 +283,32 @@ if($admin['voteopen'] >= 2 || $session->userGrade >= 5) {
";
$query = "select nation,color,name,gennum from nation order by gennum desc";
- $nationResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
+ $nationResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$nationcount = MYDB_num_rows($nationResult);
- for($i=0; $i < $nationcount; $i++) {
+ for ($i=0; $i < $nationcount; $i++) {
$nation = MYDB_fetch_array($nationResult);
$query = "select no from general where nation='{$nation['nation']}' and npc<2";
- $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
+ $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), "");
$memCount = MYDB_num_rows($result);
- if(!$nationVoteCount[$nation['nation']]) { $nationVoteCount[$nation['nation']] = 0; }
- $percentage = @round($nationVoteCount[$nation['nation']] / $memCount * 100, 1);
+ $voteCount = $nationVoteCount[$nation['nation']] ?? 0;
+ $percentage = round($voteCount / $memCount * 100, 1);
echo "
{$nation['name']}
- {$nationVoteCount[$nation['nation']]} / {$memCount} ({$percentage} %)
+ {$voteCount} / {$memCount} ({$percentage} %)
";
- for($k=0; $k < $voteTypeCount; $k++) {
- $per = @round($nationVote[$nation['nation']][$k] / $memCount * 100, 1);
+ for ($k=0; $k < $voteTypeCount; $k++) {
+ $per = round($nationVote[$nation['nation']][$k] / $memCount * 100, 1);
// if($per < 5) { $vote['cnt'] = " "; }
echo "
- {$nationVote[$nation['nation']][$k]}
+ {$nationVote[$nation['nation']][$k]}
";
}
@@ -310,12 +332,13 @@ if($admin['voteopen'] >= 2 || $session->userGrade >= 5) {
0) {
+function getVoteColor($type)
+{
+ if ($type > 0) {
$type = (($type - 1) % 7) + 1;
}
- switch($type) {
+ switch ($type) {
case 0: $color = "black"; break;
case 1: $color = "red"; break;
case 2: $color = "orange"; break;
@@ -329,12 +352,13 @@ function getColor($type) {
return $color;
}
-function getNewColor($type) {
- if($type > 0) {
+function getNewColor($type)
+{
+ if ($type > 0) {
$type = (($type - 1) % 7) + 1;
}
- switch($type) {
+ switch ($type) {
case 2: $color = "black"; break;
case 3: $color = "black"; break;
default:$color = "white"; break;
@@ -342,5 +366,3 @@ function getNewColor($type) {
return $color;
}
-
-
diff --git a/hwe/b_auction.php b/hwe/b_auction.php
index 3a2b29af..893149a5 100644
--- a/hwe/b_auction.php
+++ b/hwe/b_auction.php
@@ -3,6 +3,10 @@ namespace sammo;
include "lib.php";
include "func.php";
+
+$msg = Util::getReq('msg');
+$msg2 = Util::getReq('msg2');
+
//로그인 검사
$session = Session::requireGameLogin()->setReadOnly();
$userID = Session::getUserID();
@@ -105,7 +109,7 @@ for ($i=0; $i < $count; $i++) {
$chk = 1;
}
$pv = round($auction['value'] * 100 / $auction['amount']) / 100 + 0.001;
- $pv = substr($pv, 0, 4);
+ $pv = substr((string)$pv, 0, 4);
if ($auction['stuff'] != 0) {
$pv = '-';
}
diff --git a/hwe/b_betting.php b/hwe/b_betting.php
index 4af92667..16a97a0d 100644
--- a/hwe/b_betting.php
+++ b/hwe/b_betting.php
@@ -53,9 +53,9 @@ table { font-family:'맑은 고딕'; line-height:110%; }
font { font-family:'맑은 고딕'; line-height:110%; }
input { font-family:'맑은 고딕'; line-height:110%; height:20px }
select { font-family:'굴림'; line-height:100%; }
-#bg0 { background-image:url(=$images?>/back_walnut.jpg); }
-#bg1 { background-image:url(=$images?>/back_green.jpg); }
-#bg2 { background-image:url(=$images?>/back_blue.jpg); }
+#bg0 { background-image:url(=ServConfig::$gameImagePath?>/back_walnut.jpg); }
+#bg1 { background-image:url(=ServConfig::$gameImagePath?>/back_green.jpg); }
+#bg2 { background-image:url(=ServConfig::$gameImagePath?>/back_blue.jpg); }
diff --git a/hwe/b_tournament.php b/hwe/b_tournament.php
index d413085a..49088183 100644
--- a/hwe/b_tournament.php
+++ b/hwe/b_tournament.php
@@ -49,9 +49,9 @@ table { font-family:'맑은 고딕'; line-height:110%; }
font { font-family:'맑은 고딕'; line-height:110%; }
input { font-family:'맑은 고딕'; line-height:110%; height:20px }
select { font-family:'굴림'; line-height:100%; }
-#bg0 { background-image:url(=$images?>/back_walnut.jpg); }
-#bg1 { background-image:url(=$images?>/back_green.jpg); }
-#bg2 { background-image:url(=$images?>/back_blue.jpg); }
+#bg0 { background-image:url(=ServConfig::$gameImagePath?>/back_walnut.jpg); }
+#bg1 { background-image:url(=ServConfig::$gameImagePath?>/back_green.jpg); }
+#bg2 { background-image:url(=ServConfig::$gameImagePath?>/back_blue.jpg); }
diff --git a/hwe/commandlist.php b/hwe/commandlist.php
index 0dc0bfe0..47234ce7 100644
--- a/hwe/commandlist.php
+++ b/hwe/commandlist.php
@@ -65,8 +65,6 @@ function myclock() {
myCommandList();
function myCommandList() {
- global $images;
-
$db = DB::db();
$connect=$db->get();
$userID = Session::getUserID();
diff --git a/hwe/func.php b/hwe/func.php
index 51d2502e..a694196b 100644
--- a/hwe/func.php
+++ b/hwe/func.php
@@ -68,11 +68,10 @@ function getAllNationStaticInfo(){
}
function GetImageURL($imgsvr) {
- global $image, $image1;
if($imgsvr == 0) {
- return $image;
+ return ServConfig::$sharedIconPath;
} else {
- return $image1;
+ return AppConf::getUserIconPathWeb();
}
}
@@ -117,8 +116,6 @@ function getRandGenName() {
function cityInfo() {
- global $images;
-
$db = DB::db();
$connect=$db->get();
$userID = Session::getUserID();
@@ -232,8 +229,6 @@ function cityInfo() {
}
function myNationInfo() {
- global $images;
-
$db = DB::db();
$connect=$db->get();
$userID = Session::getUserID();
@@ -749,8 +744,6 @@ function myInfo() {
}
function generalInfo($no) {
- global $image, $images;
-
$db = DB::db();
$connect=$db->get();
@@ -851,8 +844,8 @@ function generalInfo($no) {
elseif($general['mode'] == 1) { $general['mode'] = "수비 함(훈사60) "; }
else { $general['mode'] = "수비 안함 "; }
- $weapImage = "{$images}/weap{$general['crewtype']}.jpg";
- if($admin['show_img_level'] < 2) { $weapImage = "{$image}/default.jpg"; };
+ $weapImage = ServConfig::$gameImagePath."/weap{$general['crewtype']}.jpg";
+ if($admin['show_img_level'] < 2) { $weapImage = ServConfig::$sharedIconPath."/default.jpg"; };
$imageTemp = GetImageURL($general['imgsvr']);
echo "
@@ -940,7 +933,7 @@ function myInfo2() {
}
function generalInfo2($no) {
- global $image, $images, $_dexLimit;
+ global $_dexLimit;
$db = DB::db();
$connect=$db->get();
@@ -1127,8 +1120,6 @@ function PushMsg($type, $nation, $picture, $imgsvr, $from, $fromcolor, $to, $toc
}
function msgprint($msg, $name, $picture, $imgsvr, $when, $num, $type) {
- global $images;
-
$db = DB::db();
$connect=$db->get();
diff --git a/hwe/func_legacy.php b/hwe/func_legacy.php
index 25edfbc7..9881b77e 100644
--- a/hwe/func_legacy.php
+++ b/hwe/func_legacy.php
@@ -23,14 +23,13 @@ function printLimitMsg($turntime) {
function bar($per, $h=7) {
- global $images;
if($h == 7) { $bd = 0; $h = 7; $h2 = 5; }
else { $bd = 1; $h = 12; $h2 = 8; }
$per = round($per, 1);
if($per < 1 || $per > 99) { $per = round($per); }
- $str1 = " ";
- $str2 = " ";
+ $str1 = " ";
+ $str2 = " ";
if($per <= 0) { $str1 = ""; }
elseif($per >= 100) { $str2 = ""; }
$str = "
diff --git a/hwe/j_server_basic_info.php b/hwe/j_server_basic_info.php
index c388c1e0..e2459c74 100644
--- a/hwe/j_server_basic_info.php
+++ b/hwe/j_server_basic_info.php
@@ -31,7 +31,7 @@ if($general){
if($general['imgsvr'] == 0) {
$me['picture'] = '../../image/'.$general['picture'];
} else {
- $me['picture'] = '../d_pic/'.$general['picture'];
+ $me['picture'] = AppConf::getUserIconPathWeb().'/'.$general['picture'];
}
}
diff --git a/hwe/js/install_db.js b/hwe/js/install_db.js
index 638d3881..4045603a 100644
--- a/hwe/js/install_db.js
+++ b/hwe/js/install_db.js
@@ -6,7 +6,7 @@ $(document).ready( function () {
db_port:"required",
db_id:"required",
db_pw:"required",
- db_name:"required",
+ db_name:"required"
},
errorElement: "div",
errorPlacement: function ( error, element ) {
diff --git a/hwe/lib.php b/hwe/lib.php
index 6773d59d..bf31d42a 100644
--- a/hwe/lib.php
+++ b/hwe/lib.php
@@ -5,11 +5,11 @@ namespace sammo;
$loader = require __dir__.'/../vendor/autoload.php';
$loader->addPsr4('sammo\\', __DIR__.'/sammo', true);
-$loader->addClassMap((function(){
+$loader->addClassMap((function () {
$d_settingMap = [];
- foreach(glob(__dir__.'/d_setting/*.php') as $filepath){
+ foreach (glob(__dir__.'/d_setting/*.php') as $filepath) {
$filename = basename($filepath);
- if(Util::ends_with($filename, '.orig.php')){
+ if (Util::ends_with($filename, '.orig.php')) {
continue;
}
$classname = explode('.', $filename)[0];
@@ -36,11 +36,6 @@ include "MYDB.php";
define('STEP_LOG', true);
define('PROCESS_LOG', true);
$_startTime = microtime(true);
-$_ver = "서비스중";
-$x_version = "삼국지 모의전투 PHP HideD v0.1";
-$x_banner = "KOEI의 이미지를 사용, 응용하였습니다 / 제작 : 유기체(jwh1807@gmail.com), HideD(hided62@gmail.com)";
-$x_helper = "도움 주신 분들";
-$x_develrate = 50; // 내정시 최하 민심 설정
$_upgradeLimit = 30; // 능력치 상승 경험치
$_dexLimit = 1000000; // 숙련도 제한치
$_defaultatmos = 40; // 초기 사기치
@@ -61,13 +56,6 @@ $x_goodgenleader = 65; // 명장,지장에 사용될 통솔 제한
$x_goodgenpower = 65; // 명장에 사용될 무력 제한
$x_goodgenintel = 65; // 지장에 사용될 지력 제한
$_taxrate = 0.01; // 군량 매매시 세율
-//$images = "http://115.68.28.99/images";
-//$image = "http://115.68.28.99/image";
-//$images = "http://jwh1807.vipweb.kr/images";
-//$image = "http://jwh1807.vipweb.kr/image";
-$image1 = "../d_pic";
-$images = "/images";
-$image = "/image";
ob_start();
session_cache_limiter('nocache');//NOTE: 캐시가 가능하도록 설정해야 할 수도 있음. 주의!
@@ -76,7 +64,7 @@ session_cache_limiter('nocache');//NOTE: 캐시가 가능하도록 설정해야
// 에러 메세지 출력
function Error($message, $url="")
{
- if(!$url){
+ if (!$url) {
$url = $_SERVER['REQUEST_URI'];
}
file_put_contents(__dir__."/logs/_db_bug.txt", "{\"url\":\"$url\",\"msg\":\"$message\"}\n", FILE_APPEND);
diff --git a/hwe/processing.php b/hwe/processing.php
index a61b987e..a3a71625 100644
--- a/hwe/processing.php
+++ b/hwe/processing.php
@@ -110,8 +110,6 @@ switch($commandtype) {
}
function starter($name, $type=0) {
- //FIXME: 장기적으로 template로 변경해야함.
- global $images;
echo '
@@ -238,7 +236,6 @@ function command_11($turn, $command) {
$connect=$db->get();
$userID = Session::getUserID();
- global $images, $image;
starter("징병");
$query = "select * from game limit 1";
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
@@ -400,8 +397,8 @@ function calc(cost, formnum) {
$defence = $this->defence + $abil;
$speed = $this->speed;
$avoid = $this->avoid;
- $weapImage = "{$images}/weap{$i}.jpg";
- if($admin['show_img_level'] < 2) { $weapImage = "{$image}/default.jpg"; }
+ $weapImage = ServConfig::$gameImagePath."/weap{$i}.jpg";
+ if($admin['show_img_level'] < 2) { $weapImage = ServConfig::$sharedIconPath."/default.jpg"; }
$baseRiceShort = round($baseRice, 1);
$baseCostShort = round($baseCost, 1);
@@ -447,7 +444,6 @@ function command_12($turn, $command) {
$connect=$db->get();
$userID = Session::getUserID();
- global $images, $image;
starter("모병");
$query = "select * from game limit 1";
$result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),"");
@@ -611,8 +607,8 @@ function calc(cost, formnum) {
$defence = $this->defence + $abil;
$speed = $this->speed;
$avoid = $this->avoid;
- $weapImage = "{$images}/weap{$i}.jpg";
- if($admin['show_img_level'] < 2) { $weapImage = "{$image}/default.jpg"; }
+ $weapImage = ServConfig::$gameImagePath."/weap{$i}.jpg";
+ if($admin['show_img_level'] < 2) { $weapImage = ServConfig::$sharedIconPath."/default.jpg"; }
$baseRiceShort = round($baseRice, 1);
$baseCostShort = round($baseCost, 1);
@@ -999,8 +995,6 @@ function command_24($turn, $command) {
}
function command_25($turn, $command) {
- global $images;
-
$db = DB::db();
$connect=$db->get();
$userID = Session::getUserID();
diff --git a/hwe/select_npc.php b/hwe/select_npc.php
index 0e7ec033..6b9a2fc6 100644
--- a/hwe/select_npc.php
+++ b/hwe/select_npc.php
@@ -88,7 +88,7 @@ if($admin['show_img_level'] >= 3) {
?>
장수
- /1001.jpg border=0 name=picture width=64 height=64>
+ /1001.jpg border=0 name=picture width=64 height=64>
);
document.form1.face.selectedIndex = sel;
num = document.form1.face.value;
- document.form1.picture.src="=$image?>" + "/"+ num +".jpg";
+ document.form1.picture.src="=ServConfig::$sharedIconPath?>" + "/"+ num +".jpg";
}
function selectGen() {
diff --git a/i_entrance/j_get_user_info.php b/i_entrance/j_get_user_info.php
index c1383d53..ed2afbe4 100644
--- a/i_entrance/j_get_user_info.php
+++ b/i_entrance/j_get_user_info.php
@@ -12,16 +12,21 @@ $db = RootDB::db();
$member = $db->queryFirstRow('SELECT `id`, `name`, `grade`, `picture` FROM `MEMBER` WHERE `NO` = %i', $userID);
if(!$member['picture']){
- $picture = IMAGE.'/default.jpg';
+ $picture = ServConfig::$sharedIconPath.'/default.jpg';
}
else{
$picture = $member['picture'];
if(strlen($picture) > 11){
$picture = substr($picture, 0, -10);
}
- $picture = '../d_pic/'.$picture;
- if(!file_exists($picture)){
- $picture = IMAGE.'/'.$picture;
+
+ $pictureFSPath = AppConf::getUserIconPathFS().'/'.$picture;
+
+ if(file_exists($pictureFSPath)){
+ $picture = AppConf::getUserIconPathWeb().'/'.$picture;
+ }
+ else{
+ $picture = ServConfig::$sharedIconPath.'/'.$picture;
}
}
diff --git a/i_entrance/j_get_userlist.php b/i_entrance/j_get_userlist.php
index e271a6ce..d8b1ff2a 100644
--- a/i_entrance/j_get_userlist.php
+++ b/i_entrance/j_get_userlist.php
@@ -19,10 +19,10 @@ foreach($db->query('SELECT member.*, max(member_log.date) as loginDate from memb
group by member.no order by member.no asc') as $member){
if($member['IMGSVR']){
- $icon = RootDB::getServerBasepath().'/d_pic/'.$member['PICTURE'];
+ $icon = AppConf::getUserIconPathWeb().'/'.$member['PICTURE'];
}
else{
- $icon = IMAGE.'/'.$member['PICTURE'];
+ $icon = ServConfig::$sharedIconPath.'/'.$member['PICTURE'];
}
$userList[] = [
diff --git a/i_entrance/j_icon_delete.php b/i_entrance/j_icon_delete.php
index a0e59432..50d6c4a5 100644
--- a/i_entrance/j_icon_delete.php
+++ b/i_entrance/j_icon_delete.php
@@ -20,7 +20,7 @@ else{
$dt = '00000000';
}
-$dest = ROOT.'/d_pic/'.$picName;
+$dest = AppConf::getUserIconPathFS().'/'.$picName;
$rf = date('Ymd');
diff --git a/i_entrance/j_set_userlist.php b/i_entrance/j_set_userlist.php
index dc652709..00ede015 100644
--- a/i_entrance/j_set_userlist.php
+++ b/i_entrance/j_set_userlist.php
@@ -88,7 +88,7 @@ if($action == 'scrub_icon'){
$cnt = 0;
- foreach(glob(__DIR__.'/../d_pic/*.{jpg,png,gif}', GLOB_BRACE) as $filepath){
+ foreach(glob(AppConf::getUserIconPathFS().'/*.{jpg,png,gif}', GLOB_BRACE) as $filepath){
$filename = basename($filepath);
if (array_key_exists($filename, $usedIcon)) {
diff --git a/i_other/help.php b/i_other/help.php
index 6bf034a8..9fb117e1 100644
--- a/i_other/help.php
+++ b/i_other/help.php
@@ -6,7 +6,6 @@ require(__dir__.'/../vendor/autoload.php');
WebUtil::setHeaderNoCache();
$category = Util::array_get($_GET['category'], 0);
//FIXME: 겨우 category 구분을 위해 php를 써야하는가? JavaScript로 바꾸자
-$images = IMAGES;
?>
@@ -20,9 +19,9 @@ $images = IMAGES;
body { color:white; background-color:black; border-width:1; border-color:gray; }
table { font-family:'맑은 고딕'; line-height:110%; }
font { font-family:'맑은 고딕'; line-height:110%; }
-#bg0 { background-image:url(=$images?>/back_walnut.jpg); }
-#bg1 { background-image:url(=$images?>/back_blue.jpg); }
-#bg2 { background-image:url(=$images?>/back_green.jpg); }
+#bg0 { background-image:url(=ServConfig::$gameImagePath?>/back_walnut.jpg); }
+#bg1 { background-image:url(=ServConfig::$gameImagePath?>/back_blue.jpg); }
+#bg2 { background-image:url(=ServConfig::$gameImagePath?>/back_green.jpg); }
.intro {
font-size: 15px;
@@ -87,7 +86,7 @@ if ($category == 0) {
◈ 우선 예약턴제 전략 웹게임인 『체섭』의 컨셉 & 모토를 이해해봅시다.
- /help_01_01.jpg class=leftFloat>
+ /help_01_01.jpg class=leftFloat>
『웹게임』이란?
☞ 온라인게임과 달리 특별한 프로그램 설치 없이도 인터넷 브라우저상에서 바로 즐길 수 있는 게임들을 칭합니다. 그렇기 때문에 어딜가든 인터넷이 되는 곳이라면 언제든지 접속해서 플레이가 가능합니다. 심지어 모바일기기(휴대폰, PMP)에서도 가능합니다!
@@ -102,7 +101,7 @@ if ($category == 0) {
☞ 체섭 입문을 권유하는 분들이 항상 하는 말씀 : 하루 5분 투자만으로도 가능한 게임!
- /help_01_03.jpg class=rightFloat>
+ /help_01_03.jpg class=rightFloat>
『삼국지 모의전투』?
☞ 동양인들이 열광하는 중국 삼국시대(서기 184년~280년)를 배경으로 하여, 유저 자신이 한명의 장수가 되어 다른 장수들과 각축을 벌이며 중원에서 활약하는 게임입니다.
@@ -115,7 +114,7 @@ if ($category == 0) {
☞ 일반 MMORPG에서 길드장, 혈맹장을 즐겨 하신분들이라면 체섭에서의 수뇌부나 군주를 하면서 휘하 장수들을 거느리며 통솔하는 것에서 재미를 찾을 수 있을지도 모릅니다!
- /help_01_02.jpg class=leftFloat>
+ /help_01_02.jpg class=leftFloat>
☞ 힘들이지 않고 여유롭게, 캐릭터를 육성하거나 전투하는 재미를 찾을 수 있습니다!
☞ 온라인 게임을 하면서도 뭔지 모르게 외롭다거나, 심심하거나, 멍때리며 칼질만 하는 당신을 발견했다면... 삼모전만의 매력인 IRC 채팅(공개채널, 국가채널 등)을 즐기며 여유로운 게임을 겸해보세요! 몇시간이 훌쩍 지나는 것을 체험할 수 있습니다!
@@ -137,7 +136,7 @@ if ($category == 0) {
◈ 회원 가입을 해봅시다!
- /help_02_01.jpg class=leftFloat>
+ /help_02_01.jpg class=leftFloat>
☞ 아직 회원가입을 하지 않았다면 계정생성을 눌러봅시다.
☞ 원하는 ID를 입력합니다.
@@ -146,7 +145,7 @@ if ($category == 0) {
☞ 확인을 위해 다시한번 PW를 입력합니다.
- /help_02_02.jpg class=rightFloat>
+ /help_02_02.jpg class=rightFloat>
※ 비밀번호는 가입하는 순간 암호화되어 저장되므로 운영자도 알 수 없습니다. 그래서 비밀번호 찾기 기능이 없지요. 비밀번호를 잊었을 경우, 운영자에게 요청하여 초기화는 가능합니다. 안심하셔도 좋습니다.
☞ 주민등록번호를 입력합니다.
@@ -180,16 +179,16 @@ if ($category == 0) {
◈ 웹게임에서 로그인은 굉장히 중요한 부분입니다. 잘 읽어주세요~
- /help_03_01.jpg class=leftFloat>
+ /help_03_01.jpg class=leftFloat>
☞ 로그인하는 순간 IP같은 몇가지 접속 정보가 서버에 기록됩니다. 특히 공공장소에서 접속 장소를 명시하지 않고 접속하는 경우, 멀티로 판단되어 캐릭터가 블럭되는 경우가 있으므로 주의해주세요!
☞ 한 가정에서 형과 동생, 직장에서 직장 동료들과 함께 플레이하는 경우는 특히 접속장소를 잘 적어주세요.
예시) 자택/형, 삼모대학 도서관, 62사단 사지방 등
- /help_03_02.jpg>
- /help_03_03.jpg>
- /help_03_04.jpg>
+ /help_03_02.jpg>
+ /help_03_03.jpg>
+ /help_03_04.jpg>
☞ 위처럼, 한 IP에서 여러명이 접속해야하는 경우는 항상 멀티후보로 분류되므로 조심해야 합니다. 동생이 형의 계정으로 접속하여 대신 명령을 해준다든지(이하 대턴입력) 하는 등의 행동은 여러가지 분석정보에 의해서 적발될 수 있습니다.
☞ 한 IP에서 다수가 접속해야 하는 경우는 정황판단에 의해서 언제든지 블럭대상이 될 수 있음을 명심하시고, 블럭당할시에 이의제기는 받지 않습니다. 그만큼 확실히 멀티나 대턴이 확실하다고 판단되는 경우를 적발합니다.
@@ -213,7 +212,7 @@ if ($category == 0) {
◈ 각 서버의 특징을 알아봅시다.
- /help_04_01.jpg class=leftFloat>
+ /help_04_01.jpg class=leftFloat>
☞ 온라인 게임을 해보셨다면 익숙한 서버 선택 화면입니다. 체섭은 크게 유저들만 활동하는 메이져 서버인 체섭과 NPC들과 어울릴 수 있는 마이너 서버인 퀘풰퉤훼섭으로 분류됩니다. 마이너 서버들은 본래 테스트 서버 목적이므로 언제든지 리셋, 폐쇄될 수 있습니다.
☞ 체섭은 180년에 모두 공백지인 상태에서 유저들끼리 경쟁하는 가장 기본적인 방법의 삼모전입니다. 활동 유저도 가장 많고 그만큼 치열합니다. 대신 눈에 띄는 활약을 했다면 『명예의 전당』과 『왕조일람』에 그 명성을 영원히 남길 수 있습니다!
@@ -227,7 +226,7 @@ if ($category == 0) {
☞ 훼섭은 퉤섭과 비슷한 스타일이지만 고속진행이 특징입니다. 아침에 시작해서 밤에 통일되는 쾌속 서버! 휴가나 방학에 즐기면 좋습니다.
- /help_04_02.jpg class=rightFloat>
+ /help_04_02.jpg class=rightFloat>
◈ 원하는 서버에 캐릭터를 생성해 봅시다.
☞ 마음에 드는 서버에서 장수생성을 클릭해봅시다. 저는 퉤섭을 찍어볼게요~
@@ -245,13 +244,13 @@ if ($category == 0) {
☞ 장수생성을 누릅시다.
☞ 다시 로그인 해봅시다. 캐릭터가 생성되었군요!
- /help_04_03.jpg class=leftFloat>
+ /help_04_03.jpg class=leftFloat>
◈ 자신의 계정을 관리하는 방법을 알아봅시다.
- /help_04_04.jpg class=leftFloat>
- /help_04_05.jpg class=rightFloat>
+ /help_04_04.jpg class=leftFloat>
+ /help_04_05.jpg class=rightFloat>
☞ 플레이에 들어가기에 앞서 계정관리를 살펴봅시다. 계정관리의 비번&전콘을 눌러봅시다.
☞ 비밀번호를 변경할 수 있습니다.
@@ -279,11 +278,11 @@ if ($category == 0) {
◈ 가장 기본이 되는 턴입력을 해봅시다.
- /help_05_01.jpg class=leftFloat>
+ /help_05_01.jpg class=leftFloat>
☞ 중간에 보이는 세로 스크롤창에서 클릭, 드래그, Ctrl+클릭, Shift+클릭을 해봅시다. 클릭은 1개만 선택됩니다.
- /help_05_03.jpg class=rightFloat>
- /help_05_02.jpg class=rightFloat>
+ /help_05_03.jpg class=rightFloat>
+ /help_05_02.jpg class=rightFloat>
☞ 1턴 부분에서 버튼을 누른 후, 떼지 말고 5턴 부분까지 끌어봅시다. 여러개가 선택됩니다. 드래그라고 하지요.
☞ 이번엔 1턴을 클릭해봅시다. 그리고 Ctrl키를 누른 상태에서 3턴, 6턴을 눌러봅시다. 떨어져있는 여러가지를 선택할 수 있답니다.
@@ -291,7 +290,7 @@ if ($category == 0) {
☞ 이번엔 1턴 부분을 클릭해봅시다. 그리고 Shift키를 누른 상태에서 5턴 부분을 클릭해 봅시다. 드래그와 비슷한 기능이죠? 이처럼 여러가지 방법을 사용해서 예약할 턴을 선택할 수 있습니다.
- /help_05_04.jpg class=leftFloat>
+ /help_05_04.jpg class=leftFloat>
☞ 간단하게 1턴, 3턴을 골라봅시다.
☞ 우측에 보이는 콤보박스를 클릭하면 명령 목록이 쭉 나열됩니다. 휠이나 스크롤바를 사용하여 아래로 쭉 내려봅시다. ===개인=== 탭에 가장 먼저 보이는 견문을 선택합니다.
@@ -300,7 +299,7 @@ if ($category == 0) {
☞ 가장 우측에 보이는 곳에 1, 3번째 칸에 견문이 입력되었을겁니다. 이처럼 원하는 턴을 선택하고, 원하는 명령을 선택하고, 실행을 눌러서 원하는 명령을 원하는 턴에 입력하는게 가장 기본적인 플레이 방법입니다.
- /help_05_05.jpg class=leftFloat>
+ /help_05_05.jpg class=leftFloat>
☞ 우측에 보이는 정보창(이하 예턴창)에서는 턴 순서, 게임시간, 실제시간, 명령이 보이게 됩니다. 방금 입력한대로 따르면 1턴이 197년 9월이고 실제 시간으로는 21시 30분에 실행된다는 뜻이네요^^
☞ 이처럼 자신의 턴시간에 자신이 예약해둔 명령이 실행되는 형태로 게임이 진행됩니다. 예약턴을 지정해놓고 잠을 자도 되고, 일을 해도 되고, IRC에 가서 전략을 토론하거나 잡담을 해도 되며, 심지어 멍때려도 됩니다!
@@ -308,7 +307,7 @@ if ($category == 0) {
◈ 고급 턴 입력 스킬을 공부해 봅시다.
- /help_05_06.jpg class=leftFloat>
+ /help_05_06.jpg class=leftFloat>
☞ 1턴에 견문을 입력해봅시다.
☞ 2턴에 요양을 입력해봅시다.
@@ -319,7 +318,7 @@ if ($category == 0) {
☞ 이번엔 전체턴에 견문을 입력해봅시다. 1~24턴까지 견문이 입력될겁니다.
- /help_05_07.jpg class=leftFloat>
+ /help_05_07.jpg class=leftFloat>
☞ 반복&수정에서 5턴 미루기를 선택해 봅시다. 1~5턴이 휴식으로 된것을 볼 수 있습니다.
☞ 무슨 기능인지 눈치 채셨나요? 현재 입력된 1~24턴이 그대로 5칸이 6~24턴으로 밀리게 되고 공백칸은 휴식으로 채워지게 됩니다. 전체 턴 순서는 유지하면서도 끼워넣거나 할때 편리하게 이용할 수 있습니다. 당기기도 비슷한 기능이랍니다. 직접 해보세요!
@@ -345,7 +344,7 @@ if ($category == 0) {
◈ 올턴 견문을 입력해놓으셨나요? 그럼 이제 각종 정보를 구경해볼까요?
- /help_06_01.jpg class=leftFloat>
+ /help_06_01.jpg class=leftFloat>
세력도
☞ 전체 지도와 장수동향, 정세동향을 볼 수 있습니다. 여기 나오는 정보들은 최신 소식이 가장 위에 나오는 형태이므로 아래에서 위로(↑방향) 읽는 것이 시간순서가 되겠지요^^
@@ -395,7 +394,7 @@ if ($category == 0) {
☞ 현재 서버내의 접속현황을 확인할 수 있습니다.
- /help_06_03.jpg class=rightFloat>
+ /help_06_03.jpg class=rightFloat>
☞ 1. 현재 토너먼트 진행상황을 알 수 있습니다.
☞ 2. 서버의 과부하 상황을 알 수 있습니다.
☞ 3. 서버의 시나리오 종류를 알 수 있습니다.
@@ -416,7 +415,7 @@ if ($category == 0) {
☞ 18. 1~24턴의 예약턴 표시
- /help_06_04.jpg class=rightFloat>
+ /help_06_04.jpg class=rightFloat>
☞ 소속 국가 정보 : 현재는 재야이므로 당연히 없겠죠? ^^ (일반장수 튜토리얼)
☞ 내 장수 정보 표시
☞ 캐릭터의 얼굴입니다.
@@ -446,7 +445,7 @@ if ($category == 0) {
☞ 벌점 : 갱신(클릭)량에 따라서 벌점이 쌓입니다. 너무 무리한 갱신은 서버에 무리를 줄 수 있으므로 벌점이 너무 높으면 안되겠죠. 일반적으로 플레이하는 유저라면 신경쓰지 않아도 됩니다.
- /help_06_05.jpg class=rightFloat>
+ /help_06_05.jpg class=rightFloat>
☞ 1. 국가정보창들 : 일반장수 튜토리얼 참고
☞ 2. 장수동향 : 전체 장수들의 눈에 띄는 동향들이 표시됩니다.
☞ 3. 개인기록 : 내 캐릭터의 명령 실행 결과들이 표시됩니다.
@@ -460,27 +459,27 @@ if ($category == 0) {
◈ 인터페이스 구경 잘 하셨나요? ^^ 그럼 이제 갱신 버튼을 눌러볼까요?
- /help_06_06.jpg class=leftFloat>
+ /help_06_06.jpg class=leftFloat>
☞ 음? 뭐가 바뀐거지? 잘 살펴보시면 명령목록이 구경하시는동안 시간만큼 수행되어서 당겨진 것을 볼 수 있을겁니다. 5분턴 서버 기준으로 20분정도 구경을 하셨다면 약 4턴이 실행되었겠군요^^
- /help_06_07.jpg class=rightFloat>
+ /help_06_07.jpg class=rightFloat>
☞ 개인기록을 보시면 4턴이 실행된동안의 결과가 기록되어있습니다. 하하핫! 동네 장사를 이겼군요!.
☞ 오오~ 레벨업 하는 모습도 보이는군요.
- /help_06_08.jpg class=leftFloat>
+ /help_06_08.jpg class=leftFloat>
- /help_06_09.jpg class=rightFloat>
+ /help_06_09.jpg class=rightFloat>
☞ 자, 재야에서도 볼 수 있는 중원 정보를 눌러봅시다.
☞ 각 국가별로 외교상황이나 장수 숫자를 살펴볼 수 있습니다. 한눈에 전체 정세를 파악할 때 유용하겠죠?
- /help_06_10.jpg class=rightFloat>
+ /help_06_10.jpg class=rightFloat>
☞ 현재도시를 눌러봅시다.
☞ 현재 자신이 소재하고 있는 도시의 정보를 볼 수 있습니다. 흠... 각종 수치들을 보니 아직 이 도시는 개발이 더딘 것 같군요. 뭐 우리나라가 아니므로 패스~
@@ -490,7 +489,7 @@ if ($category == 0) {
☞ 아악... 제 능력치가 빨간색인걸 보니 현재 부상을 입은 상태이군요. ㅠㅠ
- /help_06_11.jpg class=rightFloat>
+ /help_06_11.jpg class=rightFloat>
☞ 이번엔 내정보&설정을 눌러봅시다.
☞ 오. 좀 더 자세한 정보가 보이는군요. 명성과 계급, 전투기록과 숙련도도 볼 수 있군요. 개인기록도 더 오래전 것까지 볼 수 있구요. 전투 결과나 자신의 열전(역사)도 볼 수 있답니다.
@@ -516,17 +515,17 @@ if ($category == 0) {
◈ 국가에 임관하여 일반장수가 되어서 국가를 강성하게 만들어 봅시다!
- /help_07_01.jpg class=rightFloat>
+ /help_07_01.jpg class=rightFloat>
☞ 1턴에 임관을 실행해봅시다.
☞ 화면이 전환되면서 각국의 홍보문구가 나타납니다. 홍보문구를 보고 마음에 드는 국가를 선택해서 임관 버튼을 눌러봅시다. 손권을 돕고 싶으니 吳을 선택!
- /help_07_02.jpg class=leftFloat>
+ /help_07_02.jpg class=leftFloat>
☞ 1턴에 【吳】(으)로 임관이라고 입력된게 보이죠? 지루하게 어떻게 기다리느냐구요? 나중에 중요 장수가 되거나 수뇌부, 군주가 되면 정신이 없을정도로 시간이 촉박할겁니다. ㅎㅎ 이리저리 구경하면서 임관이 되길 기다려봅시다.
☞ 1턴이 실행될즈음 중원정보나 현재도시를 들락날락 하거나 갱신 버튼을 눌러보면 임관명령 결과가 보이게 됩니다. 잘 임관 되었군요.
- /help_07_03.jpg class=leftFloat>
+ /help_07_03.jpg class=leftFloat>
☞ 이제 한 국가의 소속 장수이므로 신분도 일반이 되었고 국가를 강성하게 만들기 위해서 열심히 일을 해봅시다. 국가는 열심히 일한 장수들을 위해서 1월마다 자금을, 7월마다 군량을 지급하게 됩니다. 이 돈을 가지고 내정도 하고, 나중에 전쟁이 벌어지면 병사도 모으게 됩니다. 혹은 여유자금을 가지고 아이템을 구입하거나 베팅장에 투자를 할 수도 있습니다!(응?)
☞ 임관을 하게 되면 자동으로 수도(깃발에 별표시)로 이동하게 되는데요. 흠. 도시정보를 보니 농업, 수비가 부족하군요. 전체 선택후 명령목록에서 농업이나 수비를 선택합시다. 이 장수는 무력보다 지력이 높으므로 지력이 중요한 농지개간을 선택합니다. 실행을 누르면 올턴 농지개간이 입력!
@@ -536,7 +535,7 @@ if ($category == 0) {
☞ 국가방침에서 장수들에게 방침을 정해준다면 그대로 따르는것이 더 좋겠죠? 국가는 일사불란하게 장수들이 움직일 때 더욱 강성해지는 법!
- /help_07_04.jpg class=rightFloat>
+ /help_07_04.jpg class=rightFloat>
☞ 이제 국가 정보가 나타나는군요. 살펴볼까요?
☞ 국가명
☞ 성향 : 국가의 성향입니다. 성향마다 장점과 단점이 존재합니다.
@@ -620,7 +619,7 @@ if ($category == 0) {
☞ 특수병은 강력한 전투력 대신 자금과 군량 소모가 큰 특징이 있답니다.
☞ 이민족병은 준수한 전투력과 더불어 자금과 군량 소모가 적은 특징이 있답니다.
☞ 지역병은 일반병과 비슷한 능력에 기동력이나 회피율이 뛰어난 특징이 있답니다.
- /help_08_01.jpg class=rightFloat>
+ /help_08_01.jpg class=rightFloat>
---------- 보병계열 ----------
보병 : 특별한 조건이 없이 만들 수 있어요.
청주병 : 중원 지역에서 생산이 가능해요.
diff --git a/i_other/screenshot.php b/i_other/screenshot.php
index 4a1737cd..687f3d65 100644
--- a/i_other/screenshot.php
+++ b/i_other/screenshot.php
@@ -3,7 +3,6 @@ namespace sammo;
require(__dir__.'/../vendor/autoload.php');
WebUtil::setHeaderNoCache();//FIXME: 이 파일에는 이럴 이유가 없다. javascript 기반으로 바꿔도 충분
-$images = IMAGES;
if($sel == 0) $sel = 1;
?>
@@ -18,9 +17,9 @@ if($sel == 0) $sel = 1;
body { color:white; background-color:black; border-width:1; border-color:gray; }
table { font-family:'맑은 고딕'; line-height:110%; }
font { font-family:'맑은 고딕'; line-height:110%; }
-#bg0 { background-image:url(=$images?>/back_walnut.jpg); }
-#bg1 { background-image:url(=$images?>/back_blue.jpg); }
-#bg2 { background-image:url(=$images?>/back_green.jpg); }
+#bg0 { background-image:url(=ServConfig::$gameImagePath?>/back_walnut.jpg); }
+#bg1 { background-image:url(=ServConfig::$gameImagePath?>/back_blue.jpg); }
+#bg2 { background-image:url(=ServConfig::$gameImagePath?>/back_green.jpg); }
.leftFloat {
float: left;
@@ -49,13 +48,13 @@ font { font-family:'맑은 고딕'; line-height:110%; }
- /screenshot_01.jpg style=border-style:ridge;width:125px;height:75px; onclick=location.replace('screenshot.php?sel=1')>
- /screenshot_02.jpg style=border-style:ridge;width:125px;height:75px; onclick=location.replace('screenshot.php?sel=2')>
- /screenshot_03.jpg style=border-style:ridge;width:125px;height:75px; onclick=location.replace('screenshot.php?sel=3')>
- /screenshot_04.jpg style=border-style:ridge;width:125px;height:75px; onclick=location.replace('screenshot.php?sel=4')>
- /screenshot_05.jpg style=border-style:ridge;width:125px;height:75px; onclick=location.replace('screenshot.php?sel=5')>
- /screenshot_06.jpg style=border-style:ridge;width:125px;height:75px; onclick=location.replace('screenshot.php?sel=6')>
- /screenshot_07.jpg style=border-style:ridge;width:125px;height:75px; onclick=location.replace('screenshot.php?sel=7')>
+ /screenshot_01.jpg style=border-style:ridge;width:125px;height:75px; onclick=location.replace('screenshot.php?sel=1')>
+ /screenshot_02.jpg style=border-style:ridge;width:125px;height:75px; onclick=location.replace('screenshot.php?sel=2')>
+ /screenshot_03.jpg style=border-style:ridge;width:125px;height:75px; onclick=location.replace('screenshot.php?sel=3')>
+ /screenshot_04.jpg style=border-style:ridge;width:125px;height:75px; onclick=location.replace('screenshot.php?sel=4')>
+ /screenshot_05.jpg style=border-style:ridge;width:125px;height:75px; onclick=location.replace('screenshot.php?sel=5')>
+ /screenshot_06.jpg style=border-style:ridge;width:125px;height:75px; onclick=location.replace('screenshot.php?sel=6')>
+ /screenshot_07.jpg style=border-style:ridge;width:125px;height:75px; onclick=location.replace('screenshot.php?sel=7')>
@@ -77,7 +76,7 @@ case 7: echo "독 특 한 커 뮤 니 티"; break;
- /screenshot_0=$sel?>.jpg style=border-style:ridge;>
+ /screenshot_0=$sel?>.jpg style=border-style:ridge;>
diff --git a/js/install.js b/js/install.js
index b351b957..12b0faf0 100644
--- a/js/install.js
+++ b/js/install.js
@@ -54,7 +54,9 @@ $(document).ready( function () {
db_id:"required",
db_pw:"required",
db_name:"required",
- serv_host:"required"
+ serv_host:"required",
+ shared_icon_path:"required",
+ game_image_path:"required"
},
errorElement: "div",
errorPlacement: function ( error, element ) {
@@ -90,7 +92,9 @@ $(document).ready( function () {
db_id:$('#db_id').val(),
db_pw:$('#db_pw').val(),
db_name:$('#db_name').val(),
- serv_host:$('#serv_host').val()
+ serv_host:$('#serv_host').val(),
+ shared_icon_path:$('#shared_icon_path').val(),
+ game_image_path:$('#game_image_path').val()
}
}).then(function(result){
var deferred = $.Deferred();
diff --git a/src/sammo/AppConf.php b/src/sammo/AppConf.php
index f1498218..dde33178 100644
--- a/src/sammo/AppConf.php
+++ b/src/sammo/AppConf.php
@@ -5,6 +5,9 @@ class AppConf
{
private static $serverList = null;
+ /** @var string 전용 아이콘 경로 */
+ public static $userIconPath = 'd_pic';
+
/**
* 서버 설정 반환
*
@@ -55,4 +58,12 @@ class AppConf
}
return DB::db();
}
+
+ public static function getUserIconPathFS() : string{
+ return ROOT.'/'.static::$userIconPath;
+ }
+
+ public static function getUserIconPathWeb() : string{
+ return ServConfig::$serverWebPath.'/'.static::$userIconPath;
+ }
}