<!-- BEGIN: MAIN -->
<div class="moderation-page centerwrap clearfix pt30 pb20 page-offer">
  <div class="" style="margin: auto">
    <h1 class="semibold font-OpenSans f32">
      Модерация
    </h1>

    <div class="block-response mb15">
      <i class="ico-arrow-left dib v-align-m"></i>
      <a class="dib v-align-m f14 color-gray color-text" href="{PHP|cot_url('moderation')}">На главную</a>
    </div>

    <div class="query-card white-bg-border">
      <h1>
        История платежей
        <!-- IF {PHP.id} > 0 --> пользователя {USER_NICKNAME}<!-- ENDIF -->
      </h1>

      {FILE "{PHP.cfg.themes_dir}/{PHP.cfg.defaulttheme}/warnings.tpl"}

      <!-- IF {PHP.id} > 0 -->
      <div>
      	<form action="{PHP.id|cot_url('moderation', 'm=payments&a=addpayment&id='$this)}" method="POST" class="form-horizontal">
          <h4>Пополнить баланс пользователю</h4>
           Сумма (<b> в {PHP.cfg.payments.valuta}</b>): <input type="text" name="summ"/>
           Сумма (<b> в {PHP.cfg.payments.valutadodji}</b>): <input type="text" name="summ_dodji"/>
           <small>* можно указать значение с минусом, тогда с баланса пользователя будет снята указанная сумма</small>
           <br>
           Комментарий: <input type="text" name="desc"/>
           <br>
      		<button class="hugeGreenBtn GreenBtnStyle h50 mb10">Создать платеж</button>
      	</form>
        <div class="clearfix"></div>
      </div>
      <!-- ENDIF -->

      <div>
        <div style="float:left;width:50%;color: #858585;">
          <!-- IF {PHP.cfg.payments.balance_enabled} -->
        	<p>
            <b>{PHP.L.payments_siteinvoices}:</b>
            <br>{PHP.L.payments_debet}: {ADMIN_PAYMENTS_INBALANCE} {PHP.cfg.payments.valuta}
            <br>{PHP.L.payments_credit}: {ADMIN_PAYMENTS_OUTBALANCE} {PHP.cfg.payments.valuta}
            <br>{PHP.L.payments_balance}: {ADMIN_PAYMENTS_BALANCE} {PHP.cfg.payments.valuta}
          </p>
        	<!-- ENDIF -->
        	<p><b>{PHP.L.payments_allpayments}:</b> {ADMIN_PAYMENTS_CREDIT} {PHP.cfg.payments.valuta}</p>
        </div>
        <div style="float:left;width:50%;color: #858585;">
          <!-- IF {PHP.cfg.payments.balance_enabled} -->
        	<p>
            <b>{PHP.L.payments_siteinvoices}:</b>
            <br>{PHP.L.payments_debet}: {ADMIN_PAYMENTS_INBALANCE_DODJI} {PHP.cfg.payments.valutadodji}
            <br>{PHP.L.payments_credit}: {ADMIN_PAYMENTS_OUTBALANCE_DODJI} {PHP.cfg.payments.valutadodji}
            <br>{PHP.L.payments_balance}: {ADMIN_PAYMENTS_BALANCE_DODJI} {PHP.cfg.payments.valutadodji}</p>
        	<!-- ENDIF -->
        	<p><b>{PHP.L.payments_allpayments}:</b> {ADMIN_PAYMENTS_CREDIT_DODJI} {PHP.cfg.payments.valutadodji}</p>
        </div>
        <div class="clearfix"></div>
      </div>

      <table class="table-style mt15 mb15 response-table response-table_full-width m-table-inbox">
        <thead>
          <tr>
            <td><div class="pl20">#</div></td>
        		<td>{PHP.L.User}</td>
        		<td>{PHP.L.Date}</td>
        		<td></td>
        		<td>{PHP.L.payments_summ}</td>
            <td>Валюта</td>
        		<td>{PHP.L.payments_desc}</td>
        	</tr>
      	</thead>
      	<tbody>
      	<!-- BEGIN: PAY_ROW -->
      	<tr>
      		<td><div class="pl20">{PAY_ROW_ID}</div></td>
      		<td><a href="{PAY_ROW_USER_ID|cot_url('moderation', 'm=payments&id='$this)}">{PAY_ROW_USER_NICKNAME}</a></td>
      		<td>{PAY_ROW_ADATE|date('d.m.Y H:i',$this)}</td>
      		<td class="centerall"><!-- IF {PAY_ROW_AREA} == 'balance' -->+<!-- ELSE -->-<!-- ENDIF --></td>
      		<td style="text-align: right;white-space: nowrap;">
            <!-- IF {PAY_ROW_IN_DODJI} -->{PAY_ROW_SUMM_DODJI|number_format($this, 2, '.', ' ')}<!-- ELSE -->{PAY_ROW_SUMM|number_format($this, 2, '.', ' ')}<!-- ENDIF -->
          </td>
          <td style="text-align: left;white-space: nowrap;">
            <span class="rouble<!-- IF {PAY_ROW_IN_DODJI} --> rouble-dodji<!-- ENDIF -->">Р</span> ({PAY_ROW_VALUTA})
          </td>
      		<td>{PAY_ROW_DESC}</td>
      	</tr>
      	<!-- END: PAY_ROW -->
      	</tbody>
      </table>

      <!-- IF {PAGENAV_COUNT} > 0 -->
        <div class="paging">
          <div class="p1">
            <ul>{PAGENAV_PAGES}</ul>
          </div>
        </div>
      <!-- ELSE -->
        <div class="alert mb0">Платежи не найдены</div>
      <!-- ENDIF -->
    </div>

  </div>
</div>

<script>
  $('.moderation-page').find('input[type="text"], input[type="password"], select').addClass('input-styled');
</script>

<!-- END: MAIN -->