01-19-2017, 04:49 AM
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??
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??