Example #1
0
                    //bof 12-6ke
                    $category_query = $db->Execute("select * from " . TABLE_COUPON_RESTRICT . " where coupon_id = '" . $cInfo->coupon_id . "' and category_id != '0'");
                    if ($category_query->RecordCount() > 0) {
                        $cat_details = TEXT_SEE_RESTRICT;
                    }
                    //eof 12-6ke
                    $coupon_name = $db->Execute("select coupon_name\r\n                                     from " . TABLE_COUPONS_DESCRIPTION . "\r\n                                     where coupon_id = '" . $cInfo->coupon_id . "'\r\n                                     and language_id = '" . $_SESSION['languages_id'] . "'");
                    $uses_coupon = $cInfo->uses_per_coupon;
                    $uses_user = $cInfo->uses_per_user;
                    if ($uses_coupon == 0 || $uses_coupon == '') {
                        $uses_coupon = TEXT_UNLIMITED;
                    }
                    if ($uses_user == 0 || $uses_user == '') {
                        $uses_user = TEXT_UNLIMITED;
                    }
                    $contents[] = array('text' => COUPON_NAME . '&nbsp;::&nbsp; ' . $coupon_name->fields['coupon_name'] . '<br />' . COUPON_AMOUNT . '&nbsp;::&nbsp; ' . $amount . '<br />' . COUPON_STARTDATE . '&nbsp;::&nbsp; ' . zen_date_short($cInfo->coupon_start_date) . '<br />' . COUPON_FINISHDATE . '&nbsp;::&nbsp; ' . zen_date_short($cInfo->coupon_expire_date) . '<br />' . COUPON_USES_COUPON . '&nbsp;::&nbsp; ' . $uses_coupon . '<br />' . COUPON_USES_USER . '&nbsp;::&nbsp; ' . $uses_user . '<br />' . COUPON_PRODUCTS . '&nbsp;::&nbsp; ' . $prod_details . '<br />' . COUPON_CATEGORIES . '&nbsp;::&nbsp; ' . $cat_details . '<br />' . DATE_CREATED . '&nbsp;::&nbsp; ' . zen_date_short($cInfo->date_created) . '<br />' . DATE_MODIFIED . '&nbsp;::&nbsp; ' . zen_date_short($cInfo->date_modified) . '<br /><br />' . COUPON_ZONE_RESTRICTION . '&nbsp;::&nbsp; ' . zen_get_geo_zone_name($cInfo->coupon_zone_restriction) . '<br /><br />' . ($cInfo->coupon_id != '' ? '<center><a href="' . zen_href_link(FILENAME_COUPON_ADMIN, 'action=email&cid=' . $cInfo->coupon_id, 'NONSSL') . '">' . zen_image_button('button_email.gif', 'Email ' . TEXT_DISCOUNT_COUPON) . '</a>' . '<a href="' . zen_href_link(FILENAME_COUPON_ADMIN, 'action=voucheredit&cid=' . $cInfo->coupon_id . (isset($_GET['status']) ? '&status=' . $_GET['status'] : '') . (isset($_GET['page']) ? '&page=' . $_GET['page'] : ''), 'NONSSL') . '">' . zen_image_button('button_edit.gif', 'Edit ' . TEXT_DISCOUNT_COUPON) . '</a>' . '<a href="' . zen_href_link(FILENAME_COUPON_ADMIN, 'action=voucherdelete&cid=' . $cInfo->coupon_id . (isset($_GET['status']) ? '&status=' . $_GET['status'] : '') . (isset($_GET['page']) ? '&page=' . $_GET['page'] : ''), 'NONSSL') . '">' . zen_image_button('button_delete.gif', 'Delete ' . TEXT_DISCOUNT_COUPON) . '</a>' . '<br /><a href="' . zen_href_link('coupon_restrict.php', 'cid=' . $cInfo->coupon_id . (isset($_GET['status']) ? '&status=' . $_GET['status'] : '') . (isset($_GET['page']) ? '&page=' . $_GET['page'] : ''), 'NONSSL') . '">' . zen_image_button('button_restrict.gif', 'Restrict') . '</a><a href="' . zen_href_link(FILENAME_COUPON_ADMIN, 'action=voucherreport&cid=' . $cInfo->coupon_id . (isset($_GET['status']) ? '&status=' . $_GET['status'] : '') . (isset($_GET['page']) ? '&page=' . $_GET['page'] : ''), 'NONSSL') . '">' . zen_image_button('button_report.gif', TEXT_DISCOUNT_COUPON . ' Report') . '<a href="' . zen_href_link(FILENAME_COUPON_ADMIN, 'action=vouchercopy&cid=' . $cInfo->coupon_id . (isset($_GET['status']) ? '&status=' . $_GET['status'] : '') . (isset($_GET['page']) ? '&page=' . $_GET['page'] : ''), 'NONSSL') . '">' . zen_image_button('button_copy.gif', 'Copy ' . TEXT_DISCOUNT_COUPON) . '</a></center>' : ' who ' . $cInfo->coupon_id . ' - ' . $_GET['cid']));
                }
                break;
        }
        ?>
    <td width="25%" valign="top">
<?php 
        $box = new box();
        echo $box->infoBox($heading, $contents);
        echo '            </td>' . "\n";
}
?>
      </tr>
    </table></td>
<!-- body_text_eof //-->
  </tr>
require DIR_WS_INCLUDES . 'header.php';
?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
  <tr>
<!-- body_text //-->
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php 
echo HEADING_TITLE;
if (isset($_GET['zone'])) {
    echo '<br><span class="smallText">' . zen_get_geo_zone_name($_GET['zone']) . '</span>';
}
?>
</td>
            <td class="pageHeading" align="right"><?php 
echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT);
?>
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top">
<?php