[ Index ] |
PHP Cross Reference of osCMax 2.0.4 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 $Id: affiliate_sales.php 14 2006-07-28 17:42:07Z user $ 4 5 OSC-Affiliate 6 7 Contribution based on: 8 9 osCMax Power E-Commerce 10 http://oscdox.com 11 12 Copyright 2006 osCMax 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 if ($HTTP_GET_VARS['acID'] > 0) { 23 24 $affiliate_sales_raw = " 25 select asale.*, os.orders_status_name as orders_status, a.affiliate_firstname, a.affiliate_lastname from " . TABLE_AFFILIATE_SALES . " asale 26 left join " . TABLE_ORDERS . " o on (asale.affiliate_orders_id = o.orders_id) 27 left join " . TABLE_ORDERS_STATUS . " os on (o.orders_status = os.orders_status_id and language_id = " . $languages_id . ") 28 left join " . TABLE_AFFILIATE . " a on (a.affiliate_id = asale.affiliate_id) 29 where asale.affiliate_id = '" . $HTTP_GET_VARS['acID'] . "' 30 order by affiliate_date desc 31 "; 32 $affiliate_sales_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $affiliate_sales_raw, $affiliate_sales_numrows); 33 34 } else { 35 36 $affiliate_sales_raw = " 37 select asale.*, os.orders_status_name as orders_status, a.affiliate_firstname, a.affiliate_lastname from " . TABLE_AFFILIATE_SALES . " asale 38 left join " . TABLE_ORDERS . " o on (asale.affiliate_orders_id = o.orders_id) 39 left join " . TABLE_ORDERS_STATUS . " os on (o.orders_status = os.orders_status_id and language_id = " . $languages_id . ") 40 left join " . TABLE_AFFILIATE . " a on (a.affiliate_id = asale.affiliate_id) 41 order by affiliate_date desc 42 "; 43 $affiliate_sales_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $affiliate_sales_raw, $affiliate_sales_numrows); 44 } 45 ?> 46 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 47 <html <?php echo HTML_PARAMS; ?>> 48 <head> 49 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 50 <title><?php echo TITLE; ?></title> 51 <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> 52 </head> 53 <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> 54 <!-- header //--> 55 <?php require (DIR_WS_INCLUDES . 'header.php'); ?> 56 <!-- header_eof //--> 57 58 <!-- body //--> 59 <table border="0" width="100%" cellspacing="2" cellpadding="2"> 60 <tr> 61 <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> 62 <!-- left_navigation //--> 63 <?php require (DIR_WS_INCLUDES . 'column_left.php'); ?> 64 <!-- left_navigation_eof //--> 65 </table></td> 66 <!-- body_text //--> 67 <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> 68 <tr> 69 <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> 70 <tr> 71 <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> 72 <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> 73 <?php 74 if ($HTTP_GET_VARS['acID'] > 0) { 75 ?> 76 <td class="pageHeading" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_AFFILIATE_STATISTICS, tep_get_all_get_params(array('action'))) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td> 77 <?php 78 } else { 79 ?> 80 <td class="pageHeading" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_AFFILIATE_SUMMARY, '') . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td> 81 <?php 82 } 83 ?> 84 </tr> 85 </table></td> 86 </tr> 87 <tr> 88 <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="4"> 89 <tr class="dataTableHeadingRow"> 90 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_AFFILIATE; ?></td> 91 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE; ?></td> 92 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_ID; ?></td> 93 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_VALUE; ?></td> 94 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_PERCENTAGE; ?></td> 95 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_SALES; ?></td> 96 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td> 97 </tr> 98 <?php 99 if ($affiliate_sales_numrows > 0) { 100 $affiliate_sales_values = tep_db_query($affiliate_sales_raw); 101 $number_of_sales = '0'; 102 while ($affiliate_sales = tep_db_fetch_array($affiliate_sales_values)) { 103 $number_of_sales++; 104 if (($number_of_sales / 2) == floor($number_of_sales / 2)) { 105 echo ' <tr class="dataTableRowSelected">'; 106 } else { 107 echo ' <tr class="dataTableRow">'; 108 } 109 110 $link_to = '<a href="orders.php?action=edit&oID=' . $affiliate_sales['affiliate_orders_id'] . '">' . $affiliate_sales['affiliate_orders_id'] . '</a>'; 111 ?> 112 <td class="dataTableContent"><?php echo $affiliate_sales['affiliate_firstname'] . " ". $affiliate_sales['affiliate_lastname']; ?></td> 113 <td class="dataTableContent" align="center"><?php echo tep_date_short($affiliate_sales['affiliate_date']); ?></td> 114 <td class="dataTableContent" align="right"><?php echo $link_to; ?></td> 115 <td class="dataTableContent" align="right"> <?php echo $currencies->display_price($affiliate_sales['affiliate_value'], ''); ?></td> 116 <td class="dataTableContent" align="right"><?php echo $affiliate_sales['affiliate_percent'] . "%" ; ?></td> 117 <td class="dataTableContent" align="right"> <?php echo $currencies->display_price($affiliate_sales['affiliate_payment'], ''); ?></td> 118 <td class="dataTableContent" align="center"><?php if ($affiliate_sales['orders_status']) echo $affiliate_sales['orders_status']; else echo TEXT_DELETED_ORDER_BY_ADMIN; ?></td> 119 <?php 120 } 121 } else { 122 ?> 123 <tr class="dataTableRowSelected"> 124 <td colspan="7" class="smallText"><?php echo TEXT_NO_SALES; ?></td> 125 </tr> 126 <?php 127 } 128 if ($affiliate_sales_numrows > 0 && (PREV_NEXT_BAR_LOCATION == '2' || PREV_NEXT_BAR_LOCATION == '3')) { 129 ?> 130 <tr> 131 <td colspan="7"><table border="0" width="100%" cellspacing="0" cellpadding="2"> 132 <tr> 133 <td class="smallText" valign="top"><?php echo $affiliate_sales_split->display_count($affiliate_sales_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_SALES); ?></td> 134 <td class="smallText" align="right"><?php echo $affiliate_sales_split->display_links($affiliate_sales_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> 135 </tr> 136 </table></td> 137 </tr> 138 <?php 139 } 140 ?> 141 </table></td> 142 </tr> 143 </table></td> 144 <!-- body_text_eof //--> 145 </tr> 146 </table> 147 <!-- body_eof //--> 148 149 <!-- footer //--> 150 <?php require (DIR_WS_INCLUDES . 'footer.php'); ?> 151 <!-- footer_eof //--> 152 <br> 153 </body> 154 </html> 155 <?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 |