<?php

/**
 * Created by PhpStorm.
 * User: Hani
 * Date: 8/11/2018
 * Time: 6:44 PM
 */

wp_register_style( 'woo2app_style', WOO2APP_CSS_URL.'woo2app_style.css'  );
wp_enqueue_style( 'woo2app_style'.WOO2APP_FILES_VER);
if(get_locale() == 'fa_IR'){
	wp_register_style('myfont', WOO2APP_CSS_URL . 'font.css');
	wp_enqueue_style( 'myfont'.WOO2APP_FILES_VER);
}

$current_url = admin_url().'admin.php?page=woo2app/discount/index.php';

if(isset($_GET["tab"]))	$tab = $_GET["tab"];

else $tab = 'rules';

?>

<div class="wrap">

    <h2 class="nav-tab-wrapper koodak">
        <a href="<?= $current_url . '&tab=roles' ?>"
           class="nav-tab <?php echo ('roles' == $tab) ? 'nav-tab-active' : ''; ?>"> <?php _e('Roles', 'woo2app'); ?> </a>
        <a href="<?= $current_url . '&tab=discount' ?>"
           class="nav-tab <?php echo ('discount' == $tab) ? 'nav-tab-active' : ''; ?>"> <?php _e('Discounts', 'woo2app'); ?> </a>
    </h2>

    <?php
    if($tab == 'discount'){
        require_once  "discount.php";
    }
    else{
        require_once 'roles.php';
    }
    ?>

</div>

