MN Forum

Full Version: VIP and Free referral comission
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want pay to Members VIP x2.
In config.php

if($data['ref'] > 0 && $data['ref_paid'] != 1){
$ref_valid = $db->QueryFetchArray("SELECT SUM(`total_clicks`) AS `clicks` FROM `user_clicks` WHERE `uid`='".$data['id']."' LIMIT 1");
if($ref_valid['clicks'] >= $site['aff_click_req']){
if($data['premium'] > 0){
$comision = $site['ref_coins'] * "2";}
else{
$comision = $site['ref_coins'];
}


$db->Query("UPDATE `users` SET `coins`=`coins`+'".$comision."' WHERE `id`='".$data['ref']."'");
$db->Query("UPDATE `users` SET `ref_paid`='1' WHERE `id`='".$data['id']."'");

if($site['paysys'] == 1 && $site['ref_cash'] > 0){
affiliate_commission($data['ref'], $data['id'], $site['ref_cash'], 'referral_activity');
}
}


This is ok??
Do you find aswer for this ?