[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
Zen Cart 源代码 gv_sent.php

Zen Cart 源代码 gv_sent.php




下载文件

文件名: gv_sent.php
文件类型: PHP文件
文件大小: 9.01 KiB
MD5: 11926f796b4ea240f8aa69195798edff

gv_sent.php - 关闭高亮
  1. <?php
  2. //
  3. // +----------------------------------------------------------------------+
  4. // |zen-cart Open Source E-commerce                                       |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 2003 The zen-cart developers                           |
  7. // |                                                                      |
  8. // | http://www.zen-cart.com/index.php                                    |
  9. // |                                                                      |
  10. // | Portions Copyright (c) 2003 osCommerce                               |
  11. // +----------------------------------------------------------------------+
  12. // | This source file is subject to version 2.0 of the GPL license,       |
  13. // | that is bundled with this package in the file LICENSE, and is        |
  14. // | available through the world-wide-web at the following url:           |
  15. // | http://www.zen-cart.com/license/2_0.txt.                             |
  16. // | If you did not receive a copy of the zen-cart license and are unable |
  17. // | to obtain it through the world-wide-web, please send a note to       |
  18. // | license@zen-cart.com so we can mail you a copy immediately.          |
  19. // +----------------------------------------------------------------------+
  20. //  $Id: gv_sent.php 3727 2006-06-09 02:42:39Z ajeh $
  21. //
  22.  
  23.   require('includes/application_top.php');
  24.  
  25.   require(DIR_WS_CLASSES . 'currencies.php');
  26.   $currencies = new currencies();
  27.  
  28. ?>
  29. <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  30. <html <?php echo HTML_PARAMS; ?>>
  31. <head>
  32. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  33. <title><?php echo TITLE; ?></title>
  34. <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
  35. <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
  36. <script language="javascript" src="includes/menu.js"></script>
  37. <script type="text/javascript">
  38.   <!--
  39.   function init()
  40.   {
  41.     cssjsmenu('navbar');
  42.     if (document.getElementById)
  43.     {
  44.       var kill = document.getElementById('hoverJS');
  45.       kill.disabled = true;
  46.     }
  47.   }
  48.   // -->
  49. </script>
  50. </head>
  51. <body onload="init()">
  52. <!-- header //-->
  53. <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
  54. <!-- header_eof //-->
  55. <!-- body //-->
  56. <table border="0" width="100%" cellspacing="2" cellpadding="2">
  57.   <tr>
  58. <!-- body_text //-->
  59.     <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  60.       <tr>
  61.         <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  62.           <tr>
  63.             <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
  64.             <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
  65.           </tr>
  66.         </table></td>
  67.       </tr>
  68.       <tr>
  69.         <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  70.           <tr>
  71.             <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  72.               <tr class="dataTableHeadingRow">
  73.                 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_SENDERS_NAME; ?></td>
  74.                 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_VOUCHER_VALUE; ?></td>
  75.                 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_VOUCHER_CODE; ?></td>
  76.                 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_DATE_SENT; ?></td>
  77.                 <td class="dataTableHeadingContent" align="right"><?php echo TEXT_HEADING_DATE_REDEEMED; ?></td>
  78.                 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
  79.               </tr>
  80. <?php
  81.   $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, crt.redeem_date, c.coupon_id
  82.                  from " . TABLE_COUPONS . " c
  83.                  left join " . TABLE_COUPON_REDEEM_TRACK . " crt
  84.                  on c.coupon_id= crt.coupon_id, " . TABLE_COUPON_EMAIL_TRACK . " et
  85.                  where c.coupon_id = et.coupon_id " . "
  86.                  and c.coupon_type = 'G'
  87.                  order by date_sent desc";
  88.   $gv_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $gv_query_raw, $gv_query_numrows);
  89.   $gv_list = $db->Execute($gv_query_raw);
  90.   while (!$gv_list->EOF) {
  91.     if (((!$_GET['gid']) || (@$_GET['gid'] == $gv_list->fields['coupon_id'])) && (!$gInfo)) {
  92.     $gInfo = new objectInfo($gv_list->fields);
  93.     }
  94.     if ( (is_object($gInfo)) && ($gv_list->fields['coupon_id'] == $gInfo->coupon_id) ) {
  95.       echo '              <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . zen_href_link('gv_sent.php', zen_get_all_get_params(array('gid', 'action')) . 'gid=' . $gInfo->coupon_id . '&action=edit') . '\'">' . "\n";
  96.     } else {
  97.       echo '              <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . zen_href_link('gv_sent.php', zen_get_all_get_params(array('gid', 'action')) . 'gid=' . $gv_list->fields['coupon_id']) . '\'">' . "\n";
  98.     }
  99. ?>
  100.                 <td class="dataTableContent"><?php echo $gv_list->fields['sent_firstname'] . ' ' . $gv_list->fields['sent_lastname']; ?></td>
  101.                 <td class="dataTableContent" align="center"><?php echo $currencies->format($gv_list->fields['coupon_amount']); ?></td>
  102.                 <td class="dataTableContent" align="center"><?php echo $gv_list->fields['coupon_code']; ?></td>
  103.                 <td class="dataTableContent" align="right"><?php echo zen_date_short($gv_list->fields['date_sent']); ?></td>
  104.                 <td class="dataTableContent" align="right"><?php echo (empty($gv_list->fields['redeem_date']) ? TEXT_INFO_NOT_REDEEMED : zen_date_short($gv_list->fields['redeem_date'])); ?></td>
  105.                 <td class="dataTableContent" align="right"><?php if ( (is_object($gInfo)) && ($gv_list->fields['coupon_id'] == $gInfo->coupon_id) ) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . zen_href_link(FILENAME_GV_SENT, 'page=' . $_GET['page'] . '&gid=' . $gv_list->fields['coupon_id']) . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td>
  106.               </tr>
  107. <?php
  108.     $gv_list->MoveNext();
  109.   }
  110. ?>
  111.               <tr>
  112.                 <td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  113.                   <tr>
  114.                     <td class="smallText" valign="top"><?php echo $gv_split->display_count($gv_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_GIFT_VOUCHERS); ?></td>
  115.                     <td class="smallText" align="right"><?php echo $gv_split->display_links($gv_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?></td>
  116.                   </tr>
  117.                 </table></td>
  118.               </tr>
  119.             </table></td>
  120. <?php
  121.   $heading = array();
  122.   $contents = array();
  123.  
  124.   $heading[] = array('text' => '[' . $gInfo->coupon_id . '] ' . ' ' . $currencies->format($gInfo->coupon_amount));
  125.   $redeem = $db->Execute("select * from " . TABLE_COUPON_REDEEM_TRACK . "
  126.                          where coupon_id = '" . $gInfo->coupon_id . "'");
  127.   $redeemed = 'No';
  128.   if ($redeem->RecordCount() > 0) $redeemed = 'Yes';
  129.   $contents[] = array('text' => TEXT_INFO_SENDERS_ID . ' ' . $gInfo->customer_id_sent);
  130.   $contents[] = array('text' => TEXT_INFO_AMOUNT_SENT . ' ' . $currencies->format($gInfo->coupon_amount));
  131.   $contents[] = array('text' => TEXT_INFO_DATE_SENT . ' ' . zen_date_short($gInfo->date_sent));
  132.   $contents[] = array('text' => TEXT_INFO_VOUCHER_CODE . ' ' . $gInfo->coupon_code);
  133.   $contents[] = array('text' => TEXT_INFO_EMAIL_ADDRESS . ' ' . $gInfo->emailed_to);
  134.   if ($redeemed=='Yes') {
  135.     $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_REDEEMED . ' ' . zen_date_short($redeem->fields['redeem_date']));
  136.     $contents[] = array('text' => TEXT_INFO_IP_ADDRESS . ' ' . $redeem->fields['redeem_ip']);
  137.     $contents[] = array('text' => TEXT_INFO_CUSTOMERS_ID . ' ' . $redeem->fields['customer_id']);
  138.   } else {
  139.     $contents[] = array('text' => '<br />' . TEXT_INFO_NOT_REDEEMED);
  140.   }
  141.  
  142.   if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) {
  143.     echo '            <td width="25%" valign="top">' . "\n";
  144.  
  145.     $box = new box;
  146.     echo $box->infoBox($heading, $contents);
  147.  
  148.     echo '            </td>' . "\n";
  149.   }
  150. ?>
  151.           </tr>
  152.         </table></td>
  153.       </tr>
  154.     </table></td>
  155. <!-- body_text_eof //-->
  156.   </tr>
  157. </table>
  158. <!-- body_eof //-->
  159.  
  160. <!-- footer //-->
  161. <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
  162. <!-- footer_eof //-->
  163. <br />
  164. </body>
  165. </html>
  166. <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>