А> С shtml все понятно. Спасибо! А как будет выглядеть шаблон на php?
А> Напишите, плз...
Очень просто. Вот пример:
foreach ($filmsList as $cid => $line) {
$color = ($color == 'silver_row') ? 'gray_row' : 'silver_row';
$page->chooseBlock('ROW');
$page->assignBlock('ROOT_URL', $_SERVER['PROSITER_ROOT_URL']);
$page->assignBlock('COLOR', $color);
$page->assignBlock('ID', $line['id']);
$page->assignBlock('NUM', $films->checkNewRingtones($line['id'])
? 'NEW!' : ' ');
$page->assignBlock('NAME', $line['name']);
$page->parseBlock();
}
$rusz = $films->getLetters('rus');
$latz = $films->getLetters('lat');
for ($i = 0, $max = count($rusz); $i < $max; $i++) {
$page->chooseBlock('ALPHA_RU');
$page->assignBlock('HREF', '?letter='.$rusz[$i]);
$page->assignBlock('TITLE', $rusz[$i]);
$page->parseBlock();
}
for ($i = 0, $max = count($latz); $i < $max; $i++) {
$page->chooseBlock('ALPHA_EN');
$page->assignBlock('HREF', '?letter='.$latz[$i]);
$page->assignBlock('TITLE', $latz[$i]);
$page->parseBlock();
}
$page->chooseBlock('PAGES_LINKS');
$page->assignBlock('PAGES_LINKS', $pager);
$page->parseBlock();
$page->chooseBlock('ROOT');
$page->assignBlock('PAGES_LINKS', trim($pager) != '' ? $page->getBlock('PAGES_LINKS')
: ' ');
$page->assignBlock('ALPHA_EN');
$page->assignBlock('ALPHA_RU');
$page->assignBlock('HREF', '?');
$page->assignBlock('ROW');
$page->assignBlock('ROOT_URL', $_SERVER['PROSITER_ROOT_URL']);
$page->parseBlock();
$page->printBlock('ROOT');
И пример шаблона:
<!-- silver row start -->
{BLOCK ROW BEGIN}
<tr class="{COLOR}">
<td><img src="{ROOT_URL}images/tr.gif" alt="" width="8" height="1" border="0"></td>
<td><span class="red"> </span></td>
<td>
{BLOCK PERFORMERS BEGIN}
{PNAME}<br>
{BLOCK PERFORMERS END}
</td>
<td>{NAME}</td>
<td>
{BLOCK AUTHORS BEGIN}
<strong>{ROLE}</strong> - {ANAME}<br>
{BLOCK AUTHORS END}
</td>
<td>{DOLE}</td>
<td>{ARIGHTS}</td>
<td>{BRIGHTS}</td>
<td>
{BLOCK RINGTONES BEGIN}
<a href="javascript:void(0)" onmouseover="this.href='listen/'" onmouseout="this.href='javascript:void(0)'"
onclick="this.href='{ROOT_URL}listen.php?name={RINGTONE}&id={ID}'"><img src="{ROOT_URL}images/ring_phone.gif"
alt="" border="0" class="ring_phone_img"></a>
{BLOCK RINGTONES END}
</td>
<td>
{BLOCK RINGTONELINK BEGIN}
<a href="javascript:void(0)" onmouseover="this.href='how_to_download/'" onmouseout="this.href='javascript:void(0)'"
onclick="this.href='javascript:void(0)';op_win('/popup.php?name=content_newest&id={ID}',750,263);"><img
src="{ROOT_URL}images/ring_tone.gif" alt="" border="0"></a>
{BLOCK RINGTONELINK END}
</td>
<td><img src="{ROOT_URL}images/tr.gif" alt="" width="8" height="1" border="0"></td>
</tr>
{BLOCK ROW END}
<!-- silver row end -->
Задумайтесь, все-таки, о приобретении CMS.