$div10[1] += $harmonyLvl; $div10[1] = strtoupper(dechex($div10[1])); $div10 = implode("", $div10); while (strlen($div10) < 2) { $div10 = "0" . $div10; } $div11 = strtoupper(dechex($socket1)); $div12 = strtoupper(dechex($socket2)); $div13 = strtoupper(dechex($socket3)); $div14 = strtoupper(dechex($socket4)); $div15 = strtoupper(dechex($socket5)); while (strlen($div11) < 2) { $div11 = "0" . $div11; } while (strlen($div12) < 2) { $div12 = "0" . $div12; } while (strlen($div13) < 2) { $div13 = "0" . $div13; } while (strlen($div14) < 2) { $div14 = "0" . $div14; } while (strlen($div15) < 2) { $div15 = "0" . $div15; } $item = "{$div0}{$div1}{$div2}{$div3}{$div4}{$div5}{$div6}{$div7}{$div8}{$div9}{$div10}{$div11}{$div12}{$div13}{$div14}{$div15}"; $it->AnalyseItemByHex($item); echo "<style>.WebShopItemAnalysis {\n\ttext-align:center;\n\tbackground:#080705;\n\tcolor:#EEE;\n\tfont-size:9px;\n\t}</style>"; echo $it->ShowItemName($item); echo $it->ShowItemDetails($item, "WebShopItemAnalysis");
function GetMyFullLastBuys(&$db, &$acc, &$it) { require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Main.php"; require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/WebShop.php"; require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Language/{$MainLanguage}/WebShop.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Date.class.php"; $dateClass = new Date(); require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Item.class.php"; $it = new Item(); $db->Query("SELECT * FROM Z_Currencies"); while ($data = $db->GetRow()) { $Currencies[$data['idx']] = $data['name']; } $db->Query("SELECT * FROM Z_WebShopLog WHERE memb___id = '{$acc->memb___id}' AND status = '1' ORDER BY [date] DESC"); $NumRows = $db->NumRows(); for ($i = 0; $i < $NumRows; $i++) { $LogData[$i] = $db->GetRow(); } $return = "\n\t\t<script>\n\t\tvar Working = 0;\n\t\tfunction SearchItem(idx,serial)\n\t\t{\n\t\t\tif(Working == 1) return;\n\t\t\tWorking = 1;\n\t\t\t\$(\"#ItemLocation_\"+idx).html(\"...\");\n\t\t\t\$.post(\"/" . $_SESSION['SiteFolder'] . "System/ItemFinder.php\", { idx:idx, serial:serial, gseisgaefohrhóhg:'segsvsegerblou' }, function(data) {\n\t\t\t\t\$(\"#ItemLocation_\"+idx).html(data);\n\t\t\t\tWorking = 0;\n\t\t\t});\n\t\t}\n\t\t\n\t\tfunction RemoveInsurance(idx)\n\t\t{\n\t\t\tif(confirm('{$WebShopMessage058}'))\n\t\t\t{\n\t\t\t\t\$.post(\"/" . $_SESSION['SiteFolder'] . "?c=WebShop/MyBuys/Insurance\", { idx:idx }, function(data) {\n\t\t\t\t\talert('{$WebShopMessage059}');\n\t\t\t\t\t"; $return .= "LoadContent('index.php?c=WebShop/MyBuys');"; $return .= "\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t</script>"; if (isset($WebShopCancelByUser) && $WebShopCancelByUser) { $return .= "\n\t\t\t<p>{$WebShopMessage050}</p>\n\t\t\t<p>{$WebShopMessage055}<br />\n\t\t\t<strong>{$WebShopCancelPercentNoInsurance}" . "%</strong> {$WebShopMessage056}<br />\n\t\t\t<strong>{$WebShopCancelPercentInsurance}" . "%</strong> {$WebShopMessage057}</p>"; } if (isset($WebShopRemoveInsuranceByUser) && $WebShopRemoveInsuranceByUser) { $return .= "<p>{$WebShopMessage060}</p>"; } $return .= "\n\t\t<table class=\"WebShopFullHistoryTable\">\n \t<tr style=\"background-color:#000; color:#FFF;\">\n \t<th>{$WebShopMessage042}</td>\n \t<th>{$WebShopMessage043}</td>\n\t\t\t\t<th>{$WebShopMessage044}</td>\n\t\t\t\t<th>{$WebShopMessage045}</td>\n\t\t\t\t<th>{$WebShopMessage046}</td>\n\t\t\t\t<th></td>\n\t\t\t</tr><tbody>\n\t\t \t"; for ($i = 0; $i < $NumRows; $i++) { $data = $LogData[$i]; if ($data['insurance'] == 1) { if (isset($WebShopRemoveInsuranceByUser) && $WebShopRemoveInsuranceByUser) { $insurance = "<a href=\"javascript:;\" onclick=\"RemoveInsurance('" . $data['idx'] . "')\" style=\"color:#00AA00\" alt=\"{$WebShopMessage048}\" title=\"{$WebShopMessage048}\">[•]</a>"; } else { $insurance = "<span style=\"color:#00AA00\">[•]</a>"; } } else { $insurance = "<span style=\"color:#FF0000\">x</span>"; } $it->AnalyseItemByHex($data['item']); $item = $it->ShowItemName($data['item']) . $it->ShowItemDetails($data['item']); $location = "\n\t\t\t<div id=\"ItemLocation_" . $data['idx'] . "\">\n\t\t\t\t<a href=\"javascript:;\" onclick=\"SearchItem('" . $data['idx'] . "','" . $data['serial'] . "')\" alt=\"{$WebShopMessage049}\" title=\"{$WebShopMessage049}\">[{$WebShopMessage047}]</a>\n\t\t\t</div>"; if ($i > 1 && $i % 10 == 0) { $return .= "\n\t\t\t\t<tr style=\"background-color:#000; color:#FFF;\">\n\t\t\t\t\t<th>{$WebShopMessage042}</td>\n\t\t\t\t\t<th>{$WebShopMessage043}</td>\n\t\t\t\t\t<th>{$WebShopMessage044}</td>\n\t\t\t\t\t<th>{$WebShopMessage045}</td>\n\t\t\t\t\t<th>{$WebShopMessage046}</td>\n\t\t\t\t\t<th></td>\n\t\t\t\t</tr>\n\t\t\t\t"; } $return .= "\n\t\t\t<tr>\n\t\t\t\t<td align=\"center\">" . $dateClass->DateFormat($data['date']) . " " . $dateClass->TimeFormat($data['date'], "h") . "</td>\n\t\t\t\t<td align=\"center\">" . $item . "</td>\n\t\t\t\t<td align=\"center\" nowrap=\"nowrap\">" . number_format($data['price'], 0, "", ".") . " " . $Currencies[$data['currency']] . "</td>\n\t\t\t\t<td align=\"center\"><div id=\"insurance_" . $data['idx'] . "\">" . $insurance . "</div></td>\n\t\t\t\t<td align=\"center\">" . $location . "</td>\n\t\t\t\t<td></td>\n\t\t\t</tr>\n\t\t\t"; } $return .= "\n\t\t</tbody>\n\t\t</table>\n\t\t"; return $return; }
function ManageItemsPack(&$db, $idx) { require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Config/Main.php"; require $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "Manager/Language/{$MainLanguage}/WebShop.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/" . $_SESSION['SiteFolder'] . "System/Item.class.php"; $it = new Item(); $db->Query("SELECT pack_name FROM Z_WebShopPacks WHERE idx = '{$idx}'"); $data = $db->GetRow(); $pack_name = $data[0]; $pack_idx = $idx; $return = "\n\t\t<table class=\"WebShopManageItemsPackStructure\">\n\t\t\t<tr>\n\t\t\t\t<td valign=\"top\">\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<legend>{$WebShopMessage104} {$pack_name}</legend>\n\t\t\t\t\t\t<table>\n\t\t\t\t\t\t"; $db->Query("SELECT * FROM Z_WebShopPackItems WHERE pack_idx = '{$pack_idx}'"); while ($data = $db->GetRow()) { $return .= "\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>"; foreach ($data as $key => $value) { ${$key} = $value; } $div0 = dechex($id); while (strlen($div0) < 2) { $div0 = "0" . $div0; } $div1 = 0; if ($skill == 1) { $div1 += 128; } if ($luck == 1) { $div1 += 4; } while ($level > 0) { $div1 += 8; $level--; } $div7 = 0; if ($addopt > 3) { $div7 = 64; $addopt -= 4; } while ($addopt > 0) { $div1++; $addopt--; } $div1 = dechex($div1); while (strlen($div1) < 2) { $div1 = "0" . $div1; } $div2 = "XX"; $div3 = "XX"; $div4 = "XX"; $div5 = "XX"; $div6 = "XX"; $div7 += $exc_opts; $div7 = dechex($div7); while (strlen($div7) < 2) { $div7 = "0" . $div7; } $div8 = dechex($ancient); while (strlen($div8) < 2) { $div8 = "0" . $div8; } $div9 = array(); $div9[0] = dechex($type); $div9[1] = $opt380; $div9 = implode("", $div9); $div10 = array(); $div10[0] = dechex($harmony_opt); $div10[1] = dechex($harmony_lvl); $div10 = implode("", $div10); while (strlen($div10) < 2) { $div10 = "0" . $div10; } $div11 = strtoupper(dechex($socket1)); $div12 = strtoupper(dechex($socket2)); $div13 = strtoupper(dechex($socket3)); $div14 = strtoupper(dechex($socket4)); $div15 = strtoupper(dechex($socket5)); while (strlen($div11) < 2) { $div11 = "0" . $div11; } while (strlen($div12) < 2) { $div12 = "0" . $div12; } while (strlen($div13) < 2) { $div13 = "0" . $div13; } while (strlen($div14) < 2) { $div14 = "0" . $div14; } while (strlen($div15) < 2) { $div15 = "0" . $div15; } $item = "{$div0}{$div1}{$div2}{$div3}{$div4}{$div5}{$div6}{$div7}{$div8}{$div9}{$div10}{$div11}{$div12}{$div13}{$div14}{$div15}"; $it->AnalyseItemByHex($item); $return .= $it->ShowItemName($item); $return .= $it->ShowItemDetails($item); $return .= "\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td valign=\"top\">\n\t\t\t\t\t\t\t\t\t<div id=\"icon\" style=\"cursor:pointer; float:left;\" align=\"center\" class=\"ui-state-default ui-corner-all\" onclick=\"DeleteItemPack('{$idx}')\" title=\"Delete\">\n\t\t\t\t\t\t\t\t\t<span class=\"ui-widget ui-icon ui-icon-trash\"></span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t"; } $return .= "\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</fieldset>\n\t\t\t\t</td>\n\t\t\t\t<td valign=\"top\">\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<legend>{$WebShopMessage105}</legend>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"idx\" id=\"idx\" value=\"{$pack_idx}\" />\n\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th align=\"right\">{$WebShopMessage041}</th>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<select name=\"itemType\" id=\"itemType\" onchange=\"PackLoadItems()\">\n\t\t\t\t\t\t\t\t\t\t<option value=\"0\">Swords</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"1\">Axes</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"2\">Maces / Scepters</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"3\">Spears</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"4\">Bows / Crossbows</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"5\">Staffs</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"6\">Shields</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"7\">Helms</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"8\">Armors</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"9\">Pants</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"10\">Gloves</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"11\">Boots</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"12\">Items (12)</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"13\">Items (13)</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"14\">Items (14)</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"15\">Scrolls</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th align=\"right\">{$WebShopMessage042}</th>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<select name=\"itemIndex\" id=\"itemIndex\" onchange=\"ProcessPackItemForm()\"></select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th align=\"right\" valign=\"top\">{$WebShopMessage106}</th>\n\t\t\t\t\t\t\t\t<td class=\"WebShopExcellentOptionsCell\">\n\t\t\t\t\t\t\t\t\t<div id=\"excellent_opt\">"; /*if($it->GetExcellentOptionName(32) != "") $return .= "<input type=\"checkbox\" name=\"excopt\" id=\"excopt1\" value=\"32\" />".$it->GetExcellentOptionName(32)."<br />"; if($it->GetExcellentOptionName(16) != "") $return .= "<input type=\"checkbox\" name=\"excopt\" id=\"excopt2\" value=\"16\" />".$it->GetExcellentOptionName(16)."<br />"; if($it->GetExcellentOptionName(8) != "") $return .= "<input type=\"checkbox\" name=\"excopt\" id=\"excopt3\" value=\"8\" />".$it->GetExcellentOptionName(8)."<br />"; if($it->GetExcellentOptionName(4) != "") $return .= "<input type=\"checkbox\" name=\"excopt\" id=\"excopt4\" value=\"4\" />".$it->GetExcellentOptionName(4)."<br />"; if($it->GetExcellentOptionName(2) != "") $return .= "<input type=\"checkbox\" name=\"excopt\" id=\"excopt5\" value=\"2\" />".$it->GetExcellentOptionName(2)."<br />"; if($it->GetExcellentOptionName(1) != "") $return .= "<input type=\"checkbox\" name=\"excopt\" id=\"excopt6\" value=\"1\" />".$it->GetExcellentOptionName(1)."<br />";*/ $return .= "\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th align=\"right\">{$WebShopMessage057}</th>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<select name=\"level\" id=\"level\">"; for ($i = 0; $i <= 15; $i++) { $return .= "<option value=\"{$i}\">+{$i}</option>"; } $return .= "\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th align=\"right\">{$WebShopMessage107}</th>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<select name=\"addopt\" id=\"addopt\">"; for ($i = 0; $i <= 7; $i++) { $return .= "<option value=\"{$i}\">+{$i}% - " . $i * 4 . "% - " . $i * 5 . "</option>"; } $return .= "\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th align=\"right\">{$WebShopMessage060}</th>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<select name=\"skill\" id=\"skill\">\n\t\t\t\t\t\t\t\t\t\t<option value=\"0\">{$WebShopMessage055}</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"1\">{$WebShopMessage054}</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th align=\"right\">{$WebShopMessage061}</th>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<select name=\"luck\" id=\"luck\">\n\t\t\t\t\t\t\t\t\t\t<option value=\"0\">{$WebShopMessage055}</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"1\">{$WebShopMessage054}</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th align=\"right\">{$WebShopMessage062}</th>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<select name=\"ancient\" id=\"ancient\"></select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th align=\"right\" valign=\"top\">{$WebShopMessage063}</th>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<select name=\"harmony_opt\" id=\"harmony_opt\" onchange=\"GetHarmonyLevels()\"></select> <select name=\"harmony_lvl\" id=\"harmony_lvl\"></select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th align=\"right\">{$WebShopMessage064}</th>\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<select name=\"opt380\" id=\"opt380\">\n\t\t\t\t\t\t\t\t\t\t<option value=\"0\">{$WebShopMessage055}</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"1\">{$WebShopMessage054}</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th align=\"right\">#1 {$WebShopMessage108}</th>\n\t\t\t\t\t\t\t\t<td><select name=\"socket1\" id=\"socket1\"></select></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th align=\"right\">#2 {$WebShopMessage108}</th>\n\t\t\t\t\t\t\t\t<td><select name=\"socket2\" id=\"socket2\"></select></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th align=\"right\">#3 {$WebShopMessage108}</th>\n\t\t\t\t\t\t\t\t<td><select name=\"socket3\" id=\"socket3\"></select></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th align=\"right\">#4 {$WebShopMessage108}</th>\n\t\t\t\t\t\t\t\t<td><select name=\"socket4\" id=\"socket4\"></select></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th align=\"right\">#5 {$WebShopMessage108}</th>\n\t\t\t\t\t\t\t\t<td><select name=\"socket5\" id=\"socket5\"></select></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th align=\"right\"></th>\n\t\t\t\t\t\t\t\t<td><input type=\"button\" value=\"{$WebShopMessage067}\" onclick=\"SaveItemToPack()\" /></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</fieldset>\n\t\t\t\t</td>\t\t\t\n\t\t\t</tr>\t\t\n\t\t</table>\n\t\t<script>\n\t\t\t\$(function() { setTimeout(PackLoadItems, 100); setTimeout(ProcessPackItemForm, 100); });\n\t\t</script>\n\t\t"; return $return; }