<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>
<!DOCTYPE html>
<html>
  <head>
    <title>Admin &gt; SMS Gateway</title>
    <?php include_once(VIEWPATH.'includes/head.php'); ?>
  </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>SMS Gateway</span></li>
      </ul>
      <div class="panel panel-default" id="tour1">
        <div class="panel-heading">
          <h3>SMS Gateway</h3>
        </div>
        <div class="panel-body">
          <ul class="nav nav-tabs" role="tablist" style="margin-bottom: 15px;">
            <li role="presentation" class="<?php echo $gateway == 'fondasms' ? 'active' : '';?>"><a href="#fondasms" aria-controls="home" role="tab" data-toggle="tab">FondaSMS / EnvayaSMS</a></li>
            <li role="presentation" class="<?php echo $gateway == 'w38s_gateway' ? 'active' : '';?>"><a href="#w38s_gateway" aria-controls="home" role="tab" data-toggle="tab">W38S Gateway</a></li>
          </ul>
          <div class="tab-content">
            <div role="tabpanel" class="tab-pane <?php echo $gateway == 'fondasms' ? 'active fade in' : '';?>" id="fondasms">
              <div style="margin-bottom: 15px;">
                <a data-toggle="collapse" href="#aboutFondaSMS" aria-expanded="false" aria-controls="aboutFondaSMS"><i class="fa fa-info-circle"></i> Tentang FondaSMS / EnvayaSMS</a>
                <div class="collapse" id="aboutFondaSMS">
                  <div class="well well-sm" style="margin-top: 10px;"><strong>FondaSMS / EnvayaSMS</strong> adalah aplikasi Android untuk mengirim dan menerima SMS dari / ke WEB.<br />
                  Fungsi <strong>FondaSMS / EnvayaSMS</strong> untuk mengirimkan SMS ke nomor SMS Center agen pulsa atau ke nomor HP lainnya.<br />
                  Silakan <a href="https://play.google.com/store/apps/details?id=com.yeleman.fondasms" target="_blank">Download Aplikasi FondaSMS</a> atau <a href="https://play.google.com/store/apps/details?id=org.envaya.sms&hl=in" target="_blank">Download Aplikasi EnvayaSMS</a> dan berikut adalah pengaturan aplikasi FondaSMS atau EnvayaSMS yang harus anda samakan.
                  </div>
                </div>
              </div>
              <?php echo form_open(site_url('admin/modules/sms-gateway'));?>
                <div class="form-group">
                  <label>Enable FondaSMS / EnvayaSMS</label>
                  <p class="help-block">Tandai</p>
                </div>
                <div class="form-group">
                  <label>Server URL</label>
                  <input type="text" class="form-control" value="<?php echo str_replace('https://','http://', site_url('sms-gateway/fondasms'));?>" readonly="readonly"/>
                </div>
                <div class="form-group">
                  <label class="control-label">Password</label>
                  <input type="text" class="form-control" name="password" value="<?php echo set_value('password',$fondasms->password);?>" maxlength="16" required/>
                </div>
                <div class="form-group">
                  <label>Poll interval</label>
                  <p class="help-block">30 sec (bebas memilih)</p>
                </div>
                <div class="form-group">
                  <label>Keep new message</label>
                  <p class="help-block">Tandai</p>
                </div>
                <div class="form-group">
                  <label>Call notifications</label>
                  <p class="help-block">Tandai</p>
                </div>
                <div class="form-group">
                  <label>Pesan Masuk</label>
                  <div>
                    <div class="radio" style="margin-top: 0;">
                      <label><input type="radio" name="inbox" value="all" <?php echo @$fondasms->inbox == 'all' ? 'checked="checked"' : '';?>/> Simpan semua SMS masuk</label>
                    </div>
                    <div class="radio">
                      <label><input type="radio" name="inbox" value="server" <?php echo @$fondasms->inbox == 'server' ? 'checked="checked"' : '';?>/> Hanya menyimpan SMS masuk yang dikirim oleh Server (Balasan server)</label>
                    </div>
                  </div>
                </div>
                <div>
                  <button type="submit" class="btn btn-primary" name="submit" value="fondasms"><i class="fa fa-check"></i> Simpan</button>
                </div>
              <?php echo form_close();?>
              <div class="help-block" style="margin-top: 15px;">#NB: Untuk pengaturan lainnya biarkan default</div>
            </div>
            <div role="tabpanel" class="tab-pane <?php echo $gateway == 'w38s_gateway' ? 'active fade in' : 'fade';?>" id="w38s_gateway">
             <div style="margin-bottom: 15px;">
                <a data-toggle="collapse" href="#aboutW38SGateway" aria-expanded="false" aria-controls="aboutW38SGateway"><i class="fa fa-info-circle"></i> Tentang W38S Gateway</a>
                <div class="collapse" id="aboutW38SGateway">
                  <div class="well well-sm" style="margin-top: 10px;">
                  <p>W38S Gateway adalah aplikasi Android yang dibuat untuk mendukung kelancaran transaksi Web Pulsa Online by w38s.com</p>
                  <p>W38S Gateway dapat mengirim dan menerima SMS dari atau ke Web, dan ini bisa digunakan untuk membuat layanan verifikasi member website anda dengan SMS.</p>
                  <p>W38S Gateway juga dapat mengirimkan notifikasi dari web yang akan diterima di ponsel anda</p>
                  <h5>Fitur</h5>
                  <ul>
                    <li>Mengalihkan SMS masuk ke Web tanpa menghapus SMS dari ponsel anda</li>
                    <li>Mengirim SMS dari Web</li>
                    <li>Menerima notifikasi dari Web</li>
                  </ul>
                  <div><a href="https://play.google.com/store/apps/details?id=com.w38s.gateway" target="_blank"><img src="//play.google.com/intl/en_us/badges/images/badge_new.png" alt="Download W38S Gateway"/></a></div>
                </div>
                </div>
              </div>
              <?php echo form_open(site_url('admin/modules/sms-gateway/w38s-gateway'));?>
               <h5>Pengaturan Server</h5>
               <div class="form-group">
                 <label>URL</label>
                  <input type="text" class="form-control" value="<?php echo str_replace('https://','http://', site_url('sms-gateway/w38s-gateway'));?>" readonly="readonly"/>
               </div>
               <div class="form-group">
                  <label class="control-label">Password</label>
                  <input type="text" class="form-control" name="password" value="<?php echo set_value('password',$w38s_gateway->password);?>" maxlength="32" required="required"/>
                </div>
                <div>
                  <button type="submit" class="btn btn-primary" name="submit" value="w38s_gateway"><i class="fa fa-check"></i> Simpan</button>
                </div>
             <?php echo form_close();?>
            </div>
          </div>
        </div>
      </div>
    </div>
    <?php include_once(VIEWPATH.'includes/foot.php'); ?>
  </body>
</html>