<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>
<!DOCTYPE html>
<html>
  <head>
    <title>Admin &gt; Transaksi Via Jabber</title>
    <?php include_once(VIEWPATH.'includes/head.php'); ?>
    <style type="text/css">.checkbox>label,.checkbox-inline>label,.radio>label,.radio-inline>label{font-weight: normal;}</style>
  </head>
  <body>
    <?php include_once(VIEWPATH. 'admin/_navbar.php'); ?>
    <div class="container">
      <ul class="breadcrumb">
        <li><a href="<?php echo site_url();?>"><i class="fa fa-home"></i></a></li>
        <li><a href="<?php echo site_url('admin');?>">Admin Panel</a></li>
        <li class="active"><span>Transaksi Via Jabber</span></li>
      </ul>
      <div class="row">
        <div class="col-sm-4 col-md-3">
          <?php include_once(dirname(__FILE__).'/_sidebar.php');?>
        </div>
        <div class="col-sm-8 col-md-9">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h3><i class="fa fa-cogs"></i> Pengaturan</h3>
            </div>
            <div class="panel-body">
              <ul class="nav nav-tabs" role="tablist" style="margin-bottom: 15px;">
                <li role="presentation" class="<?php echo $active_tab == 'transaksi' ? 'active' : '';?>"><a href="#transaksi" aria-controls="transaksi" role="tab" data-toggle="tab">Transaksi</a></li>
                <li role="presentation" class="<?php echo $active_tab == 'lisensi' ? 'active' : '';?>"><a href="#lisensi" aria-controls="lisensi" role="tab" data-toggle="tab">Lisensi</a></li>
              </ul>
              <div class="tab-content">
                <div role="tabpanel" class="tab-pane <?php echo $active_tab == 'transaksi' ? 'active' : '';?>" id="transaksi">
                  <?php echo form_open('admin/modules/jabbertrx/index/transaksi');?>
                    <div class="form-group">
                      <label>Siapa yang boleh melakukan transaksi via Jabber?</label>
                      <div>
                        <div class="radio-inline"><label><input type="radio" name="user" value="all"<?php echo ($set['user'] == 'all' ? ' checked="checked"' : '');?>/> Semua member</label></div>
                        <div class="radio-inline"><label><input type="radio" name="user" value="verified"<?php echo ($set['user'] == 'verified' ? ' checked="checked"' : '');?>/> Hanya member terverifikasi</label></div>
                        <div class="radio-inline"><label><input type="radio" name="user" value="reseller"<?php echo ($set['user'] == 'reseller' ? ' checked="checked"' : '');?>/> Hanya reseller <span>(Harus terverifikasi)</span></label></div>
                        <div class="radio-inline"><label><input type="radio" name="user" value="none"<?php echo ($set['user'] == 'none' ? ' checked="checked"' : '');?>/> Tidak semua</label></div>
                      </div>
                    </div>
                    <div class="form-group">
                      <label>Jabber Center <a href="javascript:return false;" data-toggle="tooltip" title="Masukan alamat jabber center, jika lebih dari satu jabber center silakan pisahkan dengan tanda koma."><i class="fa fa-info-circle"></i></a></label>
                      <input type="text" class="form-control" id="center" name="center" value="<?php echo set_value('center', implode(', ', $set['center']));?>" maxlength="255" />
                    </div>
                    <div class="form-group">
                      <label>XMPP domain yang diperbolehkan <a href="javascript:return false;" data-toggle="tooltip" title="XMPP domain yang diperbolehkan untuk melalukan pendaftaran transaksi via jabber, pisahkan domain dengan tanda koma atau kosongkan untuk menonaktifkan filter ini."><i class="fa fa-info-circle"></i></a></label>
                      <input class="form-control" name="xmpp_domain" maxlength="255" value="<?php echo set_value('center', implode(', ', $set['xmpp_domain']));?>" placeholder="Contoh: jabbim.com, xabber.org"/>
                    </div>
                    <div class="form-group">
                      <label>Kode pemisah <a href="javascript:return false;" data-toggle="tooltip" title="Kode pemisah yang digunakan pada format transaksi"><i class="fa fa-info-circle"></i></a></label>
                      <input type="text" class="form-control" name="pemisah" value="<?php echo set_value('pemisah', $set['pemisah']);?>" maxlength="1" required="required" />
                    </div>
                    <div class="form-group">
                      <label>Perbolehkan cek saldo?</label>
                      <div>
                        <div class="radio-inline"><label><input type="radio" name="cek_saldo" value="1"<?php echo $set['cek_saldo'] ? ' checked="checked"' : '';?>/> Ya</label></div>
                        <div class="radio-inline"><label><input type="radio" name="cek_saldo" value="0"<?php echo !$set['cek_saldo'] ? ' checked="checked"' : '';?>/>Tidak</label></div>
                      </div>
                    </div>
                    <div class="form-group">
                      <label>Perbolehkan cek riwayat transaksi?</label>
                      <div>
                        <div class="radio-inline"><label><input type="radio" name="history" value="1"<?php echo $set['history'] ? ' checked="checked"' : '';?>/> Ya</label></div>
                        <div class="radio-inline"><label><input type="radio" name="history" value="0"<?php echo !$set['history'] ? ' checked="checked"' : '';?>/>Tidak</label></div>
                      </div>
                    </div>
                    <div class="form-group">
                      <label>Perbolehkan mengirim permintaan deposit?</label>
                      <div>
                        <div class="radio-inline"><label><input type="radio" name="deposit" value="1"<?php echo $set['deposit'] ? ' checked="checked"' : '';?>/> Ya</label></div>
                        <div class="radio-inline"><label><input type="radio" name="deposit" value="0"<?php echo !$set['deposit'] ? ' checked="checked"' : '';?>/>Tidak</label></div>
                      </div>
                    </div>
                    <div>
                      <button type="submit" class="btn btn-primary" name="submit1" value="1">Simpan</button>
                    </div>
                  <?php echo form_close();?>
                </div>
                <div role="tabpanel" class="tab-pane <?php echo $active_tab == 'lisensi' ? 'active' : '';?>" id="lisensi">
                  <?php echo form_open('admin/modules/jabbertrx/index/lisensi');?>
                    <div class="form-group" style="margin-bottom: 0;">
                      <label>Kode Lisensi</label>
                      <div class="input-group">
                        <input type="text" class="form-control" name="lisensi" value="<?php echo set_value('lisensi', @$set['lisensi']);?>" placeholder="" maxlength="64" />
                        <span class="input-group-btn"><button class="btn btn-primary" type="submit" name="submit2" value="simpan">Simpan</button></span>
                      </div>
                      <p class="help-block" style="margin-bottom: 0;"><a href="http://w38s.com/lisensi/jabbertrx" target="_blank">Klik di sini</a> untuk mendapatkan kode lisensi</p>
                    </div>
                  <?php echo form_close();?>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <?php include_once(VIEWPATH.'includes/foot.php'); ?>
  </body>
</html>