"") { $_SESSION["isLoggedIn"] = true; } else { $_SESSION["isLoggedIn"] = false; header("location: login.php"); } if($_SESSION["user_type"]!="admin"){ header("location: login.php?alert=Only admins allowed here!"); } $vendor = getVendorbyId($_SESSION["vendorId"]); $array = json_decode($vendor,true); $selectedBankAccount = null; foreach ($array['bank_acount_details'] as $bankAccount) { if ($bankAccount['bank_payout']) { $selectedBankAccount = $bankAccount; break; } } if ($selectedBankAccount === null && !empty($array['bank_acount_details'])) { $selectedBankAccount = $array['bank_acount_details'][0]; } $selectedBankAccountJSON = json_encode($selectedBankAccount); $shopOrders = getOrderbyVendorId($_SESSION["vendorId"]); $vendorOrderss = json_decode($shopOrders); if (is_array($vendorOrderss)) { $vendorOrders = json_decode($shopOrders); } elseif (is_object($vendorOrderss) && property_exists($vendorOrderss, 'message')) { $vendorOrders = []; } else { echo "Unknown type or no 'message' property found."; } $allPayouts = getAllPayout($_SESSION["token"]); $vendorPayouts = json_decode($allPayouts,true); $filteredPayouts = []; foreach ($vendorPayouts as $payout) { if ($payout['vendor_details'][0]['vendor_id'] == $_SESSION["vendorId"]) { $filteredPayouts[] = $payout; } } if (isset($_SESSION["token"])) { $token = $_SESSION["token"]; $token_parts = explode(".", $token); $token_payload = base64_decode($token_parts[1]); $token_data = json_decode($token_payload); $issued_at_time = $token_data->iat; $expiration_time = $token_data->exp; $renewal_time = $issued_at_time + 3300; if (time() >= $renewal_time || time() >= $expiration_time) { header("Location: token-renew.php"); exit; } } // $token = loginRenew($_SESSION["email"], $_SESSION["password"], $token); // $_SESSION["token"] = $token; ?> oBanana B2B - Admin Dashboard
" alt="user image" class="img-fluid rounded-circle" alt="Avatar Image" style="width: 100px; height: 100px; object-fit: cover; border-radius: 50%;">
1703

Friends

3005

Followers

1150

Following


Contact Information
"; //echo date('Y-m-d H:i:s', $expiration_time) . "
"; //echo date('Y-m-d H:i:s', $renewal_time) . "
"; //echo date('Y-m-d H:i:s', time()) . "
"; ?>

Email address

Phone Number

+00 1234 5678 91

Birthday

Dec 10, 1991

Social Profile

Payments

Method Amount Status Payout Description Date
>

Payouts

Amount Bank Account Name Date Status

5300

New Users

1953

Order Placed

1450

Total Sales

Recent Orders

Order_ID Product_Name Units Order_Date Order_Cost Status
24541 Coach Swagger 1 Unit Oct 20, 2018 $230 Completed
24541 Toddler Shoes, Gucci Watch 2 Units Nov 15, 2018 $550 Delayed
24541 Hat Black Suits 1 Unit Nov 18, 2018 $325 On Hold
24541 Backpack Gents, Swimming Cap Slin 5 Units Dec 13, 2018 $200 Completed
24541 Speed 500 Ignite 1 Unit Dec 23, 2018 $150 Cancelled
Bank Name
Account Number
Account Name