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
/
resources
/
..
/
admin
/
cron_monthly_income.php
/
/
<?php session_start(); include '../connection.php'; include '../function_lib.php'; $monthly_amount_scale = 175000; $datetime = date('Y-m-d H:i:s'); //if(isset($_SESSION['adminid']) && !empty($_SESSION['adminid'])) { $result = mysqli_query($connection, "select uid from user WHERE is_paid=1 ORDER BY uid"); while($row = mysqli_fetch_object($result)){ $uid = $row->uid; $amount_left = 0; $amount_right = 0; $childs_left = get_child_levels(get_child_ids_2($uid, 'L')); $childs_right = get_child_levels(get_child_ids_2($uid, 'R')); $amount_left = get_pv_amount($childs_left); $amount_right = get_pv_amount($childs_right); if($amount_left >= $monthly_amount_scale && $amount_right >= $monthly_amount_scale){ $amount= min($amount_left, $amount_right) *0.05; mysqli_query($connection, "INSERT INTO monthly_income (uid, amount, datetime) VALUES ('$uid', '$amount', '$datetime' )"); mysqli_query($connection, "update user set wallet = wallet + $amount where uid = '$uid'"); } } mysqli_query($connection, "update product_sale set monthly_status = 1 where monthly_status = 0"); //echo "Record generated = $count"; echo "<br/> Closing complete. Please close this browser."; //}else{ // redirect('./index.php'); //} function get_pv_amount($id_array){ $amount = 0; if(!empty ($id_array)) { $uid_in = implode(" , ", $id_array); $result = mysqli_query($connection, "select pv_amount from product_sale where uid in ( $uid_in ) and monthly_status = 0"); $rec_id_array = array(); while($row = mysqli_fetch_object($result)){ $amount = $amount + $row->pv_amount; // $rec_id_array[] = $row->rec_id; } } return $amount; } ?>
/home2/wtmwscom/public_html/resources/../admin/cron_monthly_income.php