function SmithyRefineShow() { // ■精錬処理 //$Result = $this->SmithyRefineProcess(); // 精錬可能な物の表示 if ($this->item) { include CLASS_JS_ITEMLIST; $possible = CanRefineType(); $possible = array_flip($possible); //配列の先頭の値が"0"なので1にする(isset使わずにtrueにするため) $possible[key($possible)]++; $goods = new JS_ItemList(); $goods->SetID("my"); $goods->SetName("type"); $goods->ListTable("<table cellspacing=\"0\">"); // テーブルタグのはじまり $goods->ListTableInsert("<tr><td class=\"td9\"></td><td class=\"align-center td9\">精炼费</td><td class=\"align-center td9\">Item</td></tr>"); // テーブルの最初と最後の行に表示させるやつ。 // JSを使用しない。 if ($this->no_JS_itemlist) { $goods->NoJS(); } foreach ($this->item as $no => $val) { $item = LoadItemData($no); // 精錬可能な物だけ表示させる。 if (!$possible[$item["type"]]) { continue; } $price = $item["buy"] / 2; // NoTable // $string = '<input type="radio" class="vcent" name="item_no" value="'.$no.'">'; // $string .= "<span style=\"padding-right:10px;width:10ex\">".MoneyFormat($price)."</span>".ShowItemDetail($item,$val,1)."<br />"; $string = '<tr>'; $string .= '<td class="td7"><input type="radio" class="vcent" name="item_no" value="' . $no . '">'; $string .= '</td><td class="td7">' . MoneyFormat($price) . '</td><td class="td8">' . ShowItemDetail($item, $val, 1) . "<td>"; $string .= "</tr>"; $goods->AddItem($item, $string); } // JavaScript部分の書き出し print $goods->GetJavaScript("list"); print '可以精炼的名单'; // 種類のセレクトボックス print $goods->ShowSelect(); print '<form action="?menu=refine" method="post">' . "\n"; // [Refine]button print '<input type="submit" value="Refine" name="refine" class="btn">' . "\n"; // 精錬回数の指定 print '回数 : <select name="timesA">' . "\n"; for ($i = 1; $i < 11; $i++) { print '<option value="' . $i . '">' . $i . '</option>'; } print '</select>' . "\n"; // リストの表示 print '<div id="list">' . $goods->ShowDefault() . '</div>' . "\n"; // [Refine]button print '<input type="submit" value="Refine" name="refine" class="btn">' . "\n"; print '<input type="hidden" value="1" name="refine">' . "\n"; // 精錬回数の指定 print '回数 : <select name="timesB">' . "\n"; for ($i = 1; $i < REFINE_LIMIT + 1; $i++) { print '<option value="' . $i . '">' . $i . '</option>'; } print '</select>' . "\n"; print '</form>' . "\n"; } else { print "No items<br />\n"; } print "</div>\n"; ?> </div> <?php }
function CanRefine() { $possible = CanRefineType(); if (REFINE_LIMIT <= $this->refine) { return false; } else { if (in_array($this->type, $possible)) { return true; } else { return false; } } }