<?php
global $wp_query;
$user_id = get_current_user_id();
$panel_page = $wp_query->get('panel_page');
$sub_page = $wp_query->get('sub_page');
$sub_id = $wp_query->get('sub_id');
$vip_active = yascode_vip::is_active(); ?>
<?php get_header(); ?>
<section class="user-panel rt">
    <?php get_template_part('templates/panel/master/top-side'); ?>
    <?php if (empty($panel_page)) get_template_part('templates/panel/parts/dashboard');
    elseif ($panel_page == "edit-profile") get_template_part('templates/panel/parts/edit-profile');
    elseif ($panel_page == "change-password") get_template_part('templates/panel/parts/change-password');
    elseif ($panel_page == "watch-list") get_template_part('templates/panel/parts/watch-list');
    elseif ($panel_page == "plans") {
        if (($vip_active)) {
            if (!empty($sub_page) && $sub_page == 'checkout' && !empty($sub_id)) get_template_part('templates/panel/parts/subscription/checkout');
            else get_template_part('templates/panel/parts/subscription/plans');
        }
    } ?>
</section>
<?php get_footer(); ?>