<?php require_once(ROOT . "/views/admin/layouts/_header_admin.php"); ?>

<div class="s-bk-lf">
	<div class="acc-title">Настройки платёжек</div>
</div>
<div class="silver-bk"><div class="clr"></div>	

<?php if(isset($errors)) echo $errors; ?>

<?php foreach ($paysystems as $row) : ?>

<form action="" method="post">
<input type="hidden" name="_tocken" value="<?=Session::$tocken; ?>">
<input type="hidden" name="name" value="<?=$row["name"]; ?>">
<table cellpadding='3' cellspacing='0' border='0' bordercolor='#336633' align='center' width="99%">

  <tr class="htt">
    <td colspan="2" align="center"><br>-------------------<b><?=strtoupper($row['fullname']); ?>:</b>-------------------<br><br><br></td>
  </tr>

  <tr class="htt">
    <td><b>Доступность</b></td>
    <td>
      <select name="active" id="">
        <option value="0" <?php if ($row["active"] == 0) echo "selected"; ?>>Отключена</option>
        <option value="1" <?php if ($row["active"] == 1) echo "selected"; ?>>Включена</option>
      </select>
    </td>
  </tr>

  <tr class="htt">
    <td><b>Пополнение</b></td>
    <td width="300" align="center">
      <select name="active_insert" id="">
        <option value="0" <?php if ($row["active_insert"] == 0) echo "selected"; ?>>Отключена</option>

      <?php if ($row['name'] != 'pyb' && $row['name'] != 'pymt' && $row['name'] != 'pymf' && $row['name'] != 'pyt' && $row['name'] != 'pokp') : ?>

        <option value="1" <?php if ($row["active_insert"] == 1) echo "selected"; ?>>Включена</option>

      <?php endif; ?>

      </select>
    </td>
  </tr>

  <tr class="htt">
    <td><b>Вывод</b></td>
    <td width="300" align="center">
      <select name="active_payment" id="">
        <option value="0" <?php if ($row["active_payment"] == 0) echo "selected"; ?>>Отключена</option>

      <?php if ($row['name'] != 'fk') : ?>

        <option value="1" <?php if ($row["active_payment"] == 1) echo "selected"; ?>>Авто</option>
        <option value="2" <?php if ($row["active_payment"] == 2) echo "selected"; ?>>Ручные</option>

      <?php endif; ?>
      
      </select>
    </td>
  </tr>

  <tr class="htt">
    <td><b>Комиссия</b></td>
    <td>
      <input type="text" name="comis" value="<?=$row['comis']; ?>">
    </td>
  </tr>

  <tr class="htt">
    <td><b>Мин. вывод</b></td>
    <td>
      <input type="text" name="min_pay" value="<?=$row['min_pay']; ?>">
    </td>
  </tr>

  <tr class="htt">
    <td><b>Макс. вывод</b></td>
    <td>
      <input type="text" name="max_pay" value="<?=$row['max_pay']; ?>">
    </td>
  </tr>

  <tr> <td colspan="2" align="center"><input type="submit" name="yes" value="Сохранить" /></td> </tr>
</table>
</form>

<?php endforeach; ?>

</div>
<div class="clr"></div>	

<?php require_once(ROOT . "/views/admin/layouts/_footer_admin.php"); ?>