<div class="left"> <?php echo '<ul class="letters">'; foreach (array_merge(range('A', 'Z'), array('0-9')) as $l) { echo '<li' . (isset($_GET['firstchar']) && $_GET['firstchar'] == $l ? ' class="active"' : '') . '><a href="' . tlink('stores', 'firstchar=' . $l) . '">' . $l . '</a></li>'; } echo '<li><a href="' . tlink('stores') . '">ALL</a></li>'; echo '</ul>'; echo '<div class="title"> <span style="color: #efefef;">' . ($items = (int) have_items(array('firstchar' => isset($_GET['firstchar']) ? $_GET['firstchar'] : ''))) . '</span> Stores/Brands </div>'; if ($items) { foreach (items(array('firstchar' => isset($_GET['firstchar']) ? $_GET['firstchar'] : '')) as $item) { echo '<article class="array_item"> <div class="table"> <div class="left"> <img src="' . store_avatar($item->image) . '" alt=""> <span class="rating"><span style="width:' . $item->stars * 16 . 'px;"></span></span> <a href="' . $item->reviews_link . '">' . $item->reviews . ' reviews</a> </div> <div class="right"> <a href="' . $item->link . '" class="title">' . $item->name . '</a> <div class="description">' . (!empty($item->description) ? nl2br($item->description) : 'no description') . '</div> <ul class="details"> <li>Coupons/Deals: <b>' . $item->coupons . '</b></li>'; if (theme_has_products()) {
<div class="left"> <?php $category = the_item(); have_items(); if (searched_type() === 'products') { if (exists()) { echo '<div class="title"> <span style="color: #efefef;">' . $category->name . '</span> Products <div class="shareico" style="position: relative; float: right;" data-ttip="RSS Feed"><a href="' . tlink('plugin/rss2-products.xml', 'cat=' . $category->ID) . '"></a></div> </div> <div style="margin-bottom: 20px;"> <ul class="category"> <li><a href="' . get_remove(array('type', 'page')) . '">Coupons</a></li>'; if (theme_has_products()) { echo '<li class="active">Products</li>'; } echo '</ul>'; if (!empty($category->description)) { echo '<article class="array_item category_box" style="border-top: 0;">' . $category->description . '</article>'; } echo '</div>'; if (results() > 0) { foreach (items(array('orderby' => 'active desc')) as $item) { echo '<article class="array_item product"> <div class="table"> <div class="left"> <img src="' . product_avatar($item->image) . '" alt="">
<li class="share-rss" data-ttip="RSS Feed"><a href="' . tlink('plugin/rss2.xml', 'store=' . $item->ID) . '"></a></li> </ul> <input type="text" value="' . $item->link . '" onclick="$(this).select();" /> </div> </div> </article>'; if (me()) { echo '<a href="#" class="btn write_review"' . ($_SERVER['REQUEST_METHOD'] == 'POST' ? ' style="display: none;"' : '') . '>Write Review</a>'; echo '<div' . ($_SERVER['REQUEST_METHOD'] != 'POST' ? ' style="display: none;"' : '') . '>' . write_review_form() . '</div>'; } echo '<div class="text-tit" style="margin-top: 15px;">Reviews for ' . $item->name . ':</div>'; if (have_items()) { foreach (items(array('orderby' => 'date desc')) as $review) { echo '<article class="array_item"> <div class="table"> <div class="left"> <img src="' . user_avatar($review->user_avatar) . '" alt="" style="width: 60px; height: 60px;" /> <span class="rating"><span style="width:' . $review->stars * 16 . 'px;"></span></span> </div> <div class="right"> <div class="title">' . $review->user_name . '</div> <div class="time">Added ' . date('m/d/Y', $wdate = strtotime($review->date)) . ', ' . timeago($wdate, 'seconds') . ' ago</div> <div class="description">' . $review->text . '</div> </div>
echo '<span>Page ' . page() . ' / ' . pages() . '</span>'; echo '</div>'; } } } else { echo '<div class="title"> <span style="color: #efefef;">' . searched('text') . '</span> Coupon Codes </div> <ul class="category" style="margin-bottom: 20px;"> <li class="active">Coupons</li>'; if (theme_has_products()) { echo '<li><a href="' . get_update(array('page' => 1, 'type' => 'products')) . '">Products</a></li>'; } echo '</ul>'; if ((int) ($items = have_items()) === 0) { echo '<div class="info_form">Sorry, but we couldn\'t find any coupon for "' . searched('text') . '".</div> <div class="text-tit" style="margin-top: 15px;">See some interesting 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">