uawdijnntqw1x1x1
IP : 216.73.216.26
Hostname : server.wtmmart.in
Kernel : Linux server.wtmmart.in 4.18.0-553.45.1.el8_10.x86_64 #1 SMP Wed Mar 19 09:44:46 EDT 2025 x86_64
Disable Function : exec,passthru,shell_exec,system
OS : Linux
PATH:
/
home2
/
wtmwscom
/
public_html
/
admin
/
cronjob
/
cron_binary_type_update.php
/
/
<?php include '../../connection.php'; include '../../function_lib.php'; //$date = "2018-06-06"; //$datetime = $date." 23:59:59"; $datetime = date('Y-m-d H:i:s'); $date = date('Y-m-d'); $sql = "select uid, refer_id, is_paid, plan_type, binary_type from user WHERE DATE(reg_date) <= '$date' AND is_paid=1 ORDER BY recid ASC "; $result = mysqli_query($connection, $sql); while($row = mysqli_fetch_object($result)){ $uid = $row->uid; $refer_id = $row->refer_id; $is_paid = $row->is_paid; // $plan_type = $row->plan_type; $binary_type = $row->binary_type; $refer_id_array = array(); $result_refer_id = mysqli_query($connection, "SELECT uid FROM user WHERE refer_id = '$uid' AND is_paid=1 AND DATE(reg_date) <= '$date' "); while ($row_refer_id = mysqli_fetch_object($result_refer_id)) { $refer_id_array[] = $row_refer_id->uid; } // $amount_left = 0; // $amount_right = 0; $childs_left = get_paid_refer_child_ids_by_reg_date_by_position($uid, "L", $date, $refer_id_array); $childs_right = get_paid_refer_child_ids_by_reg_date_by_position($uid, "R", $date, $refer_id_array); // $amount_left = get_pv_amount_refer_id($childs_left, $date); // $amount_right = get_pv_amount_refer_id($childs_right, $date); if(count($childs_left) >= 1 && count($childs_right) >=1 ){ mysqli_query($connection, "update user set binary_type = 1, type_update_datetime = '$datetime' where uid = '$uid'"); } } //$result = mysqli_query($connection, "SELECT uid, type, plan_type, is_paid FROM user WHERE DATE(reg_date) <= '$date' AND is_paid=1 AND type < 4 ORDER BY recid ASC "); //while ($user = mysqli_fetch_object($result)) { // $uid = $user->uid; //$type = update_user_booster_type($uid, $user->plan_type, $user->type, $user->is_paid); // 2 direct referral //$special_sponser_counter=0; //$left_id_counter = 0; //$right_id_counter = 0; //$sponser_result = mysqli_query($connection, "SELECT uid, plan_type, position FROM user WHERE refer_id = '$uid' AND is_paid=1 "); /*while ($sponser_row = mysqli_fetch_object($sponser_result)) { if ($sponser_row->plan_type >= $user->plan_type) { //$special_sponser_counter++; if ($sponser_row->position == "L" ) { $left_id_counter++; } else if ($sponser_row->position == "R") { $right_id_counter++; } } }*/ // $count_refer_id = mysqli_fetch_object(mysqli_query($connection, "SELECT COUNT(uid) as count FROM user WHERE refer_id = '$uid' AND is_paid=1 AND DATE(reg_date) <= '$date' "))->count; // if ($user->type <= 0 && $count_refer_id >= 2 && $count_refer_id < 4 ) { // mysqli_query($connection, "UPDATE user SET type = '1', type_update_datetime='" . $datetime . "' WHERE uid = '$uid' "); // //echo " uid: $uid , "; // } else if($user->type <= 1 && $count_refer_id >= 4 && $count_refer_id < 6 ) { // mysqli_query($connection, "UPDATE user SET type = '2', type_update_datetime='" . $datetime . "' WHERE uid = '$uid' "); // } else if($user->type <= 2 && $count_refer_id >= 6 && $count_refer_id < 8 ) { // mysqli_query($connection, "UPDATE user SET type = '3', type_update_datetime='" . $datetime . "' WHERE uid = '$uid' "); // } else if($user->type <= 3 && $count_refer_id >= 8 ) { // mysqli_query($connection, "UPDATE user SET type = '4', type_update_datetime='" . $datetime . "' WHERE uid = '$uid' "); // } // } ?>
/home2/wtmwscom/public_html/admin/cronjob/cron_binary_type_update.php