diff --git a/hwe/b_dipcenter.php b/hwe/b_dipcenter.php index 1dd949c9..7e1cc3e2 100644 --- a/hwe/b_dipcenter.php +++ b/hwe/b_dipcenter.php @@ -216,7 +216,7 @@ if ($budgetricediff > 0) { - + diff --git a/hwe/func_template.php b/hwe/func_template.php index b0cbd495..a5e9af0f 100644 --- a/hwe/func_template.php +++ b/hwe/func_template.php @@ -172,4 +172,15 @@ function getMapHtml(){ $templates = new \League\Plates\Engine(__dir__.'/templates'); return $templates->render('map'); +} + +function getInvitationList(array $nationList){ + $templates = new \League\Plates\Engine(__dir__.'/templates'); + + foreach($nationList as &$nation){ + $nation['textColor'] = newColor($nation['color']); + } + return $templates->render('invitationList', [ + 'nationList'=>$nationList + ]); } \ No newline at end of file diff --git a/hwe/join.php b/hwe/join.php index a7dc6690..680c4e64 100644 --- a/hwe/join.php +++ b/hwe/join.php @@ -63,27 +63,11 @@ if ($gencount >= $admin['maxgeneral']) { echo ""; exit(); } -?> -
국 가 방 침 & 임관 권유 메세지
국 가 방 침 & 임관 권유 메시지
국가 방침 name=btn value=국가방침>
임관 권유 maxlength=1000 style=color:white;background-color:black;width:830px; name=scoutmsg value=''> name=btn value=임관권유>
870 x 200px 넘는 크기를 점유할 시 통보없이 제한될 수 있습니다.
- -query('SELECT nation,`name`,color,scout,scoutmsg FROM nation ORDER BY rand()'); -for ($i=0; $i < $nationcount; $i++) { - $nation = MYDB_fetch_array($nationresult); - if ($nation['scoutmsg'] == "") { - echo " - "; - } else { - echo " - "; - } -} +echo getInvitationList($nationList); ?> -
임관 권유 메세지
{$nation['name']}-
{$nation['name']}{$nation['scoutmsg']}
diff --git a/hwe/processing.php b/hwe/processing.php index 06b26ed6..ac8e6450 100644 --- a/hwe/processing.php +++ b/hwe/processing.php @@ -972,6 +972,8 @@ function command_25($turn, $command) { $query = "select nation,name,color,scout,scoutmsg,sabotagelimit,gennum from nation order by gennum"; $result = MYDB_query($query, $connect) or Error("aaa_processing.php ".MYDB_error($connect),""); $count = MYDB_num_rows($result); + + $nationList = $db->query('SELECT nation,`name`,color,scout,scoutmsg FROM nation ORDER BY rand()'); echo " 국가에 임관합니다.
@@ -988,18 +990,7 @@ function command_25($turn, $command) { "; $scoutStr = ""; - for($i=1; $i <= $count; $i++) { - $nation = MYDB_fetch_array($result); - - $scoutStr .= - "" - ."" - ."'; - + foreach($nationList as $nation){ if($gameStor->year < $gameStor->startyear+3 && $nation['gennum'] >= GameConst::$initialNationGenLimit) { echo " "; @@ -1026,11 +1017,8 @@ function command_25($turn, $command) { } echo " - -
" - .$nation['name'] - ."" - .($nation['scoutmsg']?:'-') - .'
- -{$scoutStr} -
임관 권유 메세지
"; +"; + echo getInvitationList($nationList); ender(); } diff --git a/hwe/select_npc.php b/hwe/select_npc.php index 95486f97..6c29380a 100644 --- a/hwe/select_npc.php +++ b/hwe/select_npc.php @@ -18,7 +18,7 @@ if(!$npcmode) { $gencount = $db->queryFirstField('SELECT count(`no`) FROM general WHERE npc<2'); -$nations = $db->queryAllLists('SELECT `name`, scoutmsg, color FROM nation'); +$nationList = $db->query('SELECT nation,`name`,color,scout,scoutmsg FROM nation ORDER BY rand()'); ?> @@ -61,21 +61,7 @@ history.go(-1); - - - - - - - - - - - - - - -
임관 권유 메세지
+
장수 빙의
diff --git a/hwe/templates/invitationList.php b/hwe/templates/invitationList.php new file mode 100644 index 00000000..2cddf86a --- /dev/null +++ b/hwe/templates/invitationList.php @@ -0,0 +1,18 @@ + + + + + + + + + + + + +
임관 권유 메시지
\ No newline at end of file