<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

	<title><?php echo $title;?></title>
	<meta name="description" content="<?php echo $description;?>" />
	<meta name="keywords" content="<?php echo $keywords;?>" />
	<meta name="author" content="<?php echo WBS_COMPANY;?>">

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

    <link href="<?php echo HTTP_SERVER_WEBSITE ?>templates/<?php echo WEBSITE_TEMPLATE;?>/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <link href="<?php echo HTTP_SERVER_WEBSITE ?>templates/<?php echo WEBSITE_TEMPLATE;?>/assets/plugins/colorpicker/css/colorpicker.css" rel="stylesheet">

    <link href="<?php echo HTTP_SERVER_WEBSITE ?>templates/<?php echo WEBSITE_TEMPLATE;?>/assets/plugins/fancybox/jquery.fancybox.css" rel="stylesheet">

    <link href="<?php echo HTTP_SERVER_WEBSITE ?>templates/<?php echo WEBSITE_TEMPLATE;?>/assets/css/custom.css" rel="stylesheet">

<?php if ( CHARTS_TYPE == 'HIGHCHARTS' ) { ?>
    <script src="<?php echo HTTP_SERVER_WEBSITE ?>templates/<?php echo WEBSITE_TEMPLATE;?>/assets/plugins/highcharts/js/highcharts.js"></script>
<?php } ?>

	<?php echo $customCode;?>

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="<?php echo HTTP_SERVER_WEBSITE ?>templates/<?php echo WEBSITE_TEMPLATE;?>/assets/js/pagination.js"></script>
  </head>

  <body>
<div id="header">
	<div class="container">


    <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
      <div class="container">

        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="<?php echo HTTP_SERVER_WEBSITE ?>"><?php echo PROJECT_NAME;?></a>
        </div>

        <div class="navbar-collapse collapse">


<?php if ( !empty ( $_SESSION[USER_SESSION] ) ) { ?>



<ul class="nav navbar-nav">
<li class="dropdown">

<?php if ( $advertiser_menu != 'on' && $publisher_menu != 'on' ) { ?>

	<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-transfer"></span> <?php echo $LANG["WBS_SWITCH_SELECT_ACCOUNT"];?> <span class="caret"></span></a>

<?php } else { ?>

	<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-transfer"></span> <?php echo $LANG["WBS_SWITCH_ACCOUNT"];?> <span class="caret"></span></a>

<?php } ?>

	<ul class="dropdown-menu" role="menu">

<?php if ( ADVERTISER == 'ON' ) { ?>
		<li><a href="<?php echo HTTP_SERVER_WEBSITE ?>dashboard/advertiser"><?php echo $LANG["WBS_SWITCH_ADVERTISER"];?></a></li>
<?php } ?>

<?php if ( PUBLISHER == 'ON' ) { ?>
		<li><a href="<?php echo HTTP_SERVER_WEBSITE ?>dashboard/publisher"><?php echo $LANG["WBS_SWITCH_PUBLISHER"];?></a></li>
<?php } ?>

	</ul>
</li>
</ul>




<?php if ( ADVERTISER == 'ON' ) { ?>
	<?php if ( $advertiser_menu == 'on' ) { ?>

		  <ul class="nav navbar-nav">
			<li><a href="<?php echo HTTP_SERVER_WEBSITE ?>dashboard/advertiser"><?php echo $LANG["WBS_DM_ADVERTISER_STATS"];?></a></li>

			<li class="dropdown">
			  <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo $LANG["WBS_DM_ADVERTISER_ADS"];?> <span class="caret"></span></a>
			  <ul class="dropdown-menu" role="menu">
				<li><a href="<?php echo HTTP_SERVER_WEBSITE ?>dashboard/advertiser/campaigns"><?php echo $LANG["WBS_DM_MANAGE_ADS"];?></a></li>
				<li><a href="<?php echo HTTP_SERVER_WEBSITE ?>dashboard/advertiser/ad"><?php echo $LANG["WBS_DM_NEW_AD"];?></a></li>
				<li class="divider"></li>
				<li><a href="<?php echo HTTP_SERVER_WEBSITE ?>dashboard/advertiser/campaign"><?php echo $LANG["WBS_DM_ADVERTISER_NEW_CAMPAIGN"];?>	</a></li>
			  </ul>
			</li>

			<li class="dropdown">
			  <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo $LANG["WBS_DM_DEPOSIT_MANAGEMENT"];?> <span class="caret"></span></a>
			  <ul class="dropdown-menu" role="menu">
				<li><a href="<?php echo HTTP_SERVER_WEBSITE ?>dashboard/advertiser/deposit-management/add-money"><?php echo $LANG["WBS_DM_ADVERTISER_ADD_MONEY"];?></a></li>
				<li class="divider"></li>
				<li><a href="<?php echo HTTP_SERVER_WEBSITE ?>dashboard/advertiser/deposit-management"><?php echo $LANG["WBS_DM_ADVERTISER_TRANSACTIONS_HISTORY"];?></a></li>
			  </ul>
			</li>

		  </ul>

	<?php } ?>
<?php } ?>



<?php if ( PUBLISHER == 'ON' ) { ?>
	<?php if ( $publisher_menu == 'on' ) { ?>

		  <ul class="nav navbar-nav">
			<li><a href="<?php echo HTTP_SERVER_WEBSITE ?>dashboard/publisher"><?php echo $LANG["WBS_DM_PUBLISHER_STATS"];?></a></li>

			<li class="dropdown">
			  <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo $LANG["WBS_DM_PUBLISHER_ADS"];?> <span class="caret"></span></a>
			  <ul class="dropdown-menu" role="menu">
				<li><a href="<?php echo HTTP_SERVER_WEBSITE ?>dashboard/publisher/channels"><?php echo $LANG["WBS_DM_MANAGE_ADS_CHANNELS"];?></a></li>
				<li class="divider"></li>
				<li><a href="<?php echo HTTP_SERVER_WEBSITE ?>dashboard/publisher/ad"><?php echo $LANG["WBS_DM_NEW_ADV_AD"];?></a></li>
			  </ul>
			</li>

			<li class="dropdown">
			  <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo $LANG["WBS_DM_PUBLISHER_MONEY_MANAGEMENT"];?> <span class="caret"></span></a>
			  <ul class="dropdown-menu" role="menu">
				<li><a href="<?php echo HTTP_SERVER_WEBSITE ?>dashboard/publisher/money"><?php echo $LANG["WBS_DM_MONEY_WITHDRAWAL"];?></a></li>
				<li><a href="<?php echo HTTP_SERVER_WEBSITE ?>dashboard/publisher/money/history"><?php echo $LANG["WBS_DM_PUBLISHER_WITHDRAWAL_HISTORY"];?></a></li>
				<li class="divider"></li>
				<li><a href="<?php echo HTTP_SERVER_WEBSITE ?>dashboard/publisher/money/settings"><?php echo $LANG["WBS_DM_PUBLISHER_PAYMENTS_SETTINGS"];?></a></li>
			  </ul>
			</li>


		  </ul>

	<?php } ?>
<?php } ?>


<?php } ?>












	<?php if ( empty ( $_SESSION[USER_SESSION] ) ) { ?>
          <div class="navbar-form navbar-right" role="form">
			<div id="have-account-msg" class="form-group">
              <?php echo $LANG["WBS_HAVE_ACCOUNT"];?>
            </div>
            <a class="btn btn-default blue-btn" href="<?php echo HTTP_SERVER_WEBSITE ?>login"><?php echo $LANG["WBS_LOGIN"];?></a>
		  </div>
	<?php } else { ?>




	  <ul class="nav navbar-nav pull-right">


<li id="logged-in" class="dropdown">
	<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-user"></span> <?php echo $_SESSION[USER_SESSION]['0']['user_email'];?> <span class="caret"></span></a>
	<ul class="dropdown-menu" role="menu">
		<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo HTTP_SERVER_WEBSITE ?>dashboard"><?php echo $LANG["WBS_DASHBOARD"];?></a></li>
		<li role="presentation"><a role="menuitem" tabindex="-1" href="<?php echo HTTP_SERVER_WEBSITE ?>profile"><?php echo $LANG["WBS_PROFILE"];?></a></li>
		<li role="presentation" class="divider"></li>

		<li role="presentation"><a id="log-out" role="menuitem" tabindex="-1" href="javascript:;"><?php echo $LANG["WBS_LOG_OUT"];?></a></li>
	</ul>
</li>





		  </ul>




	<?php } ?>

        </div><!--/.navbar-collapse -->

      </div>
    </div>


	</div>
</div>
