private void ShowHtml(String name, Player player)
{
String html = HtmCache.getInstance().getNotNull(Config.BBS_HOME_DIR + "pages/buffer/" + name + ".htm", player);
if (player.isLangRus())
html = html.replaceFirst("%aim%", player.getVarB("isPlayerBuff") ? "Персонаж" : "Питомец");
else
html = html.replaceFirst("%aim%", player.getVarB("isPlayerBuff") ? "Character" : "Pet");
if (Config.COMMUNITYBOARD_BOARD_ALT_ENABLED)
{
if (player.getLevel() < 20)
html = html.replace("%pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_PICE_NG));
else if (player.getLevel() >= 20 && player.getLevel() <40)
html = html.replace("%pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_PICE_D));
else if (player.getLevel() >= 40 && player.getLevel() <52)
html = html.replace("%pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_PICE_C));
else if (player.getLevel() >= 52 && player.getLevel() <61)
html = html.replace("%pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_PICE_B));
else if (player.getLevel() >= 61 && player.getLevel() <76)
html = html.replace("%pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_PICE_A));
else if (player.getLevel() >= 76 && player.getLevel() <80)
html = html.replace("%pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_PICE_S));
else if (player.getLevel() >= 80 && player.getLevel() <84)
html = html.replace("%pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_PICE_S80));
else
html = html.replace("%pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_PICE_S84));
}
else
html = html.replace("%pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_PICE));
if (Config.COMMUNITYBOARD_BOARD_ALT_ENABLED)
{
if (player.getLevel() < 20)
html = html.replace("%group_pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_PICE_NG_GR));
else if (player.getLevel() >= 20 && player.getLevel() <40)
html = html.replace("%group_pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_PICE_D_GR));
else if (player.getLevel() >= 40 && player.getLevel() <52)
html = html.replace("%group_pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_PICE_C_GR));
else if (player.getLevel() >= 52 && player.getLevel() <61)
html = html.replace("%group_pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_PICE_B_GR));
else if (player.getLevel() >= 61 && player.getLevel() <76)
html = html.replace("%group_pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_PICE_A_GR));
else if (player.getLevel() >= 76 && player.getLevel() <80)
html = html.replace("%group_pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_PICE_S_GR));
else if (player.getLevel() >= 80 && player.getLevel() <84)
html = html.replace("%group_pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_PICE_S80_GR));
else
html = html.replace("%group_pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_PICE_S84_GR));
}
else
html = html.replace("%group_pice%", GetStringCount(Config.COMMUNITYBOARD_BUFF_SAVE_PICE));
StringBuilder content = new StringBuilder("");
content.append("<table width=120>");
for(SBufferScheme sm : ManageBbsBuffer.getSchemePlayer(player.getObjectId()))
{
content.append("<tr>");
content.append("<td>");
content.append("<button value=\"" + sm.name + "\" action=\"bypass _cbbsbrestore:" + sm.id + ":" + sm.name + ":" + name + ";\" width=105 height=20 back=\"L2UI_ct1.Button_DF_Down\" fore=\"L2UI_ct1.Button_DF\">");
content.append("</td>");
content.append("<td>");
content.append("<button value=\"-\" action=\"bypass _cbbsbdelete:" + sm.id + ":" + sm.name + ":" + name + ";\" width=20 height=20 back=\"L2UI_ct1.Button_DF_Down\" fore=\"L2UI_ct1.Button_DF\">");
content.append("</td>");
content.append("</tr>");
}
content.append("</table>");
html = html.replace("%list_sheme%", content.toString());
html = BbsUtil.htmlBuff(html, player);
ShowBoard.separateAndSend(html, player);
}