• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

AAC [GESIOR 2012] Spells Page who read information from spells.xml

potinho

Advanced OT User
Joined
Oct 11, 2009
Messages
1,402
Solutions
17
Reaction score
150
Location
Brazil
I would like a spell page for Gesior 2012 that could read the contents of Spells.xml. I tried the solution in the topic below but the page is not shown to me, only the headers. No errors generated in the apache log.


1661525894685.pngaa
 
No errors o /var/log, just this on web:

1668187609722.png

My spells page:
PHP:
<?php

if(!defined('INITIALIZED'))
    exit;
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD CLASS=white><B><font CLASS=white>Name</B></TD><TD CLASS=white><B><font CLASS=white>Sentence</B></TD><TD CLASS=white><B><font CLASS=white>Mana</B></TD><TD CLASS=white><B><font CLASS=white>Level</B></TD><TD CLASS=white><B>Vocations:</B></TD></TR>';
$stages = new DOMDocument();
if($stages->load($config['site']['serverPath'] . 'data/spells/spells.xml'))
{
    foreach($stages->getElementsByTagName('instant') as $stage)
    {
        if($stage->hasAttribute('group'))
        {
            if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['lightborder']; } else { $bgcolor = $config['site']['darkborder']; } $number_of_rows++;
            $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>'.$stage->getAttribute('name').'</TD><TD>'.$stage->getAttribute('words').'</TD><TD>'.$stage->getAttribute('mana').'</TD><TD>'.$stage->getAttribute('maglv').'</TD>';
            $main_content .= '<TD>';
                foreach($stage->getElementsByTagName('vocation') as $stage2)              
                {
                    if($stage2->hasAttribute('name'))
                    {
                        $main_content .= ''.$stage2->getAttribute('name').'<BR>';
                    }
                }
            $main_content .= '</TD></TR>';
        }
    }
}
$main_content .= '</table>';
?>

spells.xml are attached
 

Attachments

Back
Top