Ejemplo n.º 1
0
if ($id != "" && is_numeric($id)) {
    $TooltipData = "";
    if ($type == "" || $type == "item") {
        if ($DiscoveredItemsOnly == TRUE) {
            $Query = "SELECT * FROM {$tbitems}, discovered_items WHERE {$tbitems}.id='" . $id . "' AND discovered_items.item_id={$tbitems}.id";
        } else {
            $Query = "SELECT * FROM {$tbitems} WHERE id='" . $id . "'";
        }
        $QueryResult = mysql_query($Query) or message_die('item.php', 'MYSQL_QUERY', $Query, mysql_error());
        if (mysql_num_rows($QueryResult) == 0) {
            //exit();
        }
        $item = mysql_fetch_array($QueryResult);
        // Prints all Item data into formatted tables
        $TooltipData .= BuildItemStats($item, 1);
    } elseif ($type == "spell") {
        $spell = getspell($id);
        if ($id > 0) {
            if ($spell) {
                $TooltipData .= BuildSpellInfo($spell, 1);
            } else {
                $TooltipData .= "There is no spell info found";
            }
        } else {
            $TooltipData .= "There is no spell info found";
        }
    }
    echo '$ToolTip.registerItem({"tooltip":"<div class=\\"itemtooltip\\">' . $TooltipData . '</div>","id":"' . $id . '"});';
} else {
    //exit();
}
Ejemplo n.º 2
0
    while ($row = mysql_fetch_array($QueryResult)) {
        // $Content .= BuildSpellInfo($row, 1);
        echo BuildItemStats($row, 1, 'item_view');
    }
}
/* 
	Displays Spell View tooltip
*/
if (isset($_GET['spell_view'])) {
    require_once 'includes/spell.inc.php';
    require_once 'includes/constants.php';
    require_once 'includes/alla_functions.php';
    require_once 'modules/ItemEditor/constants_ie.php';
    $QueryResult = mysql_query("SELECT * FROM spells_new WHERE `id` = " . $_GET['spell_view'] . ";");
    while ($row = mysql_fetch_array($QueryResult)) {
        $Content .= BuildSpellInfo($row, 1, 'item_view');
        echo $Content;
    }
    if (!$Content) {
        echo 'There is no data available...';
    }
}
/* 
	Displays Inline Spell View Data for inline editing as well... 
	Requested via tooltip...
*/
if (isset($_GET['spell_view_data_quick'])) {
    require_once 'includes/spell.inc.php';
    require_once 'includes/constants.php';
    require_once 'includes/alla_functions.php';
    require_once 'modules/ItemEditor/constants_ie.php';