function noBorderSpellTable($spell)
{
    echo "<table class=spell><tbody>";
    $name = $spell['SpellName'];
    if ($spell['Rank']) {
        echo "<tr><td class=Name>" . $name . "</td><td class=Rank align=right>" . $spell['Rank'] . "</td></tr>";
    } else {
        echo "<tr><td class=Name colspan=2>" . $name . "</td></tr>";
    }
    $cost = getSpellCostText($spell);
    if ($cost or $spell['rangeIndex'] > 1) {
        echo "<tr><td>";
        if ($cost) {
            echo $cost . "</td><td align=right>";
        }
        if ($spell['rangeIndex'] > 0 and $range = getRange($spell['rangeIndex']) and $range != 0) {
            echo $range . " yds range";
        }
        echo "</td></tr>";
    }
    // Заполняем поле времени каста
    $cast_time = "";
    if (($spell['Attributes'] & 0x404) == 0x404) {
        $cast_time = "Next melee";
    } else {
        if ($spell['AttributesEx'] & 0x44) {
            $cast_time = "Chanelled";
        } else {
            $cast_time = getCastTimeText($spell);
        }
    }
    // Заполняем поле кулдауна
    $cooldown = getSpellCooldown($spell);
    if ($cooldown) {
        $cooldown = getTimeText($cooldown / 1000) . " cooldown";
    } else {
        $cooldown = "";
    }
    if ($cast_time or $cooldown) {
        echo "<tr><td>" . $cast_time . "</td><td align=right>" . $cooldown . "</td></tr>";
    }
    // Тотем категория
    if ($spell['TotemCategory_1'] or $spell['TotemCategory_2']) {
        echo "<tr><td colspan=2 class=tool> Tools: ";
        if ($spell['TotemCategory_1']) {
            echo getTotemCategory($spell['TotemCategory_1']);
        }
        if ($spell['TotemCategory_2']) {
            echo ", " . getTotemCategory($spell['TotemCategory_2']);
        }
        echo "</td></tr>";
    }
    $itemClass = $spell['EquippedItemClass'];
    // Требования мили или рангед оружия
    if ($spell['Attributes'] & 0x2) {
        echo "<tr><td colspan=2>Requires Ranged Weapon</td></tr>";
    } else {
        if ($spell['Attributes'] & 0x4) {
            echo "<tr><td colspan=2>Requires Melee Weapon</td></tr>";
        } else {
            if ($itemClass == 2) {
                echo "<tr><td colSpan=2 class=req>";
                if ($itemSubClass = $spell['EquippedItemSubClassMask']) {
                    echo getSubclassList($itemClass, $itemSubClass);
                } else {
                    echo getClassName($itemClass);
                }
                echo "</td></tr>";
            }
        }
    }
    $reqForm = getAllowableForm($spell['Stances'], 0);
    if ($reqForm) {
        echo "<tr><td colspan=2>Requires: " . $reqForm . "</td></tr>";
    }
    $notreqForm = getAllowableForm($spell['StancesNot'], 0);
    if ($notreqForm) {
        echo "<tr><td class=SpellErr colspan=2>Not cast in: " . $notreqForm . "</td></tr>";
    }
    echo "<tr><td colspan=2 class=SpellDesc><a href=\"?spell={$spell['id']}\">" . getSpellDesc($spell) . "</a></td></tr>";
    echo "</tbody></table>";
}
function createSpellDetails($spell)
{
    global $lang;
    echo '<table class=details width=600><tbody>';
    echo '<tr><td colspan=4 class=head>' . $lang['detail_info'] . '</td></tr>';
    echo '<tr><th>Name</th><td colspan=2>' . $spell['SpellName'] . '</td><td align=right>' . $spell['Rank'] . '</td></tr>';
    if ($spell['Description']) {
        echo '<tr><th width=60>Info:</th><td colspan=3>' . getSpellDesc($spell) . '</td></tr>';
    }
    if ($spell['ToolTip']) {
        echo '<tr><th>Buff:</th><td colspan=3>' . getSpellBuff($spell) . '</td></tr>';
    }
    // Стоимость и длительность
    $cost = getSpellCostText($spell);
    $duration = getSpellDurationText($spell);
    if ($cost or $duration) {
        echo '<tr><th>Cost</th><td>' . ($cost ? $cost : 'No Cost') . '</td><th>Duration</th><td>' . $duration . '</td></tr>';
    }
    echo '<tr>';
    echo '<th width=13%>Level</th>';
    echo '<td width=37%>Base ' . $spell['baseLevel'] . ', Max ' . $spell['maxLevel'] . ', Spell ' . $spell['spellLevel'] . '</td>';
    echo '<th width=20%>Range</th>';
    echo '<td width=30%>' . getRangeText($spell['rangeIndex']) . '</td>';
    echo '</tr>';
    // Время квста и школа (выводятся всегда)
    echo '<tr><th>Cast time</th><td>' . getCastTimeText($spell) . '</td><th>School</th><td>' . getSpellSchool($spell['SchoolMask']) . '</td></tr>';
    $skillAbility = getSkillLineAbility($spell['id']);
    if ($skillAbility or $spell['Category']) {
        echo '<tr>';
        echo '<th>Skill</th>';
        if ($skillAbility) {
            echo '<td>' . getSkillName($skillAbility['skillId']) . '</td>';
        } else {
            echo '<td>n/a</td>';
        }
        echo '<th>Category</th>';
        if ($spell['Category']) {
            echo '<td>' . getCategoryName($spell['Category']) . '</td>';
        } else {
            echo '<td>n/a</td>';
        }
        echo '</tr>';
    }
    // Вывод механики и диспелла
    if ($spell['Mechanic'] or $spell['Dispel']) {
        echo '<tr>';
        echo '<th>Mechanic</th><td>' . getMechanicName($spell['Mechanic']) . '</td>';
        echo '<th>Dispel type</th><td>' . getDispelName($spell['Dispel']) . '</td>';
        echo '</tr>';
    }
    // Вывод кулдаунов
    $cooldown = getSpellCooldown($spell);
    if ($cooldown or $spell['StartRecoveryCategory'] or $spell['StartRecoveryTime']) {
        echo '<tr>';
        echo '<th>Cooldown</th>';
        if ($cooldown) {
            echo '<td>' . getTimeText($cooldown / 1000) . '</td>';
        } else {
            echo '<td>No cooldown</td>';
        }
        echo '<th>Global cooldown</th>';
        if ($spell['StartRecoveryCategory'] or $spell['StartRecoveryTime']) {
            echo '<td>';
            echo 'Affected';
            if ($spell['StartRecoveryTime']) {
                echo ', ' . getTimeText($spell['StartRecoveryTime'] / 1000);
            } else {
                echo ', Not start';
            }
            echo '</td>';
        } else {
            echo '<td>n/a</td>';
        }
        echo '</tr>';
    }
    // Вывод требований форм
    $stances = $spell['Stances'];
    $stancesNot = $spell['StancesNot'];
    if ($stances or $stancesNot) {
        echo '<tr>';
        echo '<th>Req form</th>';
        if ($stances) {
            echo '<td>' . getAllowableForm($stances) . '</td>';
        } else {
            echo '<td>n/a</td>';
        }
        echo '<th>Not in form</th>';
        if ($stancesNot) {
            echo '<td>' . getAllowableForm($stancesNot) . '</td>';
        } else {
            echo '<td>n/a</td>';
        }
        echo '</tr>';
    }
    // Вывод требований одетого снаряжения
    $itemClass = $spell['EquippedItemClass'];
    $itemSubClass = $spell['EquippedItemSubClassMask'];
    $inventoryTypeMask = $spell['EquippedItemInventoryTypeMask'];
    if ($itemClass >= 0 or $inventoryTypeMask) {
        echo '<tr>';
        echo '<th>Req item</th>';
        if ($itemClass >= 0) {
            echo '<td>';
            if ($itemSubClass) {
                echo getClassName($itemClass, 0) . ': ' . getSubclassList($itemClass, $itemSubClass);
            } else {
                echo getClassName($itemClass);
            }
            echo '</td>';
        } else {
            echo '<td>n/a</td>';
        }
        echo '<th>Inv type</th>';
        if ($inventoryTypeMask) {
            echo '<td>' . getInventoryTypeList($inventoryTypeMask) . '</td>';
        } else {
            echo '<td>n/a</td>';
        }
        echo '</tr>';
    }
    // Вывод тотм категорий и спеллфокуса
    $totem1 = $spell['TotemCategory_1'];
    $totem2 = $spell['TotemCategory_2'];
    $focus = $spell['RequiresSpellFocus'];
    if ($totem1 or $totem2 or $focus) {
        echo '<tr>';
        echo '<th>Tools</th>';
        if ($totem1 or $totem2) {
            echo '<td>';
            if ($totem1) {
                echo getTotemCategory($totem1);
            }
            if ($totem2) {
                echo ', ' . getTotemCategory($totem2);
            }
            echo '</td>';
        } else {
            echo '<td>n/a</td>';
        }
        echo '<th>Spell Focus</th>';
        if ($focus) {
            echo '<td>' . getSpellFocusName($focus, 2) . '</td>';
        } else {
            echo '<td>n/a</td>';
        }
        echo '</tr>';
    }
    $area = $spell['AreaGroupId'];
    if ($area) {
        echo '<tr>';
        echo '<th>Area</th>';
        if ($area) {
            echo '<td>' . $area . '</td>';
        } else {
            echo '<td>n/a</td>';
        }
        echo '</tr>';
    }
    // Вывод требований целей
    $targets = $spell['Targets'];
    $targetCreature = $spell['TargetCreatureType'];
    if ($targets or $targetCreature) {
        echo '<tr>';
        echo '<th>Targets</th>';
        if ($targets) {
            echo '<td>' . getTargetsList($targets) . '</td>';
        } else {
            echo '<td>n/a</td>';
        }
        echo '<th>Creature type</th>';
        if ($targetCreature) {
            echo '<td>' . getCreatureTypeList($targetCreature) . '</td>';
        } else {
            echo '<td>n/a</td>';
        }
        echo '</tr>';
    }
    if ($spell['Reagent_1'] or $spell['Reagent_2'] or $spell['Reagent_3'] or $spell['Reagent_4'] or $spell['Reagent_5'] or $spell['Reagent_6'] or $spell['Reagent_7'] or $spell['Reagent_8']) {
        echo '<tr>';
        echo '<th>Reagents</th>';
        echo '<td colspan=3>';
        r_spellReagents($spell);
        echo '</td>';
        echo '</tr>';
    }
    // Вывод эффектов
    showEffectData($spell, 1);
    showEffectData($spell, 2);
    showEffectData($spell, 3);
    echo '</tbody></table>';
}