<?php
|
include_once "/language/lang.php";
|
include_once "/Common/CommFunc.php";
|
|
header("Content-type: text/html; charset=utf-8");
|
|
\CommFunc\SessionStart();
|
|
// 仙盟信息
|
$familyKeyCh = array(
|
'Rank' => \Lang\gettext('名次'),
|
'FamilyName' => \Lang\gettext('仙盟名'),
|
'LeaderName' => \Lang\gettext('盟主'),
|
'LV' => \Lang\gettext('等级'),
|
'MemberCnt' => \Lang\gettext('总人数'),
|
'OnLineCnt' => \Lang\gettext('在线数'),
|
//'WarRank'=>'联赛评级'),
|
'FightPower' => \Lang\gettext('总战力'),
|
'ServerID' => \Lang\gettext('服务器ID'),
|
'Broadcast' => \Lang\gettext('公告'),
|
);
|
|
// 成员信息
|
$memberKeyCh = array(
|
'Name' => \Lang\gettext('玩家名'),
|
'LV' => \Lang\gettext('等级'),
|
'FamilyLV' => \Lang\gettext('职位'),
|
'ActiveValue' => \Lang\gettext('周贡献'),
|
'OffLineSeconds' => \Lang\gettext('离线时间'),
|
);
|
|
// 职位
|
$positionKeyCh = array(
|
'0' => \Lang\gettext('成员'),
|
'1' => \Lang\gettext('精英'),
|
'2' => \Lang\gettext('副盟主'),
|
'3' => \Lang\gettext('盟主'),
|
);
|
|
$resultInfo = $_POST;
|
$resultList = $resultInfo["ResultMsg"];
|
|
$retCount = count($resultList);
|
|
$memberList = null;
|
?>
|
|
<hr />
|
<?php echo \Lang\gettext("仙盟数"); ?>: <?php echo $retCount; ?><br /><br />
|
<?php
|
echo "<table id=\"tf\" class=\"border-table\">";
|
echo "<tr>";
|
foreach ($familyKeyCh as $key => $value) {
|
echo "<td align='center'>" . $value . "</td>";
|
}
|
echo "</tr>";
|
|
for ($i = 0; $i < $retCount; $i++) {
|
$familyInfo = $resultList[$i];
|
if (array_key_exists('MemberInfo', $familyInfo)) {
|
$memberList = $familyInfo['MemberInfo'];
|
}
|
echo "<tr>";
|
foreach ($familyKeyCh as $key => $value) {
|
$widgetName = "lab" . $key . $i;
|
$tdContent = $familyInfo[$key];
|
$tdContent = '<label name="' . $widgetName . '" id="' . $widgetName . '"/>' . $tdContent . '</label>';
|
if ($key == "Broadcast") {
|
$align = "left";
|
} else {
|
$align = "center";
|
}
|
echo "<td align='" . $align . "'>" . $tdContent . "</td>";
|
}
|
echo "</tr>";
|
}
|
echo "</table>";
|
?>
|
|
<?php
|
if ($memberList) {
|
$memCount = count($memberList);
|
echo "<br/>" . \Lang\gettext("仙盟成员数") . ": " . $memCount . "<br/>";
|
echo "<table id=\"tm\" class=\"border-table\">";
|
echo "<tr>";
|
foreach ($memberKeyCh as $key => $value) {
|
echo "<td align='center'>" . $value . "</td>";
|
}
|
echo "</tr>";
|
|
for ($i = 0; $i < $memCount; $i++) {
|
$memberInfo = $memberList[$i];
|
echo "<tr>";
|
foreach ($memberKeyCh as $key => $value) {
|
$widgetName = "lab" . $key . $i;
|
$tdContent = $memberInfo[$key];
|
if ($key == 'FamilyLV') {
|
$tdContent = $positionKeyCh[$tdContent];
|
} else if ($key == 'OffLineSeconds') {
|
$offlineSeconds = $tdContent;
|
if (!$offlineSeconds) {
|
$tdContent = \Lang\gettext("在线");
|
} else if ($offlineSeconds >= 3600 * 24) {
|
$days = intval($offlineSeconds / (3600 * 24));
|
$hours = round(($offlineSeconds - 3600 * 24 * $days) / 3600, 1);
|
$tdContent = $days . \Lang\gettext("天") . $hours . \Lang\gettext("小时前");
|
} else if ($offlineSeconds >= 3600) {
|
$hours = round($offlineSeconds / 3600, 1);
|
$tdContent = $hours . \Lang\gettext("小时前");
|
} else if ($offlineSeconds >= 60) {
|
$minutes = intval($offlineSeconds / 60);
|
$tdContent = $minutes . \Lang\gettext("分钟前");
|
} else {
|
$tdContent = $offlineSeconds . \Lang\gettext("秒前");
|
}
|
}
|
$tdContent = '<label name="' . $widgetName . '" id="' . $widgetName . '"/>' . $tdContent . '</label>';
|
echo "<td align='center'>" . $tdContent . "</td>";
|
}
|
echo "</tr>";
|
}
|
echo "</table>";
|
}
|
?>
|
<hr />
|
<style type="text/css">
|
.border-table {
|
border-collapse: collapse;
|
border: none;
|
}
|
|
.border-table td {
|
border: solid #000 1px;
|
}
|
</style>
|