[ Index ] |
PHP Cross Reference of osCMax 2.0.4 |
[Summary view] [Print] [Text view]
1 <table border="0" width="100%" cellspacing="0" cellpadding="0"> 2 <tr> 3 <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> 4 <tr> 5 <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> 6 <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_history.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> 7 </tr> 8 </table></td> 9 </tr> 10 <tr> 11 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> 12 </tr> 13 <tr> 14 <td> 15 <?php 16 $orders_total = tep_count_customer_orders(); 17 18 if ($orders_total > 0) { 19 $history_query_raw = "select o.orders_id, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.public_flag = '1' order by orders_id DESC"; 20 21 $history_split = new splitPageResults($history_query_raw, MAX_DISPLAY_ORDER_HISTORY); 22 $history_query = tep_db_query($history_split->sql_query); 23 24 while ($history = tep_db_fetch_array($history_query)) { 25 $products_query = tep_db_query("select count(*) as count from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$history['orders_id'] . "'"); 26 $products = tep_db_fetch_array($products_query); 27 28 if (tep_not_null($history['delivery_name'])) { 29 $order_type = TEXT_ORDER_SHIPPED_TO; 30 $order_name = $history['delivery_name']; 31 } else { 32 $order_type = TEXT_ORDER_BILLED_TO; 33 $order_name = $history['billing_name']; 34 } 35 ?> 36 <table border="0" width="100%" cellspacing="0" cellpadding="2"> 37 <tr> 38 <td class="main"><?php echo '<b>' . TEXT_ORDER_NUMBER . '</b> ' . $history['orders_id']; ?></td> 39 <td class="main" align="right"><?php echo '<b>' . TEXT_ORDER_STATUS . '</b> ' . $history['orders_status_name']; ?></td> 40 </tr> 41 </table> 42 <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> 43 <tr class="infoBoxContents"> 44 <td><table border="0" width="100%" cellspacing="2" cellpadding="4"> 45 <tr> 46 <td class="main" width="50%" valign="top"><?php echo '<b>' . TEXT_ORDER_DATE . '</b> ' . tep_date_long($history['date_purchased']) . '<br><b>' . $order_type . '</b> ' . tep_output_string_protected($order_name); ?></td> 47 <td class="main" width="30%" valign="top"><?php echo '<b>' . TEXT_ORDER_PRODUCTS . '</b> ' . $products['count'] . '<br><b>' . TEXT_ORDER_COST . '</b> ' . strip_tags($history['order_total']); ?></td> 48 <td class="main" width="20%"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . 'order_id=' . $history['orders_id'], 'SSL') . '">' . tep_image_button('small_view.gif', SMALL_IMAGE_BUTTON_VIEW) . '</a>'; ?></td> 49 </tr> 50 </table></td> 51 </tr> 52 </table> 53 <table border="0" width="100%" cellspacing="0" cellpadding="2"> 54 <tr> 55 <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> 56 </tr> 57 </table> 58 <?php 59 } 60 } else { 61 ?> 62 <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> 63 <tr class="infoBoxContents"> 64 <td><table border="0" width="100%" cellspacing="2" cellpadding="4"> 65 <tr> 66 <td class="main"><?php echo TEXT_NO_PURCHASES; ?></td> 67 </tr> 68 </table></td> 69 </tr> 70 </table> 71 <?php 72 } 73 ?> 74 </td> 75 </tr> 76 <?php 77 if ($orders_total > 0) { 78 ?> 79 <tr> 80 <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> 81 <tr> 82 <td class="smallText" valign="top"><?php echo $history_split->display_count(TEXT_DISPLAY_NUMBER_OF_ORDERS); ?></td> 83 <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $history_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> 84 </tr> 85 </table></td> 86 </tr> 87 <?php 88 } 89 ?> 90 <tr> 91 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> 92 </tr> 93 <tr> 94 <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> 95 <tr class="infoBoxContents"> 96 <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> 97 <tr> 98 <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 99 <td><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td> 100 <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> 101 </tr> 102 </table></td> 103 </tr> 104 </table></td> 105 </tr> 106 </table>
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 |