예제 #1
0
function GetBackEquip($var, $gm)
{
    global $tbl_sys_msg, $page_main, $tbl_role_equip_info;
    $js_str = <<<_js_str
\t<script type="text/javascript" src="/js/page.js"></script>
\t<script type="text/javascript">
\tfunction getback(){
\t\tdocument.form1.target = "_block";
\t\tdocument.form1.action_name.value="166";
\t\tdocument.form1.submit();
\t}
\t</script>
_js_str;
    $server_id = $var["serverid"];
    $item_id = $var["item_id"];
    $event_id = $var["event_id"];
    $str = " order by le_uId desc limit 1";
    if ($event_id != null || $event_id != "") {
        $str = " and le_uId <= {$event_id}" . $str;
    }
    $allowe = HasAuth(166, $gm);
    $qs = "select lcs_uId, le.le_dtDateTime, let.let_uEventType, le.le_uId from tbl_log_item_del lid, tbl_log_player_giver lpg, tbl_log_event le, tbl_log_event_type let where le.le_uId = lid.le_uId and let.le_uId = lid.le_uId and lid.le_uId = lpg.le_uId and lis_uId = {$item_id}";
    $rs = MySQLQuery($qs, "Log", $server_id);
    if ($row = mysql_fetch_row($rs)) {
        global $tbl_event_type;
        $desc = ShowVirWealthLog_Desc($row[2], $row[3], $server_id);
        echo "<table class='list_table'>\n";
        printf("<tr><td style='width:120px;'>%s</td><td style='width:250px;'>%s</td><td>%s</td></tr>\n", $row[1], $tbl_event_type[$row[2]], $desc);
        echo "</table>\n";
        $role_id = $row[0];
        $role_name = GetRoleName($role_id, $server_id);
        if ($role_name == "-") {
            $allowe = false;
        }
    } else {
        //$allowe = false;
    }
    printf($js_str, $tbl_sys_msg["reason"]) . "\n";
    form($var, $gm);
    $style = <<<_style
<style>
.equip {
\twidth: 230px;
\tborder: 1px solid #ccc;
\tpadding:10px;
\tfloat:left;
}
.equip div{
\tfloat:left;
}
.equip .head, .equip .binding, .equip .durability, .equip .armor, .equip .armor .armor_item, .equip .advance, .equip .advance_item, .equip .intensify, .equip .intensify .intensify_item, .equip .equip_info .armor_item, .equip .JingLing {
\twidth: 230px;
}
.equip .head .name {
\tfloat:left;
}
.equip .head .level, .equip .equip_info .weapon_speed, .equip .intensify .intensify_total, .equip .advance .advance_times, .equip .addation, .equip .JingLingSkill {
\tfloat:right;
\ttext-align:right;
\tclear: right;
}
.equip .binding, .equip .durability {
\ttext-align:right;
}
.equip .armor .armor_item .armor_name, .equip .advance .advance_item .advance_name, .equip .intensify .intensify_name, .equip .equip_info .armor_item .armor_name {
\twidth: 80px;
}
.equip .armor .armor_item .armor_value,.equip .advance .advance_item .advance_value,.equip .intensify .intensify_value,.equip .equip_info .armor_item .armor_value {
\twidth: 30px;
}
.equip .armor, .equip .advance, .equip .intensify, .equip .JingLing {
\tmargin-top: 5px;
}
</style>
_style;
    echo $style;
    echo "<div class='equip'>\n";
    $qs = "select * from tbl_log_item_static where lis_uId = {$item_id}";
    $result = MySQLQuery($qs, "Log", $server_id);
    if ($row = mysql_fetch_row($result)) {
        $item_type = $row[1];
        $item_name = Local2UTF8($row[2]);
    } else {
        return false;
    }
    $attr = array();
    $attr["Static"] = array();
    $attr["ShieldAttr"] = array();
    $attr["Advance"] = array();
    $attr["Armor1"] = array();
    $attr["Armor2"] = array();
    $attr["Armor3"] = array();
    $attr["Armor4"] = array();
    $attr["Intensify"] = array();
    $attr["InTensifyAddAttr"] = array();
    $attr["Durability"] = array();
    $attr["Binding"] = array();
    $attr["SuperAddation"] = array();
    switch ($item_type) {
        case 5:
            //weapon
            $qs = "select * from tbl_log_item_weapon where lis_uId = {$item_id}" . $str;
            $result = MySQLQuery($qs, "Log", $server_id);
            if ($row = mysql_fetch_row($result)) {
                $attr["Static"] = $row;
                $level = $row[2];
                $intensify = $row[7];
                $inten = $row[8];
                $DPS = $row[4];
                $speed = $row[5];
                $rate = $row[6];
                $min_attack = intval($DPS * $speed * (1 - $rate * 0.01));
                $max_attack = intval($DPS * $speed * (1 + $rate * 0.01));
                $equip_info = "<div class='weapon_attack'>" . sprintf($tbl_role_equip_info[1][0][0], $min_attack, $max_attack) . "<br/>" . sprintf($tbl_role_equip_info[1][0][2], $DPS) . "</div>\n<div class='weapon_speed'>" . sprintf($tbl_role_equip_info[1][0][1], $speed) . "</div>\n";
            }
            break;
        case 6:
            //armor
        //armor
        case 9:
            //Jewelry
            $qs = "select * from tbl_log_item_armor where lis_uId = {$item_id}" . $str;
            $result = MySQLQuery($qs, "Log", $server_id);
            if ($row = mysql_fetch_row($result)) {
                $attr["Static"] = $row;
                $level = $row[2];
                $intensify = $row[8];
                $inten = $row[9];
                $equip_info = "<div class='armor_item'><div class='armor_name'>" . $tbl_role_equip_info[1][1][0] . "</div><div class='armor_value'>+" . $row[4] . "</div></div>\n";
                $equip_info .= "<div class='armor_item'><div class='armor_name'>" . $tbl_role_equip_info[1][1][1] . "</div><div class='armor_value'>+" . $row[5] . "</div></div>\n";
                $equip_info .= "<div class='armor_item'><div class='armor_name'>" . $tbl_role_equip_info[1][1][2] . "</div><div class='armor_value'>+" . $row[6] . "</div></div>\n";
            }
            break;
        case 7:
            //shield
            $qs = "select * from tbl_log_item_shield where lis_uId = {$item_id}" . $str;
            $result = MySQLQuery($qs, "Log", $server_id);
            if ($row = mysql_fetch_row($result)) {
                $attr["Static"] = $row;
                $level = $row[2];
                $intensify = $row[4];
                $inten = $row[5];
            }
            $qs = "select * from tbl_log_item_shield_Attr where lis_uId = {$item_id}" . $str;
            $result = MySQLQuery($qs, "Log", $server_id);
            if ($row = mysql_fetch_row($result)) {
                $attr["ShieldAttr"] = $row;
            }
            break;
        case 8:
            //ring
            $qs = "select * from tbl_log_item_ring where lis_uId = {$item_id}" . $str;
            $result = MySQLQuery($qs, "Log", $server_id);
            if ($row = mysql_fetch_row($result)) {
                $attr["Static"] = $row;
                $level = $row[2];
                $intensify = $row[6];
                $inten = $row[7];
                $DPS = $row[4];
                $equip_info = "<div class='ring_attack'>" . sprintf($tbl_role_equip_info[1][2][0], $DPS) . "</div>\n";
            }
            break;
    }
    $addation = 0;
    $qs = "select * from tbl_log_item_equip_superaddation where lis_uId = {$item_id}";
    $result = MySQLQuery($qs, "Log", $server_id);
    if ($row = mysql_fetch_row($result)) {
        $attr["SuperAddation"] = $row;
        $addation = $row[2];
    }
    $addation_rate = 0;
    $addation_time = "";
    $addation_desc = "";
    switch ($addation) {
        case 1:
            $addation_rate = 10;
            break;
        case 2:
            $addation_rate = 21;
            break;
        case 3:
            $addation_rate = 33;
            break;
        case 4:
            $addation_rate = 46;
            break;
        case 5:
            $addation_rate = 60;
            break;
        case 6:
            $addation_rate = 75;
            break;
        case 7:
            $addation_rate = 91;
            break;
        case 8:
            $addation_rate = 108;
            break;
    }
    if ($addation > 0) {
        $addation_time = "&nbsp;+" . $addation;
        $addatiom_desc = "<div class='addation'>(" . $tbl_role_equip_info[6] . $addation_rate . "%)</div>\n";
    }
    $inten_times = 0;
    $qs = "select * from tbl_log_item_equip_intensify where lis_uId = {$item_id}" . $str;
    $result = MySQLQuery($qs, "Log", $server_id);
    if ($row = mysql_fetch_row($result)) {
        $attr["Intensify"] = $row;
        $inten_times = $row[11];
        $inten_totle = $row[15];
        $suit_info = Lan_Equip_GetSuitInfo(Local2UTF8($row[13]), $row[17]);
        $suit_name = $suit_info["name"];
        if ($row[7]) {
            $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[7])) . "</div>\n<div class='intensify_value'>+" . $row[8] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[8] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[9]) {
            $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[9])) . "</div>\n<div class='intensify_value'>+" . $row[10] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[10] / 100) . ")</div>\n") . "</div>\n";
        }
    }
    if ($suit_name != "") {
        $suit_name .= "<br/>";
    }
    echo "<div class='head'>\n<div class='name'>" . $suit_name . Lan_Item_GetDisplayName($item_name, $item_tupe, false) . $addation_time . "</div>\n<div class='level'>" . $level . $tbl_role_equip_info[7] . "</div>\n" . $addatiom_desc . "</div>\n";
    $qs = "select * from tbl_log_item_binding where lis_uId = {$item_id}" . $str;
    $result = MySQLQuery($qs, "Log", $server_id);
    if ($row = mysql_fetch_row($result)) {
        if ($row[2] > 0) {
            global $tbl_item_is_binding;
            echo "<div class='binding'>" . $tbl_item_is_binding[$row[2]] . "</div>\n";
        }
        $row[2] = 2;
        $attr["Binding"] = $row;
    }
    $qs = "select * from tbl_log_item_equip_durability where lis_uId = {$item_id}" . $str;
    $result = MySQLQuery($qs, "Log", $server_id);
    if ($row = mysql_fetch_row($result)) {
        $attr["Durability"] = $row;
        echo "<div class='durability'>" . sprintf($tbl_role_equip_info[0], $row[3], $row[2]) . "</div>\n";
    }
    echo "<div class='equip_info'>\n{$equip_info}</div>\n";
    echo "<div class='armor'>\n";
    $qs = "select * from tbl_log_item_equip_armor where lis_uId = {$item_id} and liea_uIndex = 1" . $str;
    $result = MySQLQuery($qs, "Log", $server_id);
    if ($row = mysql_fetch_row($result)) {
        $attr["Armor" . $row[4]] = $row;
        echo "<div class='armor_item'>\n";
        $armor = Lan_Equip_GetArmorPiece(Local2UTF8($row[2]));
        echo "<div class='armor_name'>" . $armor[1] . "</div>\n";
        echo "<div class='armor_value'>+" . $armor[2] * $row[3] . "</div>\n";
        if ($armor[0] > 1) {
            echo "<div class='aromr_time'>(" . $row[3] . "/" . $armor[0] . ")</div>\n";
        }
        echo "</div>\n";
    }
    $qs = "select * from tbl_log_item_equip_armor where lis_uId = {$item_id} and liea_uIndex = 2" . $str;
    $result = MySQLQuery($qs, "Log", $server_id);
    if ($row = mysql_fetch_row($result)) {
        $attr["Armor" . $row[4]] = $row;
        echo "<div class='armor_item'>\n";
        $armor = Lan_Equip_GetArmorPiece(Local2UTF8($row[2]));
        echo "<div class='armor_name'>" . $armor[1] . "</div>\n";
        echo "<div class='armor_value'>+" . $armor[2] * $row[3] . "</div>\n";
        if ($armor[0] > 1) {
            echo "<div class='aromr_time'>(" . $row[3] . "/" . $armor[0] . ")</div>\n";
        }
        echo "</div>\n";
    }
    $qs = "select * from tbl_log_item_equip_armor where lis_uId = {$item_id} and liea_uIndex = 3" . $str;
    $result = MySQLQuery($qs, "Log", $server_id);
    if ($row = mysql_fetch_row($result)) {
        $attr["Armor" . $row[4]] = $row;
        echo "<div class='armor_item'>\n";
        $armor = Lan_Equip_GetArmorPiece(Local2UTF8($row[2]));
        echo "<div class='armor_name'>" . $armor[1] . "</div>\n";
        echo "<div class='armor_value'>+" . $armor[2] * $row[3] . "</div>\n";
        if ($armor[0] > 1) {
            echo "<div class='aromr_time'>(" . $row[3] . "/" . $armor[0] . ")</div>\n";
        }
        echo "</div>\n";
    }
    $qs = "select * from tbl_log_item_equip_armor where lis_uId = {$item_id} and liea_uIndex = 4" . $str;
    $result = MySQLQuery($qs, "Log", $server_id);
    if ($row = mysql_fetch_row($result)) {
        $attr["Armor" . $row[4]] = $row;
        echo "<div class='armor_item'>\n";
        $armor = Lan_Equip_GetArmorPiece(Local2UTF8($row[2]));
        echo "<div class='armor_name'>" . $armor[1] . "</div>\n";
        echo "<div class='armor_value'>+" . $armor[2] * $row[3] . "</div>\n";
        if ($armor[0] > 1) {
            echo "<div class='aromr_time'>(" . $row[3] . "/" . $armor[0] . ")</div>\n";
        }
        echo "</div>\n";
    }
    echo "</div>\n";
    $qs = "select * from tbl_log_item_equip_advance where lis_uId = {$item_id}" . $str;
    $result = MySQLQuery($qs, "Log", $server_id);
    if ($row = mysql_fetch_row($result)) {
        $attr["Advance"] = $row;
        echo "<div class='advance'>\n";
        $advance_name = Local2UTF8($row[16]);
        $advance_cur_tiems = $row[2];
        $advance_tot_tiems = $row[3];
        if ($advance_tot_tiems > 0) {
            echo "<div class='advance_item'>\n<div class='advance_name'>" . sprintf($tbl_role_equip_info[2], $advance_name) . "</div>\n<div class='advance_value'>" . $advance_cur_tiems . "/" . $advance_tot_tiems . "</div>\n<div class='advance_times'>" . sprintf($tbl_role_equip_info[5], $row[11]) . "</div>\n</div>\n";
        }
        if ($row[12] != 0) {
            echo "<div class='advance_item'>\n<div class='advance_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[17])) . "</div>\n<div class='advance_value'>+" . $row[12] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[12] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[13] != 0) {
            echo "<div class='advance_item'>\n<div class='advance_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[18])) . "</div>\n<div class='advance_value'>+" . $row[13] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[13] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[14] != 0) {
            echo "<div class='advance_item'>\n<div class='advance_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[19])) . "</div>\n<div class='advance_value'>+" . $row[14] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[14] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[15] != 0) {
            echo "<div class='advance_item'>\n<div class='advance_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[20])) . "</div>\n<div class='advance_value'>+" . $row[15] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[15] / 100) . ")</div>\n") . "</div>\n";
        }
        $JingLingType = Local2UTF8($row[9]);
        $JingLingSkill = $row[8];
        echo "</div>\n";
    }
    global $tbl_item_inten_soul;
    $qs = "select * from tbl_log_item_equip_intensifyAddAttr where lis_uId = {$item_id}" . $str;
    $result = MySQLQuery($qs, "Log", $server_id);
    if ($row = mysql_fetch_row($result)) {
        $attr["InTensifyAddAttr"] = $row;
        if ($row[2]) {
            $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[2])) . "</div>\n<div class='intensify_value'>+" . $row[3] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[3] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[4]) {
            $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[4])) . "</div>\n<div class='intensify_value'>+" . $row[5] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[5] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[6]) {
            $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[6])) . "</div>\n<div class='intensify_value'>+" . $row[7] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[7] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[8]) {
            $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[8])) . "</div>\n<div class='intensify_value'>+" . $row[9] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[9] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[10]) {
            $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[10])) . "</div>\n<div class='intensify_value'>+" . $row[11] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[11] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[12]) {
            $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[12])) . "</div>\n<div class='intensify_value'>+" . $row[13] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[13] / 100) . ")</div>\n") . "</div>\n";
        }
    }
    echo "<div class='intensify'>\n";
    echo "<div class='intensify_item'>\n";
    if ($intensify > 0) {
        echo "<div class='intensify_name'>" . sprintf($tbl_role_equip_info[3], $tbl_item_inten_soul[Local2base64($inten)]) . "</div>\n<div class='intensify_value'>{$inten_times}/{$intensify}</div>\n";
    }
    if ($inten_totle) {
        echo "<div class='intensify_total'>" . sprintf($tbl_role_equip_info[4], $inten_totle) . "</div>\n";
    }
    echo "</div>\n";
    echo $inten_info;
    echo "<div class='intensify_item'>\n";
    if ($suit_info["name"] != null) {
        echo $suit_info["name"] . "\n";
    }
    echo "<div style='margin-left: 10px'>\n";
    if ($suit_info["part"] != null) {
        foreach ($suit_info["part"] as $part) {
            echo $suit_info["name"] . $part . "<br/>\n";
        }
    }
    if ($suit_info["desc"] != null) {
        foreach ($suit_info["desc"] as $i => $desc) {
            printf($tbl_role_equip_info[8], $i);
            echo $desc . "<br/>\n";
        }
    }
    echo "</div>\n";
    if ($suit_info["talent"] != null) {
        echo "<div>" . $tbl_role_equip_info[9] . $suit_info["talent"] . "</div>\n";
    }
    echo "</div>\n";
    echo "</div>\n";
    global $tbl_JingLing_type;
    echo "<div class='JingLing'><div>" . $tbl_JingLing_type[UTF82Base64($JingLingType)] . "</div>";
    if ($JingLingSkill > 0) {
        echo "<div class='JingLingSkill'>" . Lan_Equip_GetSkillName($JingLingType, $JingLingSkill) . "</div>";
    }
    echo "</div>\n";
    echo "</div>\n";
    echo "</div>\n";
    if ($allowe) {
        $attrstr = $item_name . "," . $item_type . "," . $item_id . ";";
        $attrstr .= attrtostr($attr["Static"]) . ";";
        $attrstr .= attrtostr($attr["ShieldAttr"]) . ";";
        $attrstr .= attrtostr($attr["Advance"]) . ";";
        $attrstr .= attrtostr($attr["Armor1"]) . ";";
        $attrstr .= attrtostr($attr["Armor2"]) . ";";
        $attrstr .= attrtostr($attr["Armor3"]) . ";";
        $attrstr .= attrtostr($attr["Armor4"]) . ";";
        $attrstr .= attrtostr($attr["Intensify"]) . ";";
        $attrstr .= attrtostr($attr["InTensifyAddAttr"]) . ";";
        $attrstr .= attrtostr($attr["Durability"]) . ";";
        $attrstr .= ",,2,;";
        $attrstr .= attrtostr($attr["SuperAddation"]) . ";";
        echo "<input type='hidden' name='attr' value='{$attrstr}'/>\n";
        echo "<table style='float: left; margin-left: 20px;'>\n";
        echo "<tr><th>" . $page_main["role_name"] . "</th><td><input type='text' name='role_name' value='{$role_name}'" . ($role_name == "" ? "" : " readonly=\"readonly\"") . " /></td></tr>\n";
        echo "<tr><th>" . $tbl_sys_msg["reason"] . "</th><td><textarea name='reason' style='width:300px;'></textarea></td></tr>\n";
        echo "<tr><th>&nbsp;</th><td><input type='button' onclick='getback()' value='" . $tbl_sys_msg["submit"] . "' /></td></tr>\n";
        echo "</table>\n";
    }
    echo "</form>\n";
    return true;
}
예제 #2
0
파일: Lib.php 프로젝트: svn2github/ybtx
function Lan_NPC_GetDisplayName($name, $b = true)
{
    $ret = "<i>{$name}</i>";
    if ($name == "") {
        return $ret;
    }
    $param = array();
    $param["name"] = UTF82Local($name);
    $xml_item = Lan_Load($param, "Lan_NPC_GetDisplayName");
    if ($xml_item->getElementsByTagName("NPC")->length > 0) {
        $ret = $xml_item->getElementsByTagName("NPC")->item(0)->nodeValue;
    }
    if ($b) {
        $ret .= "<span class='base64'>" . UTF82Base64($name) . "</span>";
    }
    return $ret;
}
예제 #3
0
function GetTongInfo($var, $gm)
{
    if ($var["serverindex"] == null || $var["serverindex"] == "") {
        global $tbl_list_tong, $tbl_sys_msg, $tbl_tong_page, $tbl_sys_msg;
        $js_src = <<<_js_src
<script type='text/javascript' src='/js/checkbox.js'></script>
<script type='text/javascript' src='/js/page.js'></script>
<script type="text/javascript">
function OnDetail(obj,id){
\tdocument.form1.target = '_self';
\tdocument.form1.action_name.value = '65';
\tdocument.form1.id.value = id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.submit();
}
function OnMember(obj,id){
\tdocument.form1.target = '_self';
\tdocument.form1.action_name.value = '64';
\tdocument.form1.id.value = id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.submit();
}
function OnDepot(obj,id){
\tdocument.form1.target = '_self';
\tdocument.form1.action_name.value = '178';
\tdocument.form1.id.value = id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.submit();
}
function OnRename(obj,id){
\tvar new_name = prompt("%s","");
\tif(new_name==null) return;
\tdocument.form1.new_name.value = new_name;
\tvar reason = prompt("%s","");
\tif(reason==null) return;
\tdocument.form1.reason.value = reason;
\tdocument.form1.target = "block";
\tdocument.form1.action_name.value = "169";
\tdocument.form1.id.value = id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.submit();
}
function OnLevel(obj,id){
\tdocument.form1.target="block";
\tvar level = \$(obj).parents("tr").find("select").val();
\tdocument.form1.new_name.value = level;
\tvar reason = prompt("%s","");
\tif(reason==null) return;
\tdocument.form1.reason.value = reason;
\tdocument.form1.action_name.value = '172';
\tdocument.form1.id.value = id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.submit();
}
function OnMemberLog(obj,id){
\tdocument.form1.target = '_self';
\tdocument.form1.action_name.value = '73';
\tdocument.form1.id.value = id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.submit();
}
function OnItemLog(obj,id){
\tdocument.form1.target = '_self';
\tdocument.form1.action_name.value = '74';
\tdocument.form1.id.value = id;
\tdocument.form1.serverid.value = \$(obj).parents(".panel").attr("id").substring(4);
\tdocument.form1.submit();
}
</script>
_js_src;
        printf($js_src . "\n", $tbl_list_tong[4][0], $tbl_sys_msg["reason"], $tbl_sys_msg["reason"], $tbl_sys_msg["reason"]);
        echo "<h1>" . $tbl_list_tong[0] . "</h1>\n";
        form($var, $gm);
        echo "<input type='hidden' name='id' />";
        echo "<input type='hidden' name='new_name' />";
        echo "<input type='hidden' name='reason' />";
        echo "<input type='hidden' name='role_name' />";
        checkbox(false, true);
        $level_str = "<select name='uPage'>";
        for ($l = 1; $l < count($tbl_tong_page); $l++) {
            $level_str .= sprintf("<option value='%d'>%s</option>", $l, $tbl_tong_page[$l]);
        }
        $level_str .= "</select>";
        ReturnAndBack();
        $var["str"] = UTF82Base64($var["str"]);
        $ret = eachServerFrame($var, $gm);
        ReturnAndBack();
        echo "</form>\n";
        return $ret;
    } else {
        $serverid = intval($var["serverindex"]);
    }
    $qs = "";
    if ($var["str"] != null && $var["str"] != "") {
        $qs = " and t.t_sName like '%" . Base642UTF8($var["str"]) . "%'";
    }
    global $tbl_list_tong;
    $query = "select t.t_sName, count(m.cs_uId), c.c_sName, t.t_uCamp,t.t_uHonor, t.t_uLevel, t.t_uId, t.t_uDepotID from tbl_tong t, tbl_member_tong m, tbl_char c, tbl_member_tong o where t.t_uId = o.t_uId and o.mt_sPosition=5 and o.cs_uId=c.cs_uId and t.t_uId=m.t_uId" . $qs . " group by t.t_uId order by t.t_uHonor desc";
    page($var, $query, 63, "Game", $serverid, $result, $str, $desc, "_TongInfo", $tbl_list_tong[0], array($tbl_list_tong[1][0], $tbl_list_tong[1][1], $tbl_list_tong[1][2], $tbl_list_tong[1][3], $tbl_list_tong[1][4], $tbl_list_tong[1][5]));
    $tbl_content = array();
    while ($row = mysql_fetch_row($result)) {
        $tbl_size = count($tbl_content);
        $tbl_content[$tbl_size] = $row;
    }
    echo $desc;
    RetTongInfo($tbl_content, $var, $str, $serverid);
    return true;
}
예제 #4
0
function GetRoleEquipByID($var, $gm)
{
    $serverid = intval($var["serverid"]);
    $item_id = mysql_escape_string($var["item_id"]);
    global $tbl_role_equip_info;
    $qs = "select * from tbl_item_static where is_uId = {$item_id}";
    $result = MySQLQuery($qs, "Game", $serverid);
    if ($row = mysql_fetch_row($result)) {
        $item_type = $row[1];
        $item_name = Local2UTF8($row[2]);
    } else {
        return false;
    }
    $style = <<<_style
<style>
.equip {
\twidth: 230px;
\tborder: 1px solid #ccc;
\tpadding:10px;
\tfloat:left;
}
.equip div{
\tfloat:left;
}
.equip .head, .equip .binding, .equip .durability, .equip .armor, .equip .armor .armor_item, .equip .advance, .equip .advance_item, .equip .intensify, .equip .intensify .intensify_item, .equip .equip_info .armor_item, .equip .JingLing {
\twidth: 230px;
}
.equip .head .name {
\tfloat:left;
}
.equip .head .level, .equip .equip_info .weapon_speed, .equip .intensify .intensify_total, .equip .advance .advance_times, .equip .addation, .equip .JingLingSkill {
\tfloat:right;
\ttext-align:right;
\tclear: right;
}
.equip .binding, .equip .durability {
\ttext-align:right;
}
.equip .armor .armor_item .armor_name, .equip .advance .advance_item .advance_name, .equip .intensify .intensify_name, .equip .equip_info .armor_item .armor_name {
\twidth: 80px;
}
.equip .armor .armor_item .armor_value,.equip .advance .advance_item .advance_value,.equip .intensify .intensify_value,.equip .equip_info .armor_item .armor_value {
\twidth: 30px;
}
.equip .armor, .equip .advance, .equip .intensify, .equip .JingLing {
\tmargin-top: 5px;
}
</style>
_style;
    echo $style;
    echo "<div class='equip'>\n";
    switch ($item_type) {
        case 5:
            //weapon
            $qs = "select * from tbl_item_weapon where is_uId = {$item_id}";
            $result = MySQLQuery($qs, "Game", $serverid);
            if ($row = mysql_fetch_row($result)) {
                if ($row[1] != "") {
                    $item_name = $row[1];
                }
                $level = $row[2];
                $intensify = $row[7];
                $inten = $row[8];
                $DPS = $row[4];
                $speed = $row[5];
                $rate = $row[6];
                $min_attack = intval($DPS * $speed * (1 - $rate * 0.01));
                $max_attack = intval($DPS * $speed * (1 + $rate * 0.01));
                $equip_info = "<div class='weapon_attack'>" . sprintf($tbl_role_equip_info[1][0][0], $min_attack, $max_attack) . "<br/>" . sprintf($tbl_role_equip_info[1][0][2], $DPS) . "</div>\n<div class='weapon_speed'>" . sprintf($tbl_role_equip_info[1][0][1], $speed) . "</div>\n";
            }
            break;
        case 6:
            //armor
        //armor
        case 9:
            //Jewelry
            $qs = "select * from tbl_item_armor where is_uId = {$item_id}";
            $result = MySQLQuery($qs, "Game", $serverid);
            if ($row = mysql_fetch_row($result)) {
                if ($row[1] != "") {
                    $item_name = $row[1];
                }
                $level = $row[2];
                $intensify = $row[8];
                $inten = $row[9];
                $equip_info = "<div class='armor_item'><div class='armor_name'>" . $tbl_role_equip_info[1][1][0] . "</div><div class='armor_value'>+" . $row[4] . "</div></div>\n";
                $equip_info .= "<div class='armor_item'><div class='armor_name'>" . $tbl_role_equip_info[1][1][1] . "</div><div class='armor_value'>+" . $row[5] . "</div></div>\n";
                $equip_info .= "<div class='armor_item'><div class='armor_name'>" . $tbl_role_equip_info[1][1][2] . "</div><div class='armor_value'>+" . $row[6] . "</div></div>\n";
            }
            break;
        case 7:
            //shield
            $qs = "select * from tbl_item_shield where is_uId = {$item_id}";
            $result = MySQLQuery($qs, "Game", $serverid);
            if ($row = mysql_fetch_row($result)) {
                if ($row[1] != "") {
                    $item_name = $row[1];
                }
                $level = $row[2];
                $intensify = $row[4];
                $inten = $row[5];
            }
            break;
        case 8:
            //ring
            $qs = "select * from tbl_item_ring where is_uId = {$item_id}";
            $result = MySQLQuery($qs, "Game", $serverid);
            if ($row = mysql_fetch_row($result)) {
                if ($row[1] != "") {
                    $item_name = $row[1];
                }
                $level = $row[2];
                $intensify = $row[6];
                $inten = $row[7];
                $DPS = $row[4];
                $equip_info = "<div class='ring_attack'>" . sprintf($tbl_role_equip_info[1][2][0], $DPS) . "</div>\n";
            }
            break;
    }
    $addation = 0;
    $qs = "select * from tbl_item_equip_superaddation where is_uId = {$item_id}";
    $result = MySQLQuery($qs, "Game", $serverid);
    if ($row = mysql_fetch_row($result)) {
        $addation = $row[1];
    }
    $addation_rate = 0;
    $addation_time = "";
    $addation_desc = "";
    switch ($addation) {
        case 1:
            $addation_rate = 10;
            break;
        case 2:
            $addation_rate = 21;
            break;
        case 3:
            $addation_rate = 33;
            break;
        case 4:
            $addation_rate = 46;
            break;
        case 5:
            $addation_rate = 60;
            break;
        case 6:
            $addation_rate = 75;
            break;
        case 7:
            $addation_rate = 91;
            break;
        case 8:
            $addation_rate = 108;
            break;
    }
    if ($addation > 0) {
        $addation_time = "&nbsp;+" . $addation;
        $addatiom_desc = "<div class='addation'>(" . $tbl_role_equip_info[6] . $addation_rate . "%)</div>\n";
    }
    $inten_times = 0;
    $qs = "select * from tbl_item_equip_intensify where is_uId = {$item_id}";
    $result = MySQLQuery($qs, "Game", $serverid);
    if ($row = mysql_fetch_row($result)) {
        $inten_times = $row[10];
        $inten_totle = $row[14];
        $suit_info = Lan_Equip_GetSuitInfo(Local2UTF8($row[12]), $row[16]);
        $suit_name = $suit_info["name"];
        if ($row[6]) {
            $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[6])) . "</div>\n<div class='intensify_value'>+" . $row[7] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[7] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[8]) {
            $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[8])) . "</div>\n<div class='intensify_value'>+" . $row[9] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[9] / 100) . ")</div>\n") . "</div>\n";
        }
    }
    if ($suit_name != "") {
        $suit_name .= "<br/>";
    }
    echo "<div class='head'>\n<div class='name'>" . $suit_name . Lan_Item_GetDisplayName($item_name, $item_type, false) . $addation_time . "</div>\n<div class='level'>" . $level . $tbl_role_equip_info[7] . "</div>\n" . $addatiom_desc . "</div>\n";
    $qs = "select * from tbl_item_is_binding where is_uId = {$item_id}";
    $result = MySQLQuery($qs, "Game", $serverid);
    if ($row = mysql_fetch_row($result)) {
        if ($row[1] > 0) {
            global $tbl_item_is_binding;
            echo "<div class='binding'>" . $tbl_item_is_binding[$row[1]] . "</div>\n";
        }
    }
    $qs = "select * from tbl_item_equip_durability where is_uId = {$item_id}";
    $result = MySQLQuery($qs, "Game", $serverid);
    if ($row = mysql_fetch_row($result)) {
        echo "<div class='durability'>" . sprintf($tbl_role_equip_info[0], $row[2], $row[1]) . "</div>\n";
    }
    echo "<div class='equip_info'>\n{$equip_info}</div>\n";
    $qs = "select * from tbl_item_equip_armor where is_uId = {$item_id}";
    $result = MySQLQuery($qs, "Game", $serverid);
    if (mysql_num_rows($result) > 0) {
        echo "<div class='armor'>\n";
        while ($row = mysql_fetch_row($result)) {
            echo "<div class='armor_item'>\n";
            $armor = Lan_Equip_GetArmorPiece(Local2UTF8($row[1]));
            echo "<div class='armor_name'>" . $armor[1] . "</div>\n";
            echo "<div class='armor_value'>+" . $armor[2] * $row[2] . "</div>\n";
            if ($armor[0] > 1) {
                echo "<div class='aromr_time'>(" . $row[2] . "/" . $armor[0] . ")</div>\n";
            }
        }
        echo "</div>\n";
    }
    $qs = "select * from tbl_item_equip_advance where is_uId = {$item_id}";
    $result = MySQLQuery($qs, "Game", $serverid);
    if ($row = mysql_fetch_row($result)) {
        echo "<div class='advance'>\n";
        $advance_name = Local2UTF8($row[15]);
        $advance_cur_tiems = $row[1];
        $advance_tot_tiems = $row[2];
        if ($advance_tot_tiems > 0) {
            echo "<div class='advance_item'>\n<div class='advance_name'>" . sprintf($tbl_role_equip_info[2], $advance_name) . "</div>\n<div class='advance_value'>" . $advance_cur_tiems . "/" . $advance_tot_tiems . "</div>\n<div class='advance_times'>" . sprintf($tbl_role_equip_info[5], $row[10]) . "</div>\n</div>\n";
        }
        if ($row[11] != null) {
            echo "<div class='advance_item'>\n<div class='advance_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[16])) . "</div>\n<div class='advance_value'>+" . $row[11] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[11] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[12] != null) {
            echo "<div class='advance_item'>\n<div class='advance_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[17])) . "</div>\n<div class='advance_value'>+" . $row[12] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[12] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[13] != null) {
            echo "<div class='advance_item'>\n<div class='advance_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[18])) . "</div>\n<div class='advance_value'>+" . $row[13] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[13] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[14] != null) {
            echo "<div class='advance_item'>\n<div class='advance_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[19])) . "</div>\n<div class='advance_value'>+" . $row[14] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[14] / 100) . ")</div>\n") . "</div>\n";
        }
        $JingLingType = Local2UTF8($row[8]);
        $JingLingSkill = $row[7];
        echo "</div>\n";
    }
    global $tbl_item_inten_soul;
    $qs = "select * from tbl_item_equip_intensifyAddAttr where is_uId = {$item_id}";
    $result = MySQLQuery($qs, "Game", $serverid);
    if ($row = mysql_fetch_row($result)) {
        if ($row[1]) {
            $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[1])) . "</div>\n<div class='intensify_value'>+" . $row[2] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[2] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[3]) {
            $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[3])) . "</div>\n<div class='intensify_value'>+" . $row[4] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[4] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[5]) {
            $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[5])) . "</div>\n<div class='intensify_value'>+" . $row[6] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[6] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[7]) {
            $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[7])) . "</div>\n<div class='intensify_value'>+" . $row[8] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[8] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[9]) {
            $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[9])) . "</div>\n<div class='intensify_value'>+" . $row[10] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[10] / 100) . ")</div>\n") . "</div>\n";
        }
        if ($row[11]) {
            $inten_info .= "<div class='intensify_item'>\n<div class='intensify_name'>" . Lan_Equip_GetPropertyName(Local2UTF8($row[11])) . "</div>\n<div class='intensify_value'>+" . $row[12] . "</div>\n" . ($addation == 0 ? "" : "<div class='addation'>(+" . ceil($addation_rate * $row[12] / 100) . ")</div>\n") . "</div>\n";
        }
    }
    echo "<div class='intensify'>\n";
    echo "<div class='intensify_item'>\n";
    if ($intensify > 0) {
        echo "<div class='intensify_name'>" . sprintf($tbl_role_equip_info[3], $tbl_item_inten_soul[Local2Base64($inten)]) . "</div>\n<div class='intensify_value'>{$inten_times}/{$intensify}</div>\n";
    }
    if ($inten_totle) {
        echo "<div class='intensify_total'>" . sprintf($tbl_role_equip_info[4], $inten_totle) . "</div>\n";
    }
    echo "</div>\n";
    echo $inten_info;
    echo "<div class='intensify_item'>\n";
    if ($suit_info["name"] != null) {
        echo $suit_info["name"] . "\n";
    }
    echo "<div style='margin-left: 10px'>\n";
    if ($suit_info["part"] != null) {
        foreach ($suit_info["part"] as $part) {
            echo $suit_info["name"] . $part . "<br/>\n";
        }
    }
    if ($suit_info["desc"] != null) {
        foreach ($suit_info["desc"] as $i => $desc) {
            printf($tbl_role_equip_info[8], $i);
            echo $desc . "<br/>\n";
        }
    }
    echo "</div>\n";
    if ($suit_info["talent"] != null) {
        echo "<div>" . $tbl_role_equip_info[9] . $suit_info["talent"] . "</div>\n";
    }
    echo "</div>\n";
    echo "</div>\n";
    global $tbl_JingLing_type;
    echo "<div class='JingLing'><div>" . $tbl_JingLing_type[UTF82Base64($JingLingType)] . "</div>";
    if ($JingLingSkill > 0) {
        echo "<div class='JingLingSkill'>" . Lan_Equip_GetSkillName($JingLingType, $JingLingSkill) . "</div>";
    }
    echo "</div>\n";
    echo "</div>";
    return true;
}
예제 #5
0
function NpcInfo($var, $gm)
{
    if ($var["serverindex"] == null || $var["serverindex"] == "") {
        $ret = eachServerFrame($var, $gm);
        return $ret;
    }
    global $tbl_npc_info, $tbl_camp, $bid2type, $tbl_jifen, $tbl_sys_msg, $page_main;
    $gm_name = mysql_escape_string($gm);
    $serverid = intval($var["serverindex"]);
    $action = "";
    $npc_name = $var["npc_name"];
    if ($npc_name == "") {
        PrintNotice($tbl_sys_msg["nobody"]);
        return false;
    }
    $npc_name = str_replace(" ", "+", $npc_name);
    $param = array();
    $param["npc_name"] = Base642Local($npc_name);
    global $tbl_game_server;
    $gas_host = $tbl_game_server[$serverid][0];
    $gas_port = $tbl_game_server[$serverid][1];
    $ret = PostData($gas_host, $gas_port, "GetNpcInfo", $param);
    $xml = new DOMDocument();
    $xml->loadXML(Local2UTF8($ret));
    $root = $xml->getElementsByTagName("root")->item(0);
    $npc = $root->getElementsByTagName("npc")->item(0);
    echo "<h2>" . $tbl_npc_info[0] . "</h2>\n";
    echo "<table class='form_table'>\n";
    $npc_name = $npc->getElementsByTagName("npc-name")->item(0)->nodeValue;
    echo "<tr><th>" . $page_main["npc_name"] . "</th><td>" . Lan_Npc_GetDisplayName($npc_name, false) . "</td></tr>\n";
    echo "<tr><th>" . $page_main["real_name"] . "</th><td>" . $npc_name . "</td></tr>\n";
    echo "<tr><th>Base 64</th><td>" . UTF82Base64($npc_name) . "</td></tr>\n";
    echo "<tr><th>" . $tbl_sys_msg["camp"] . "</th><td>" . $tbl_camp[intval($npc->getElementsByTagName("npc-camp")->item(0)->nodeValue)] . "</td></tr>\n";
    echo "</table>\n";
    $questset = $npc->getElementsByTagName("npc-quests")->item(0);
    if ($questset) {
        echo "<h2>" . $tbl_npc_info[1] . "</h2>\n";
        $npc_pos = $questset->getElementsByTagName("npc-quest-pos")->item(0);
        echo "<table class='list_table'>\n";
        echo "<tr><th>" . $page_main["scene"] . "</th><th>" . $page_main["pos"] . "</th></tr>\n";
        echo "<tr><td>" . Lan_Scene_GetDisplayName($npc_pos->getAttribute("scene")) . "</td><td>" . $npc_pos->getAttribute("x") . "," . $npc_pos->getAttribute("y") . "</td></tr>\n";
        echo "</table>\n";
        echo "<table class='list_table'>\n";
        echo "<tr><th>" . $page_main["task"] . "</th></tr>\n";
        $npc_quests = $questset->getElementsByTagName("npc-quest");
        foreach ($npc_quests as $quest) {
            echo "<tr><td>" . Lan_Quest_GetDisplayName($quest->nodeValue) . "</td></tr>\n";
        }
        echo "</table>\n";
    }
    $shop = $npc->getElementsByTagName("npc-shop")->item(0);
    if ($shop) {
        echo "<h2>" . $tbl_npc_info[4] . "</h2>\n";
        echo "<table class='form_table'>\n";
        $shop_pay = $shop->getElementsByTagName("npc-shop-pay")->item(0);
        if ($shop_pay) {
            echo "<tr><th>" . $page_main["category"] . "</th><td>" . $tbl_jifen[intval($shop_pay->nodeValue)] . "</td></tr>\n";
        }
        echo "</table>\n";
        echo "<table class='list_table'>\n";
        echo "<tr><th>" . $page_main["type"] . "</th><th>" . $page_main["item"] . "</th></tr>\n";
        $shop_items = $shop->getElementsByTagName("npc-shop-items")->item(0)->getElementsByTagName("npc-shop-item");
        foreach ($shop_items as $shop_item) {
            echo "<tr><td>" . $bid2type[intval($shop_item->getAttribute("type"))] . "</td><td>" . Lan_Item_GetDisplayName($shop_item->nodeValue) . "</td></tr>\n";
        }
    }
    $drop = $npc->getElementsByTagName("npc-drop")->item(0);
    if ($drop) {
        echo "<h2>" . $tbl_npc_info[2] . "</h2>\n";
        echo "<table class='form_table'>\n";
        $drop_scene = $drop->getElementsByTagName("npc-drop-scene")->item(0)->nodeValue;
        if ($drop_scene) {
            echo "<tr><th>" . $page_main["scene"] . "</th><td>" . Lan_Scene_GetDisplayName($drop_scene) . "</td></tr>\n";
        }
        $drop_level = $drop->getElementsByTagName("npc-drop-level")->item(0)->nodeValue;
        if ($drop_level) {
            echo "<tr><th>" . $page_main["level"] . "</th><td>" . $drop_level . "</td></tr>\n";
        }
        echo "</table>\n";
        $drop_teams = $drop->getElementsByTagName("npc-drop-team");
        foreach ($drop_teams as $drop_team) {
            $group_rate = $drop_team->getAttribute("rate");
            $drop_team_num = $drop_team->getElementsByTagName("npc-drop-team-num")->item(0);
            $group_number = $drop_team_num->getAttribute("min") . "-" . $drop_team_num->getAttribute("max");
            echo "<table class='list_table'>\n";
            echo "<tr><th style='width:50%'>" . $page_main["item"] . "</th><th style='width:25%;'>" . $tbl_npc_info[3] . "</th><th>" . $page_main["number"] . "</th></tr>\n";
            $drop_items = $drop_team->getElementsByTagName("npc-drop-team-item");
            foreach ($drop_items as $drop_item) {
                echo "<tr><td>" . Lan_Item_GetDisplayName($drop_item->nodeValue) . "</td><td>" . $group_rate . "*" . $drop_item->getAttribute("rate") . "</td><td>" . $group_number . "</td></tr>\n";
            }
            echo "</table>\n";
        }
    }
    return true;
}
예제 #6
0
function AddItemToTong($var, $gm, $role_name, $arg1, $arg2, $reason)
{
    $gm_name = mysql_escape_string($gm);
    $serverid = intval($var["serverid"]);
    $tbl = explode("_", $arg1);
    global $tbl_tong_page;
    $temp = strpos($tbl[1], ":");
    if ($temp) {
        $base64name = UTF82Base64(substr($tbl[1], 0, $temp)) . substr($tbl[1], $temp);
    } else {
        $base64name = UTF82Base64($tbl[1]);
    }
    global $AddItemToTong;
    $param = array();
    $param["tong_name"] = $role_name;
    $param["item_type"] = $tbl[0];
    $param["item_name"] = $base64name;
    $param["num"] = $tbl[2];
    $param["page"] = $arg2;
    $param["log"] = sprintf($AddItemToTong, $tbl[2], $tbl[1], $tbl_tong_page[$arg2]);
    global $tbl_game_server;
    $gas_host = $tbl_game_server[$serverid][0];
    $gas_port = $tbl_game_server[$serverid][1];
    $ret = PostData($gas_host, $gas_port, "AddItemToTong", $param);
    if (intval($ret) != 200) {
        PrintNotice(LogInfo($reason, false, $ret));
        BackAndRefresh($tbl_sys_msg["success"]);
        return true;
    }
    if (LogGMCommand($gm_name, $var["action_name"] . ".0175", $reason, $serverid)) {
        PrintNotice(LogInfo($reason, true));
        BackAndRefresh($tbl_sys_msg["success"]);
        return true;
    }
    return false;
}