Solution Technologies
Управление сайтом без ограничений
{**
 * XS2:
 *
 * This file is developed by Solutecs, LLC for the purpose of the company
 * and is provided together with XS2 Framework as and inherent part of the
 * system. This file can be used on the terms of License Agreement.
 *
 * +7 (495) 585-0833 / 13 Rusakovskaya street, Moscow 107140 Russia
 *
 * @link http://www.solutecs.com
 * @copyright ©1998-2007 Solutecs, LLC
 * @version 1.XX
 *}



{* Поведение: показывает список тем раздела *}
{* Параметры: 0:section.NodId *}

{if $section.NType eq "section"}
  {strip}

    {xs2Fetch mod="forum" met="path" atr=$section.NodId}
    <h1>{$section.NName}</h1>

    {foreach from=$threads item="thread"}
      <p>
        <a href="{xs2Href mod="forum" obj="thread"
                          met="show" atr=$thread.NodId}">{$thread.NName}</a>
        &nbsp;
        {if $thread.LastChangeDate}
          {assign var="timediff"
                  value=$thread.LastChangeDate|ForumTimeDiff:$forumCurrentUser.LastVisitDate}
          {if $timediff>=0 and not $thread.isVisited}<b>{/if}
            ({$thread.LastChangeDate})
          {if $timediff>=0 and not $thread.isVisited}</b>{/if}
        {/if}
      </p>
    {/foreach}

    {if $forumCurrentUser.NodId}
      <h2>Начать новую тему</h2>

      <div id="formSource">
        {* Шаблон формы редактирования сообщения *}
        {xs2Fetch mod="forum" obj="message" met="edit"}
      </div>

      {literal}
        <script type="text/javascript">
          function addThread(ParId){
            var form = self.document.forms.messageForm;
            form.action.value = "addMessage";
            form.NType.value = "thread";
            form.ParId.value = ParId;
            form.NFlag.value = 1;
            form.ParseIcons.value = form._ParseIcons.checked ? "1" : "0";
            form.ParseLineBreaks.value = form._ParseLineBreaks.checked ? "1" : "0";
            form.submit();
        }
        </script>
      {/literal}

      <button onclick="addThread({$section.NodId})">Оптправить</button>
      &nbsp;
      <button onclick="self.document.forms.messageForm.reset()">Очистить</button>

    {/if}

  {/strip}
{else}

  <p>Раздел не найден</p>

{/if}
Copyright ©1998-2008 Солютекс. Все права защищены.
Этот сайт сделан в designLab | Работает на технологии XS2
Условия использования | О защите конфиденциальности