Server IP : 144.76.124.212 / Your IP : 216.73.216.138 Web Server : LiteSpeed System : Linux l4cp.vnetindia.com 4.18.0-553.40.1.lve.el8.x86_64 #1 SMP Wed Feb 12 18:54:57 UTC 2025 x86_64 User : rakcha ( 1356) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home5/rakcha/public_html/user/ |
Upload File : |
<?php include("includes/database.php"); $select_query_12 = "select * from admin"; $run_12 = mysqli_query($con,$select_query_12); while ($row_12 = mysqli_fetch_array($run_12)) { $network_12 = $row_12['network']+1; } $select_query = "select * from member where member_category='2'"; $run = mysqli_query($con,$select_query); while ($row = mysqli_fetch_array($run)) { $member_no = $row['member_no']; $user_id = $row['user_id']; $rank = $row['rank']; $fb = $row['fb']; $cp = $row['cp']; $hp = $row['hp']; $lp = $row['lp']; $gp = $row['gp']; $up = $row['up']; $today_date = "2024-07-01"; $select_query_main = "select * from roi_tree where member_no='$member_no' ORDER BY tree_id ASC limit 1"; $run_main = mysqli_query($con,$select_query_main); while ($row_main = mysqli_fetch_array($run_main)) { $tree_id_main = $row_main['tree_id']; $group_number_main = $row_main['group_number']; $member_no_main = $row_main['member_no']; $user_id_main = $row_main['user_id']; $sponsor_no_main = $row_main['sponsor_no']; $relation_ship_no_main = $row_main['relation_ship_no']; $level_no_main = $row_main['level_no']; $x_position_main = $row_main['x_position']; $y_position_main = $row_main['y_position']; $roi_amount_main = $row_main['roi_amount']; $roi_status_main = $row_main['roi_status']; $percent = $row_main['percent']; $rank = $row_main['rank']; $network_amount = $row_main['network_amount']; } $last_month_from = date("Y-m-d", strtotime("first day of previous month")); $last_month_end = date("Y-m-d", strtotime("last day of previous month")); $select_query_total_x1 = "select SUM(product_amount) from product_tree where date >= '$last_month_from' AND date <= '$last_month_end' AND member_no='$member_no'"; $run_total_x1 = mysqli_query($con,$select_query_total_x1); while($row_total_x1 = mysqli_fetch_array($run_total_x1)){ $total_x1 = $row_total_x1['SUM(product_amount)']; } $select_query_total_x1a = "select SUM(roi_amount) from roi_tree where date >= '$last_month_from' AND date <= '$last_month_end' AND member_no='$member_no'"; $run_total_x1a = mysqli_query($con,$select_query_total_x1a); while($row_total_x1a = mysqli_fetch_array($run_total_x1a)){ $total_x1a_1 = $row_total_x1a['SUM(roi_amount)']; } $total_last_month_sales = $total_x1+$total_x1a_1; if ($rank > 0 || $gp > 0) { mysqli_query($con,"insert into point_member(member_no, date, rank, fb, cp, hp, lp, gp, up) values('$member_no', '$today_date', '$rank', '$fb', '$cp', '$hp', '$lp', '$gp', '$up')"); } mysqli_query($con,"insert into percent_member(member_no, date, percent, relation_ship_no, x_position, y_position, rank, network_amount, admin) values('$member_no', '$today_date', '$percent', '$relation_ship_no_main', '$x_position_main', '$y_position_main', '$rank', '$total_last_month_sales', '$network_12')"); mysqli_query($con,"update member set rank='0', fb='0', cp='0', hp='0', lp='0', gp='0', up='1' where member_no='$member_no'"); mysqli_query($con,"update roi_tree set rank='0', network_amount='0', network='0' where member_no='$member_no'"); mysqli_query($con,"update commitee set point='1', status='0' where member_no='$member_no'"); mysqli_query($con,"update roi_tree set active_base='0' where member_no='$member_no'"); mysqli_query($con,"update net_trees set month='0' where member_no='$member_no'"); ?> <?php } mysqli_query($con,"update admin set network='$network_12' where admin_id='1'"); mysqli_query($con,"update net_trees set status='0' where status='1'"); mysqli_query($con,"update net_trees set month='0' where member_no='$member_no'"); ?>