<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="http://178.140.10.58:8080/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://178.140.10.58:8080/feed.php">
        <title>Библиотека знаний - webdesign:тemplating</title>
        <description>Заметки IT программиста</description>
        <link>http://178.140.10.58:8080/</link>
        <image rdf:resource="http://178.140.10.58:8080/lib/exe/fetch.php?media=wiki:dokuwiki.svg" />
       <dc:date>2026-04-17T09:59:51+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://178.140.10.58:8080/doku.php?id=webdesign:%D1%82emplating:smarty"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://178.140.10.58:8080/lib/exe/fetch.php?media=wiki:dokuwiki.svg">
        <title>Библиотека знаний</title>
        <link>http://178.140.10.58:8080/</link>
        <url>http://178.140.10.58:8080/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="http://178.140.10.58:8080/doku.php?id=webdesign:%D1%82emplating:smarty">
        <dc:format>text/html</dc:format>
        <dc:date>2015-10-29T00:49:21+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Smarty - Шаблонизатор</title>
        <link>http://178.140.10.58:8080/doku.php?id=webdesign:%D1%82emplating:smarty</link>
        <description>&lt;div class=&quot;tags&quot;&gt;&lt;span&gt;
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:web&amp;amp;do=showtag&amp;amp;tag=web&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:web&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; web&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:script&amp;amp;do=showtag&amp;amp;tag=script&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:script&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; script&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:smarty&amp;amp;do=showtag&amp;amp;tag=smarty&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:smarty&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; smarty&lt;/a&gt;,
	&lt;a href=&quot;http://178.140.10.58:8080/doku.php?id=tag:template&amp;amp;do=showtag&amp;amp;tag=template&quot; class=&quot;wikilink1 tag label label-default mx-1&quot; title=&quot;tag:template&quot; rel=&quot;tag&quot;&gt;&lt;span class=&quot;iconify&quot;  data-icon=&quot;mdi:tag-text-outline&quot;&gt;&lt;/span&gt; template&lt;/a&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;h1 class=&quot;sectionedit1&quot; id=&quot;smarty_-_шаблонизатор&quot;&gt;Smarty - Шаблонизатор&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;Smarty - \u0428\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;smarty_-_\u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:1,&amp;quot;range&amp;quot;:&amp;quot;37-85&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit2&quot; id=&quot;переменные&quot;&gt;Переменные&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;pre class=&quot;code Smarty&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;         отображение простой переменной (не массив и не объект)
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;      отображает 5-й элемент числового массива
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;bar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;     отображает значение ключа &amp;quot;bar&amp;quot; ассоциативного массива, подобно PHP $foo[&#039;bar&#039;]
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;.&lt;span class=&quot;re0&quot;&gt;$bar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;    отображает значение переменного ключа массива, подобно PHP $foo[$bar]
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;-&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;bar&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;    отображает свойство &amp;quot;bar&amp;quot; объекта
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;-&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;bar&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;  отображает возвращаемое значение метода &amp;quot;bar&amp;quot; объекта
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;#foo#&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;        отображает переменную &amp;quot;foo&amp;quot; конфигурационного файла
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/config&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;config&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;foo&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;  синоним для &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;#foo#&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;bar&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;    синтаксис доступен только в цикле section, см. &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/assign&quot;&gt;&lt;span class=&quot;kw5&quot;&gt;assign&lt;/span&gt;&lt;/a&gt; var&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;foo &lt;span class=&quot;kw6&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;baa&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;   отображает &amp;quot;baa&amp;quot;, см. &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/assign&quot;&gt;&lt;span class=&quot;kw5&quot;&gt;assign&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
Также доступно множество других комбинаций
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;bar&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;baz&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;.&lt;span class=&quot;re0&quot;&gt;$bar&lt;/span&gt;.&lt;span class=&quot;re0&quot;&gt;$baz&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;baz&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span class=&quot;re0&quot;&gt;$baz&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;bar&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;baz&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;-&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;bar&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$baz&lt;/span&gt;,&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;re0&quot;&gt;$bar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;  передача параметра
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;foo&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;        статические значения также разрешены
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* отображает серверную переменную &amp;quot;SERVER_NAME&amp;quot; ($_SERVER[&#039;SERVER_NAME&#039;])*}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;server&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;SERVER_NAME&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
//
// Внедренные переменные в двойных кавычках
//
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;func var&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;test $foo test&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;        ищет $foo
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;func var&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;test $foo_bar test&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;    ищет $foo_bar
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;func var&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;test $foo[0] test&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;     ищет $foo[0]
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;func var&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;test $foo[bar] test&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;   ищет $foo[bar]
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;func var&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;test $foo.bar test&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;    ищет $foo (не $foo.bar)
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;func var&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;test `$foo.bar` test&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;  ищет $foo.bar
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;func var&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;test `$foo.bar` test&amp;quot;&lt;/span&gt;|escape&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;  модификатор вне кавычек!
&amp;nbsp;
//
// Примеры
//
&lt;span class=&quot;coMULTI&quot;&gt;{* заменит $tpl_name её значением *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;subdir/$tpl_name.tpl&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;coMULTI&quot;&gt;{* не заменит $tpl_name *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;subdir/$tpl_name.tpl&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; 
&lt;span class=&quot;coMULTI&quot;&gt;{* нужны обратные кавычки из за того, что имя содержит точки *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/cycle&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;cycle&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;values&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;one,two,`$smarty.config.myval`&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;coMULTI&quot;&gt;{* аналог $module[&#039;contact&#039;].&#039;.tpl&#039; в PHP *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;`$module.contact`.tpl&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;coMULTI&quot;&gt;{* аналог $module[$view].&#039;.tpl&#039; в PHP *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;`$module.$view`.tpl&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://www.smarty.net/docsv2/ru/language.variables.tpl#id2601705&quot; class=&quot;urlextern&quot; title=&quot;http://www.smarty.net/docsv2/ru/language.variables.tpl#id2601705&quot; rel=&quot;ugc nofollow&quot;&gt;Подробнее&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:0,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;86-2723&amp;quot;} --&gt;
&lt;h2 class=&quot;sectionedit3&quot; id=&quot;переменные_запроса&quot;&gt;Переменные запроса&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;
&lt;pre class=&quot;code Smarty&quot;&gt;&lt;span class=&quot;coMULTI&quot;&gt;{* отображение параметра page из URL ($_GET) http://www.example.com/index.php?page=foo *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;get&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* отображение параметра &amp;quot;page&amp;quot; из формы ($_POST[&#039;page&#039;]) *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;post&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* отображение значения cookie &amp;quot;username&amp;quot; ($_COOKIE[&#039;username&#039;]) *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;cookies&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;username&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* отображение серверной переменной &amp;quot;SERVER_NAME&amp;quot; ($_SERVER[&#039;SERVER_NAME&#039;])*}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;server&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;SERVER_NAME&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* отображение переменной системного окружения &amp;quot;PATH&amp;quot; *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;env&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;PATH&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* отображение переменной сессии PHP &amp;quot;id&amp;quot; ($_SESSION[&#039;id&#039;]) *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;session&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* отображение переменной &amp;quot;username&amp;quot; из смешенных get/post/cookies/server/env *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;request&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;username&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://www.smarty.net/docsv2/ru/language.variables.smarty.tpl#id2602077&quot; class=&quot;urlextern&quot; title=&quot;http://www.smarty.net/docsv2/ru/language.variables.smarty.tpl#id2602077&quot; rel=&quot;ugc nofollow&quot;&gt;Подробнее&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435_\u0437\u0430\u043f\u0440\u043e\u0441\u0430&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:1,&amp;quot;secid&amp;quot;:3,&amp;quot;range&amp;quot;:&amp;quot;2724-3759&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit4&quot; id=&quot;арифметические_операции&quot;&gt;Арифметические операции&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;pre class=&quot;code smarty&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;+&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;*&lt;span class=&quot;re0&quot;&gt;$bar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;coMULTI&quot;&gt;{* несколько более сложных примеров *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;-&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;bar-&lt;span class=&quot;re0&quot;&gt;$bar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;*&lt;span class=&quot;re0&quot;&gt;$baz&lt;/span&gt;-&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;foo-&lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt;bar&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;-&lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;*&lt;span class=&quot;nu0&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;+&lt;span class=&quot;re0&quot;&gt;$bar&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;test&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$baz&lt;/span&gt;*&lt;span class=&quot;nu0&quot;&gt;134232&lt;/span&gt;+&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;+&lt;span class=&quot;re0&quot;&gt;$b&lt;/span&gt;+&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;|truncate:&lt;span class=&quot;st0&quot;&gt;&amp;quot;`$fooTruncCount/$barTruncFactor-1`&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/assign&quot;&gt;&lt;span class=&quot;kw5&quot;&gt;assign&lt;/span&gt;&lt;/a&gt; var&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;foo&amp;quot;&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;`$foo+$bar`&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0410\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435_\u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:2,&amp;quot;secid&amp;quot;:4,&amp;quot;range&amp;quot;:&amp;quot;3760-4104&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit5&quot; id=&quot;модификаторы_переменных&quot;&gt;Модификаторы переменных&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;pre class=&quot;code smarty&quot;&gt;&lt;span class=&quot;coMULTI&quot;&gt;{* применение модификатора к переменной *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$title&lt;/span&gt;|upper&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* модификатор с параметрами *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$title&lt;/span&gt;|truncate:&lt;span class=&quot;nu0&quot;&gt;40&lt;/span&gt;:&lt;span class=&quot;st0&quot;&gt;&#039;...&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* применение модификатора к аргументу функции *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/html_table&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;html_table&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$myvar&lt;/span&gt;|upper&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* с параметрами *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/html_table&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;html_table&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$myvar&lt;/span&gt;|truncate:&lt;span class=&quot;nu0&quot;&gt;40&lt;/span&gt;:&lt;span class=&quot;st0&quot;&gt;&#039;...&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* применение модификатора к строке *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;foobar&#039;&lt;/span&gt;|upper&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* использование date_format для форматирования текущей даты *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;now&lt;/span&gt;|date_format:&lt;span class=&quot;st0&quot;&gt;&amp;quot;%Y/%m/%d&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* применение модификатора к функции *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;mailto|upper address&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;smarty@example.com&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* использование функции PHP str_repeat *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;=&#039;&lt;/span&gt;|str_repeat:&lt;span class=&quot;nu0&quot;&gt;80&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* функция PHP count *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$myArray&lt;/span&gt;|@&lt;span class=&quot;kw8&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* функция PHP shuffle, применяемая к IP адресу сервера *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;server&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;SERVER_ADDR&lt;/span&gt;|shuffle&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
(* это приведет в верхний регистр букв и обрежет пробелы у всех элементов массива *}
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;select name=&amp;quot;name_id&amp;quot;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/html_options&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;html_options&lt;/span&gt;&lt;/a&gt; output&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$myArray&lt;/span&gt;|upper|truncate:&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/select&amp;gt;&lt;/span&gt;
&amp;nbsp;
//
// Комбинирование модификаторов
//
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$articleTitle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$articleTitle&lt;/span&gt;|upper|spacify&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$articleTitle&lt;/span&gt;|lower|spacify|truncate&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$articleTitle&lt;/span&gt;|lower|truncate:&lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;|spacify&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$articleTitle&lt;/span&gt;|lower|spacify|truncate:&lt;span class=&quot;nu0&quot;&gt;30&lt;/span&gt;:&lt;span class=&quot;st0&quot;&gt;&amp;quot;. . .&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b_\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:3,&amp;quot;secid&amp;quot;:5,&amp;quot;range&amp;quot;:&amp;quot;4105-5644&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit6&quot; id=&quot;условия&quot;&gt;Условия&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;pre class=&quot;code smarty&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt; &lt;a href=&quot;http://smarty.php.net/eq&quot;&gt;&lt;span class=&quot;kw7&quot;&gt;eq&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;st0&quot;&gt;&#039;Fred&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  Welcome Sir.
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/elseif&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;elseif&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt; &lt;a href=&quot;http://smarty.php.net/eq&quot;&gt;&lt;span class=&quot;kw7&quot;&gt;eq&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;st0&quot;&gt;&#039;Wilma&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    Welcome Ma&#039;am.
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/else&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    Welcome, whatever you are.
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* пример с логикой &amp;quot;или&amp;quot; *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt; &lt;a href=&quot;http://smarty.php.net/eq&quot;&gt;&lt;span class=&quot;kw7&quot;&gt;eq&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;st0&quot;&gt;&#039;Fred&#039;&lt;/span&gt; or &lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt; &lt;a href=&quot;http://smarty.php.net/eq&quot;&gt;&lt;span class=&quot;kw7&quot;&gt;eq&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;st0&quot;&gt;&#039;Wilma&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
	...
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* то же самое, что и выше *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&#039;Fred&#039;&lt;/span&gt; || &lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&#039;Wilma&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
	...
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* скобки разрешены *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$amount&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt; or &lt;span class=&quot;re0&quot;&gt;$amount&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1000&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; and &lt;span class=&quot;re0&quot;&gt;$volume&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;=&lt;/span&gt; #minVolAmt#&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
	...
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* вы также можете использовать функции php *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw8&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$var&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; gt &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
	...
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* проверка на массив *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw8&quot;&gt;is_array&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
 ...
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* проверка на существование *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw8&quot;&gt;isset&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
 ...
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* проверяет чётность значений *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$var&lt;/span&gt; is even&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
	...
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$var&lt;/span&gt; is odd&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
	...
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$var&lt;/span&gt; is &lt;a href=&quot;http://smarty.php.net/not&quot;&gt;&lt;span class=&quot;kw7&quot;&gt;not&lt;/span&gt;&lt;/a&gt; odd&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
	...
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* проверяет, делится ли $var на 4 без остатка *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$var&lt;/span&gt; is div by &lt;span class=&quot;nu0&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
	...
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{*
  проверяет, является ли $var чётным двум, например
  0=чётно, 1=чётно, 2=нечётно, 3=нечётно, 4=чётно, 5=чётно и т.д.
*}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$var&lt;/span&gt; is even by &lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
	...
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* 0=чётно, 1=чётно, 2=чётно, 3=нечётно, 4=нечётно, 5=нечётно и т.д. *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$var&lt;/span&gt; is even by &lt;span class=&quot;nu0&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
	...
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw8&quot;&gt;isset&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &amp;amp;&amp;amp; &lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&#039;Blog&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;coMULTI&quot;&gt;{* сделать что-нибудь *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/elseif&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;elseif&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;coMULTI&quot;&gt;{* сделать что-нибудь другое *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw8&quot;&gt;is_array&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &amp;amp;&amp;amp; &lt;span class=&quot;kw8&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span class=&quot;coMULTI&quot;&gt;{* выполнить цикл foreach *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://www.smarty.net/docsv2/ru/language.function.if.tpl#id2622102&quot; class=&quot;urlextern&quot; title=&quot;http://www.smarty.net/docsv2/ru/language.function.if.tpl#id2622102&quot; rel=&quot;ugc nofollow&quot;&gt;Подробнее&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u0423\u0441\u043b\u043e\u0432\u0438\u044f&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u0443\u0441\u043b\u043e\u0432\u0438\u044f&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:4,&amp;quot;secid&amp;quot;:6,&amp;quot;range&amp;quot;:&amp;quot;5645-7406&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit7&quot; id=&quot;section_-_обход_массива&quot;&gt;section - Обход массива&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;pre class=&quot;code smarty&quot;&gt;&lt;span class=&quot;coMULTI&quot;&gt;{* этот пример напечатает все значения массива $custid *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;customer &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    id: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* этот пример напечатает все значения массива $custid в обратном порядке *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;foo &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;step&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;-&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;foo&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;foo &lt;span class=&quot;kw6&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;20&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;step&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;foo&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;bar &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;21&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;step&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;-&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;bar&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{*
  переменная loop определяет только количество итераций.
  вы можете получать доступ к любой переменной из шаблона внутри секции.
  Этот пример предполагает, что $custid, $name и $address все являются
  массивами, содержащими одинаковое количество значений
*}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;customer &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;p&amp;gt;&lt;/span&gt;
    id: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
    name: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
    address: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$address&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{*
  имя секции может быть любым, так как оно используется для обращения к
  данным в пределах секции
*}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;anything &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;p&amp;gt;&lt;/span&gt;
    id: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;anything&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
    name: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;anything&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
    address: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$address&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;anything&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{*
  секции могут иметь вложенность любой глубины. Используя вложенные секции,
  вы можете обращаться к сложным структурам данных, таким как многомерные
  массивы. В этом примере $contact_type[customer] - это массив 
  типов контактов для текущего клиента.
*}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;customer &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;hr&amp;gt;&lt;/span&gt;
    id: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
    name: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
    address: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$address&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
     &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;contact &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contact_type&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
        &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contact_type&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;contact&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contact_info&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;contact&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
 	  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{*
   Это пример вывода ассоциативного массива
   данных внутри секции
*}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;customer &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contacts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;p&amp;gt;&lt;/span&gt;
    name: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contacts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
    home: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contacts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;home&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
    cell: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contacts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;cell&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
    e-mail: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contacts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;email&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{*
   выводим результат запроса к БД в таблицу
*}&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;table&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&lt;/span&gt;&amp;amp;nbsp;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;&lt;/span&gt;Name&amp;gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;&lt;/span&gt;Home&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;&lt;/span&gt;Cell&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;&lt;/span&gt;Email&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;co &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contacts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;view.php?id={$contacts[co].id}&amp;quot;&amp;gt;&lt;/span&gt;view&lt;span class=&quot;sc2&quot;&gt;&amp;lt;a&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contacts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;co&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contacts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;co&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;home&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contacts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;co&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;cell&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contacts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;co&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;email&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* sectionelse будет выполнена в том случае, если $custid не содержит значений *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;customer &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    id: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/sectionelse&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;sectionelse&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    there are no values in $custid.
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* к вашему сведению, $custid[customer.index] и $custid[customer] означают одно и то же *}&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;customer &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;customer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; id: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* к вашему сведению, $custid[cus.index] и $custid[cus] означают одно и то же *}&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;table&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;th&amp;gt;&lt;/span&gt;index&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;&lt;/span&gt;id&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;th&amp;gt;&lt;/span&gt;index_prev&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;&lt;/span&gt;prev_id&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;th&amp;gt;&lt;/span&gt;index_next&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;&lt;/span&gt;next_id&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;cus &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;cus&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;cus&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;cus&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;index_prev&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;cus.&lt;span class=&quot;me1&quot;&gt;index_prev&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;cus&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;index_next&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;cus.&lt;span class=&quot;me1&quot;&gt;index_next&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;cu &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;step&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  iteration=&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;cu&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;iteration&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  index=&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;cu&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  id=&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;cu&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;table&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;co &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contacts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;co&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;iteration&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&lt;/span&gt;&amp;amp;nbsp;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;&lt;/span&gt;Name&amp;gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;&lt;/span&gt;Home&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;&lt;/span&gt;Cell&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;&lt;/span&gt;Email&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;td&amp;gt;&amp;lt;a href=&amp;quot;view.php?id={$contacts[co].id}&amp;quot;&amp;gt;&lt;/span&gt;view&lt;span class=&quot;sc2&quot;&gt;&amp;lt;a&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contacts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;co&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contacts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;co&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;home&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contacts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;co&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;cell&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contacts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;co&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;email&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;customer &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$customers&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;customer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;table&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&lt;/span&gt;id&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;&lt;/span&gt;customer&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$customers&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;}&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$customers&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;.&lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
&amp;nbsp;
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;customer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;last&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;customer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;total&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; customers&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;customer &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;customer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; id: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
There were &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;customer&lt;/span&gt;.&lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; customers shown above.
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{*
  $show_customer_info (true/false) может быть передан из приложения PHP,
  чтобы определить, необходимо ли отображать секцию
*}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;customer &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$show_customer_info&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;customer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;rownum&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; id: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;customer&lt;/span&gt;.&lt;span class=&quot;kw6&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  the section was shown.
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/else&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  the section was not shown.
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;customer &lt;span class=&quot;kw6&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;step&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;customer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; id: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$custid&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;customer&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
There were &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/section&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;section&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;customer&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;total&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; customers shown above.&lt;/pre&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://www.smarty.net/docsv2/ru/language.function.section.tpl&quot; class=&quot;urlextern&quot; title=&quot;http://www.smarty.net/docsv2/ru/language.function.section.tpl&quot; rel=&quot;ugc nofollow&quot;&gt;Подробнее&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;section - \u041e\u0431\u0445\u043e\u0434 \u043c\u0430\u0441\u0441\u0438\u0432\u0430&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;section_-_\u043e\u0431\u0445\u043e\u0434_\u043c\u0430\u0441\u0441\u0438\u0432\u0430&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:5,&amp;quot;secid&amp;quot;:7,&amp;quot;range&amp;quot;:&amp;quot;7407-13443&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit8&quot; id=&quot;foreach&quot;&gt;foreach&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;pre class=&quot;code smarty&quot;&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$myArray&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;foo&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;li&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$foo&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$myArray&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;k &lt;span class=&quot;kw6&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;v&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
   &lt;span class=&quot;sc2&quot;&gt;&amp;lt;li&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$k&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$v&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$items&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;myId &lt;span class=&quot;kw6&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;i&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;item.php?id={$myId}&amp;quot;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;no&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;outer &lt;span class=&quot;kw6&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;contact &lt;span class=&quot;kw6&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contacts&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;hr /&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw6&quot;&gt;key&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw6&quot;&gt;item&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contact&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$key&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;: &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$item&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;cid &lt;span class=&quot;kw6&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;con &lt;span class=&quot;kw6&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$results&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;sc2&quot;&gt;&amp;lt;a href=&amp;quot;contact.php?contact_id={$cid}&amp;quot;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$con&lt;/span&gt;.&lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; - &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$con&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;nick&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreachelse&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreachelse&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    Ничего не найдено
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* The header block is output every five rows *}&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;table&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$items&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;myId &lt;span class=&quot;kw6&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;i &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;foo&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;foo&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
     &lt;span class=&quot;sc2&quot;&gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&lt;/span&gt;Title&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* этот шаблон выведет 0|1, 1|2, 2|3, ... и т.д. *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$myArray&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;i &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;foo&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;foo&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;|&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;foo&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;iteration&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;,
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* отображаем &amp;quot;НОВОЕ&amp;quot; напротив первого элемента, иначе id *}&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;table&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$items&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;myId &lt;span class=&quot;kw6&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;i &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;foo&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;foo&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;НОВОЕ&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/else&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$myId&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* Добавляем горизонтальную полосу (&amp;lt;hr /&amp;gt;) в конце списка *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$items&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;part_id &lt;span class=&quot;kw6&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;prod &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;products&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;a href=&amp;quot;#{$part_id}&amp;quot;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$prod&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;products&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;last&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;hr /&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/else&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;,&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreachelse&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreachelse&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  ... content ...
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* отображаем количество отображенных строк в конце *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$items&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;part_id &lt;span class=&quot;kw6&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;prod &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;foo&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$prod&lt;/span&gt;.&lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;hr/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;foo&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;last&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;div id=&amp;quot;total&amp;quot;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/%24smarty&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$smarty&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;.&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;.&lt;span class=&quot;me1&quot;&gt;foo&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;total&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; предметов&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreachelse&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreachelse&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
 ... что-то другое ...
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;foreach&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;foreach&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:6,&amp;quot;secid&amp;quot;:8,&amp;quot;range&amp;quot;:&amp;quot;13444-15438&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit9&quot; id=&quot;include&quot;&gt;include&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;pre class=&quot;code smarty&quot;&gt;//
// Функции
//
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/config_load&quot;&gt;&lt;span class=&quot;kw5&quot;&gt;config_load&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;colors.conf&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;header.tpl&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/insert&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;insert&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;banner_ads.tpl&#039;&lt;/span&gt; title&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;Smarty - это круто&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$logged_in&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    Welcome, &lt;span class=&quot;sc2&quot;&gt;&amp;lt;font color=&amp;quot;{#fontColor#}&amp;quot;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;!&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/font&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/else&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
    Hi, &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$name&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;!
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;footer.tpl&#039;&lt;/span&gt; ad&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$random_id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
//
// Параметры
//
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;header.tpl&#039;&lt;/span&gt; attrib_name&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;attrib value&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;#includeFile# title&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;Smarty is cool&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/html_select_date&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;html_select_date&lt;/span&gt;&lt;/a&gt; display_days&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;yes&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/mailto&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;mailto&lt;/span&gt;&lt;/a&gt; address&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;smarty@example.com&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;select name=&#039;company_id&#039;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/html_options&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;html_options&lt;/span&gt;&lt;/a&gt; options&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$companies&lt;/span&gt; selected&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$company_id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/select&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
 &lt;span class=&quot;sc2&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;sc2&quot;&gt;&amp;lt;title&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$title&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
 &lt;span class=&quot;sc2&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
 &lt;span class=&quot;sc2&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;page_header.tpl&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
  &lt;span class=&quot;coMULTI&quot;&gt;{* тут идёт тело шаблона *}&lt;/span&gt;
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;$tpl_name.tpl&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; заменит $tpl_name его значением
  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;page_footer.tpl&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
 &lt;span class=&quot;sc2&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;header.tpl&#039;&lt;/span&gt; title&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;Main Menu&#039;&lt;/span&gt; table_bgcolor&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;#c0c0c0&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;coMULTI&quot;&gt;{* тут идёт тело шаблона *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;footer.tpl&#039;&lt;/span&gt; logo&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;http://my.example.com/logo.gif&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;nav.tpl&#039;&lt;/span&gt; &lt;a href=&quot;http://smarty.php.net/assign&quot;&gt;&lt;span class=&quot;kw5&quot;&gt;assign&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;navbar&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;header.tpl&#039;&lt;/span&gt; title&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;Main Menu&#039;&lt;/span&gt; table_bgcolor&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;#effeef&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$navbar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;coMULTI&quot;&gt;{* тут идёт тело шаблона *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;footer.tpl&#039;&lt;/span&gt; logo&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;http://my.example.com/logo.gif&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$navbar&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* абсолютные пути *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;/usr/local/include/templates/header.tpl&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* абсолютные пути (то же самое) *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;file:/usr/local/include/templates/header.tpl&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* абсолютные пути в windows (ОБЯЗАТЕЛЬНО используйте префикс &amp;quot;file:&amp;quot;) *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;file:C:/www/pub/templates/header.tpl&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* подключение шаблона из ресурса с именем &amp;quot;db&amp;quot; *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;db:header.tpl&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* подключение шаблона с переменным именем - например, $module = &#039;contacts&#039; *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;$module.tpl&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;coMULTI&quot;&gt;{* не будет работать, т.к. в одинарных кавычках не работает подстановка переменных *}&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/include&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;include&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&#039;$module.tpl&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://www.smarty.net/docsv2/ru/language.function.include.tpl#id2622950&quot; class=&quot;urlextern&quot; title=&quot;http://www.smarty.net/docsv2/ru/language.function.include.tpl#id2622950&quot; rel=&quot;ugc nofollow&quot;&gt;Подробнее&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;include&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;include&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:7,&amp;quot;secid&amp;quot;:9,&amp;quot;range&amp;quot;:&amp;quot;15439-17738&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit10&quot; id=&quot;hook&quot;&gt;hook&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;pre class=&quot;code smarty&quot;&gt;  &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;re0&quot;&gt;$page_children&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;hook &lt;span class=&quot;kw6&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&amp;quot;pages:page_children&amp;quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;ul class=&amp;quot;subpages-list&amp;quot;&amp;gt;&lt;/span&gt;
&amp;nbsp;
                &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;kw6&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$page_children&lt;/span&gt; &lt;span class=&quot;kw6&quot;&gt;item&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;child_page&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
                        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;li&amp;gt;&amp;lt;span class=&amp;quot;main-info&amp;quot;&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$child_page&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;timestamp&lt;/span&gt;|date_format:&lt;span class=&quot;re0&quot;&gt;$settings&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;Appearance&lt;/span&gt;.&lt;a href=&quot;http://smarty.php.net/date_format&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;date_format&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;sc2&quot;&gt;&amp;lt;a href=&amp;quot;{if $child_page.page_type == $smarty.const.PAGE_TYPE_LINK}{$child_page.link}{else}{$index_script}?dispatch=pages.view&amp;amp;page_id={$child_page.page_id}{/if}&amp;quot;{if $child_page.new_window} target=&amp;quot;_blank&amp;quot;{/if}&amp;gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$child_page&lt;/span&gt;.&lt;span class=&quot;me1&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sc2&quot;&gt;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&amp;nbsp;
                &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/foreach&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;sc2&quot;&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;hook&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
        &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;/&lt;/span&gt;&lt;a href=&quot;http://smarty.php.net/if&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;hook&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;hook&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:8,&amp;quot;secid&amp;quot;:10,&amp;quot;range&amp;quot;:&amp;quot;17739-18384&amp;quot;} --&gt;
&lt;h3 class=&quot;sectionedit11&quot; id=&quot;наследование_шаблонов&quot;&gt;Наследование шаблонов&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://www.smarty.net/docs/en/advanced.features.template.inheritance.tpl&quot; class=&quot;urlextern&quot; title=&quot;http://www.smarty.net/docs/en/advanced.features.template.inheritance.tpl&quot; rel=&quot;ugc nofollow&quot;&gt;http://www.smarty.net/docs/en/advanced.features.template.inheritance.tpl&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://www.smarty.net/docs/en/language.function.extends.tpl&quot; class=&quot;urlextern&quot; title=&quot;http://www.smarty.net/docs/en/language.function.extends.tpl&quot; rel=&quot;ugc nofollow&quot;&gt;http://www.smarty.net/docs/en/language.function.extends.tpl&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt;
 &lt;a href=&quot;http://www.smarty.net/docs/en/language.function.block.tpl&quot; class=&quot;urlextern&quot; title=&quot;http://www.smarty.net/docs/en/language.function.block.tpl&quot; rel=&quot;ugc nofollow&quot;&gt;http://www.smarty.net/docs/en/language.function.block.tpl&lt;/a&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;section&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;\u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435_\u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432&amp;quot;,&amp;quot;codeblockOffset&amp;quot;:9,&amp;quot;secid&amp;quot;:11,&amp;quot;range&amp;quot;:&amp;quot;18385-&amp;quot;} --&gt;</description>
    </item>
</rdf:RDF>
