Plik php:
<?php
class public_play_przyklad_character extends ipsCommand
{
public function doExecute( ipsRegistry $registry )
{
$db = ipsRegistry::DB();
$db->query("SELECT p.id, p.Nazwa, m.member_id FROM samp.Konta p, ipb_members m WHERE m.member_id=p.id");
$db->execute();
while($char = $db->fetch())
{
$char['Nazwa'] = str_replace("_", " ", $char['Nazwa']);
}
$template = $this->registry->output->getTemplate('game')->showChar();
$this->registry->output->addContent($template);
$this->registry->output->setTitle('Panel gracza');
$this->registry->output->sendOutput();
}
}
?>
Szablon:
<div class="general_box" style="background: 0;">
<h3>Postacie</h3><br/>
</div>
Nick postaci: {$char['Nazwa']}
I dodam że w zmiennych szablonu dodałem $char, wiecie o co chodzi.