<!-- BEGIN: MAIN -->

{FILE "{PHP.cfg.themes_dir}/{PHP.cfg.defaulttheme}/warnings.tpl"}
<div class="block">
  <h3>{PHP.L.Filters}</h3>
  <form method="get" action="admin.php">
    <input type="hidden" name="m" value="other">
    <input type="hidden" name="p" value="ads">
    <div>
      Категория:<br>
      {FILTER_CATEGORY}
    </div>
    <div>
      Пользователь:<br>
      {FILTER_CLIENT}
    </div>
    <br>
    <div class="action_bar valid">
      <button type="submit" class="submit">{PHP.L.Show}</button>
    </div>
  </form>
</div>
<div class="block">
  <h3>{PAGE_TITLE}</h3>
  <table class="cells margintop10">
    <tr>
      <td class="coltop"></td>
      <td class="coltop">Услуга</td>
      <td class="coltop">Место размещения</td>
      <td class="coltop">{PHP.L.Category}</td>
      <td class="coltop">Пользователь</td>
      <td class="coltop">Статус</td>
      <td class="coltop">Срок размещения</td>
      <td class="coltop">Просмотры/Клики</td>
      <td class="coltop">{PHP.L.Action}</td>
    </tr>
    <!-- BEGIN: LIST_ROW -->
    <tr>
      <td class="{ADS_ROW_ODDEVEN} centerall">{ADS_ROW_NUM}</td>
      <td class="{ADS_ROW_ODDEVEN}">
          <a href="{PRD_ROW_URL}">
             <img src="{PRD_ROW_PHOTO_FIRST}" alt="{PRD_ROW_SHORTTITLE}" style="width: 50px"/>
             {PRD_ROW_SHORTTITLE}
          </a>
      </td>
      <td class="{ADS_ROW_ODDEVEN}">{ADS_ROW_POSITION.title}</td>
      <td class="{ADS_ROW_ODDEVEN}">{ADS_ROW_CATEGORY_TITLE}</td>
      <td class="{ADS_ROW_ODDEVEN} centerall">{ADS_ROW_CLIENT_TITLE}</td>
      <td class="{ADS_ROW_ODDEVEN} centerall">
        <!-- IF {ADS_ROW_EXPIRE} == 0 AND {ADS_ROW_PAUSED} == 0 -->
           <span class="label label-danger">не оплачен</span>
        <!-- ELSE -->
          <!-- IF {ADS_ROW_EXPIRE} > {PHP.sys.now} -->
           <span class="label label-success">активен</span>
           до {ADS_ROW_EXPIRE|cot_date('d.m.Y H:i', $this)}
          <!-- ELSE -->
            <!-- IF {ADS_ROW_EXPIRE} > 0 -->
             <span class="label label-default">завершен</span>
             {ADS_ROW_EXPIRE|cot_date('d.m.Y H:i', $this)}
            <!-- ENDIF -->
            <!-- IF {ADS_ROW_PAUSED} > 0 -->
             <span class="label label-info">остановлен</span>
             (Остаток {ADS_ROW_PAUSED_TIME})
            <!-- ENDIF -->
          <!-- ENDIF -->
        <!-- ENDIF -->
      </td>
      <td class="{ADS_ROW_ODDEVEN}">{ADS_ROW_PERIOD}</td>
      <td class="{ADS_ROW_ODDEVEN} centerall">{ADS_ROW_SHOWS} / {ADS_ROW_CLICKS}</td>
      <td class="{ADS_ROW_ODDEVEN}">
        <a href="{ADS_ROW_ID|cot_url('admin', 'm=other&p=ads&act=delete&id=$this')}">{PHP.L.short_delete}</a>
      </td>
    </tr>
    <!-- END: LIST_ROW -->
    <!-- IF {LIST_TOTALLINES} == '0' -->
    <tr>
      <td class="odd centerall" colspan="9">{PHP.L.None}</td>
    </tr>
    <!-- ENDIF -->
  </table>
  <div class="action_bar valid">
    <p class="paging">{LIST_PAGEPREV}{LIST_PAGINATION}{LIST_PAGENEXT} <span>{PHP.L.Total}: {LIST_TOTALLINES}, {PHP.L.Onpage}: {LIST_ITEMS_ON_PAGE}</span></p>
  </div>
</div>
<!-- END: MAIN -->