//no error $output .= ' <h1>' . lang("points", "points") . '</h1>'; } $output .= ' </div>'; $action = isset($_GET["action"]) ? $_GET["action"] : "coupons"; $coupon_id = isset($_GET["coupon_id"]) ? $_GET["coupon_id"] : 0; $bag_id = isset($_GET["bag_id"]) ? $_GET["bag_id"] : 0; $raffle_id = isset($_GET["raffle_id"]) ? $_GET["raffle_id"] : 0; // prevent injection if (!is_numeric($coupon_id) || !is_numeric($bag_id) || !is_numeric($raffle_id)) { error(lang("global", "err_invalid_input")); } if ($action == "coupons") { coupons(); } elseif ($action == "redeem_coupon") { redeem_coupon(); } elseif ($action == "do_redeem") { do_redeem(); } elseif ($action == "raffles") { raffles(); } elseif ($action == "view_raffle") { view_raffle(); } elseif ($action == "do_purchase") { do_purchase(); } elseif ($action == "contests") { contests(); } elseif ($action == "view_bag") { view_bag(); } elseif ($action == "edit_bag") {
<?php if ($GLOBALS['me'] && isset($_GET['action'])) { switch ($_GET['action']) { /* MY COUPONS */ case 'my_coupons': echo '<div class="left">'; if (($pagination = have_coupons(array('show' => 'all'))) && $pagination['results'] > 0) { foreach (coupons(array('orderby' => 'date desc', 'show' => 'all')) 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> </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 {