[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/admin/ -> affiliate_clicks.php (source)

   1  <?php
   2  /*

   3  $Id: affiliate_clicks.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    if ($HTTP_GET_VARS['acID'] > 0) {
  20      $affiliate_clickthroughs_raw = "select ac.*, pd.products_name, a.affiliate_firstname, a.affiliate_lastname from " . TABLE_AFFILIATE_CLICKTHROUGHS . " ac left join " . TABLE_PRODUCTS . " p on (p.products_id = ac.affiliate_products_id) left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on (pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "') left join " . TABLE_AFFILIATE . " a  on (a.affiliate_id = ac.affiliate_id) where a.affiliate_id = '" . $HTTP_GET_VARS['acID'] . "' ORDER BY ac.affiliate_clientdate desc";
  21  //    "select * from " . TABLE_AFFILIATE_CLICKTHROUGHS . " where affiliate_id ='" . $HTTP_GET_VARS['acID'] . "' order by date desc";

  22      $affiliate_clickthroughs_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $affiliate_clickthroughs_raw, $affiliate_clickthroughs_numrows);
  23    } else {
  24      $affiliate_clickthroughs_raw = "select ac.*, pd.products_name, a.affiliate_firstname, a.affiliate_lastname from " . TABLE_AFFILIATE_CLICKTHROUGHS . " ac left join " . TABLE_PRODUCTS . " p on (p.products_id = ac.affiliate_products_id) left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on (pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "') left join " . TABLE_AFFILIATE . " a  on (a.affiliate_id = ac.affiliate_id) ORDER BY ac.affiliate_clientdate desc";
  25      $affiliate_clickthroughs_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $affiliate_clickthroughs_raw, $affiliate_clickthroughs_numrows);
  26    }
  27  ?>
  28  <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  29  <html <?php echo HTML_PARAMS; ?>>
  30  <head>
  31  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  32  <title><?php echo TITLE; ?></title>
  33  <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
  34  </head>
  35  <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
  36  <!-- header //-->
  37  <?php require (DIR_WS_INCLUDES . 'header.php'); ?>
  38  <!-- header_eof //-->
  39  
  40  <!-- body //-->
  41  <table border="0" width="100%" cellspacing="2" cellpadding="2">
  42    <tr>
  43      <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
  44  <!-- left_navigation //-->
  45  <?php require (DIR_WS_INCLUDES . 'column_left.php'); ?>
  46  <!-- left_navigation_eof //-->
  47      </table></td>
  48  <!-- body_text //-->
  49      <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  50        <tr>
  51          <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  52            <tr>
  53              <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
  54              <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
  55  <?php 
  56    if ($HTTP_GET_VARS['acID'] > 0) {
  57  ?>
  58              <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>
  59  <?php
  60    } else {
  61  ?>
  62              <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>
  63  <?php
  64    }
  65  ?>
  66            </tr>
  67          </table></td>
  68        </tr>
  69        <tr>
  70          <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  71            <tr>
  72              <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  73                <tr class="dataTableHeadingRow">
  74                  <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_AFFILIATE_USERNAME .'/<br>' . TABLE_HEADING_IPADDRESS; ?></td>
  75                  <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_ENTRY_DATE .'/<br>' . TABLE_HEADING_REFERRAL_URL; ?></td>
  76                  <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CLICKED_PRODUCT; ?></td>
  77                  <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_BROWSER; ?></td>
  78                </tr>
  79  <?php
  80    if ($affiliate_clickthroughs_numrows > 0) {
  81      $affiliate_clickthroughs_values = tep_db_query($affiliate_clickthroughs_raw);
  82      $number_of_clickthroughs = '0';
  83      while ($affiliate_clickthroughs = tep_db_fetch_array($affiliate_clickthroughs_values)) {
  84        $number_of_clickthroughs++;
  85  
  86        if ( ($number_of_clickthroughs / 2) == floor($number_of_clickthroughs / 2) ) {
  87          echo '                  <tr class="productListing-even">';
  88        } else {
  89          echo '                  <tr class="productListing-odd">';
  90        }
  91  ?>
  92                  <td class="dataTableContent"><?php echo $affiliate_clickthroughs['affiliate_firstname'] . " " . $affiliate_clickthroughs['affiliate_lastname']; ?></td>
  93                  <td class="dataTableContent" align="center"><?php echo tep_date_short($affiliate_clickthroughs['affiliate_clientdate']); ?></td>
  94  <?php
  95        if ($affiliate_clickthroughs['affiliate_products_id'] > 0) $link_to = '<a href="' . tep_catalog_href_link(FILENAME_CATALOG_PRODUCT_INFO, 'products_id=' . $affiliate_clickthroughs['affiliate_products_id']) . '" target="_blank">' . $affiliate_clickthroughs['products_name'] . '</a>';
  96        else $link_to = "Startpage";
  97  ?>
  98                  <td class="dataTableContent"><?php echo $link_to; ?></td>
  99                  <td class="dataTableContent" align="center"><?php echo $affiliate_clickthroughs['affiliate_clientbrowser']; ?></td>
 100                </tr>
 101                <tr>
 102                  <td class="dataTableContent"><?php echo $affiliate_clickthroughs['affiliate_clientip']; ?></td>
 103                  <td class="dataTableContent" colspan="3"><?php  echo $affiliate_clickthroughs['affiliate_clientreferer']; ?></td>
 104                </tr>
 105                <tr>
 106                  <td class="dataTableContent" colspan="4"><?php echo tep_draw_separator('pixel_black.gif', '100%', '1'); ?></td>
 107                </tr>
 108  <?php
 109      }
 110    } else {
 111  ?>
 112                <tr class="productListing-odd">
 113                  <td colspan="7" class="smallText"><?php echo TEXT_NO_CLICKS; ?></td>
 114                </tr>
 115  <?php
 116    }
 117  ?>
 118                <tr>
 119                  <td class="smallText" colspan="7"><table border="0" width="100%" cellspacing="0" cellpadding="2">
 120                    <tr>
 121                      <td class="smallText" valign="top"><?php echo $affiliate_clickthroughs_split->display_count($affiliate_clickthroughs_numrows,  MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_CLICKS); ?></td>
 122                      <td class="smallText" align="right"><?php echo $affiliate_clickthroughs_split->display_links($affiliate_clickthroughs_numrows,  MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page', 'oID', 'action'))); ?></td>
 123                    </tr>
 124                  </table></td>
 125                </tr>
 126              </table></td>
 127            </tr>
 128          </table></td>
 129        </tr>
 130      </table></td>
 131  <!-- body_text_eof //-->
 132    </tr>
 133  </table>
 134  <!-- body_eof //-->
 135  
 136  <!-- footer //-->
 137  <?php require (DIR_WS_INCLUDES . 'footer.php'); ?>
 138  <!-- footer_eof //-->
 139  <br>
 140  </body>
 141  </html>
 142  <?php require (DIR_WS_INCLUDES . 'application_bottom.php');?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7