/[drupal]/contributions/modules/affiliates/affiliates.module
ViewVC logotype

Diff of /contributions/modules/affiliates/affiliates.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.4.5.2.15, Wed Apr 8 16:47:21 2009 UTC revision 1.1.4.5.2.16, Thu Apr 16 08:53:30 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: affiliates.module,v 1.1.4.5.2.14 2009/04/07 16:46:25 paulbooker Exp $  // $Id: affiliates.module,v 1.1.4.5.2.15 2009/04/08 16:47:21 paulbooker Exp $
3    
4  // Portions Copyright 2006 http://2bits.com  // Portions Copyright 2006 http://2bits.com
5  define ('AFFILIATE_BUTTONS_DIRECTORY_RELATIVE_FILES', '/affiliates');  define ('AFFILIATE_BUTTONS_DIRECTORY_RELATIVE_FILES', '/affiliates');
# Line 1017  function affiliates_click() { Line 1017  function affiliates_click() {
1017        user_id, cookie_id, ip, referer, ad_id, click_time)        user_id, cookie_id, ip, referer, ad_id, click_time)
1018        VALUES        VALUES
1019        (%d, '%s', '%s', '%s', %d, %d)",        (%d, '%s', '%s', '%s', %d, %d)",
1020        $uid, $cookie_value, $_SERVER['REMOTE_ADDR'], filter_xss($_SERVER['HTTP_REFERER']), $ad_id, time());        $uid, $cookie_value, ip_address(), filter_xss($_SERVER['HTTP_REFERER']), $ad_id, time());
1021    
1022      // Record it in the userpoints      // Record it in the userpoints
1023      if (module_exists('userpoints')) {      if (module_exists('userpoints')) {
# Line 1031  function affiliates_click() { Line 1031  function affiliates_click() {
1031        );        );
1032        userpoints_userpointsapi($params);        userpoints_userpointsapi($params);
1033      }      }
1034        if (module_exists('referral')) {
1035              referral_set_cookie($uid);
1036            }
1037    }    }
1038    
1039    $redirect = db_result(db_query("SELECT redirect FROM {affiliates_ads} WHERE ad_id = %d", $ad_id));    $redirect = db_result(db_query("SELECT redirect FROM {affiliates_ads} WHERE ad_id = %d", $ad_id));

Legend:
Removed from v.1.1.4.5.2.15  
changed lines
  Added in v.1.1.4.5.2.16

  ViewVC Help
Powered by ViewVC 1.1.2