|
Server : Apache/2.4.18 (Ubuntu) System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 User : oppastar ( 1041) PHP Version : 7.0.33-0ubuntu0.16.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Directory : /var/www/laciasmara.com/public_html/shop/application/views/account/ |
Upload File : |
<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>
<div class="account-point-container">
<?php if ($reseller): ?>
<h1>Credits</h1>
<p>Credit: <b>IDR <?= $current_point ?></b></p>
<?php else : ?>
<h1><?= ucfirst(lang('point_title')) ?></h1>
<p><?= ucfirst(lang('point_sub_title')) ?></p>
<p><?= ucfirst(lang('point_current')) ?>: <b><?= $current_point ?> points</b></p>
<div class="point-search-bar">
<input type="text" id="point-search" placeholder="<?= ucfirst(lang('point_search_placeholder')) ?>" />
</div>
<ul class="point-list" id="pointList">
<?php foreach ($orders as $order): ?>
<li class="point-item">
<div class="point-header">
<span class="point-date"><?= $order['date'] ?></span>
<span class="point-id">Order ID: <?= $order['id'] ?></span>
</div>
<div class="point-details">
<p><?= ucfirst(lang('points_earned')) ?>: <?= $order['plus_reward'] ?></p>
<p><?= ucfirst(lang('points_used')) ?>: <?= $order['minus_reward'] ?></p>
<?php if (!empty($order['redeemed_voucher_code'])): ?>
<p>Voucher Code: <?= $order['redeemed_voucher_code'] ?></p>
<?php endif; ?>
</div>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
<script>
document.getElementById('point-search').addEventListener('input', function() {
let filter = this.value.toLowerCase();
let items = document.querySelectorAll('.point-item');
items.forEach(function(item) {
let orderId = item.querySelector('.point-id').textContent.toLowerCase();
if (orderId.includes(filter)) {
item.style.display = '';
} else {
item.style.display = 'none';
}
});
});
</script>