Технология построения интерактивных Web-ресурсов. Мартынов А.И - 78 стр.

UptoLike

Составители: 

78
$template->assign('years', $years);
$template->assign('reg', $_GET['reg']);
$template->assign('count',$cur_group);
$template->assign('offset',$offset);
$template->assign('group',$offset_group);
$template->assign('prev',$prev);
$template->assign('next',$next);
$template->assign('count_rec',$count);
$template->assign('count_group',$count_group);
$template->assign('count_res',$count_res);
$template->assign('count_page',$count_page);
$template->assign('r_sort',$r_sort);
$template->assign('sort',$sort);
$template->assign('panel_visible',$panel_visible);
$template->assign('tableTitle',$tableTitle);
$template->assign('addAction',$addAction);
$template->assign('setup_panel',$setup_panel);
$template->assign('numeration',$numeration);
$template->display(DOC_ROOT . 'templates/list.tpl');
return (true);
}
Исходный текст шаблона list.tpl
<form method = "POST" action = "{$self}?reg={$reg}&action={$action}" name =
"{$action}">
Панель настроек: <a class="tree"><img src={if $panel_visible ==
1}"images/close.gif" title = "Показать панель настроек"{else}"images/open.gif"
title = "Скрыть панель настроек"{/if} id = "panel_button" border = 0
onClick=showhide(filter_panel,panel_button,'{$action}')></a>
<div {if $panel_visible == 1}class = "filter_hide"{else}class = "filter_show"{/if}
id = "filter_panel">
<table border=0 cellpadding="0" cellspacing="0" width=95%>
<tr>
<td align = "center"><b>Фильтр по полю:</b>
<td align = "center"><b>Сортировка по полю:</b>
<td align = "center"><b>Параметры вывода:</b>
</tr>
<tr>
<td>
<table width = 100% border = 0>
{foreach from=$grid_fields item = grid_field}
{if $grid_field.find == "Y"}
<tr>
<td>{$grid_field.name}
<td>
{if $grid_field.type == "text"}
<input type = "text"
{foreach from = $filtr_fields
item = filter_field key =
key}
{if $grid_field.field
== $key}value =
"{$filter_field}"{/if}
{/foreach}