<?php
require_once('../redd/lib/table-traits.php');
require_once('../redd/lib/basic-function.php');
require_once('../' . $basicFunctn->admin_url . '/lib/mailing/emails.php');
require_once('../' . $basicFunctn->admin_url . '/lib/user-functions.php');




$category = $basicFunctn->selectAllDlt($basicFunctn->category_tb);
?>
<!-- width: 249px -->
<div class="sidebar-wrapper sidebar-theme">

    <nav id="sidebar">

        <ul class="list-unstyled menu-categories text-capitalize" id="accordionExample">
            <li class="menu">
                <a href="overview" aria-expanded="<?php print aria_expanded($current_pg, 1); ?>" class="dropdown-toggle <?php print dropdown_toggle($current_pg, 1); ?>">
                    <div class="flex">
                        <!-- <div class="bx-icon">
                            <i class="bx bx-home"></i>
                        </div> -->
                        <div class="pt-7">Overview</div>
                    </div>
                </a>
            </li>
            <!-- <li class="menu">
                <a href="profile" aria-expanded="<?php // print aria_expanded($current_pg, 3); 
                                                    ?>" class="dropdown-toggle <?php // print dropdown_toggle($current_pg, 2); 
                                                                                ?>">
                    <div class="">

                        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user">
                            <path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
                            <circle cx="12" cy="7" r="4"></circle>
                        </svg>
                        <span>Profile</span>
                    </div>
                </a>
            </li> -->
            <li class="menu">
                <a href="deposit" aria-expanded="<?php print aria_expanded($current_pg, 8); ?>" class="dropdown-toggle <?php print dropdown_toggle($current_pg, 8); ?>">

                    <div class="flex">
                        <!-- <div class="bx-icon">
                            <i class="bx bx-wallet"></i>
                        </div> -->
                        <div class="pt-7">wallet</div>
                    </div>
                </a>
            </li>
            <li class="menu">
                <a href="orders" aria-expanded="<?php print aria_expanded($current_pg, 9); ?>" class="dropdown-toggle <?php print dropdown_toggle($current_pg, 9); ?>">

                    <div class="flex">
                        <!-- <div class="bx-icon">
                            <i class="bx bx-cart-alt"></i>
                        </div> -->
                        <div class="pt-7">my purchases</div>
                    </div>
                </a>
            </li>
            <!-- <li class="menu">
                        <a href="#invest"  data-active="" data-toggle="collapse"  aria-expanded="<?php // print aria_expanded($current_pg,4); 
                                                                                                    ?>" class="dropdown-toggle <?php // print dropdown_toggle($current_pg,4); 
                                                                                                                                ?>">
                            <div class="">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-activity"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg>
                                <span>Invest</span>
                            </div>
                            <div>
                                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><polyline points="9 18 15 12 9 6"></polyline></svg>
                            </div>
                        </a>
                        <ul class="submenu list-unstyled <?php // print collapse_show($current_pg,4); 
                                                            ?>" id="invest" data-parent="#accordionExample">
                            <li>
                                <a href="deposit"> Make Deposit </a>
                            </li>
                            <li>
                                <a href="investments"> Investment </a>
                            </li>
                        </ul>
                    </li> -->
            <!-- <li class="menu">
                        <a href="#withdraw"  data-active="" data-toggle="collapse"  aria-expanded="<?php // print aria_expanded($current_pg,5); 
                                                                                                    ?>" class="dropdown-toggle <?php // print dropdown_toggle($current_pg,5); 
                                                                                                                                ?>">
                            <div class="">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-download"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
                                <span>Withdraw</span>
                            </div>
                            <div>
                                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><polyline points="9 18 15 12 9 6"></polyline></svg>
                            </div>
                        </a>
                        <ul class="submenu list-unstyled <?php // print collapse_show($current_pg,5); 
                                                            ?>" id="withdraw" data-parent="#accordionExample">
                            <li>
                                <a href="withdraw-interest"> Interest </a>
                            </li>
                            <li>
                                <a href="withdraw-bonus"> Bonus </a>
                            </li>
                            <li>
                                <a href="all-withdrawal"> All Withdrawals </a>
                            </li>
                        </ul>
                    </li> -->
            <?php foreach ($category as $e) { ?>
                <li class="menu">
                    <a href="#<?php print $e['unique_id']; ?>" data-active="" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle collapsed">
                        <div class="">

                            <span class="text-capitalize"><?php print $e['name']; ?></span>
                        </div>
                        <div>
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right">
                                <polyline points="9 18 15 12 9 6"></polyline>
                            </svg>
                        </div>
                    </a>
                    <ul class="submenu list-unstyled collapse" id="<?php print $e['unique_id']; ?>" data-parent="#accordionExample">
                        <?php
                        $subcategory = $basicFunctn->selectWhereDlt($basicFunctn->subcategory_tb, 'category_id', $e['unique_id']);
                        foreach ($subcategory as $key) { ?>
                            <li>
                                <a href="product?subcategory=<?php print $key['unique_id'] ?>"> <?php print $key['name'] ?> </a>
                            </li>
                        <?php } ?>

                    </ul>
                </li>
            <?php } ?>
            <!-- <li class="menu">
                        <a href="kyc-validation" aria-expanded="<?php print aria_expanded($current_pg, 9); ?>" class="dropdown-toggle <?php print dropdown_toggle($current_pg, 9); ?>">
                            <div class="">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-thumbs-up"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>
                                <span>KYC</span>
                            </div>
                        </a>
                    </li> -->
            <!-- <li class="menu">
                        <a href="testimonial" aria-expanded="<?php //print aria_expanded($current_pg,10); 
                                                                ?>" class="dropdown-toggle <?php //print dropdown_toggle($current_pg,10); 
                                                                                            ?>">
                            <div class="">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-thumbs-up"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>
                                <span>Testimonial</span>
                            </div>
                        </a>
                    </li> -->
            <!-- <li class="menu">
                <a href="support" aria-expanded="<?php // print aria_expanded($current_pg, 7); ?>" class="dropdown-toggle <?php // print dropdown_toggle($current_pg, 7); ?>">

                    <div class="flex">
                        <div class="bx-icon">
                            <i class="bx bx-support"></i>
                        </div>
                        <div class="pt-7">support</div>
                    </div>
                </a>
            </li> -->
            <li class="menu">
                <a href="logout" aria-expanded="<?php //print aria_expanded($current_pg,3); 
                                                ?>" class="dropdown-toggle <?php //print dropdown_toggle($current_pg,2); 
                                                                            ?>">

                    <div class="flex">
                        <!-- <div class="bx-icon">
                            <i class="bx bx-log-in"></i>
                        </div> -->
                        <div class="pt-7">sign out</div>
                    </div>
                </a>
            </li>

        </ul>

    </nav>

</div>