Bica
Member
Sup .. i'm not sure, but i already found many pages "bla bla bla Spells bla bla bla" ...
i tested some of them but they didnt worked, so i find this one at my websites folder this one, i tested and worked fine
So i'm tired watching guys crying to have one decent spells page .... lets move to next chapter.
Line 8 - Do not forget to fix this line
PS: i wont put any link bcus in the future it must not work.
i tested some of them but they didnt worked, so i find this one at my websites folder this one, i tested and worked fine
So i'm tired watching guys crying to have one decent spells page .... lets move to next chapter.
PHP:
<div class='message'>
<div class='title'>Spells</div>
<div class='content'>
<?php
if(!defined('BASEPATH')) exit('No direct script access allowed');
$DIR = 'SPELLS DIR';
if(is_dir($DIR)) {
$spells = simplexml_load_file($DIR.'spells.xml');
$table_color_1 = 'black';
$table_color_2 = '#080808';
?>
<table border="0" cellspacing="1" cellpadding="5" width="100%" class="cellspadding">
<tr class="tableheader">
<td><strong>Name</strong></td>
<td><strong>Words</strong></td>
<td><strong>Mana Cost</strong></td>
<td width="10%" align="center"><strong>Level</strong></td>
</tr>
<?php
$i = 1;
foreach($spells as $spell) {
$color = ($i % 2 ? $table_color_1 : $table_color_2);
$i++;
if ($spell['mana'] >= 1 and $spell['words'] > null) {
echo '
<tr class="tablerow" id="spell_list">
<td style="font-size: 10pt;">'.$spell['name'].'</td>
<td style="font-size: 10pt;">'.$spell['words'].'</td>
<td style="font-size: 10pt;">'.$spell['mana'].'</td>
<td style="font-size: 10pt;">'.$spell['lvl'].'</td>
</tr>';
}
}
}
else{alert('Error loading spells. Directory address must be correct.');}
?>
</table>
</div></div>
Line 8 - Do not forget to fix this line
PHP:
$DIR = 'SPELLS DIR';
PS: i wont put any link bcus in the future it must not work.
Attachments
-
spells.rar687 bytes · Views: 30 · VirusTotal