hxp
2025-06-04 f4a514d5ac952110da846636ecbb9de951eaf3d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?php
include_once "/language/lang.php";
include_once "/Common/CommFunc.php";
 
header("Content-type: text/html; charset=utf-8");
 
\CommFunc\SessionStart();
$spid = $_SESSION['spid'];
 
$itemNameArray = CommFunc\getCfgKeyNameContent("item", true, $spid);
$packTypeCh = CommFunc\getCfgKeyNameContent("packType", true, $spid);
 
$itemInfoKeyCh = array(
    'ItemPlaceIndex' => \Lang\gettext('索引'),
    'ItemTypeID' => \Lang\gettext('物品ID'),
    'ItemName' => \Lang\gettext('物品名'),
    'Count' => \Lang\gettext('个数'),
    //'IsBind' => \Lang\gettext('拍品'),
    //'IsSuite' => \Lang\gettext('套装'),
    'GearScore' => \Lang\gettext('评分'),
    'UserData' => \Lang\gettext('UserData'),
    'ItemGUID' => \Lang\gettext('ItemGUID'),
    'CreateTime' => \Lang\gettext('创建时间'),
    'RemainHour' => \Lang\gettext('剩余时间'),
);
 
$resultInfo = $_POST;
$ResultMsg = $resultInfo["ResultMsg"];
$packName = "";
$packIndex = null;
$resultList = null;
$totalItemCount = 0;
if ($ResultMsg) {
    $packIndex = $ResultMsg["PackIndex"];
    $totalItemCount = $ResultMsg["TotalItemCount"];
    $resultList = $ResultMsg["ItemList"];
    $packName = $packTypeCh[$packIndex];
}
$retCount = count($resultList);
 
//echo $_POST[data];
?>
 
<br />
<hr />
<?php
if ($packName) {
    echo "【" . $packName . "】<br/>";
}
echo \Lang\gettext("背包类型") . ": " . $packIndex . "<br/>";
echo \Lang\gettext("物品总数") . ": " . $totalItemCount . "<br/><br/>";
if ($totalItemCount != $retCount) {
    echo "<font color='red'>";
    echo \Lang\gettext("实际返回物品数量为") . ": " . $retCount . "<br/><br/>";
    echo "</font>";
}
echo "<br/>";
echo "<table id=\"tf\" class=\"border-table\">";
echo "<tr>";
foreach ($itemInfoKeyCh as $key => $value) {
    echo "<td align='center'>" . $value . "</td>";
}
echo "</tr>";
 
for ($i = 0; $i < $retCount; $i++) {
    $dataInfo = $resultList[$i];
    echo "<tr>";
    foreach ($itemInfoKeyCh as $key => $value) {
        $widgetName = "lab" . $key . $i;
        $tdContent = $dataInfo[$key];
 
        if ($key == "ItemPlaceIndex") {
            if (!$tdContent) {
                $tdContent = 0;
            }
            if ($packIndex == 33) {
                $tdContent = "<br/>神兽" . (intval($tdContent / 5)  + 1);
            }
        }
 
        if ($key == "ItemName") {
            if (!$tdContent) {
                $itemID = $dataInfo["ItemTypeID"];
                if (array_key_exists($itemID, $itemNameArray)) {
                    $tdContent .= $itemNameArray[$itemID];
                }
            }
 
            if ($dataInfo["IsSuite"] == 1) {
                $tdContent .= "<font color='red'>[" . \Lang\gettext('套装') . "]</font>";
            }
 
            if ($dataInfo["IsBind"] == 1) {
                $tdContent .= "<font color='red'>[" . \Lang\gettext('拍品') . "]</font>";
            }
        }
 
        if ($key == "Count") {
            if (!$tdContent) {
                $tdContent .= "1";
            }
            $tdContent = "x" . $tdContent;
        }
 
 
        $tdContent = '<label name="' . $widgetName . '" id="' . $widgetName . '"/>' . $tdContent . '</label>';
        if ($key == "Count" || $key == "IsBind" || $key == "IsSuite" || $key == "GearScore") {
            $align = "center";
        } else {
            $align = "left";
        }
        echo "<td align='" . $align . "'>" . $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>