베팅장에서 관련 스탯 출력시키기
This commit is contained in:
+23
-19
@@ -38,25 +38,25 @@ if ($con >= 2) {
|
|||||||
switch ($admin['tnmt_type']) {
|
switch ($admin['tnmt_type']) {
|
||||||
default:
|
default:
|
||||||
throw new \RuntimeException('Invalid tnmt_type');
|
throw new \RuntimeException('Invalid tnmt_type');
|
||||||
case 0:
|
case convertTournamentType('전력전'):
|
||||||
$tnmt_type = "<font color=cyan>전력전</font>";
|
$tnmt_type = "<font color=cyan>전력전</font>";
|
||||||
$tp = "total";
|
$tp = "total";
|
||||||
$tp2 = "종합";
|
$tp2 = "종합";
|
||||||
$tp3 = "total";
|
$tp3 = "total";
|
||||||
break;
|
break;
|
||||||
case 1:
|
case convertTournamentType('통솔전'):
|
||||||
$tnmt_type = "<font color=cyan>통솔전</font>";
|
$tnmt_type = "<font color=cyan>통솔전</font>";
|
||||||
$tp = "leadership";
|
$tp = "leadership";
|
||||||
$tp2 = "통솔";
|
$tp2 = "통솔";
|
||||||
$tp3 = "leadership";
|
$tp3 = "leadership";
|
||||||
break;
|
break;
|
||||||
case 2:
|
case convertTournamentType('일기토'):
|
||||||
$tnmt_type = "<font color=cyan>일기토</font>";
|
$tnmt_type = "<font color=cyan>일기토</font>";
|
||||||
$tp = "strength";
|
$tp = "strength";
|
||||||
$tp2 = "무력";
|
$tp2 = "무력";
|
||||||
$tp3 = "strength";
|
$tp3 = "strength";
|
||||||
break;
|
break;
|
||||||
case 3:
|
case convertTournamentType('설전'):
|
||||||
$tnmt_type = "<font color=cyan>설전</font>";
|
$tnmt_type = "<font color=cyan>설전</font>";
|
||||||
$tp = "intel";
|
$tp = "intel";
|
||||||
$tp2 = "지력";
|
$tp2 = "지력";
|
||||||
@@ -273,7 +273,7 @@ if ($str3) {
|
|||||||
for ($i = 0; $i < 8; $i++) {
|
for ($i = 0; $i < 8; $i++) {
|
||||||
$cent[$i] = "<font color=white>";
|
$cent[$i] = "<font color=white>";
|
||||||
}
|
}
|
||||||
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=20 order by grp, grp_no LIMIT 16');
|
$generalList = $db->query('SELECT npc,name,win,leadership,strength,intel,leadership+strength+intel as total from tournament where grp>=20 order by grp, grp_no LIMIT 16');
|
||||||
while (count($generalList) < 16) {
|
while (count($generalList) < 16) {
|
||||||
$generalList[] = [
|
$generalList[] = [
|
||||||
'name' => '-',
|
'name' => '-',
|
||||||
@@ -293,6 +293,7 @@ if ($str3) {
|
|||||||
$line[$i] = "<font color=white>";
|
$line[$i] = "<font color=white>";
|
||||||
}
|
}
|
||||||
$gen[$i] = $general['name'];
|
$gen[$i] = $general['name'];
|
||||||
|
$stat[$i] = $general[$tp];
|
||||||
}
|
}
|
||||||
for ($i = 0; $i < 8; $i++) {
|
for ($i = 0; $i < 8; $i++) {
|
||||||
$cent[$i] = $cent[$i] . "┻" . "</font>";
|
$cent[$i] = $cent[$i] . "┻" . "</font>";
|
||||||
@@ -300,13 +301,24 @@ if ($str3) {
|
|||||||
$line[$i * 2 + 1] = $line[$i * 2 + 1] . "━━┓" . "</font>";
|
$line[$i * 2 + 1] = $line[$i * 2 + 1] . "━━┓" . "</font>";
|
||||||
echo "<td colspan=2>{$line[$i * 2]}{$cent[$i]}{$line[$i * 2 + 1]}</td>";
|
echo "<td colspan=2>{$line[$i * 2]}{$cent[$i]}{$line[$i * 2 + 1]}</td>";
|
||||||
}
|
}
|
||||||
echo "
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
<tr align=center>";
|
<tr align=center>
|
||||||
|
<?php for ($i = 0; $i < 16; $i++) { ?>
|
||||||
for ($i = 0; $i < 16; $i++) {
|
<td width=70><?=$gen[$i]?></td>
|
||||||
echo "<td width=70>{$gen[$i]}</td>";
|
<?php } ?>
|
||||||
}
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<?php for ($i = 0; $i < 16; $i++) { ?>
|
||||||
|
<td width=70 style="font-size: 14px"><?=$stat[$i]?></td>
|
||||||
|
<?php } ?>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table align=center width=1120 class='tb_layout bg0'>
|
||||||
|
<tr align=center>
|
||||||
|
<td height=10 colspan=16></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
|
||||||
$bet = [];
|
$bet = [];
|
||||||
$gold = [];
|
$gold = [];
|
||||||
@@ -326,14 +338,6 @@ if ($str3) {
|
|||||||
$gold[$i] = Util::round($myBet[$i] * $bet[$i]);
|
$gold[$i] = Util::round($myBet[$i] * $bet[$i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<table align=center width=1120 class='tb_layout bg0'>
|
|
||||||
<tr align=center>
|
|
||||||
<td height=10 colspan=16></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
echo "
|
echo "
|
||||||
<tr align=center>";
|
<tr align=center>";
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,15 @@ function getNationLevel(int $level) {
|
|||||||
][$level];
|
][$level];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function convertTournamentType(string $type){
|
||||||
|
return[
|
||||||
|
'전력전'=>0,
|
||||||
|
'통솔전'=>1,
|
||||||
|
'일기토'=>2,
|
||||||
|
'설전'=>3,
|
||||||
|
][$type]??-1;
|
||||||
|
}
|
||||||
|
|
||||||
function getGenChar(?string $type) {
|
function getGenChar(?string $type) {
|
||||||
if($type === null){
|
if($type === null){
|
||||||
return '-';
|
return '-';
|
||||||
|
|||||||
Reference in New Issue
Block a user