} if (isset($pagination['prev_page']) || isset($pagination['next_page'])) { echo '<div class="pagination">'; echo isset($pagination['prev_page']) ? '<span><a href="' . $pagination['prev_page'] . '" class="btn">← Prev</a></span>' : '<span class="btn" style="opacity: 0.2;">← Prev</span>'; echo isset($pagination['next_page']) ? '<span><a href="' . $pagination['next_page'] . '" class="btn">Next →</a></span>' : '<span class="btn" style="opacity: 0.2;">Next →</span>'; echo '<span>Page ' . $pagination['page'] . ' / ' . $pagination['pages'] . '</span>'; echo '</div>'; } } else { echo '<div style="text-align:center;">No coupons, yet! :(</div>'; } } } else { echo '<div class="info_form">Oops. This store/brand is no longer available !</div>'; echo '<div class="text-tit" style="margin-top: 15px;">See some coupons:</div>'; foreach (items_custom(array('show' => ',active', 'orderby' => 'rand', 'max' => option('items_per_page'))) as $item) { echo '<article class="array_item"> <div class="table"> <div class="left"> <img src="' . store_avatar($item->store_img) . '" alt=""> <span class="rating"><span style="width:' . $item->stars * 16 . 'px;"></span></span> <a href="' . $item->store_reviews_link . '">' . $item->reviews . ' reviews</a>'; echo !empty($item->cashback) ? '<span class="cashback-points" data-ttip="Great! Use it and you\'ll receive ' . $item->cashback . ' points.">' . $item->cashback . '</span> ' : ''; echo '</div> <div class="right"> <a href="' . $item->link . '" class="title">' . $item->title . '</a> More coupons for <a href="' . $item->store_link . '">' . $item->store_name . '</a> <div class="description">' . (!empty($item->description) ? nl2br($item->description) : 'no description') . '</div>
</article>'; } if (($pp = prev_page()) || next_page()) { echo '<div class="pagination">'; echo $pp ? '<span><a href="' . $pp . '" class="btn">← Prev</a></span>' : '<span class="btn" style="opacity: 0.2;">← Prev</span>'; echo ($np = next_page()) ? '<span><a href="' . $np . '" class="btn">Next →</a></span>' : '<span class="btn" style="opacity: 0.2;">Next →</span>'; echo '<span>Page ' . page() . ' / ' . pages() . '</span>'; echo '</div>'; } } else { echo '<div style="text-align:center;">No reviews, yet! :(</div>'; } } else { echo '<div class="info_form">Oops. This store/brand is no longer available !</div>'; echo '<div class="text-tit" style="margin-top: 15px;">See some coupons:</div>'; foreach (items_custom(array('show' => ',active', 'orderby' => 'rand', 'max' => 10)) as $item) { echo '<article class="array_item"> <div class="table"> <div class="left"> <img src="' . store_avatar($item->store_img) . '" alt=""> <span class="rating"><span style="width:' . $item->stars * 16 . 'px;"></span></span> <a href="' . $item->store_reviews_link . '">' . $item->reviews . ' reviews</a>'; echo !empty($item->cashback) ? '<span class="cashback-points" data-ttip="Great! Use it and you\'ll receive ' . $item->cashback . ' points.">' . $item->cashback . '</span> ' : ''; echo '</div> <div class="right"> <a href="' . $item->link . '" class="title">' . $item->title . '</a> More coupons for <a href="' . $item->store_link . '">' . $item->store_name . '</a> <div class="description">' . (!empty($item->description) ? nl2br($item->description) : 'no description') . '</div>
<?php echo '<div class="widget widget_coupons' . (!$mobile_view ? ' mobile_view' : '') . '">'; if (!empty($title)) { echo '<h2>' . $title . '</h2>'; } echo '<ul class="list">'; foreach (items_custom(array('show' => !empty($type) ? $type : '', 'orderby' => !empty($order) ? $order : '', 'max' => !empty($limit) ? $limit : 10)) as $id) { echo '<li><a href="' . $id->link . '">' . $id->title . '</a></li>'; } echo '</ul> </div>';
<div class="left"> <?php if ($pagination = have_items_custom(array('show' => 'active,visible'))) { foreach (items_custom(array('show' => 'active,visible', 'orderby' => 'date desc')) as $item) { echo '<article class="array_item"> <div class="table"> <div class="left"> <img src="' . store_avatar($item->store_img) . '" alt=""> <span class="rating"><span style="width:' . $item->stars * 16 . 'px;"></span></span> <a href="' . $item->store_reviews_link . '">' . $item->reviews . ' reviews</a>'; echo !empty($item->cashback) ? '<span class="cashback-points" data-ttip="Great! Use it and you\'ll receive ' . $item->cashback . ' points.">' . $item->cashback . '</span> ' : ''; echo '</div> <div class="right"> <a href="' . $item->link . '" class="title">' . $item->title . '</a> More coupons for <a href="' . $item->store_link . '">' . $item->store_name . '</a> <div class="description">' . (!empty($item->description) ? nl2br($item->description) : 'no description') . '</div> <ul class="details"> <li>Coupon Added: <b>' . timeago(strtotime($item->date), 'seconds') . ' ago</b></li>'; if ($item->is_expired) { echo '<li>Expired on: <span class="expired">' . date('m/d/y', strtotime($item->expiration_date)) . '</span></li>'; } else { if (!$item->is_started) { echo '<li>Starts on: <span class="notstarted">' . date('m/d/y', strtotime($item->expiration_date)) . '</span></li>'; } else { echo '<li>Expiration: <span class="active">' . date('m/d/y', strtotime($item->expiration_date)) . '</span></li>'; }