The site is: http://tibiaotserver.com/?subtopic=spells
I cant do this recogniza vocation name from spells.xml.
Can some one help me?
Thanks
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>Type</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('group').'</TD><TD>'.$stage->getAttribute('mana').'</TD><TD>'.$stage->getAttribute('lvl').'</TD>';
$main_content .= '<TD>vocations_name</TD></TR>';
}
}
}
$main_content .= '</table>';
?>
I cant do this recogniza vocation name from spells.xml.
Can some one help me?
Thanks