scriptz-team

DEiONCUBE

Dec 28th, 2011
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.54 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. *    
  5. *      _____ _____ _ _____ _____         _____ _____ _____ _____
  6. *  ___|     | __  |_|  _  |_   _|___ ___|_   _|   __|  _  |     |
  7. * |_ -|   --|    -| |   __| | | |- _|___| | | |   __|     | | | |
  8. * |___|_____|__|__|_|__|    |_| |___|     |_| |_____|__|__|_|_|_|
  9. * |s C R i P T z - T E A M . i N F O|
  10. *
  11. * This file was created by sCRiPTz-TEAM.iNFO [DEiONCUBE TEAM]
  12. * @ IonCube & Zend & NuSphere DeCoder
  13. *
  14. * @    Version             :    1.0.0.3
  15. * @    Author              :    sCRiPTz-TEAM.iNFO
  16. * @    Released            :    26-December-2011
  17. * @    Official site       :    http://sCRiPTz-TEAM.iNFO
  18. *
  19. */
  20.  
  21. function affiliateActivate( $userid )
  22. {
  23.     global $CONFIG;
  24.     $result = select_query( "tblclients", "currency", array(
  25.         "id" => $userid
  26.     ) );
  27.     $data = mysql_fetch_array( $result );
  28.     $clientcurrency = $data['currency'];
  29.     $bonusdeposit = convertCurrency( $CONFIG['AffiliateBonusDeposit'], 1, $clientcurrency );
  30.     $result = select_query( "tblaffiliates", "id", array(
  31.         "clientid" => $userid
  32.     ) );
  33.     $data = mysql_fetch_array( $result );
  34.     $affiliateid = $data['id'];
  35.     if ( !$affiliateid )
  36.     {
  37.         insert_query( "tblaffiliates", array(
  38.             "date" => "now()",
  39.             "clientid" => $userid,
  40.             "balance" => $bonusdeposit
  41.         ) );
  42.     }
  43.     logActivity( "Activated Affiliate Account - User ID: {$userid}", $userid );
  44.     run_hook( "AffiliateActivation", array(
  45.         "affid" => $affiliateid,
  46.         "userid" => $userid
  47.     ) );
  48. }
  49.  
  50. ?>
Advertisement
Add Comment
Please, Sign In to add comment