当前位置: 首页>>代码示例>>PHP>>正文


PHP get_item_icon函数代码示例

本文整理汇总了PHP中get_item_icon函数的典型用法代码示例。如果您正苦于以下问题:PHP get_item_icon函数的具体用法?PHP get_item_icon怎么用?PHP get_item_icon使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_item_icon函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: bbcode_callbacks_wow

function bbcode_callbacks_wow($item)
{
    global $item_datasite;
    wowhead_tt();
    require_once "scripts/id_tab.php";
    require_once "scripts/get_lib.php";
    return "<a href=\"{$item_datasite}{$item[1]}\" target=\"_blank\"\r\nonmouseover=\"toolTip('" . addslashes(get_item_tooltip($item[1])) . "','item_tooltip')\" onmouseout=\"toolTip()\">\r\n<img src=\"" . get_item_icon($item[1]) . "\" class=\"icon_border\" alt=\"\" /></a>";
}
开发者ID:scamp,项目名称:minimanager,代码行数:8,代码来源:forum_lib.php

示例2: reverse_ids

 function reverse_ids()
 {
     $this->item = get_item_name($this->item_id);
     $this->icon = get_item_icon($this->item_id);
     if (is_null($this->icon) || $this->icon == "") {
         # if no icon, use the ? icon
         $this->icon = "07_15";
     }
 }
开发者ID:Covert-Inferno,项目名称:fortissimo,代码行数:9,代码来源:parser.php

示例3: bbcode_callbacks_wow

function bbcode_callbacks_wow($item)
{
    global $base_datasite, $item_datasite;
    wowhead_tt();
    require_once "scripts/id_tab.php";
    require_once "scripts/get_lib.php";
    return '
    <a href="' . $base_datasite . $item_datasite . $item[1] . '" target="_blank" onmouseover="oldtoolTip(\'' . addslashes(get_item_tooltip($item[1])) . '\',\'old_item_tooltip\')" onmouseout="oldtoolTip()">
      <img src="' . get_item_icon($item[1]) . '" class="icon_border" alt="" />
    </a>';
}
开发者ID:xhaher,项目名称:CoreManager,代码行数:11,代码来源:forum_lib.php

示例4: edit


//.........这里部分代码省略.........
        $result2 = $sqlw->query("SELECT entryid,normal10percentchance,normal25percentchance,heroic10percentchance,heroic25percentchance FROM loot_creatures WHERE itemid = {$item['entry']} ORDER BY normal10percentchance DESC");
        if ($sqlw->num_rows($result2)) {
            $output .= "<tr class=\"large_bold\"><td colspan=\"8\" class=\"hidden\" align=\"left\">" . lang('item_edit', 'dropped_by') . ": " . lang('item_edit', 'top_x') . "</td></tr>";
            $output .= "<tr>\r\n    <th width=\"1%\">ID</th>\r\n    <th width=\"35%\">" . lang('item_edit', 'mob_name') . "</th>\r\n    <th width=\"10%\">" . lang('item_edit', 'mob_minlevel') . "</th>\r\n    <th width=\"10%\">" . lang('item_edit', 'mob_maxlevel') . "</th>\r\n    <th width=\"6%\">" . lang('item_edit', 'norm10_drop_chance') . "</th>\r\n    <th width=\"6%\">" . lang('item_edit', 'norm25_drop_chance') . "</th>\r\n    <th width=\"6%\">" . lang('item_edit', 'hero10_drop_chance') . "</th>\r\n    <th width=\"7%\">" . lang('item_edit', 'hero25_drop_chance') . "</th>\r\n  </tr>";
            while ($info = $sqlw->fetch_assoc($result2)) {
                //$result3 = $sql->query("SELECT creature_names.entry,IFNULL(".($deplang<>0?"name_loc$deplang":"NULL").",`creature_names`.`name`) as name FROM creature_names LEFT JOIN creature_names_localized ON creature_names.entry = creature_names_localized.id LEFT JOIN loot_creatures ON creature_names.entry = loot_creatures.entryid WHERE itemid = {$info[0]} LIMIT 1");
                $result3 = $sqlw->query("SELECT creature_names.entry,`name`,creature_proto.minlevel,creature_proto.maxlevel FROM creature_names LEFT JOIN creature_proto ON creature_names.entry = creature_proto.entry WHERE creature_names.entry = " . $info['entryid'] . " LIMIT 1");
                while ($mob = $sqlw->fetch_assoc($result3)) {
                    $output .= "<tr><td>";
                    if ($user_lvl >= $action_permission['delete']) {
                        $output .= "<a class=\"tooltip\" href=\"creature.php?action=edit&amp;entry=" . $mob['entry'] . "&amp;error=4\" target=\"_blank\">" . $mob['entry'] . "</a>";
                    } else {
                        $output .= $mob['entry'];
                    }
                    $output .= "</td>\r\n          <td><a class=\"tooltip\" href=\"{$creature_datasite}" . $mob['entry'] . " target=\"_blank\">" . $mob['name'] . "</a></td>\r\n          <td>" . $mob['minlevel'] . "</td>\r\n          <td>" . $mob['maxlevel'] . "</td>\r\n          <td>" . $info['normal10percentchance'] . "%</td>\r\n          <td>" . $info['normal25percentchance'] . "%</td>\r\n          <td>" . $info['heroic10percentchance'] . "%</td>\r\n          <td>" . $info['heroic25percentchance'] . "%</td>";
                }
            }
        }
        // SOLD BY
        //$result2 = $sql->query("SELECT creature_names.entry,IFNULL(".($deplang<>0?"name_loc$deplang":"NULL").",`creature_names`.`name`) as name FROM creature_names LEFT JOIN creature_names_localized ON creature_names.entry = creature_names_localized.id WHERE creature_names.entry IN (SELECT entry FROM vendors WHERE item = {$item['entry']}) LIMIT 5");
        $result2 = $sqlw->query("SELECT creature_names.entry,`creature_names`.`name` FROM creature_names LEFT JOIN creature_names_localized ON creature_names.entry = creature_names_localized.id WHERE creature_names.entry IN (SELECT entry FROM vendors WHERE item = {$item['entry']})");
        if ($sqlw->num_rows($result2)) {
            $output .= "<tr class=\"large_bold\"><td colspan=\"9\" class=\"hidden\" align=\"left\">" . lang('item_edit', 'sold_by') . "</td></tr>";
            $output .= "<tr>\r\n    <th width=\"1%\">ID</th>\r\n    <th width=\"80%\" align=\"left\">" . lang('item_edit', 'mob_name') . "</th>\r\n  </tr>";
            while ($mob = $sqlw->fetch_row($result2)) {
                $output .= "<tr>\r\n        <td width=\"10%\">";
                if ($user_lvl >= $action_permission['delete']) {
                    $output .= "<a class=\"tooltip\" href=\"creature.php?action=edit&amp;entry={$mob['0']}&amp;error=4\" target=\"_blank\">{$mob['0']}</a>";
                } else {
                    $output .= "{$mob['0']}";
                }
                $output .= "\r\n        \r\n        <td width=\"80%\" colspan=\"8\" align=\"left\">\r\n          <a class=\"tooltip\" href=\"{$creature_datasite}{$mob['0']}\" target=\"_blank\">{$mob['1']}</a></td>\r\n        </td></tr>";
            }
        }
        // QUEST ITEM
        //$result2 = $sql->query("SELECT quests.entry,IFNULL(".($deplang<>0?"title_loc$deplang":"NULL").",`quests`.`title`) as title,QuestLevel FROM quests LEFT JOIN quests_localized ON quests.entry = quests_localized.entry WHERE ( SrcItem = {$item['entry']} OR ReqItemId1 = {$item['entry']} OR
        $result2 = $sqlw->query("SELECT quests.entry,`quests`.`title`,QuestLevel FROM quests LEFT JOIN quests_localized ON quests.entry = quests_localized.entry WHERE ( SrcItem = {$item['entry']} OR ReqItemId1 = {$item['entry']} OR\r\n              ReqItemId2 = {$item['entry']} OR ReqItemId3 = {$item['entry']} OR ReqItemId4 = {$item['entry']} ) ORDER BY QuestLevel DESC");
        if ($sqlw->num_rows($result2)) {
            $output .= "<tr class=\"large_bold\"><td colspan=\"8\" class=\"hidden\" align=\"left\">" . lang('item_edit', 'involved_in_quests') . ":</td></tr>";
            $output .= "<tr>\r\n    <th width=\"1%\">ID</th>\r\n    <th width=\"80%\">" . lang('item_edit', 'mob_name') . "</th>\r\n  </tr>";
            while ($quest = $sqlw->fetch_row($result2)) {
                $output .= "<tr><td width=\"20%\">id: {$quest['0']}</td>\r\n        <td width=\"80%\" colspan=\"6\" align=\"left\"><a class=\"tooltip\" href=\"{$quest_datasite}{$quest['0']}\" target=\"_blank\">({$quest['2']}) {$quest['1']}</a></td><td></td></tr>";
            }
        }
        // QUEST REWARD
        $result2 = $sqlw->query("SELECT quests.entry,IFNULL(" . ($deplang != 0 ? "title_loc{$deplang}" : "NULL") . ",`quests`.`title`) as title,QuestLevel FROM quests LEFT JOIN quests_localized ON quests.entry = quests_localized.entry WHERE ( RewChoiceItemId1 = {$item['entry']} OR RewChoiceItemId2 = {$item['entry']} OR\r\n              RewChoiceItemId3 = {$item['entry']} OR RewChoiceItemId4 = {$item['entry']} OR RewChoiceItemId5 = {$item['entry']} OR RewChoiceItemId6 = {$item['entry']} OR RewItemId1 = {$item['entry']} OR\r\n              RewItemId2 = {$item['entry']} OR RewItemId3 = {$item['entry']} OR RewItemId4 = {$item['entry']} )\r\n              ORDER BY QuestLevel DESC");
        if ($sqlw->num_rows($result2)) {
            $output .= "<tr class=\"large_bold\"><td colspan=\"9\" class=\"hidden\" align=\"left\">" . lang('item_edit', 'reward_from_quest') . ":</td></tr>";
            while ($quest = $sqlw->fetch_row($result2)) {
                $output .= "<tr><td width=\"20%\">id: {$quest['0']}</td>\r\n        <td width=\"80%\" colspan=\"7\" align=\"left\"><a class=\"tooltip\" href=\"{$quest_datasite}{$quest['0']}\" target=\"_blank\">({$quest['2']}) {$quest['1']}</a></td></tr>";
            }
        }
        $output .= "</tr></table><br /><br />\r\n    </div>";
        if ($item['DisenchantID']) {
            $output .= "<div id=\"pane9\">\r\n  <br /><br /><table class=\"lined\" style=\"width: 720px;\">\r\n  <tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">" . lang('item_edit', 'disenchant_templ') . ": {$item['DisenchantID']}</td></tr>\r\n  <tr><td colspan=\"6\">";
            $cel_counter = 0;
            $row_flag = 0;
            $output .= "<table class=\"hidden\" align=\"center\"><tr>";
            $result1 = $sqlw->query("SELECT item,ChanceOrQuestChance,`groupid`,mincountOrRef,maxcount,lootcondition,condition_value1, condition_value2 FROM disenchant_loot_template WHERE entry = {$item['DisenchantID']} ORDER BY ChanceOrQuestChance DESC");
            while ($item = $sqlw->fetch_row($result1)) {
                $cel_counter++;
                $tooltip = get_item_name($item[0]) . " ({$item['0']})<br />" . lang('item_edit', 'drop_chance') . ": {$item['1']}%<br />" . lang('item_edit', 'quest_drop_chance') . ": {$item['2']}%<br />" . lang('item_edit', 'drop_chance') . ": {$item['3']}-{$item['4']}<br />" . lang('item_edit', 'lootcondition') . ": {$item['5']}<br />" . lang('item_edit', 'condition_value1') . ": {$item['6']}<br />" . lang('item_edit', 'condition_value2') . ": {$item['7']}";
                $output .= "<td>";
                $output .= maketooltip("<img src=\"" . get_item_icon($item[0]) . "\" class=\"icon_border\" alt=\"\" />", "{$item_datasite}{$item['0']}", $tooltip, "item_tooltip");
                $output .= "<br /><input type=\"checkbox\" name=\"del_de_items[]\" value=\"{$item['0']}\" /></td>";
                if ($cel_counter >= 16) {
                    $cel_counter = 0;
                    $output .= "</tr><tr>";
                    $row_flag++;
                }
            }
            if ($row_flag) {
                $output .= "<td colspan=\"" . (16 - $cel_counter) . "\"></td>";
            }
            $output .= "</td></tr></table>\r\n </td>\r\n</tr>\r\n<tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">" . lang('item_edit', 'add_items_to_templ') . ":</td></tr>\r\n<tr>\r\n<td>" . makeinfocell(lang('item_edit', 'loot_item_id'), lang('item_edit', 'loot_item_id_desc')) . "</td>\r\n  <td><input type=\"text\" name=\"de_item\" size=\"8\" maxlength=\"10\" value=\"\" /></td>\r\n<td>" . makeinfocell(lang('item_edit', 'loot_drop_chance'), lang('item_edit', 'loot_drop_chance_desc')) . "</td>\r\n  <td><input type=\"text\" name=\"de_ChanceOrQuestChance\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>\r\n<td>" . makeinfocell(lang('item_edit', 'loot_quest_drop_chance'), lang('item_edit', 'loot_quest_drop_chance_desc')) . "</td>\r\n  <td><input type=\"text\" name=\"de_groupid\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>\r\n</tr>\r\n<tr>\r\n<td>" . makeinfocell(lang('item_edit', 'min_count'), lang('item_edit', 'min_count_desc')) . "</td>\r\n  <td><input type=\"text\" name=\"de_mincountOrRef\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>\r\n<td>" . makeinfocell(lang('item_edit', 'max_count'), lang('item_edit', 'max_count_desc')) . "</td>\r\n  <td><input type=\"text\" name=\"de_maxcount\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>\r\n</tr>\r\n<tr>\r\n<td>" . makeinfocell(lang('item_edit', 'lootcondition'), lang('item_edit', 'lootcondition_desc')) . "</td>\r\n  <td><input type=\"text\" name=\"de_lootcondition\" size=\"8\" maxlength=\"3\" value=\"0\" /></td>\r\n<td>" . makeinfocell(lang('item_edit', 'condition_value1'), lang('item_edit', 'condition_value1_desc')) . "</td>\r\n  <td><input type=\"text\" name=\"de_condition_value1\" size=\"8\" maxlength=\"3\" value=\"0\" /></td>\r\n<td>" . makeinfocell(lang('item_edit', 'condition_value2'), lang('item_edit', 'condition_value2_desc')) . "</td>\r\n  <td><input type=\"text\" name=\"de_condition_value2\" size=\"8\" maxlength=\"3\" value=\"0\" /></td>\r\n</tr>\r\n</table>\r\n</div>";
        }
        $output .= "</div>\r\n</div>\r\n<br />\r\n</form>\r\n\r\n<script type=\"text/javascript\">setupPanes(\"container\", \"tab1\")</script>";
        unset($socketColor_3);
        $output .= "\r\n          <table class=\"hidden\">\r\n            <tr>\r\n              <td>";
        if ($user_lvl >= $action_permission['delete']) {
            makebutton(lang('item_edit', 'del_item'), "item.php?action=delete&amp;entry={$entry}\" type=\"wrn", 180);
        }
        $output .= "\r\n              </td>\r\n              <td>";
        if ($user_lvl >= $action_permission['update']) {
            makebutton(lang('item_edit', 'update'), "javascript:do_submit('form1',0)\" type=\"wrn", 180);
        }
        $output .= "\r\n              </td>\r\n              <td>";
        if ($user_lvl >= $action_permission['insert']) {
            makebutton(lang('item_edit', 'export_sql'), "javascript:do_submit('form1',1)", 180);
        }
        $output .= "\r\n              </td></tr><tr>\r\n              <td>";
        makebutton(lang('global', 'back'), "javascript:window.history.back()", 130);
        $output .= "\r\n              </td>\r\n              <td>";
        makebutton(lang('item_edit', 'new_search'), "item.php", 130);
        $output .= "\r\n              </td>\r\n            </tr>\r\n          </table>\r\n        </center>\r\n";
    } else {
        error(lang('item_edit', 'item_not_found'));
        exit;
    }
}
开发者ID:GlassFace,项目名称:CoreManager2,代码行数:101,代码来源:item.php

示例5: char_main


//.........这里部分代码省略.........
            $spell_damage = 9999;
            for ($i = 0; $i < 6; ++$i) {
                if ($char_data[CHAR_DATA_OFFSET_SPELL_DAMAGE + 1 + $i] < $spell_damage) {
                    $spell_damage = $char_data[CHAR_DATA_OFFSET_SPELL_DAMAGE + 1 + $i];
                }
            }
            $rage = round($char['power2'] / 10);
            $expertise = '' . $char_data[CHAR_DATA_OFFSET_EXPERTISE] . ' / ' . $char_data[CHAR_DATA_OFFSET_OFFHAND_EXPERTISE] . '';
            $EQU_HEAD = $char_data[CHAR_DATA_OFFSET_EQU_HEAD];
            $EQU_NECK = $char_data[CHAR_DATA_OFFSET_EQU_NECK];
            $EQU_SHOULDER = $char_data[CHAR_DATA_OFFSET_EQU_SHOULDER];
            $EQU_SHIRT = $char_data[CHAR_DATA_OFFSET_EQU_SHIRT];
            $EQU_CHEST = $char_data[CHAR_DATA_OFFSET_EQU_CHEST];
            $EQU_BELT = $char_data[CHAR_DATA_OFFSET_EQU_BELT];
            $EQU_LEGS = $char_data[CHAR_DATA_OFFSET_EQU_LEGS];
            $EQU_FEET = $char_data[CHAR_DATA_OFFSET_EQU_FEET];
            $EQU_WRIST = $char_data[CHAR_DATA_OFFSET_EQU_WRIST];
            $EQU_GLOVES = $char_data[CHAR_DATA_OFFSET_EQU_GLOVES];
            $EQU_FINGER1 = $char_data[CHAR_DATA_OFFSET_EQU_FINGER1];
            $EQU_FINGER2 = $char_data[CHAR_DATA_OFFSET_EQU_FINGER2];
            $EQU_TRINKET1 = $char_data[CHAR_DATA_OFFSET_EQU_TRINKET1];
            $EQU_TRINKET2 = $char_data[CHAR_DATA_OFFSET_EQU_TRINKET2];
            $EQU_BACK = $char_data[CHAR_DATA_OFFSET_EQU_BACK];
            $EQU_MAIN_HAND = $char_data[CHAR_DATA_OFFSET_EQU_MAIN_HAND];
            $EQU_OFF_HAND = $char_data[CHAR_DATA_OFFSET_EQU_OFF_HAND];
            $EQU_RANGED = $char_data[CHAR_DATA_OFFSET_EQU_RANGED];
            $EQU_TABARD = $char_data[CHAR_DATA_OFFSET_EQU_TABARD];
            /*
            // reserved incase we want to use back minimanagers' built in tooltip, instead of wowheads'
            // minimanagers' item tooltip needs updating, but it can show enchantments and sockets.
            
                  $equiped_items = array
                  (
                     1 => array(($EQU_HEAD      ? get_item_tooltip($EQU_HEAD)      : 0),($EQU_HEAD      ? get_item_icon($EQU_HEAD)      : 0),($EQU_HEAD      ? get_item_border($EQU_HEAD)      : 0)),
                     2 => array(($EQU_NECK      ? get_item_tooltip($EQU_NECK)      : 0),($EQU_NECK      ? get_item_icon($EQU_NECK)      : 0),($EQU_NECK      ? get_item_border($EQU_NECK)      : 0)),
                     3 => array(($EQU_SHOULDER  ? get_item_tooltip($EQU_SHOULDER)  : 0),($EQU_SHOULDER  ? get_item_icon($EQU_SHOULDER)  : 0),($EQU_SHOULDER  ? get_item_border($EQU_SHOULDER)  : 0)),
                     4 => array(($EQU_SHIRT     ? get_item_tooltip($EQU_SHIRT)     : 0),($EQU_SHIRT     ? get_item_icon($EQU_SHIRT)     : 0),($EQU_SHIRT     ? get_item_border($EQU_SHIRT)     : 0)),
                     5 => array(($EQU_CHEST     ? get_item_tooltip($EQU_CHEST)     : 0),($EQU_CHEST     ? get_item_icon($EQU_CHEST)     : 0),($EQU_CHEST     ? get_item_border($EQU_CHEST)     : 0)),
                     6 => array(($EQU_BELT      ? get_item_tooltip($EQU_BELT)      : 0),($EQU_BELT      ? get_item_icon($EQU_BELT)      : 0),($EQU_BELT      ? get_item_border($EQU_BELT)      : 0)),
                     7 => array(($EQU_LEGS      ? get_item_tooltip($EQU_LEGS)      : 0),($EQU_LEGS      ? get_item_icon($EQU_LEGS)      : 0),($EQU_LEGS      ? get_item_border($EQU_LEGS)      : 0)),
                     8 => array(($EQU_FEET      ? get_item_tooltip($EQU_FEET)      : 0),($EQU_FEET      ? get_item_icon($EQU_FEET)      : 0),($EQU_FEET      ? get_item_border($EQU_FEET)      : 0)),
                     9 => array(($EQU_WRIST     ? get_item_tooltip($EQU_WRIST)     : 0),($EQU_WRIST     ? get_item_icon($EQU_WRIST)     : 0),($EQU_WRIST     ? get_item_border($EQU_WRIST)     : 0)),
                    10 => array(($EQU_GLOVES    ? get_item_tooltip($EQU_GLOVES)    : 0),($EQU_GLOVES    ? get_item_icon($EQU_GLOVES)    : 0),($EQU_GLOVES    ? get_item_border($EQU_GLOVES)    : 0)),
                    11 => array(($EQU_FINGER1   ? get_item_tooltip($EQU_FINGER1)   : 0),($EQU_FINGER1   ? get_item_icon($EQU_FINGER1)   : 0),($EQU_FINGER1   ? get_item_border($EQU_FINGER1)   : 0)),
                    12 => array(($EQU_FINGER2   ? get_item_tooltip($EQU_FINGER2)   : 0),($EQU_FINGER2   ? get_item_icon($EQU_FINGER2)   : 0),($EQU_FINGER2   ? get_item_border($EQU_FINGER2)   : 0)),
                    13 => array(($EQU_TRINKET1  ? get_item_tooltip($EQU_TRINKET1)  : 0),($EQU_TRINKET1  ? get_item_icon($EQU_TRINKET1)  : 0),($EQU_TRINKET1  ? get_item_border($EQU_TRINKET1)  : 0)),
                    14 => array(($EQU_TRINKET2  ? get_item_tooltip($EQU_TRINKET2)  : 0),($EQU_TRINKET2  ? get_item_icon($EQU_TRINKET2)  : 0),($EQU_TRINKET2  ? get_item_border($EQU_TRINKET2)  : 0)),
                    15 => array(($EQU_BACK      ? get_item_tooltip($EQU_BACK)      : 0),($EQU_BACK      ? get_item_icon($EQU_BACK)      : 0),($EQU_BACK      ? get_item_border($EQU_BACK)      : 0)),
                    16 => array(($EQU_MAIN_HAND ? get_item_tooltip($EQU_MAIN_HAND) : 0),($EQU_MAIN_HAND ? get_item_icon($EQU_MAIN_HAND) : 0),($EQU_MAIN_HAND ? get_item_border($EQU_MAIN_HAND) : 0)),
                    17 => array(($EQU_OFF_HAND  ? get_item_tooltip($EQU_OFF_HAND)  : 0),($EQU_OFF_HAND  ? get_item_icon($EQU_OFF_HAND)  : 0),($EQU_OFF_HAND  ? get_item_border($EQU_OFF_HAND)  : 0)),
                    18 => array(($EQU_RANGED    ? get_item_tooltip($EQU_RANGED)    : 0),($EQU_RANGED    ? get_item_icon($EQU_RANGED)    : 0),($EQU_RANGED    ? get_item_border($EQU_RANGED)    : 0)),
                    19 => array(($EQU_TABARD    ? get_item_tooltip($EQU_TABARD)    : 0),($EQU_TABARD    ? get_item_icon($EQU_TABARD)    : 0),($EQU_TABARD    ? get_item_border($EQU_TABARD)    : 0))
                  );
            */
            $sqlm = new SQL();
            $sqlm->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
            $sqlw = new SQL();
            $sqlw->connect($world_db[$realmid]['addr'], $world_db[$realmid]['user'], $world_db[$realmid]['pass'], $world_db[$realmid]['name']);
            $equiped_items = array(1 => array('', $EQU_HEAD ? get_item_icon($EQU_HEAD, $sqlm, $sqlw) : 0, $EQU_HEAD ? get_item_border($EQU_HEAD, $sqlw) : 0), 2 => array('', $EQU_NECK ? get_item_icon($EQU_NECK, $sqlm, $sqlw) : 0, $EQU_NECK ? get_item_border($EQU_NECK, $sqlw) : 0), 3 => array('', $EQU_SHOULDER ? get_item_icon($EQU_SHOULDER, $sqlm, $sqlw) : 0, $EQU_SHOULDER ? get_item_border($EQU_SHOULDER, $sqlw) : 0), 4 => array('', $EQU_SHIRT ? get_item_icon($EQU_SHIRT, $sqlm, $sqlw) : 0, $EQU_SHIRT ? get_item_border($EQU_SHIRT, $sqlw) : 0), 5 => array('', $EQU_CHEST ? get_item_icon($EQU_CHEST, $sqlm, $sqlw) : 0, $EQU_CHEST ? get_item_border($EQU_CHEST, $sqlw) : 0), 6 => array('', $EQU_BELT ? get_item_icon($EQU_BELT, $sqlm, $sqlw) : 0, $EQU_BELT ? get_item_border($EQU_BELT, $sqlw) : 0), 7 => array('', $EQU_LEGS ? get_item_icon($EQU_LEGS, $sqlm, $sqlw) : 0, $EQU_LEGS ? get_item_border($EQU_LEGS, $sqlw) : 0), 8 => array('', $EQU_FEET ? get_item_icon($EQU_FEET, $sqlm, $sqlw) : 0, $EQU_FEET ? get_item_border($EQU_FEET, $sqlw) : 0), 9 => array('', $EQU_WRIST ? get_item_icon($EQU_WRIST, $sqlm, $sqlw) : 0, $EQU_WRIST ? get_item_border($EQU_WRIST, $sqlw) : 0), 10 => array('', $EQU_GLOVES ? get_item_icon($EQU_GLOVES, $sqlm, $sqlw) : 0, $EQU_GLOVES ? get_item_border($EQU_GLOVES, $sqlw) : 0), 11 => array('', $EQU_FINGER1 ? get_item_icon($EQU_FINGER1, $sqlm, $sqlw) : 0, $EQU_FINGER1 ? get_item_border($EQU_FINGER1, $sqlw) : 0), 12 => array('', $EQU_FINGER2 ? get_item_icon($EQU_FINGER2, $sqlm, $sqlw) : 0, $EQU_FINGER2 ? get_item_border($EQU_FINGER2, $sqlw) : 0), 13 => array('', $EQU_TRINKET1 ? get_item_icon($EQU_TRINKET1, $sqlm, $sqlw) : 0, $EQU_TRINKET1 ? get_item_border($EQU_TRINKET1, $sqlw) : 0), 14 => array('', $EQU_TRINKET2 ? get_item_icon($EQU_TRINKET2, $sqlm, $sqlw) : 0, $EQU_TRINKET2 ? get_item_border($EQU_TRINKET2, $sqlw) : 0), 15 => array('', $EQU_BACK ? get_item_icon($EQU_BACK, $sqlm, $sqlw) : 0, $EQU_BACK ? get_item_border($EQU_BACK, $sqlw) : 0), 16 => array('', $EQU_MAIN_HAND ? get_item_icon($EQU_MAIN_HAND, $sqlm, $sqlw) : 0, $EQU_MAIN_HAND ? get_item_border($EQU_MAIN_HAND, $sqlw) : 0), 17 => array('', $EQU_OFF_HAND ? get_item_icon($EQU_OFF_HAND, $sqlm, $sqlw) : 0, $EQU_OFF_HAND ? get_item_border($EQU_OFF_HAND, $sqlw) : 0), 18 => array('', $EQU_RANGED ? get_item_icon($EQU_RANGED, $sqlm, $sqlw) : 0, $EQU_RANGED ? get_item_border($EQU_RANGED, $sqlw) : 0), 19 => array('', $EQU_TABARD ? get_item_icon($EQU_TABARD, $sqlm, $sqlw) : 0, $EQU_TABARD ? get_item_border($EQU_TABARD, $sqlw) : 0));
            if ($user_lvl > $owner_gmlvl || $owner_name === $user_name) {
                $output .= '
          <!-- start of char.php -->
          <center>
            <div id="tab_content">
              <div id="tab">
                <ul>
开发者ID:scamp,项目名称:minimanager,代码行数:67,代码来源:char.php

示例6: char_mail


//.........这里部分代码省略.........
              </font>
              <br /><br />
              <table class="lined" style="width: 100%">';
            //---------------Page Specific Starts Ends here----------------------------
            $query = $sqlc->query('SELECT a.id as id, a.messageType as messagetype, a.sender as sender,
        a.subject as subject, a.itemTextId as itemtextid, a.has_items as hasitems, a.money as money, a.cod as cod, a.checked as checked,
        b.item_template as itemtemplate
        FROM mail a INNER JOIN mail_items b ON a.id = b.mail_id where a.receiver = ' . $id . ' LIMIT ' . $start . ', ' . $itemperpage . '');
            $total_mail = $sqlc->result($sqlc->query('SELECT count(*) FROM mail WHERE receiver= ' . $id . ''), 0);
            $output .= '
                <tr>
                  <td align="left">
                  Total Mails: ' . $total_mail . '
                  </td>
                  <td align="right" width="45%">';
            $output .= generate_pagination('char_mail.php?start=' . $start . '&amp;order_by=' . $order_by . '&amp;dir=' . ($dir ? 0 : 1), $total_mail, $itemperpage, $start);
            $output .= '
                </td>
              </table>
              <table class="lined" style="width: 100%">
                <tr>
                  <th width="5%">' . $lang_mail['mail_type'] . '</th>
                  <th width="10%">' . $lang_mail['sender'] . '</th>
                  <th width="15%">' . $lang_mail['subject'] . '</th>
                  <th width="5%">' . $lang_mail['has_items'] . '</th>
                  <th width="25%">' . $lang_mail['text'] . '</th>
                  <th width="20%">' . $lang_mail['money'] . '</th>
                  <th width="5%">' . $lang_mail['checked'] . '</th>
                </tr>';
            while ($mail = $sqlc->fetch_assoc($query)) {
                $output .= '
                <tr valign=top>
                  <td>' . get_mail_source($mail['messagetype']) . '</td>
                  <td><a href="char.php?id=' . $mail['sender'] . '">' . get_char_name($mail['sender']) . '</a></td>
                  <td>' . $mail['subject'] . '</td>
                  <td>
                    <a style="padding:2px;" href="' . $item_datasite . $mail['itemtemplate'] . '" target="_blank">
                    <img class="bag_icon" src="' . get_item_icon($mail['itemtemplate'], $sqlm) . '" alt="" />
                    </a>
                  </td>
                  <td>' . get_mail_text($mail['itemtextid']) . '</td>
                  <td>
                    ' . substr($mail['money'], 0, -4) . '<img src="img/gold.gif" alt="" align="middle" />
                    ' . substr($mail['money'], -4, 2) . '<img src="img/silver.gif" alt="" align="middle" />
                    ' . substr($mail['money'], -2) . '<img src="img/copper.gif" alt="" align="middle" />
                  </td>
                  <td>' . get_check_state($mail['checked']) . '</td>
                </tr>';
            }
            //---------------Page Specific Data Ends here----------------------------
            //---------------Character Tabs Footer-----------------------------------
            $output .= '
              </table>
            </div>
            <br />
            <table class="hidden">
              <tr>
                <td>';
            // button to user account page, user account page has own security
            makebutton($lang_char['chars_acc'], 'user.php?action=edit_user&amp;id=' . $owner_acc_id . '', 130);
            $output .= '
                </td>
                <td>';
            // only higher level GM with delete access can edit character
            //  character edit allows removal of character items, so delete permission is needed
            if ($user_lvl > $owner_gmlvl && $user_lvl >= $action_permission['delete']) {
                makebutton($lang_char['edit_button'], 'char_edit.php?id=' . $id . '&amp;realm=' . $realmid . '', 130);
                $output .= '
                </td>
                <td>';
            }
            // only higher level GM with delete access, or character owner can delete character
            if ($user_lvl > $owner_gmlvl && $user_lvl >= $action_permission['delete'] || $owner_name === $user_name) {
                makebutton($lang_char['del_char'], 'char_list.php?action=del_char_form&amp;check%5B%5D=' . $id . '" type="wrn', 130);
                $output .= '
                </td>
                <td>';
            }
            // only GM with update permission can send mail, mail can send items, so update permission is needed
            if ($user_lvl >= $action_permission['update']) {
                makebutton($lang_char['send_mail'], 'mail.php?type=ingame_mail&amp;to=' . $char['name'] . '', 130);
                $output .= '
                </td>
                <td>';
            }
            makebutton($lang_global['back'], 'javascript:window.history.back()" type="def', 130);
            $output .= '
                </td>
              </tr>
            </table>
            <br />
          </center>
          <!-- end of char_mail.php -->';
        } else {
            error($lang_char['no_permission']);
        }
    } else {
        error($lang_char['no_char_found']);
    }
}
开发者ID:scamp,项目名称:minimanager,代码行数:101,代码来源:char_mail.php

示例7: edit


//.........这里部分代码省略.........
        $socketColor_1 = array(0 => "", 1 => "", 2 => "", 4 => "", 8 => "");
        $socketColor_1[$item['socketColor_1']] = " selected=\"selected\" ";
        $output .= "<td>" . makeinfocell($lang_item_edit['socket_color'] . " 1", $lang_item_edit['socket_color_desc']) . "</td>\n      <td><select name=\"socketColor_1\">\n        <option value=\"0\" {$socketColor_1[0]}>0: {$lang_item['none']}</option>\n        <option value=\"1\" {$socketColor_1[1]}>1: {$lang_item['socket_meta']}</option>\n        <option value=\"2\" {$socketColor_1[2]}>2: {$lang_item['socket_red']}</option>\n        <option value=\"4\" {$socketColor_1[4]}>4: {$lang_item['socket_yellow']}</option>\n        <option value=\"8\" {$socketColor_1[8]}>8: {$lang_item['socket_blue']}</option>\n      </select></td>\n   <td>" . makeinfocell($lang_item_edit['socket_content'] . " 1", $lang_item_edit['socket_content_desc']) . "</td>\n   <td><input type=\"text\" name=\"socketContent_1\" size=\"15\" maxlength=\"10\" value=\"{$item['socketContent_1']}\" /></td>\n</tr>\n<tr>";
        unset($socketColor_1);
        $socketColor_2 = array(0 => "", 1 => "", 2 => "", 4 => "", 8 => "");
        $socketColor_2[$item['socketColor_2']] = " selected=\"selected\" ";
        $output .= "<td>" . makeinfocell($lang_item_edit['socket_color'] . " 2", $lang_item_edit['socket_color_desc']) . "</td>\n      <td><select name=\"socketColor_2\">\n        <option value=\"0\" {$socketColor_2[0]}>0: {$lang_item['none']}</option>\n        <option value=\"1\" {$socketColor_2[1]}>1: {$lang_item['socket_meta']}</option>\n        <option value=\"2\" {$socketColor_2[2]}>2: {$lang_item['socket_red']}</option>\n        <option value=\"4\" {$socketColor_2[4]}>4: {$lang_item['socket_yellow']}</option>\n        <option value=\"8\" {$socketColor_2[8]}>8: {$lang_item['socket_blue']}</option>\n      </select></td>\n\n   <td>" . makeinfocell($lang_item_edit['socket_content'] . " 2", $lang_item_edit['socket_content_desc']) . "</td>\n   <td><input type=\"text\" name=\"socketContent_2\" size=\"15\" maxlength=\"10\" value=\"{$item['socketContent_2']}\" /></td>\n</tr>\n<tr>";
        unset($socketColor_2);
        $socketColor_3 = array(0 => "", 1 => "", 2 => "", 4 => "", 8 => "");
        $socketColor_3[$item['socketColor_3']] = " selected=\"selected\" ";
        $output .= "<td>" . makeinfocell($lang_item_edit['socket_color'] . " 3", $lang_item_edit['socket_color_desc']) . "</td>\n      <td><select name=\"socketColor_3\">\n        <option value=\"0\" {$socketColor_3[0]}>0: {$lang_item['none']}</option>\n        <option value=\"1\" {$socketColor_3[1]}>1: {$lang_item['socket_meta']}</option>\n        <option value=\"2\" {$socketColor_3[2]}>2: {$lang_item['socket_red']}</option>\n        <option value=\"4\" {$socketColor_3[4]}>4: {$lang_item['socket_yellow']}</option>\n        <option value=\"8\" {$socketColor_3[8]}>8: {$lang_item['socket_blue']}</option>\n      </select></td>\n\n   <td>" . makeinfocell($lang_item_edit['socket_content'] . " 3", $lang_item_edit['socket_content_desc']) . "</td>\n   <td><input type=\"text\" name=\"socketContent_3\" size=\"15\" maxlength=\"10\" value=\"{$item['socketContent_3']}\" /></td>\n</tr>\n\n<tr>\n   <td>" . makeinfocell($lang_item_edit['socket_bonus'], $lang_item_edit['socket_bonus_desc']) . "</td>\n   <td><input type=\"text\" name=\"socketBonus\" size=\"15\" maxlength=\"10\" value=\"{$item['socketBonus']}\" /></td>\n\n   <td>" . makeinfocell($lang_item_edit['gem_properties'], $lang_item_edit['gem_properties_desc']) . "</td>\n   <td><input type=\"text\" name=\"GemProperties\" size=\"15\" maxlength=\"10\" value=\"{$item['GemProperties']}\" /></td>\n</tr>\n\n   </table><br /><br />\n    </div>";
        $output .= "<div id=\"pane8\">\n    <br /><br /><table class=\"lined\" style=\"width: 720px;\">\n  <tr class=\"large_bold\"><td colspan=\"5\" class=\"hidden\" align=\"left\">{$lang_item_edit['dropped_by']}: {$lang_item_edit['top_x']}</td></tr>\n  <tr>\n    <th width=\"1%\">ID</th>\n    <th width=\"35%\">{$lang_item_edit['mob_name']}</th>\n    <th width=\"10%\">{$lang_item_edit['mob_level']}</th>\n    <th width=\"25%\">{$lang_item_edit['mob_drop_chance']}</th>\n    <th width=\"25%\">{$lang_item_edit['mob_quest_drop_chance']}</th>\n  </tr>";
        $result2 = $sql->query("SELECT entry,ChanceOrQuestChance,`groupid` FROM creature_loot_template WHERE item = {$item['entry']} ORDER BY `groupid`,ChanceOrQuestChance DESC LIMIT 5");
        while ($info = $sql->fetch_row($result2)) {
            $result3 = $sql->query("SELECT creature_template.entry,IFNULL(" . ($deplang != 0 ? "name_loc{$deplang}" : "NULL") . ",`name`) as name,maxlevel FROM creature_template LEFT JOIN locales_creature ON creature_template.entry = locales_creature.entry WHERE lootid = {$info[0]} LIMIT 1");
            while ($mob = $sql->fetch_row($result3)) {
                $output .= "<tr><td>";
                if ($user_lvl >= $action_permission['delete']) {
                    $output .= "<a class=\"tooltip\" href=\"creature.php?action=edit&amp;entry={$mob['0']}&amp;error=4\" target=\"_blank\">{$mob['0']}</a>";
                } else {
                    $output .= "{$mob['0']}";
                }
                $output .= "</td>\n          <td><a class=\"tooltip\" href=\"{$creature_datasite}{$mob['0']}\" target=\"_blank\">{$mob['1']}</a></td>\n          <td>{$mob['2']}</td>\n          <td>{$info['1']}%</td>\n          <td>{$info['2']}%</td></tr>";
            }
        }
        $result2 = $sql->query("SELECT creature_template.entry,IFNULL(" . ($deplang != 0 ? "name_loc{$deplang}" : "NULL") . ",`name`) as name,maxlevel FROM creature_template LEFT JOIN locales_creature ON creature_template.entry = locales_creature.entry WHERE creature_template.entry IN (SELECT entry FROM npc_vendor WHERE item = {$item['entry']}) ORDER BY maxlevel DESC LIMIT 5");
        if ($sql->num_rows($result2)) {
            $output .= "<tr class=\"large_bold\"><td colspan=\"4\" class=\"hidden\" align=\"left\">{$lang_item_edit['sold_by']}: {$lang_item_edit['limit_x']}</td></tr>";
            while ($mob = $sql->fetch_row($result2)) {
                $output .= "<tr>\n        <td width=\"10%\">";
                if ($user_lvl >= $action_permission['delete']) {
                    $output .= "<a class=\"tooltip\" href=\"creature.php?action=edit&amp;entry={$mob['0']}&amp;error=4\" target=\"_blank\">{$mob['0']}</a>";
                } else {
                    $output .= "{$mob['0']}";
                }
                $output .= "\n        <td width=\"10%\">{$mob['2']}</td>\n        <td width=\"80%\" colspan=\"2\" align=\"left\">\n          <a class=\"tooltip\" href=\"{$creature_datasite}{$mob['0']}\" target=\"_blank\">{$mob['1']}</a></td>\n        </td></tr>";
            }
        }
        $result2 = $sql->query("SELECT quest_template.entry,IFNULL(" . ($deplang != 0 ? "title_loc{$deplang}" : "NULL") . ",`title`) as title,QuestLevel FROM quest_template LEFT JOIN locales_quest ON quest_template.entry = locales_quest.entry WHERE ( SrcItemId = {$item['entry']} OR ReqItemId1 = {$item['entry']} OR\n              ReqItemId2 = {$item['entry']} OR ReqItemId3 = {$item['entry']} OR ReqItemId4 = {$item['entry']} OR RewItemId1 = {$item['entry']} OR\n              RewItemId2 = {$item['entry']} OR RewItemId3 = {$item['entry']} OR RewItemId4 = {$item['entry']} ) ORDER BY QuestLevel DESC");
        if ($sql->num_rows($result2)) {
            $output .= "<tr class=\"large_bold\"><td colspan=\"4\" class=\"hidden\" align=\"left\">{$lang_item_edit['involved_in_quests']}:</td></tr>";
            while ($quest = $sql->fetch_row($result2)) {
                $output .= "<tr><td width=\"20%\">id: {$quest['0']}</td>\n        <td width=\"80%\" colspan=\"3\" align=\"left\"><a class=\"tooltip\" href=\"{$quest_datasite}{$quest['0']}\" target=\"_blank\">({$quest['2']}) {$quest['1']}</a></td></tr>";
            }
        }
        $result2 = $sql->query("SELECT quest_template.entry,IFNULL(" . ($deplang != 0 ? "title_loc{$deplang}" : "NULL") . ",`title`) as title,QuestLevel FROM quest_template LEFT JOIN locales_quest ON quest_template.entry = locales_quest.entry WHERE ( RewChoiceItemId1 = {$item['entry']} OR RewChoiceItemId2 = {$item['entry']} OR\n              RewChoiceItemId3 = {$item['entry']} OR RewChoiceItemId4 = {$item['entry']} OR RewChoiceItemId5 = {$item['entry']} OR RewChoiceItemId6 = {$item['entry']} )\n              ORDER BY QuestLevel DESC");
        if ($sql->num_rows($result2)) {
            $output .= "<tr class=\"large_bold\"><td colspan=\"4\" class=\"hidden\" align=\"left\">{$lang_item_edit['reward_from_quest']}:</td></tr>";
            while ($quest = $sql->fetch_row($result2)) {
                $output .= "<tr><td width=\"20%\">id: {$quest['0']}</td>\n        <td width=\"80%\" colspan=\"3\" align=\"left\"><a class=\"tooltip\" href=\"{$quest_datasite}{$quest['0']}\" target=\"_blank\">({$quest['2']}) {$quest['1']}</a></td></tr>";
            }
        }
        $output .= "</tr></table><br /><br />\n    </div>";
        if ($item['DisenchantID']) {
            $output .= "<div id=\"pane9\">\n  <br /><br /><table class=\"lined\" style=\"width: 720px;\">\n  <tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_item_edit['disenchant_templ']}: {$item['DisenchantID']}</td></tr>\n  <tr><td colspan=\"6\">";
            $cel_counter = 0;
            $row_flag = 0;
            $output .= "<table class=\"hidden\" align=\"center\"><tr>";
            $result1 = $sql->query("SELECT item,ChanceOrQuestChance,`groupid`,mincountOrRef,maxcount,lootcondition,condition_value1, condition_value2 FROM disenchant_loot_template WHERE entry = {$item['DisenchantID']} ORDER BY ChanceOrQuestChance DESC");
            while ($item = $sql->fetch_row($result1)) {
                $cel_counter++;
                $tooltip = get_item_name($item[0]) . " ({$item['0']})<br />{$lang_item_edit['drop_chance']}: {$item['1']}%<br />{$lang_item_edit['quest_drop_chance']}: {$item['2']}%<br />{$lang_item_edit['drop_chance']}: {$item['3']}-{$item['4']}<br />{$lang_item_edit['lootcondition']}: {$item['5']}<br />{$lang_item_edit['condition_value1']}: {$item['6']}<br />{$lang_item_edit['condition_value2']}: {$item['7']}";
                $output .= "<td>";
                $output .= maketooltip("<img src=\"" . get_item_icon($item[0]) . "\" class=\"icon_border\" alt=\"\" />", "{$item_datasite}{$item['0']}", $tooltip, "item_tooltip");
                $output .= "<br /><input type=\"checkbox\" name=\"del_de_items[]\" value=\"{$item['0']}\" /></td>";
                if ($cel_counter >= 16) {
                    $cel_counter = 0;
                    $output .= "</tr><tr>";
                    $row_flag++;
                }
            }
            if ($row_flag) {
                $output .= "<td colspan=\"" . (16 - $cel_counter) . "\"></td>";
            }
            $output .= "</td></tr></table>\n </td>\n</tr>\n<tr class=\"large_bold\"><td colspan=\"6\" class=\"hidden\" align=\"left\">{$lang_item_edit['add_items_to_templ']}:</td></tr>\n<tr>\n<td>" . makeinfocell($lang_item_edit['loot_item_id'], $lang_item_edit['loot_item_id_desc']) . "</td>\n  <td><input type=\"text\" name=\"de_item\" size=\"8\" maxlength=\"10\" value=\"\" /></td>\n<td>" . makeinfocell($lang_item_edit['loot_drop_chance'], $lang_item_edit['loot_drop_chance_desc']) . "</td>\n  <td><input type=\"text\" name=\"de_ChanceOrQuestChance\" size=\"8\" maxlength=\"11\" value=\"0\" /></td>\n<td>" . makeinfocell($lang_item_edit['loot_quest_drop_chance'], $lang_item_edit['loot_quest_drop_chance_desc']) . "</td>\n  <td><input type=\"text\" name=\"de_groupid\" size=\"8\" maxlength=\"10\" value=\"0\" /></td>\n</tr>\n<tr>\n<td>" . makeinfocell($lang_item_edit['min_count'], $lang_item_edit['min_count_desc']) . "</td>\n  <td><input type=\"text\" name=\"de_mincountOrRef\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>\n<td>" . makeinfocell($lang_item_edit['max_count'], $lang_item_edit['max_count_desc']) . "</td>\n  <td><input type=\"text\" name=\"de_maxcount\" size=\"8\" maxlength=\"3\" value=\"1\" /></td>\n</tr>\n<tr>\n<td>" . makeinfocell($lang_item_edit['lootcondition'], $lang_item_edit['lootcondition_desc']) . "</td>\n  <td><input type=\"text\" name=\"de_lootcondition\" size=\"8\" maxlength=\"3\" value=\"0\" /></td>\n<td>" . makeinfocell($lang_item_edit['condition_value1'], $lang_item_edit['condition_value1_desc']) . "</td>\n  <td><input type=\"text\" name=\"de_condition_value1\" size=\"8\" maxlength=\"3\" value=\"0\" /></td>\n<td>" . makeinfocell($lang_item_edit['condition_value2'], $lang_item_edit['condition_value2_desc']) . "</td>\n  <td><input type=\"text\" name=\"de_condition_value2\" size=\"8\" maxlength=\"3\" value=\"0\" /></td>\n</tr>\n</table>\n</div>";
        }
        $output .= "</div>\n</div>\n<br />\n</form>\n\n<script type=\"text/javascript\">setupPanes(\"container\", \"tab1\")</script>";
        unset($socketColor_3);
        $output .= "\n          <table class=\"hidden\">\n            <tr>\n              <td>";
        if ($user_lvl >= $action_permission['delete']) {
            makebutton($lang_item_edit['del_item'], "item.php?action=delete&amp;entry={$entry}\" type=\"wrn", 180);
        }
        $output .= "\n              </td>\n              <td>";
        if ($user_lvl >= $action_permission['update']) {
            makebutton($lang_item_edit['update'], "javascript:do_submit('form1',0)\" type=\"wrn", 180);
        }
        $output .= "\n              </td>\n              <td>";
        if ($user_lvl >= $action_permission['insert']) {
            makebutton($lang_item_edit['export_sql'], "javascript:do_submit('form1',1)", 180);
        }
        $output .= "\n              </td>\n              <td>";
        makebutton($lang_global['back'], "javascript:window.history.back()", 130);
        $output .= "\n              </td>\n              <td>";
        makebutton($lang_item_edit['new_search'], "item.php", 130);
        $output .= "\n              </td>\n            </tr>\n          </table>\n        </center>\n";
    } else {
        error($lang_item_edit['item_not_found']);
        exit;
    }
}
开发者ID:BACKUPLIB,项目名称:Infinity_MaNGOS,代码行数:101,代码来源:item.php

示例8: char_companions

function char_companions(&$sqlr, &$sqlc, &$sqlw)
{
    global $output, $lang_global, $lang_char, $realm_id, $characters_db, $world_db, $action_permission, $user_lvl, $user_name, $item_datasite;
    // this page uses wowhead tooltops
    wowhead_tt();
    //==========================$_GET and SECURE=================================
    // id and multi realm security to prevent sql injection
    require_once './include/char/include/char_multi_realm_security.php';
    //==========================$_GET and SECURE end=============================
    // getting character data from database
    $result = $sqlc->query('
		SELECT account, name, race, class, gender, level
		FROM characters
		WHERE guid = ' . $id . ' 
		LIMIT 1');
    // no point going further if character does not exist
    if ($sqlc->num_rows($result)) {
        $char = $sqlc->fetch_assoc($result);
        // we get user permissions first
        $owner_acc_id = $sqlc->result($result, 0, 'account');
        $result = $sqlr->query('
			SELECT gmlevel, username 
			FROM account 
			WHERE id = ' . $char['account'] . '');
        $owner_gmlvl = $sqlr->result($result, 0, 'gmlevel');
        $owner_name = $sqlr->result($result, 0, 'username');
        // check user permission
        if ($user_lvl > $owner_gmlvl || $owner_name === $user_name) {
            // character sub header
            $output .= '
<center>
<div id="tab_content">
	<h1>' . $lang_char['extra'] . '</h1>
	<br />';
            // character menu tab
            require_once './include/char/include/char_header.php';
            // character info
            require_once './include/char/include/char_info.php';
            //---------------Page Specific Data Starts Here--------------------------
            $output .= '
	<h1>' . $lang_char['char_companions'] . '</h1>
	<br />';
            // character extra menu tab
            require_once './include/char/include/char_extra_header.php';
            $output .= '
	<div id="tab_content2">
		<table class="lined" style="width: 450px;">
			<tr>
				<th width="15%">' . $lang_char['icon'] . '</th>
				<th width="15%">' . $lang_char['quantity'] . '</th>
				<th width="70%">' . $lang_char['name'] . '</th>
			</tr>';
            $sqlw = new SQL();
            $sqlw->connect($world_db[$realm_id]['addr'], $world_db[$realm_id]['user'], $world_db[$realm_id]['pass'], $world_db[$realm_id]['name']);
            $item = $sqlw->query('
				SELECT entry, description
				FROM item_template
				WHERE BagFamily = 4096');
            while ($template = $sqlw->fetch_assoc($item)) {
                $character = $sqlc->query('
					SELECT item, item_template
					FROM character_inventory
					WHERE guid = ' . $id . ' AND item_template = ' . $template['entry'] . ' ');
                while ($inventory = $sqlc->fetch_assoc($character)) {
                    $instance = $sqlc->query('
						SELECT CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, " ", 15), " ", -1) AS UNSIGNED) AS item
						FROM item_instance
						WHERE guid = ' . $inventory['item'] . ' ');
                    $output .= '
			<tr valign="center">
				<td >
					<a style="padding:2px;" href="' . $item_datasite . $inventory['item_template'] . '" target="_blank">
						<img src="' . get_item_icon($inventory['item_template'], $sqlm) . '" alt="' . $inventory['item_template'] . '" class="icon_border_0" />
					</a>
				</td>
				<td>
					' . $instance['item'] . '
				</td>
				<td>
					<span onmousemove="toolTip(\'' . $template['description'] . '\', \'item_tooltip\')" onmouseout="toolTip()">' . get_item_name($inventory['item_template'], $sqlw) . '</span>
				</td>
			</tr>';
                }
            }
            $output .= '
		</table>';
            unset($template);
            unset($inventory);
            unset($item);
            unset($character);
            unset($instance);
            //---------------Page Specific Data Ends Here--------------------------
            $output .= '
	</div>
</div>
<br />';
            require_once './include/char/include/char_ footer.php';
            $output .= '
<br />
</center>';
//.........这里部分代码省略.........
开发者ID:BACKUPLIB,项目名称:Infinity_MaNGOS,代码行数:101,代码来源:char_extra_companion.php

示例9: browse_auctions


//.........这里部分代码省略.........
            $i_query = "SELECT *, \r\n            SUBSTRING_INDEX(SUBSTRING_INDEX(`" . $characters_db[$realm_id]["name"] . "`.item_instance.data, ' ', 11), ' ', -1) AS creator,\r\n            SUBSTRING_INDEX(SUBSTRING_INDEX(`" . $characters_db[$realm_id]["name"] . "`.item_instance.data, ' ', 23), ' ', -1) AS enchantment, \r\n            SUBSTRING_INDEX(SUBSTRING_INDEX(`" . $characters_db[$realm_id]["name"] . "`.item_instance.data, ' ', 60), ' ', -1) AS property, \r\n            SUBSTRING_INDEX(SUBSTRING_INDEX(`" . $characters_db[$realm_id]["name"] . "`.item_instance.data, ' ', 15), ' ', -1) AS count,\r\n            SUBSTRING_INDEX(SUBSTRING_INDEX(`" . $characters_db[$realm_id]["name"] . "`.item_instance.data, ' ', 62), ' ', -1) AS durability,\r\n            SUBSTRING_INDEX(SUBSTRING_INDEX(`" . $characters_db[$realm_id]["name"] . "`.item_instance.data, ' ', 22), ' ', -1) AS flags\r\n            FROM item_template\r\n              LEFT JOIN `" . $characters_db[$realm_id]["name"] . "`.character_inventory ON character_inventory.item=" . $rows["item"] . "\r\n              LEFT JOIN `" . $characters_db[$realm_id]["name"] . "`.item_instance ON item_instance.guid=" . $rows["item"] . " " . ($locales_search_option != 0 ? "LEFT JOIN locales_item ON locales_item.entry=item_template.entry " : " ") . "WHERE item_template.entry=" . $rows["item_entry"];
        } else {
            $i_query = "SELECT *, \r\n            creatorGuid AS creator,\r\n            enchantments AS enchantment, \r\n            randomPropertyId AS property, \r\n            count, durability, `" . $characters_db[$realm_id]["name"] . "`.item_instance.flags AS flags\r\n            FROM item_template\r\n              LEFT JOIN `" . $characters_db[$realm_id]["name"] . "`.character_inventory ON character_inventory.item=" . $rows["item"] . "\r\n              LEFT JOIN `" . $characters_db[$realm_id]["name"] . "`.item_instance ON item_instance.guid=" . $rows["item"] . " " . ($locales_search_option != 0 ? "LEFT JOIN locales_item ON locales_item.entry=item_template.entry " : " ") . "WHERE item_template.entry=" . $rows["item_entry"];
        }
        $i_result = $sql["world"]->query($i_query);
        $item_result = $sql["world"]->fetch_assoc($i_result);
        // Localization
        if ($locales_search_option != 0) {
            if ($core == 1) {
                $item_result["name"] = $item_result["name"];
            } else {
                $item_result["name"] = $item_result["name_loc" . $locales_search_option];
            }
        } else {
            $item_result["name"] = $item_result["name"];
        }
        // calculate the buyout value
        $value = $rows["buyout"];
        $g = floor($value / 10000);
        $value -= $g * 10000;
        $s = floor($value / 100);
        $value -= $s * 100;
        $c = $value;
        $buyout = $g . '<img src="./img/gold.gif" alt="" style="position: relative; bottom: -6px;" /> ' . $s . '<img src="./img/silver.gif" alt="" style="position: relative; bottom: -6px;" /> ' . $c . '<img src="./img/copper.gif" alt="" style="position: relative; bottom: -6px;" /> ';
        // calculate the remaining time
        $tot_time = $rows["time"] - $rows["now"];
        $total_days = (int) ($tot_time / 86400);
        $tot_time = $tot_time - $tot_days * 86400;
        $total_hours = (int) ($tot_time / 3600);
        $tot_time = $tot_time - $total_hours * 3600;
        $total_min = (int) ($tot_time / 60);
        // get bidder name
        $bidder_result = $sql["char"]->result($sql["char"]->query("SELECT name FROM characters WHERE guid = '" . $rows["bidder"] . "'"), 0);
        // calculate the last bid value
        $value = $rows["bid"];
        $g = floor($value / 10000);
        $value -= $g * 10000;
        $s = floor($value / 100);
        $value -= $s * 100;
        $c = $value;
        $bid = $g . '<img src="./img/gold.gif" alt="" /> ' . $s . '<img src="./img/silver.gif" alt="" /> ' . $c . '<img src="./img/copper.gif" alt="" /> ';
        $output .= '
            <tr>
              <td class="center-text">
                <a href="./char.php?id=' . $rows["owner"] . '">' . $rows["owner_name"] . '</a>
              </td>
              <td>';
        $item_icon = get_item_icon($rows["item_entry"]);
        $item_border = get_item_border($rows["item_entry"]);
        $output .= '
                <a href="' . $base_datasite . $item_datasite . $rows["item_entry"] . '" rel="external" onmouseover="ShowTooltip(this,\'_' . $rows["item"] . '\');" onmouseout="HideTooltip(\'_' . $rows["item"] . '\');">
                  <img src="' . $item_icon . '" class="' . $item_border . '" alt="" />
                </a>';
        $output .= '
                <div class="item_tooltip" id="tooltip_' . $rows["item"] . '">
                  <table>
                    <tr>
                      <td>
                        ' . get_item_tooltip($item_result, $item_result['enchantment'], $item_result['property'], $item_result['creator'], $item_result['durability'], $item_result['flags']) . '
                      </td>
                    </tr>
                  </table>
                </div>';
        $output .= '
              </td>
              <td class="center-text">
                <a href="' . $base_datasite . $item_datasite . $rows["item_entry"] . '" rel="external" onmouseover="ShowTooltip(this,\'_' . $rows["item"] . '\');" onmouseout="HideTooltip(\'_' . $rows["item"] . '\');" style="color:' . get_item_quality_color($item_result["Quality"]) . '">' . $item_result["name"] . '</a>
              </td>
              <td class="center-text">
                ' . $buyout . '
              </td>
              <td class="center-text">';
        if ($rows["time"] > $rows["now"]) {
            $output .= ($total_days != 0 ? $total_days . ' days, ' : '') . ($total_hours != 0 ? $total_hours . ' hours, ' : '') . ($total_min != 0 ? $total_min . ' minutes' : '');
        } else {
            $output .= lang("auctionhouse", "auction_over");
        }
        $output .= '
              </td>
              <td class="center-text">
                <a href="./char.php?id=' . $rows["bidder"] . '">' . $bidder_result . '</a>
              </td>
              <td class="center-text">
                ' . ($bidder_result != '' ? $bid : '') . '
              </td>
            </tr>';
    }
    $output .= '
            <tr>
              <td colspan="7" class="hidden" style="width: 25%; text-align: right;">';
    $output .= generate_pagination("ahstats.php?order_by=" . $order_by . ($search_by && $search_value || $search_class != -1 || $search_quality != -1 ? "&amp;search_by=" . $search_by . "&amp;search_value=" . $search_value . "&amp;search_quality=" . $search_quality . "&amp;search_class=" . $search_class . "&amp;error=2" : "") . "&amp;dir=" . ($dir ? 0 : 1), $all_record, $itemperpage, $start);
    $output .= '
              </td>
            </tr>
            <tr>
              <td colspan="7" class="hidden" style="text-align: right;">' . lang("auctionhouse", "total_auctions") . ' : ' . $all_record . '
              </td>
            </tr>
          </table>';
}
开发者ID:xhaher,项目名称:CoreManager,代码行数:101,代码来源:ahstats.php

示例10: char_extra

function char_extra(&$sqlr, &$sqlc, &$sqlw)
{
    global $output, $lang_global, $lang_char, $realm_id, $characters_db, $world_db, $action_permission, $user_lvl, $user_name, $item_datasite;
    // this page uses wowhead tooltops
    wowhead_tt();
    require_once 'core/char/char_security.php';
    $result = $sqlc->query('SELECT account, name, race, class, gender, level
                            FROM characters
                            WHERE guid = ' . $id . ' LIMIT 1');
    if ($sqlc->num_rows($result)) {
        $char = $sqlc->fetch_assoc($result);
        $owner_acc_id = $sqlc->result($result, 0, 'account');
        $result = $sqlr->query('SELECT `username`, `gmlevel` FROM `account` LEFT JOIN `account_access` ON `account`.`id`=`account_access`.`id` WHERE `account`.`id` = ' . $owner_acc_id . ' ORDER BY `gmlevel` DESC LIMIT 1');
        $owner_name = $sqlr->result($result, 0, 'username');
        $owner_gmlvl = $sqlr->result($result, 0, 'gmlevel');
        if (empty($owner_gmlvl)) {
            $owner_gmlvl = 0;
        }
        if ($user_lvl > $owner_gmlvl || $owner_name === $user_name) {
            $output .= '
            <center>
                <div id="tab_content">
                    <h1>' . $lang_char['extra'] . '</h1>
                    <br />';
            require_once 'core/char/char_header.php';
            //---------------Page Specific Data Starts Here--------------------------
            $output .= '
                    <br /><br />
                    <table class="lined" style="width: 450px;">
                        <tr>
                            <th width="15%">' . $lang_char['icon'] . '</th>
                            <th width="15%">' . $lang_char['quantity'] . '</th>
                            <th width="70%">' . $lang_char['name'] . '</th>
                        </tr>';
            $sqlw = new SQL();
            $sqlw->connect($world_db[$realm_id]['addr'], $world_db[$realm_id]['user'], $world_db[$realm_id]['pass'], $world_db[$realm_id]['name']);
            $result = $sqlw->query('SELECT entry, description FROM item_template WHERE BagFamily = 8192');
            while ($bag = $sqlw->fetch_assoc($result)) {
                $result_2 = $sqlc->query('SELECT guid as item, itemEntry FROM item_instance WHERE owner_guid = ' . $id . ' AND itemEntry = ' . $bag['entry'] . ' ');
                while ($char = $sqlc->fetch_assoc($result_2)) {
                    $result_3 = $sqlc->query('SELECT count AS item FROM item_instance WHERE guid = ' . $char['item'] . ' ');
                    $items = $sqlc->fetch_row($result_3);
                    $output .= '
                        <tr valign="center">
                            <td>
                                <a style="padding:2px;" href="' . $item_datasite . $char['itemEntry'] . '" target="_blank">
                                    <img src="' . get_item_icon($char['itemEntry'], $sqlm) . '" alt="' . $char['itemEntry'] . '" class="icon_border_0" />
                                </a>
                            </td>
                            <td>
                                ' . $items['0'] . '
                            </td>
                            <td>
                                <span onmousemove="toolTip(\'' . $bag['description'] . '\', \'item_tooltip\')" onmouseout="toolTip()">' . get_item_name($char['itemEntry'], $sqlw) . '</span>
                            </td>
                        </tr>';
                }
            }
            $output .= '
                    </table>';
            unset($bag);
            //---------------Page Specific Data Ends Here--------------------------
            $output .= '
                </div>
            </div>
            <br />';
            require_once 'core/char/char_footer.php';
            $output .= '
            <br />
            </center>';
        } else {
            error($lang_char['no_permission']);
        }
    } else {
        error($lang_char['no_char_found']);
    }
}
开发者ID:BACKUPLIB,项目名称:minimanager,代码行数:77,代码来源:char_extra.php

示例11: pointsystem


//.........这里部分代码省略.........
                            <option value="32" ' . ($bag["slots"] == 32 ? 'selected="selected"' : '') . '>32</option>
                            <option value="34" ' . ($bag["slots"] == 34 ? 'selected="selected"' : '') . '>34</option>
                            <option value="36" ' . ($bag["slots"] == 36 ? 'selected="selected"' : '') . '>36</option>
                          </select>
                        </td>
                      </tr>
                      <tr>
                        <td colspan="2">
                          <hr />
                        </td>
                      </tr>
                      <tr>
                        <td valign="top" align="center">
                          <span>' . lang("admin", "bag_simulation") . '</span>
                          <div class="bag" style="width:' . 4 * 43 . 'px;height:' . ceil($bag["slots"] / 4) * 41 . 'px;">';
                            $dsp = $bag["slots"] % 4;
                            if ($dsp) {
                                $output .= '
                            <div class="no_slot"></div>';
                            }
                            // get bag items
                            $items_query = "SELECT item_id, slot, item_count FROM point_system_prize_bag_items WHERE `bag`='" . $bag_id . "'";
                            $items_result = $sqlm->query($items_query);
                            // create a empty bag array and fill it with nothing
                            $items = array();
                            for ($i = 0; $i < $bag["slots"]; $i++) {
                                $items[] = array("item_id" => 0, "slot" => 0, "item_count" => 0);
                            }
                            while ($item = $sqlm->fetch_assoc($items_result)) {
                                $item["item_count"] = $item["item_count"] == 1 ? "" : $item["item_count"];
                                // this_is_junk: style left hardcoded because it's calculated.
                                $output .= '
                            <div class="bag_slot" style="left:' . ($item["slot"] + $dsp) % 4 * 44 . 'px;top:' . (floor(($item["slot"] + $dsp) / 4) * 41 + 3) . 'px;">
                              <img src="' . get_item_icon($item["item_id"]) . '" alt="" class="item_img" />';
                                $output .= '
                              <div class="points_bag_quantity_shadow">' . $item["item_count"] . '</div>
                              <div class="points_bag_quantity">' . $item["item_count"] . '</div>';
                                $output .= '
                            </div>';
                                $item["item_count"] = $item["item_count"] == "" ? 1 : $item["item_count"];
                                $items[$item["slot"]] = $item;
                            }
                            $output .= '
                          </div>
                        </td>
                        <td>
                          <table>
                            <tr>
                              <td>' . lang("admin", "bag_slot") . '</td>
                              <td align="center">' . lang("admin", "bag_item") . '</td>
                              <td align="center">' . lang("admin", "bag_item_count") . '</td>
                            </tr>';
                            for ($i = 0; $i < $bag["slots"]; $i++) {
                                $output .= '
                            <tr>
                              <td>' . ($i + 1) . ': </td>
                              <td>
                                <input type="text" name="slot_' . $i . '" value="' . $items[$i]["item_id"] . '" size="7" />
                              </td>
                              <td>
                                <input type="text" name="slot_count_' . $i . '" value="' . $items[$i]["item_count"] . '" size="7" />
                              </td>
                            </tr>';
                            }
                            $output .= '
                          </table>
开发者ID:Refuge89,项目名称:World-of-Warcraft-Trinity-Core-MaNGOS,代码行数:67,代码来源:admin_pointsystem_lib.php

示例12: char_inv


//.........这里部分代码省略.........
                    } elseif (isset($bank_bag_id[$slot['bag']])) {
                        $bank[$bank_bag_id[$slot['bag']]][$slot['slot']] = array($slot['itemEntry'], 0, $slot['stack_count']);
                    }
                }
            }
            unset($slot);
            unset($bag_id);
            unset($bank_bag_id);
            unset($result);
            //------------------------Character Tabs---------------------------------
            // we start with a lead of 10 spaces,
            //  because last line of header is an opening tag with 8 spaces
            //  keep html indent in sync, so debuging from browser source would be easy to read
            $output .= '
                    <center>
                        <div id="tab_content">
                            <h1>' . $lang_char['inventory'] . '</h1>
                            <br />';
            require_once 'core/char/char_header.php';
            $output .= '
                            <br /><br />
                            <table class="lined" style="width: 700px;">
                                <tr>';
            //---------------Page Specific Data Starts Here--------------------------
            $sqlm = new SQL();
            $sqlm->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
            // equipped bags
            for ($i = 1; $i < 5; ++$i) {
                $output .= '
                                    <th>';
                if ($equiped_bag_id[$i]) {
                    $output .= '
                                        <a style="padding:2px;" href="' . $item_datasite . $equiped_bag_id[$i][0] . '" target="_blank">
                                            <img class="bag_icon" src="' . get_item_icon($equiped_bag_id[$i][0], $sqlm, $sqlw) . '" alt="" />
                                        </a>
                                        ' . $lang_item['bag'] . ' ' . $i . '<br />
                                        <font class="small">' . $equiped_bag_id[$i][1] . ' ' . $lang_item['slots'] . '</font>';
                }
                $output .= '
                                    </th>';
            }
            $output .= '
                                </tr>
                                <tr>';
            // equipped bag slots
            for ($t = 1; $t < 5; ++$t) {
                $output .= '
                                    <td class="bag" valign="bottom" align="center">
                                        <div style="width:' . 4 * 43 . 'px;height:' . ceil($equiped_bag_id[$t][1] / 4) * 41 . 'px;">';
                $dsp = $equiped_bag_id[$t][1] % 4;
                if ($dsp) {
                    $output .= '
                                            <div class="no_slot"></div>';
                }
                foreach ($bag[$t] as $pos => $item) {
                    $item[2] = $item[2] == 1 ? '' : $item[2];
                    $output .= '
                                            <div style="left:' . ($pos + $dsp) % 4 * 42 . 'px;top:' . floor(($pos + $dsp) / 4) * 41 . 'px;">
                                                <a style="padding:2px;" href="' . $item_datasite . $item[0] . '" target="_blank">
                                                    <img src="' . get_item_icon($item[0], $sqlm, $sqlw) . '" alt="" />
                                                </a>
                                                <div style="width:25px;margin:-20px 0px 0px 18px;color: black; font-size:14px">' . $item[2] . '</div>
                                                <div style="width:25px;margin:-21px 0px 0px 17px;font-size:14px">' . $item[2] . '</div>
                                            </div>';
                }
                $output .= '
开发者ID:BACKUPLIB,项目名称:minimanager,代码行数:67,代码来源:char_inv.php

示例13: do_insert_update

function do_insert_update($do_insert)
{
    global $output, $world_db, $realm_id, $creature_datasite, $item_datasite, $quest_datasite, $spell_datasite, $action_permission, $user_lvl, $locales_search_option, $arcm_db, $sqlm, $sqlw, $sqld;
    //wowhead_tt();
    require_once "./libs/get_lib.php";
    require_once 'libs/item_lib.php';
    // entry only needed on update
    if (!$do_insert) {
        if (!isset($_GET['entry'])) {
            redirect("vendor.php?error=1");
        }
        $entry = is_numeric($_GET['entry']) ? $sqlw->quote_smart($_GET['entry']) : redirect("vendor.php?error=8");
        $vend_query = "SELECT * FROM vendors WHERE entry = '{$entry}'";
        $vend_restrict_query = "SELECT * FROM vendor_restrictions WHERE entry = '{$entry}'";
        $vend_result = $sqlw->query($vend_query);
        $vend_restrict_result = $sqlw->query($vend_restrict_query);
    } else {
        // get new free id
        $result = $sqlw->query("SELECT max(entry)+1 as newentry from creature_proto");
        $entry = $sqlw->result($result, 0, 'newentry');
        $result = $sqlw->query("SELECT {$entry} as `entry`, 0 as `heroic_entry`, 0 as `KillCredit1`, 0 as `KillCredit2`, 0 as `modelid_A`, 0 as `modelid_A2`, 0 as `modelid_H`, 0 as `modelid_H2`, 'new creature' as`name`,'' as `subname`, '' as `IconName`, 1 as `minlevel`, 1 as `maxlevel`, 1 as `minhealth`, 1 as `maxhealth`, 0 as `minmana`, 0 as `maxmana`, 0 as `armor`,0 as `faction_A`, 0 as `faction_H`, 0 as `npcflag`, 1 as `speed`, 1 as `scale`,0 as `rank`, 1 as `mindmg`, 1 as `maxdmg`, 0 as `dmgschool`, 0 as `attackpower`, 2000 as `baseattacktime`, 0 as `rangeattacktime`, 0 as `unit_flags`,0 as `dynamicflags`, 0 as `family`, 0 as `trainer_type`, 0 as `trainer_spell`, 0 as `trainer_class`,0 as `trainer_race`,0 as `minrangedmg`, 0 as `maxrangedmg`, 0 as `rangedattackpower`, 0 as `type`,0 as `type_flags`,0 as `lootid`, 0 as `pickpocketloot`, 0 as `skinloot`, 0 as `resistance1`, 0 as `resistance2`, 0 as `resistance3`, 0 as `resistance4`, 0 as `resistance5`, 0 as `resistance6`, 0 as`spell1`, 0 as`spell2`, 0 as `spell3`, 0 as `spell4`, 0 as `PetSpellDataId`, 100 as `mingold`, 250 as `maxgold`, '' as `AIName`, 0 as `MovementType`, 1 as `InhabitType`, 0 as `RacialLeader`, 1 as `RegenHealth`, 0 as `equipment_id`, 0 as `mechanic_immune_mask`, 0 as `flags_extra`, '' as `ScriptName`");
        // use id for new creature_template
    }
    $total_found = $sqlw->num_rows($vend_result);
    if ($mob = $sqlw->fetch_assoc($vend_result)) {
        $name_query = "SELECT name FROM creature_names WHERE entry = '" . $mob['entry'] . "'";
        $name_result = $sqlw->query($name_query);
        $vendor_name = $sqlw->fetch_assoc($name_result);
        $output .= "\r\n  <script type=\"text/javascript\" src=\"libs/js/tab.js\"></script>\r\n  <center>\r\n    <span class='large_bold'>\r\n      <a href=\"{$creature_datasite}" . $mob['entry'] . "\">" . $vendor_name['name'] . "</a>\r\n    </span>\r\n    <br />\r\n    <br />\r\n    <br />\r\n    <br />\r\n    <form method=\"post\" action=\"vendor.php?action=del_item\" name=\"form1\">\r\n      <input type=\"hidden\" name=\"backup_op\" value=\"0\"/>\r\n      <input type=\"hidden\" name=\"entry\" value=\"{$entry}\"/>\r\n      <input type=\"hidden\" name=\"insert\" value=\"{$do_insert}\"/>\r\n\r\n      <div class=\"jtab-container\" id=\"container\">\r\n        <ul class=\"jtabs\">\r\n          <li>\r\n            <a href=\"#\" onclick=\"return showPane('pane1', this)\" id=\"tab1\">" . lang('vendor', 'sells') . "</a>\r\n          </li>\r\n          <li>\r\n            <a href=\"#\" onclick=\"return showPane('pane3', this)\">" . lang('vendor', 'restrictions') . "</a>\r\n          </li>";
        $quest_flag = 0;
        $vendor_flag = 0;
        $trainer_flag = 0;
        $output .= "\r\n        </ul>\r\n          <div class=\"jtab-panes\">";
        $output .= "\r\n            <div id=\"pane1\">\r\n              <br />\r\n              <center>";
        $output .= "\r\n                <table class=\"lined\" id=\"vendor_edit_vendor\">\r\n                  <tr>\r\n                    <th width='3%'>&nbsp;</th>\r\n                    <th width='9%'></th>\r\n                    <th width='28%'>" . lang('vendor', 'itemname') . "</th>\r\n                    <th width='15%'>" . lang('vendor', 'quantity') . "</th>\r\n                    <th width='15%'>" . lang('vendor', 'maxquantity') . "</th>\r\n                    <th width='15%'>" . lang('vendor', 'inctime') . "</th>\r\n                    <th width='15%'>" . lang('vendor', 'extcost') . "</th>\r\n                  </tr>";
        $cur_vend = '';
        $vend_result2 = $sqlw->query($vend_query);
        for ($i = 1; $i <= $total_found; $i++) {
            $vendor = $sqlw->fetch_assoc($vend_result2);
            $item_query = "SELECT name1 FROM items WHERE entry = '" . $vendor['item'] . "'";
            $item_result = $sqlw->query($item_query);
            $item_name = $sqlw->fetch_assoc($item_result);
            if ($vendor['extended_cost'] != 0) {
                $extcost_query = "SELECT * FROM itemextendedcost WHERE id = '" . $vendor['extended_cost'] . "'";
                $extcost_result = $sqld->query($extcost_query);
                $extcost = $sqld->fetch_assoc($extcost_result);
                $ext_cost = "";
                $reqHonor = $extcost['ReqHonorPoints'];
                $reqArena = $extcost['ReqArenaPoints'];
                $reqItem1 = $extcost['RequiredItem1'];
                $reqItem2 = $extcost['RequiredItem2'];
                $reqItem3 = $extcost['RequiredItem3'];
                $reqItem4 = $extcost['RequiredItem4'];
                $reqItem5 = $extcost['RequiredItem5'];
                $reqItemCount1 = $extcost['RequiredItemCount1'];
                $reqItemCount2 = $extcost['RequiredItemCount2'];
                $reqItemCount3 = $extcost['RequiredItemCount3'];
                $reqItemCount4 = $extcost['RequiredItemCount4'];
                $reqItemCount5 = $extcost['RequiredItemCount5'];
                if ($reqHonor != 0) {
                    $ext_cost .= $reqHonor . "<img src='./img/money_alliance.gif' alt='Honor' /> ";
                }
                if ($reqArena != 0) {
                    $ext_cost .= $reqArena . "<img src='./img/money_arena.gif' alt='Arena' /> ";
                }
                if ($reqItem1 != 0) {
                    $ext_cost .= "\r\n            <a id='vend_req_item' href='" . $item_datasite . $reqItem1 . "' target='_blank'>\r\n              " . $reqItemCount1 . " <img src='" . get_item_icon($reqItem1) . "' width=16 height=16 alt='" . get_item_name($ReqItem1) . "' /> \r\n            </a>";
                }
                if ($reqItem2 != 0) {
                    $ext_cost .= "\r\n            <a id='vend_req_item' href='" . $item_datasite . $reqItem2 . "' target='_blank'>\r\n              " . $reqItemCount2 . " <img src='" . get_item_icon($reqItem2) . "' width=16 height=16 alt='" . get_item_name($ReqItem2) . "' /> \r\n            </a>";
                }
                if ($reqItem3 != 0) {
                    $ext_cost .= "\r\n            <a id='vend_req_item' href='" . $item_datasite . $reqItem3 . "' target='_blank'>\r\n              " . $reqItemCount3 . " <img src='" . get_item_icon($reqItem3) . "' width=16 height=16 alt='" . get_item_name($ReqItem3) . "' /> \r\n            </a>";
                }
                if ($reqItem4 != 0) {
                    $ext_cost .= "\r\n            <a id='vend_req_item' href='" . $item_datasite . $reqItem4 . "' target='_blank'>\r\n              " . $reqItemCount4 . " <img src='" . get_item_icon($reqItem4) . "' width=16 height=16 alt='" . get_item_name($ReqItem4) . "' /> \r\n            </a>";
                }
                if ($reqItem5 != 0) {
                    $ext_cost .= "\r\n            <a id='vend_req_item' href='" . $item_datasite . $reqItem5 . "' target='_blank'>\r\n              " . $reqItemCount5 . " <img src='" . get_item_icon($reqItem5) . "' width=16 height=16 alt='" . get_item_name($ReqItem5) . "' /> \r\n            </a>";
                }
            }
            //$output .= "<tr>
            //<td><a href=\"$creature_datasite".$creature['entry']."\" target=\"_blank\">".$vendor_name['name']."</a></td>";
            //$output .= "<td></td>";
            if ($user_lvl >= $action_permission['delete']) {
                $output .= '
                <tr>
                  <td>
                    <input type="checkbox" name="check[]" value="' . $vendor['item'] . '" onclick="CheckCheckAll(document.form1);" />
                  </td>';
            } else {
                $output .= '
                  <td></td>';
            }
            $output .= "\r\n                  <td>\r\n                    <a id=\"vendor_item_icon\" href=\"{$item_datasite}" . $vendor['item'] . "\" target=\"_blank\">\r\n                      <img src=\"" . get_item_icon($vendor['item']) . "\" class=\"" . get_item_border($vendor['item']) . "\" alt=\"\" />\r\n                    </a>\r\n                  </td>\r\n                  <td>\r\n                    <a href=\"item.php?action=edit&entry=" . $mob['item'] . "&amp;error=4\">" . $item_name['name1'] . "</a>\r\n                  </td>";
            $output .= "\r\n                  <td>" . $vendor['amount'] . "</td>\r\n                  <td>" . $vendor['max_amount'] . "</td>\r\n                  <td>" . $vendor['inctime'] . "</td>\r\n                  <td>" . $ext_cost . "</td>\r\n                </tr>";
        }
        $output .= "\r\n              </table>\r\n            </center>\r\n            <br />";
        if ($user_lvl >= $action_permission['delete']) {
            makebutton(lang('vendor', 'del_item'), 'javascript:do_submit(\'form1\',0)" type="wrn', 200);
//.........这里部分代码省略.........
开发者ID:GlassFace,项目名称:CoreManager2,代码行数:101,代码来源:vendor.php

示例14: char_inv


//.........这里部分代码省略.........
				  		</li>
					</ul>
					<ul>';
            // selected char tab at last
            $output .= '
						<li id="selected">
							<a href="char_inv.php?id=' . $id . '&amp;realm=' . $realmid . '">' . $lang_char['inventory'] . '</a>
						</li>';
            $output .= '
						</ul>
					</div>
					<div id="tab_content2">
					<font class="bold">
						' . htmlentities($char['name']) . ' -
						<img src="img/c_icons/' . $char['race'] . '-' . $char['gender'] . '.gif"
						onmousemove="toolTip(\'' . char_get_race_name($char['race']) . '\', \'item_tooltip\')" onmouseout="toolTip()" alt="" />
						<img src="img/c_icons/' . $char['class'] . '.gif"
						onmousemove="toolTip(\'' . char_get_class_name($char['class']) . '\',\'item_tooltip\')" onmouseout="toolTip()" alt="" /> - lvl ' . char_get_level_color($char['level']) . '
					</font>
				<br />
			<br />
			<table class="lined" style="width: 700px;">
				<tr>';
            //---------------Page Specific Data Starts Here--------------------------
            $sqlm = new SQL();
            $sqlm->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
            // equipped bags
            for ($i = 1; $i < 5; ++$i) {
                $output .= '
				<th>';
                if ($equiped_bag_id[$i]) {
                    $output .= '
					<a style="padding:2px;" href="' . $item_datasite . $equiped_bag_id[$i][0] . '" target="_blank">
						<img class="bag_icon" src="' . get_item_icon($equiped_bag_id[$i][0], $sqlm, $sqlw) . '" alt="" />
					</a>
					' . $lang_item['bag'] . ' ' . $i . '<br />
					<font class="small">' . $equiped_bag_id[$i][1] . ' ' . $lang_item['slots'] . '</font>';
                }
                $output .= '
					</th>';
            }
            $output .= '
				</tr>
				<tr>';
            // equipped bag slots
            for ($t = 1; $t < 5; ++$t) {
                $output .= '
						<td class="bag" valign="bottom" align="center">
						<div style="width:' . 4 * 43 . 'px;height:' . ceil($equiped_bag_id[$t][1] / 4) * 41 . 'px;">';
                $dsp = $equiped_bag_id[$t][1] % 4;
                if ($dsp) {
                    $output .= '
							<div class="no_slot"></div>';
                }
                foreach ($bag[$t] as $pos => $item) {
                    $item[2] = $item[2] == 1 ? '' : $item[2];
                    $output .= '
								<div style="left:' . ($pos + $dsp) % 4 * 42 . 'px;top:' . floor(($pos + $dsp) / 4) * 41 . 'px;">
								<a style="padding:2px;" href="' . $item_datasite . $item[0] . '" target="_blank">
									<img src="' . get_item_icon($item[0], $sqlm, $sqlw) . '" alt="" />
								</a>
								<div style="width:25px;margin:-20px 0px 0px 18px;color: black; font-size:14px">' . $item[2] . '</div>
								<div style="width:25px;margin:-21px 0px 0px 17px;font-size:14px">' . $item[2] . '</div>
								</div>';
                }
                $output .= '
开发者ID:scamp,项目名称:minimanager,代码行数:67,代码来源:char_inv.php

示例15: char_main

function char_main(&$sqlr, &$sqlc)
{
    global $output, $lang_global, $lang_char, $lang_item, $realm_id, $realm_db, $characters_db, $world_db, $server, $mmfpm_db, $action_permission, $user_lvl, $user_name, $user_id, $item_datasite, $spell_datasite, $showcountryflag;
    // this page uses wowhead tooltops
    wowhead_tt();
    require_once 'core/char/char_security.php';
    $result = $sqlc->query('SELECT account, race FROM characters WHERE guid = ' . $id . ' LIMIT 1');
    if ($sqlc->num_rows($result)) {
        //resrict by owner's gmlvl
        $owner_acc_id = $sqlc->result($result, 0, 'account');
        $query = $sqlr->query('SELECT `username`, `gmlevel` FROM `account` LEFT JOIN `account_access` ON `account`.`id`=`account_access`.`id` WHERE `account`.`id` = ' . $owner_acc_id . ' ORDER BY `gmlevel` DESC LIMIT 1');
        $owner_name = $sqlr->result($query, 0, 'username');
        $owner_gmlvl = $sqlr->result($query, 0, 'gmlevel');
        if (empty($owner_gmlvl)) {
            $owner_gmlvl = 0;
        }
        if ($user_lvl || $server[$realmid]['both_factions']) {
            $side_v = 0;
            $side_p = 0;
        } else {
            $side_p = in_array($sqlc->result($result, 0, 'race'), array(2, 5, 6, 8, 10)) ? 1 : 2;
            $result_1 = $sqlc->query('SELECT race FROM characters WHERE account = ' . $user_id . ' LIMIT 1');
            if ($sqlc->num_rows($result)) {
                $side_v = in_array($sqlc->result($result_1, 0, 'race'), array(2, 5, 6, 8, 10)) ? 1 : 2;
            } else {
                $side_v = 0;
            }
            unset($result_1);
        }
        if ($user_lvl >= $owner_gmlvl && ($side_v === $side_p || !$side_v)) {
            $result = $sqlc->query('SELECT characters.equipmentCache, characters.name, characters.race, characters.class, characters.level, characters.zone, characters.map, characters.online, characters.totaltime, characters.gender, characters.account, character_stats.blockPct,
                                    character_stats.dodgePct, character_stats.parryPct, character_stats.critPct, character_stats.rangedCritPct, character_stats.spellCritPct, COALESCE(guild_member.guildid,0) AS guildid, COALESCE(guild_member.rank,0) AS rank, 
                                    characters.totalHonorPoints, characters.arenaPoints, characters.totalKills, character_stats.maxhealth, character_stats.maxpower1, character_stats.strength, character_stats.agility, character_stats.stamina, character_stats.intellect,
                                    character_stats.spirit, character_stats.armor, character_stats.resHoly, character_stats.resFire, character_stats.resNature, character_stats.resFrost, character_stats.resShadow, character_stats.resArcane, character_stats.attackPower,
                                    character_stats.rangedAttackPower, character_stats.spellPower, characters.power2, character_stats.maxpower2, characters.power4, character_stats.maxpower4, characters.power3, character_stats.maxpower3   
                                    FROM characters LEFT JOIN character_stats ON characters.guid = character_stats.guid LEFT JOIN guild_member ON characters.guid = guild_member.guid WHERE characters.guid = ' . $id);
            $char = $sqlc->fetch_assoc($result);
            $eq_data = explode(' ', $char['equipmentCache']);
            $online = $char['online'] ? $lang_char['online'] : $lang_char['offline'];
            if ($char['guildid'] && $char['guildid'] != 0) {
                $guild_name = $sqlc->result($sqlc->query('SELECT name FROM guild WHERE guildid =' . $char['guildid'] . ''), 0, 'name');
                $guild_name = '<a href="guild.php?action=view_guild&amp;realm=' . $realmid . '&amp;error=3&amp;id=' . $char['guildid'] . '" >' . $guild_name . '</a>';
                $mrank = $char['rank'];
                $guild_rank = $sqlc->result($sqlc->query('SELECT rname FROM guild_rank WHERE guildid =' . $char['guildid'] . ' AND rid=' . $mrank . ''), 0, 'rname');
            } else {
                $guild_name = $lang_global['none'];
                $guild_rank = $lang_global['none'];
            }
            $block = round($char['blockPct'], 2);
            $dodge = round($char['dodgePct'], 2);
            $parry = round($char['parryPct'], 2);
            $crit = round($char['critPct'], 2);
            $ranged_crit = round($char['rangedCritPct'], 2);
            $spell_crit = round($char['spellCritPct'], 2);
            $spell_damage = $char['spellPower'];
            $rage = round($char['power2'] / 10);
            $maxrage = round($char['maxpower2'] / 10);
            //preventing undefined variables, didnt want to remove all this stuff so just filling the missing variables with 0
            define('CHAR_DATA_OFFSET_MELEE_HIT', 0);
            define('CHAR_DATA_OFFSET_SPELL_HEAL', 1);
            define('CHAR_DATA_OFFSET_SPELL_HIT', 2);
            define('CHAR_DATA_OFFSET_SPELL_HASTE_RATING', 3);
            define('CHAR_DATA_OFFSET_RESILIENCE', 4);
            define('CHAR_DATA_OFFSET_RANGE_HIT', 5);
            $char_data = array(0, 0, 0, 0, 0, 0);
            $maxdamage = 0;
            $mindamage = 0;
            $maxrangeddamage = 0;
            $minrangeddamage = 0;
            $expertise = 0;
            $EQU_HEAD = $eq_data[EQ_DATA_OFFSET_EQU_HEAD];
            $EQU_NECK = $eq_data[EQ_DATA_OFFSET_EQU_NECK];
            $EQU_SHOULDER = $eq_data[EQ_DATA_OFFSET_EQU_SHOULDER];
            $EQU_SHIRT = $eq_data[EQ_DATA_OFFSET_EQU_SHIRT];
            $EQU_CHEST = $eq_data[EQ_DATA_OFFSET_EQU_CHEST];
            $EQU_BELT = $eq_data[EQ_DATA_OFFSET_EQU_BELT];
            $EQU_LEGS = $eq_data[EQ_DATA_OFFSET_EQU_LEGS];
            $EQU_FEET = $eq_data[EQ_DATA_OFFSET_EQU_FEET];
            $EQU_WRIST = $eq_data[EQ_DATA_OFFSET_EQU_WRIST];
            $EQU_GLOVES = $eq_data[EQ_DATA_OFFSET_EQU_GLOVES];
            $EQU_FINGER1 = $eq_data[EQ_DATA_OFFSET_EQU_FINGER1];
            $EQU_FINGER2 = $eq_data[EQ_DATA_OFFSET_EQU_FINGER2];
            $EQU_TRINKET1 = $eq_data[EQ_DATA_OFFSET_EQU_TRINKET1];
            $EQU_TRINKET2 = $eq_data[EQ_DATA_OFFSET_EQU_TRINKET2];
            $EQU_BACK = $eq_data[EQ_DATA_OFFSET_EQU_BACK];
            $EQU_MAIN_HAND = $eq_data[EQ_DATA_OFFSET_EQU_MAIN_HAND];
            $EQU_OFF_HAND = $eq_data[EQ_DATA_OFFSET_EQU_OFF_HAND];
            $EQU_RANGED = $eq_data[EQ_DATA_OFFSET_EQU_RANGED];
            $EQU_TABARD = $eq_data[EQ_DATA_OFFSET_EQU_TABARD];
            /*
            // reserved incase we want to use back minimanagers' built in tooltip, instead of wowheads'
            // minimanagers' item tooltip needs updating, but it can show enchantments and sockets.
            
                  $equiped_items = array
                  (
                     1 => array(($EQU_HEAD      ? get_item_tooltip($EQU_HEAD)      : 0),($EQU_HEAD      ? get_item_icon($EQU_HEAD)      : 0),($EQU_HEAD      ? get_item_border($EQU_HEAD)      : 0)),
                     2 => array(($EQU_NECK      ? get_item_tooltip($EQU_NECK)      : 0),($EQU_NECK      ? get_item_icon($EQU_NECK)      : 0),($EQU_NECK      ? get_item_border($EQU_NECK)      : 0)),
                     3 => array(($EQU_SHOULDER  ? get_item_tooltip($EQU_SHOULDER)  : 0),($EQU_SHOULDER  ? get_item_icon($EQU_SHOULDER)  : 0),($EQU_SHOULDER  ? get_item_border($EQU_SHOULDER)  : 0)),
                     4 => array(($EQU_SHIRT     ? get_item_tooltip($EQU_SHIRT)     : 0),($EQU_SHIRT     ? get_item_icon($EQU_SHIRT)     : 0),($EQU_SHIRT     ? get_item_border($EQU_SHIRT)     : 0)),
                     5 => array(($EQU_CHEST     ? get_item_tooltip($EQU_CHEST)     : 0),($EQU_CHEST     ? get_item_icon($EQU_CHEST)     : 0),($EQU_CHEST     ? get_item_border($EQU_CHEST)     : 0)),
//.........这里部分代码省略.........
开发者ID:BACKUPLIB,项目名称:minimanager,代码行数:101,代码来源:char.php


注:本文中的get_item_icon函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。