felipemko
New Member
- Joined
- Mar 2, 2010
- Messages
- 173
- Reaction score
- 3
I have a table of made quests in my page of characters and would make the other side, because that spends 50% would like to create another side who spent the other 50%, however I do not know in the same TR ...
Here's the table, if someone knows it duplicates with the same content in the other side will thank very
Here's the table, if someone knows it duplicates with the same content in the other side will thank very
$id = $player->getCustomField("id");
$number_of_quests = 0;
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=10 WIDTH=50%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Quests</B></TD></TR>';
$quests = $config['site']['quests'];
foreach ($quests as $storage => $name) {
if(is_int($number_of_quests / 2))
$bgcolor = $config['site']['darkborder'];
else
$bgcolor = $config['site']['lightborder'];
$number_of_quests++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=97%>'.$storage.'</TD>';
$quest = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$quests[$storage].';')->fetch();
if($quest == false) {
$main_content .= '<TD><img src="images/false.png"/ width="20 height="20"></TD></TR>';
}
else
{
$main_content .= '<TD><img src="images/true.png"/ width="20" height="20"></TD></TR>';
}
}
$main_content .= '</TABLE></td></tr></table><br />';
$number_of_quests = 0;
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=10 WIDTH=50%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Quests</B></TD></TR>';
$quests = $config['site']['quests'];
foreach ($quests as $storage => $name) {
if(is_int($number_of_quests / 2))
$bgcolor = $config['site']['darkborder'];
else
$bgcolor = $config['site']['lightborder'];
$number_of_quests++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=97%>'.$storage.'</TD>';
$quest = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$quests[$storage].';')->fetch();
if($quest == false) {
$main_content .= '<TD><img src="images/false.png"/ width="20 height="20"></TD></TR>';
}
else
{
$main_content .= '<TD><img src="images/true.png"/ width="20" height="20"></TD></TR>';
}
}
$main_content .= '</TABLE></td></tr></table><br />';