<?php

/**
 * button Form  login shop
 *
 */
?>

<li class="li-user-lo"><?php
                        $current_user = wp_get_current_user();
                        if (0 == $current_user->ID) {
                        ?>
        <a class="user-login-but btn-login" onclick="document.getElementById('id01').style.display='block'" href="<?php echo get_permalink(get_option('woocommerce_myaccount_page_id')); ?>" title="<?php _e('Login / Register', 'liosa'); ?>"><i class="fal fa-user"></i><?php _e('Login / Register', 'liosa'); ?></a><?php
                                                                                                                                                                                                                                                                                                                    } else { ?>
        <div class="navbar-lo">
            <ul class="navbar-nav">
                <li class="dropdown dropdown-nav-li seen-64-mobile">
                    <a class="user-login-but btn-login" href="<?php echo get_permalink(get_option('woocommerce_myaccount_page_id')); ?>" title="<?php echo $current_user->user_login . "\n"; ?>">
                        <?php global $userdata;
                                                                                                                                                                                                                                                                                                                        echo get_avatar($userdata->ID, 60); ?>
                        <span class="caret"><?php echo $current_user->user_login . "\n"; ?></span>
                    </a>
                    <ul class="dropdown-menu">
                        <?php if (function_exists('dokan')) { ?>
                            <li>
                                <?php echo dokan_dashboard_btn(); ?>
                            </li>
                        <?php } ?>
                        <li>
                            <a href="<?php echo get_permalink(get_option('woocommerce_myaccount_page_id')); ?>"><?php _e('User Panel', 'liosa'); ?></a>
                        </li>
                        <li>
                            <a href="<?php echo wc_get_account_endpoint_url('orders'); ?>"><?php _e('My orders', 'liosa'); ?></a>
                        </li>
                        <li>
                            <a href="<?php echo wc_get_account_endpoint_url('edit-account'); ?>"><?php _e('Settings', 'liosa'); ?></a>
                        </li>
                        <li>
                            <a href="<?php echo wc_get_account_endpoint_url('customer-logout'); ?>"><?php _e('Exit', 'liosa'); ?></a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    <?php
                                                                                                                                                                                                                                                                                                                    }
