コード例 #1
0
ファイル: spell.php プロジェクト: EQMacEmu/allaclone
<?php

include './includes/constantes.php';
include './includes/config.php';
include $includes_dir . 'mysql.php';
include $includes_dir . 'functions.php';
include $includes_dir . 'spell.inc.php';
$id = $_GET["id"];
$spell = getspell($id);
if (!$spell) {
    header("Location: spells.php");
    exit;
}
$Title = $spell["name"];
include $includes_dir . 'headers.php';
print "<center><table border=0 width=50%><tr valign=top><td>\n\t\t   <table border=0 width=0%>";
if (file_exists(getcwd() . "/icons/" . $spell['new_icon'] . ".gif")) {
    echo "<tr align='center'><td nowrap align='center'>\n\t\t\t\t\t<img src='" . $icons_url . $spell['new_icon'] . ".gif' align='center'/ border='1'>\n\t\t\t\t\t</td><td> <FONT SIZE='3'><b>" . $spell["name"] . "</b></FONT></td></tr>";
}
#print "<tr><td nowrap><b>Name : </b></td><td>".
print "<tr><td nowrap><b>Classes : </b></td><td>";
$v = "";
$minlvl = 70;
for ($i = 1; $i <= 16; $i++) {
    if ($spell["classes{$i}"] > 0 and $spell["classes{$i}"] < 255) {
        print "{$v} " . $dbclasses[$i] . " (" . $spell["classes{$i}"] . ")";
        $v = ",";
        if ($spell["classes{$i}"] < $minlvl) {
            $minlvl = $spell["classes{$i}"];
        }
    }
コード例 #2
0
ファイル: pet.php プロジェクト: EQMacEmu/allaclone
    print "<tr><td nowrap><b>Special attacks : </b></td><td>" . SpecialAttacks($npc["npcspecialattks"]) . "</td></tr>";
}
print "</tr></table>";
print "</td><td width=0% nowrap>";
// right column
print "<tr class=myline height=6><td colspan=2></td><tr>\n";
print "<tr valign=top>";
if ($npc["npc_spells_id"] > 0) {
    $query = "SELECT * FROM {$tbnpcspells} WHERE id=" . $npc["npc_spells_id"];
    $result = mysql_query($query) or message_die('npc.php', 'MYSQL_QUERY', $query, mysql_error());
    if (mysql_num_rows($result) > 0) {
        $g = mysql_fetch_array($result);
        print "<td><table border=0><tr><td colspan=2 nowrap><b>This pet casts the following spells : </b><p>";
        $query = "SELECT {$tbnpcspellsentries}.spellid\n            FROM {$tbnpcspellsentries}\n            WHERE {$tbnpcspellsentries}.npc_spells_id=" . $npc["npc_spells_id"] . "\n              AND {$tbnpcspellsentries}.minlevel<=" . $npc["level"] . "\n              AND {$tbnpcspellsentries}.maxlevel>=" . $npc["level"] . "\n            ORDER BY {$tbnpcspellsentries}.priority DESC\n            ";
        $result2 = mysql_query($query) or message_die('npc.php', 'MYSQL_QUERY', $query, mysql_error());
        if (mysql_num_rows($result2) > 0) {
            print "</ul><li><b>Listname : </b>" . $g["name"];
            if ($g["attack_proc"] == 1) {
                print " (Procs)";
            }
            print "<ul>";
            while ($row = mysql_fetch_array($result2)) {
                $spell = getspell($row["spellid"]);
                print "<li><a href=spell.php?id=" . $row["spellid"] . ">" . $spell["name"] . "</a>";
            }
        }
        print "</td></tr></table></td>";
    }
}
print "</td></tr></table><p>\n";
include $includes_dir . "footers.php";