[ Index ] |
PHP Cross Reference of osCMax 2.0.4 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 $Id: gv_sent.php 14 2006-07-28 17:42:07Z user $ 4 5 osCMax Power E-Commerce 6 http://oscdox.com 7 8 Copyright 2006 osCMax 9 10 Gift Voucher System v1.0 11 Copyright 2006 osCMax2001,2002 Ian C Wilson 12 http://www.phesis.org 13 14 Released under the GNU General Public License 15 */ 16 17 require ('includes/application_top.php'); 18 19 require (DIR_WS_CLASSES . 'currencies.php'); 20 $currencies = new currencies(); 21 22 ?> 23 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 24 <html <?php echo HTML_PARAMS; ?>> 25 <head> 26 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 27 <title><?php echo TITLE; ?></title> 28 <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> 29 </head> 30 <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> 31 <!-- header //--> 32 <?php require (DIR_WS_INCLUDES . 'header.php'); ?> 33 <!-- header_eof //--> 34 <!-- body //--> 35 <table border="0" width="100%" cellspacing="2" cellpadding="2"> 36 <tr> 37 <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> 38 <!-- left_navigation //--> 39 <?php require (DIR_WS_INCLUDES . 'column_left.php'); ?> 40 <!-- left_navigation_eof //--> 41 </table></td> 42 <!-- body_text //--> 43 <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> 44 <tr> 45 <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> 46 <tr> 47 <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> 48 <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> 49 </tr> 50 </table></td> 51 </tr> 52 <tr> 53 <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> 54 <tr> 55 <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> 56 <tr class="dataTableHeadingRow"> 57 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_SENDERS_NAME; ?></td> 58 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_VOUCHER_VALUE; ?></td> 59 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_VOUCHER_CODE; ?></td> 60 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_DATE_SENT; ?></td> 61 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> 62 </tr> 63 <?php 64 $gv_query_raw = "select c.coupon_amount, c.coupon_code, c.coupon_id, et.sent_firstname, et.sent_lastname, et.customer_id_sent, et.emailed_to, et.date_sent, c.coupon_id from " . TABLE_COUPONS . " c, " . TABLE_COUPON_EMAIL_TRACK . " et where c.coupon_id = et.coupon_id"; 65 $gv_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $gv_query_raw, $gv_query_numrows); 66 $gv_query = tep_db_query($gv_query_raw); 67 while ($gv_list = tep_db_fetch_array($gv_query)) { 68 if (((!$HTTP_GET_VARS['gid']) || (@$HTTP_GET_VARS['gid'] == $gv_list['coupon_id'])) && (!$gInfo)) { 69 $gInfo = new objectInfo($gv_list); 70 } 71 if ( (is_object($gInfo)) && ($gv_list['coupon_id'] == $gInfo->coupon_id) ) { 72 echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . tep_href_link('gv_sent.php', tep_get_all_get_params(array('gid', 'action')) . 'gid=' . $gInfo->coupon_id . '&action=edit') . '\'">' . "\n"; 73 } else { 74 echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . tep_href_link('gv_sent.php', tep_get_all_get_params(array('gid', 'action')) . 'gid=' . $gv_list['coupon_id']) . '\'">' . "\n"; 75 } 76 ?> 77 <td class="dataTableContent"><?php echo $gv_list['sent_firstname'] . ' ' . $gv_list['sent_lastname']; ?></td> 78 <td class="dataTableContent" align="center"><?php echo $currencies->format($gv_list['coupon_amount']); ?></td> 79 <td class="dataTableContent" align="center"><?php echo $gv_list['coupon_code']; ?></td> 80 <td class="dataTableContent" align="right"><?php echo tep_date_short($gv_list['date_sent']); ?></td> 81 <td class="dataTableContent" align="right"><?php if ( (is_object($gInfo)) && ($gv_list['coupon_id'] == $gInfo->coupon_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . tep_href_link(FILENAME_GV_SENT, 'page=' . $HTTP_GET_VARS['page'] . '&gid=' . $gv_list['coupon_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> 82 </tr> 83 <?php 84 } 85 ?> 86 <tr> 87 <td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2"> 88 <tr> 89 <td class="smallText" valign="top"><?php echo $gv_split->display_count($gv_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_GIFT_VOUCHERS); ?></td> 90 <td class="smallText" align="right"><?php echo $gv_split->display_links($gv_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?></td> 91 </tr> 92 </table></td> 93 </tr> 94 </table></td> 95 <?php 96 $heading = array(); 97 $contents = array(); 98 99 $heading[] = array('text' => '[' . $gInfo->coupon_id . '] ' . ' ' . $currencies->format($gInfo->coupon_amount)); 100 $redeem_query = tep_db_query("select * from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $gInfo->coupon_id . "'"); 101 $redeemed = 'No'; 102 if (tep_db_num_rows($redeem_query) > 0) $redeemed = 'Yes'; 103 $contents[] = array('text' => TEXT_INFO_SENDERS_ID . ' ' . $gInfo->customer_id_sent); 104 $contents[] = array('text' => TEXT_INFO_AMOUNT_SENT . ' ' . $currencies->format($gInfo->coupon_amount)); 105 $contents[] = array('text' => TEXT_INFO_DATE_SENT . ' ' . tep_date_short($gInfo->date_sent)); 106 $contents[] = array('text' => TEXT_INFO_VOUCHER_CODE . ' ' . $gInfo->coupon_code); 107 $contents[] = array('text' => TEXT_INFO_EMAIL_ADDRESS . ' ' . $gInfo->emailed_to); 108 if ($redeemed=='Yes') { 109 $redeem = tep_db_fetch_array($redeem_query); 110 $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_REDEEMED . ' ' . tep_date_short($redeem['redeem_date'])); 111 $contents[] = array('text' => TEXT_INFO_IP_ADDRESS . ' ' . $redeem['redeem_ip']); 112 $contents[] = array('text' => TEXT_INFO_CUSTOMERS_ID . ' ' . $redeem['customer_id']); 113 } else { 114 $contents[] = array('text' => '<br>' . TEXT_INFO_NOT_REDEEMED); 115 } 116 117 if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { 118 echo ' <td width="25%" valign="top">' . "\n"; 119 120 $box = new box; 121 echo $box->infoBox($heading, $contents); 122 123 echo ' </td>' . "\n"; 124 } 125 ?> 126 </tr> 127 </table></td> 128 </tr> 129 </table></td> 130 <!-- body_text_eof //--> 131 </tr> 132 </table> 133 <!-- body_eof //--> 134 135 <!-- footer //--> 136 <?php require (DIR_WS_INCLUDES . 'footer.php'); ?> 137 <!-- footer_eof //--> 138 <br> 139 </body> 140 </html> 141 <?php require (DIR_WS_INCLUDES . 'application_bottom.php'); ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Jan 1 13:43:16 2010 | Cross-referenced by PHPXref 0.7 |