<?php
/* Smarty version 4.5.3, created on 2024-12-04 09:59:54
  from '/var/www/html/admin/system/plugin/ui/sms_balance.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.3',
  'unifunc' => 'content_674ffdeac86a96_57705189',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '52cb6dd7a09c28d3294be98d6c8c813c7022b017' => 
    array (
      0 => '/var/www/html/admin/system/plugin/ui/sms_balance.tpl',
      1 => 1729358990,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:sections/header.tpl' => 1,
    'file:sections/footer.tpl' => 1,
  ),
),false)) {
function content_674ffdeac86a96_57705189 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_subTemplateRender("file:sections/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>

<div class="row">
    <div class="col-sm-12">
        <!-- SMS Balance Panel -->
        <div class="panel panel-hovered mb20 panel-primary">
            <div class="panel-heading">
                Blessedtexts SMS Balance
            </div>
            <div class="table-responsive">
                <table class="table table-bordered table-striped table-condensed">
                    <thead>
                        <tr>
                            <th>Status</th>
                            <th>Remaining Credit Balance</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>
                                <?php if ($_smarty_tpl->tpl_vars['credit_balance']->value) {?>
                                    <span class="text-success">Available</span>
                                <?php } elseif ($_smarty_tpl->tpl_vars['credit_error_message']->value) {?>
                                    <span class="text-danger">Error</span>
                                <?php } else { ?>
                                    <span class="text-warning">Unknown</span>
                                <?php }?>
                            </td>
                            <td>
                                <?php if ($_smarty_tpl->tpl_vars['credit_balance']->value) {?>
                                    <?php echo $_smarty_tpl->tpl_vars['credit_balance']->value;?>

                                <?php } elseif ($_smarty_tpl->tpl_vars['credit_error_message']->value) {?>
                                    <span class="error"><?php echo $_smarty_tpl->tpl_vars['credit_error_message']->value;?>
</span>
                                <?php } else { ?>
                                    Unable to retrieve credit balance at the moment.
                                <?php }?>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <div class="panel-footer">
                <form method="POST" action="">
                    <div class="form-group">
                        <label for="api_key">API Key</label>
                        <input type="text" class="form-control" id="api_key" name="api_key" value="<?php echo $_smarty_tpl->tpl_vars['current_api_key']->value;?>
" required>
                    </div>
                    <button type="submit" class="btn btn-primary">Save API Key</button>
                </form>
                <?php if ($_smarty_tpl->tpl_vars['message']->value) {?>
                    <div class="alert alert-success mt-2"><?php echo $_smarty_tpl->tpl_vars['message']->value;?>
</div>
                <?php }?>
                <div class="bs-callout bs-callout-info" id="callout-navbar-role">
                    <h4>Top Up Your Balance</h4>
                    <p>You can top up your account by following the instructions on the portal.</p>
                    <a href="https://sms.blessedtexts.com/credit/topup" class="btn btn-primary">Top Up Balance</a>
                </div>
            </div>
        </div>

        <!-- Bytewave SMS Balance Panel -->
        <div class="panel panel-hovered mb20 panel-primary">
            <div class="panel-heading">
                Bytewave SMS Balance
            </div>
            <div class="table-responsive">
                <table class="table table-bordered table-striped table-condensed">
                    <thead>
                        <tr>
                            <th>Status</th>
                            <th>Remaining SMS Units</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>
                                <?php if ($_smarty_tpl->tpl_vars['sms_balance']->value) {?>
                                    <span class="text-success">Available</span>
                                <?php } elseif ($_smarty_tpl->tpl_vars['sms_error_message']->value) {?>
                                    <span class="text-danger">Error</span>
                                <?php } else { ?>
                                    <span class="text-warning">Unknown</span>
                                <?php }?>
                            </td>
                            <td>
                                <?php if ($_smarty_tpl->tpl_vars['sms_balance']->value) {?>
                                    <?php echo $_smarty_tpl->tpl_vars['sms_balance']->value;?>

                                <?php } elseif ($_smarty_tpl->tpl_vars['sms_error_message']->value) {?>
                                    <span class="error"><?php echo $_smarty_tpl->tpl_vars['sms_error_message']->value;?>
</span>
                                <?php } else { ?>
                                    Unable to retrieve SMS balance at the moment.
                                <?php }?>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <div class="panel-footer">
                <form method="POST" action="">
                    <div class="form-group">
                        <label for="api_token">API Token</label>
                        <input type="text" class="form-control" id="api_token" name="api_token" value="<?php echo $_smarty_tpl->tpl_vars['current_api_token']->value;?>
" required>
                    </div>
                    <button type="submit" class="btn btn-primary">Save API Token</button>
                </form>
                <?php if ($_smarty_tpl->tpl_vars['message']->value) {?>
                    <div class="alert alert-success mt-2"><?php echo $_smarty_tpl->tpl_vars['message']->value;?>
</div>
                <?php }?>
                <div class="bs-callout bs-callout-info" id="callout-navbar-role">
                    <h4>Top Up SMS Units</h4>
                    <p>You can top up your SMS units by clicking the button above.</p>
                    <a href="https://portal.bytewavenetworks.com/account/top-up" class="btn btn-primary">Top Up SMS Units</a>
                </div>
            </div>
        </div>
    </div>
</div>

<?php $_smarty_tpl->_subTemplateRender("file:sections/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
}
}
