<?php
  /**
   * Header
   *
   * @package Wojo Framework
   * @author wojoscripts.com
   * @copyright 2019
   * @version $Id: header.tpl.php, v1.00 2019-10-05 10:12:05 gewa Exp $
   */
  if (!defined("_WOJO"))
      die('Direct access to this location is not allowed.');
 ?>
<!doctype html>
<html lang="<?php echo Core::$language;?>">
<head>
<meta charset="utf-8">
<title><?php echo $this->title;?></title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="dcterms.rights" content="<?php echo $this->core->company;?> &copy; All Rights Reserved">
<meta name="robots" content="index">
<meta name="robots" content="follow">
<meta name="revisit-after" content="1 day">
<meta name="generator" content="Powered by FM v<?php echo $this->core->wojov;?>">
<link rel="shortcut icon" href="<?php echo SITEURL;?>/assets/favicon.ico" type="image/x-icon">
<link href="<?php echo THEMEURL . '/cache/' . Cache::cssCache(array('base.css','transition.css','label.css','form.css','dropdown.css','input.css','button.css','message.css','image.css','list.css','table.css','icon.css','card.css','editor.css','modal.css','tooltip.css','menu.css','progress.css','utility.css','style.css'), THEMEBASE);?>" rel="stylesheet" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<script type="text/javascript" src="<?php echo SITEURL;?>/assets/jquery.js"></script>
<script type="text/javascript" src="<?php echo SITEURL;?>/assets/global.js"></script>
</head>
<body data-theme="<?php echo Session::cookieExists("FLMF_THEME", "dark") ? "dark" : "light";?>" class="<?php echo $this->pageclass;?>">
<?php if($this->core->eucookie and (empty($_COOKIE['FMEU']))):?>
<div id="cookie-overlay">
  <div class="wojo notice alert">
    <div class="content"><span><?php echo Lang::$word->META_COOKIE;?></span>
      <p class="sticky-note"><?php echo Lang::$word->META_COOKIE1;?><<br><?php echo Lang::$word->META_COOKIE2;?></p>
      <a class="wojo small white button" id="c_yes">Continue</a> <a class="wojo small simple button" id="c_no" href="https://google.com">Cancel</a>
    </div>
  </div>
</div>
<?php endif;?>
<?php if(App::Auth()->is_User()):?>
<header>
  <div class="wojo-grid">
    <div class="row horizontal small gutters align middle">
      <div class="columns">
        <a href="<?php echo Url::url("/dashboard");?>" class="logo">
        <?php echo (App::Core()->logo) ? '<img src="' . SITEURL . '/uploads/' . $this->core->logo . '" alt="' . $this->core->company . '">': $this->core->company;?>
        </a>
      </div>
      <div class="columns auto">
        <a data-dropdown="#dropdown-uMenu" class="white" id="uMenu"> <img src="<?php echo UPLOADURL;?>/avatars/<?php echo (App::Auth()->avatar) ? App::Auth()->avatar : "blank.svg";?>" alt="" class="wojo inline avatar image">
        <span class="title"><?php echo App::Auth()->name;?>
        <i class="icon chevron down"></i></span>
        </a>
        <div class="wojo small dropdown top-right" id="dropdown-uMenu">
          <a class="item" href="<?php echo Url::url("/dashboard/myaccount");?>"><i class="icon user"></i>
          <?php echo Lang::$word->ACC_MY_ACCOUNT;?></a>
          <a class="item" href="<?php echo Url::url("/dashboard/mypassword");?>"><i class="icon lock"></i>
          <?php echo Lang::$word->ACC_PASS_CHANGE;?></a>
           <a class="ftheme-switch item" data-mode="<?php echo Session::cookieExists("FLMF_THEME", "dark") ? "dark" : "light";?>"><i class="icon contrast"></i><span><?php echo Session::cookieExists("FLMF_THEME", "dark") ? "Light" : "Dark";?></span></a>
          <div class="divider"></div>
          <a class="item" href="<?php echo Url::url("/logout");?>"><i class="icon power"></i>
          <?php echo Lang::$word->LOGOUT;?></a>
        </div>
      </div>
      <div class="columns auto hide-all" id="mobileToggle">
        <a class="wojo simple icon button"><i class="icon white reorder"></i></a>
      </div>
    </div>
  </div>
</header>
  <div class="navbar">
    <div class="wojo-grid">
      <nav class="menu">
        <ul class="wojo menu">
          <li<?php if (in_array("projects", $this->segments)) echo ' class="active"';?>>
            <a href="<?php echo Url::url("/dashboard/projects");?>">
            <img src="<?php echo THEMEURL;?>/images/projects.svg"><span><?php echo Lang::$word->ADM_PROJECTS;?></span>
            </a>
          </li>
          <li<?php if (in_array("invoices", $this->segments)) echo ' class="active"';?>>
            <a href="<?php echo Url::url("/dashboard/invoices");?>">
            <img src="<?php echo THEMEURL;?>/images/invoices.svg"><span><?php echo Lang::$word->ADM_INVOICES;?></span>
            </a>
          </li>
          <li<?php if (in_array("estimates", $this->segments)) echo ' class="active"';?>>
            <a href="<?php echo Url::url("/dashboard/estimates");?>">
            <img src="<?php echo THEMEURL;?>/images/estimates.svg"><span><?php echo Lang::$word->ADM_ESTIMATES;?></span>
            </a>
          </li>
          <li<?php if (in_array("calendar", $this->segments)) echo ' class="active"';?>>
            <a href="<?php echo Url::url("/dashboard/calendar");?>">
            <img src="<?php echo THEMEURL;?>/images/calendar.svg"><span><?php echo Lang::$word->CAL_CALENDAR;?></span>
            </a>
          </li>
        </ul>
      </nav>
    </div>
  </div>
<main>
<div class="wojo-grid">
<div class="wojo small breadcrumb">
  <?php echo Url::crumbs($this->crumbs ? $this->crumbs : $this->segments, "//", Lang::$word->HOME);?>
</div>
<?php endif;?>