X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=ref.php;h=6fd272a009afc08193a1ee0f3e968911b1235d38;hb=66cd6ddfae3a06371b60267945c8903e2b2746cc;hp=905abf7122db965a1c657283365f881151d8f2b3;hpb=831c60d4cec333ea95e0ce23d9e53fd5d8133ce6;p=mailer.git diff --git a/ref.php b/ref.php index 905abf7122..6fd272a009 100644 --- a/ref.php +++ b/ref.php @@ -1,18 +1,24 @@ 0) { + // Update ref counter + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_clicks`=`ref_clicks`+1 WHERE `userid`=%s LIMIT 1", + array(determineReferalId()), __FILE__, __LINE__); - // We have an refid here. So we simply add it - $URL .= bigintval($ref); + // Base URL for redirection + switch (getConfig('refid_target')) { + case 'register': + $URL = 'modules.php?module=index&what=register'; + break; - // Is the refid valid? - if ($ref > 0) { - // Update ref counter - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET ref_clicks=ref_clicks+1 WHERE userid=%s LIMIT 1", - array(bigintval($ref)), __FILE__, __LINE__); - } // END - if - } else { - // No refid and we add our refid (don't forget to set $def_refid!) - $URL = URL."/index.php"; - } + case 'index': + $URL = 'modules.php?module=index'; + break; + } // END - switch + } // END - if +} // END - if - // Load the URL - LOAD_URL($URL); -} else { - // You have to configure first! - LOAD_URL("install.php"); -} +// Load the URL +redirectToUrl($URL); -// Really all done here... ;-) +// [EOF] ?>