diff --git a/admin/index.php b/admin/index.php index 1da4c50..9944da9 100644 --- a/admin/index.php +++ b/admin/index.php @@ -14,8 +14,15 @@ if($_SESSION["user_type"]!="admin"){ header("location: login.php?alert=Only admins allowed here!"); } -$all_orders = getAllOrder(); date_default_timezone_set('Asia/Manila'); +$currentDate = date('m-d-Y'); + +$all_orders = getAllOrder(); +$all_customers = getAllCustomers(); +$all_vendors = getAllVendors(); + +$allSignups = array_merge($all_customers, $all_vendors); + ?> @@ -107,7 +114,7 @@ date_default_timezone_set('Asia/Manila');
Daily Signups
+ + + +Today's Signups
Daily Visitors
- + + + +Total Users
+Today's Order
+Today's Orders
-
-
Selena - Wagner- - @selena.oi + + |
- 2 Orders | -$150 | -|
-
-
-
-
-
-
- Walter - Reuter- - @walter.me - |
- 5 Orders | -$200 | -|
-
-
-
-
-
-
- Larissa - Gebhardt- - @larissa.gb - |
- 1 Order | -$50 | -|
-
-
-
-
-
-
- Albrecht - Straub- - @albrech.as - |
- 2 Orders | -$100 | -|
-
-
-
-
-
-
- Leopold - Ebert- - @leopold.et - |
- 1 Order | -$60 | -|
-
-
-
-
-
-
- Larissa - Gebhardt- - @larissa.gb - |
- 1 Order | -$50 | +|
No new customers in the past week | +
58Sales
-Statement belting with double-turnlock hardware - adds “swagger” to a simple.
-
- $520
- $580
-
20Sales
-Statement belting with double-turnlock hardware - adds “swagger” to a simple.
-
- $250
- $300
-
10Sales
-Statement belting with double-turnlock hardware - adds “swagger” to a simple.
-
- $480
- $654
-
+
+
+
+
+
+
+
+ ||
+
+
+ |
+ + |
No new vendors in the past week | +
Copyright © Ekka Admin Dashboard. All Rights Reserved. -
+Date | +Updated Date | +Order Date | Customer | Vendor | Product | @@ -102,6 +103,7 @@ $allorders = json_encode($orders, true); ?>
---|---|---|---|---|---|
+ | diff --git a/functions.php b/functions.php index d8bd171..9ff8b31 100644 --- a/functions.php +++ b/functions.php @@ -2010,3 +2010,48 @@ function updatePayout($token, $payoutId) return $response; } +function getAllCustomers () +{ + $curl = curl_init(); + curl_setopt_array($curl, array( + CURLOPT_URL => "https://" . $_SESSION["data_endpoint"] . "/api/v1/customers", + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'GET', + CURLOPT_HTTPHEADER => array( + 'X-Api-Key: {{apiKey}}' + ), + )); + $response = curl_exec($curl); + curl_close($curl); + $json = json_decode($response, true); + + return $json; +} + +function getAllVendors () +{ + $curl = curl_init(); + curl_setopt_array($curl, array( + CURLOPT_URL => "https://" . $_SESSION["data_endpoint"] . "/api/v1/vendors", + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'GET', + CURLOPT_HTTPHEADER => array( + 'X-Api-Key: {{apiKey}}' + ), + )); + $response = curl_exec($curl); + curl_close($curl); + $json = json_decode($response, true); + + return $json; +} \ No newline at end of file diff --git a/register.php b/register.php index e09d9cb..3acd4e0 100644 --- a/register.php +++ b/register.php @@ -112,9 +112,6 @@ $_SESSION["isVendor"] = false; |