<!-- Navbar -->
<nav class="navbar fixed-top navbar-expand-lg<?php echo (isset($JAK_CMS_PAGE["custom2"]) && !empty($JAK_CMS_PAGE["custom2"]) ? ' navbar-color-on-scroll navbar-transparent' : '');?>"<?php echo (isset($JAK_CMS_PAGE["custom2"]) && !empty($JAK_CMS_PAGE["custom2"]) ? ' color-on-scroll="100" id="sectionsNav"' : '');?>>
  <div class="container">

    <!-- Logo -->
    <a class="navbar-brand" href="<?php echo BASE_URL;?>"><?php echo JAK_TITLE;?></a>

    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#hd3-top-navbar" aria-controls="hd3-top-navbar" aria-expanded="false" aria-label="Toggle navigation">
      <span class="sr-only">Toggle navigation</span>
      <span class="navbar-toggler-icon"></span>
      <span class="navbar-toggler-icon"></span>
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="hd3-top-navbar">
      <!-- Menu -->
      <?php echo jak_build_menu(0, $mheader, $page, 'navbar-nav ml-auto', 'dropdown', 'dropdown-menu', '', false, JAK_USERISLOGGED, 'nav-item', 'nav-link');?>

      <?php if (!JAK_USERISLOGGED) { ?>
        <button class="btn btn-info btn-round" data-toggle="modal" data-target="#loginModal"><i class="far fa-sign-in"></i>
          <?php echo $jkl["hd18"];?>
        </button>
        <div class="modal fade" id="loginModal" tabindex="-1" role="dialog" aria-hidden="false">
          <div class="modal-dialog modal-register">
            <div class="modal-content">
              <div class="modal-header no-border-header text-center">
                <h3 class="modal-title"><?php echo JAK_TITLE;?></h3>
                <p><?php echo $jkl['hd161'];?></p>
              </div>
              <div class="modal-body">
                <form class="signup-form" method="post" action="<?php echo JAK_rewrite::jakParseurl(JAK_CLIENT_URL);?>">
                  <div class="form-group">
                    <div class="input-group">
                      <div class="input-group-prepend">
                        <span class="input-group-text">
                          <i class="fa fa-at"></i>
                        </span>
                      </div>
                      <input type="text" name="email" class="form-control" id="email" placeholder="<?php echo $jkl["g5"];?>">
                    </div>
                  </div>
                  <div class="form-group">
                    <div class="input-group">
                      <div class="input-group-prepend">
                        <span class="input-group-text">
                          <i class="fa fa-key"></i>
                        </span>
                      </div>
                      <input type="password" name="password" class="form-control" id="password" placeholder="<?php echo $jkl["g77"];?>">
                    </div>
                  </div>
                  <?php if (!empty(JAK_RECAP_CLIENT)) { ?>
                    <div class="g-recaptcha my-3 ml-3" data-sitekey="<?php echo JAK_RECAP_CLIENT;?>"></div>
                  <?php } ?>

                  <input type="hidden" name="action" value="login">

                  <div class="form-check">
                    <label class="form-check-label">
                      <input class="form-check-input" type="checkbox" name="lcookies" checked>
                      <span class="form-check-sign">
                        <span class="check"></span>
                      </span>
                      <?php echo $jkl["hd20"];?>
                    </label>
                  </div>

                  <button type="submit" name="logID" class="btn btn-success btn-block btn-round"><?php echo $jkl["hd18"];?></button>
                </form>
              </div>
              <div class="modal-footer no-border-footer">
                <span class="text-center">
                  <?php if (defined('JAK_API_PROFILE') && !empty(JAK_API_PROFILE)) { ?>
                    <a class="btn btn-sm btn-info" href="<?php echo JAK_API_PROFILE;?>"><?php echo $jkl["hd24"];?></a> <a class="btn btn-sm btn-warning" href="<?php echo JAK_API_PROFILE;?>"><?php echo $jkl["hd19"];?></a>
                  <?php } else { if (JAK_REGISTER) { ?>
                    <a href="javascript:void(0)" class="btn btn-sm btn-info" data-toggle="modal" data-target="#RegisterModal" data-dismiss="modal"><?php echo $jkl['hd24'];?></a> <?php } ?><a href="javascript:void(0)" class="btn btn-sm btn-warning" data-toggle="modal" data-target="#forgotModal" data-dismiss="modal"><?php echo $jkl['hd19'];?></a>
                  <?php } ?>
                  <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal"><?php echo $jkl['hd162'];?></button>
                </span>
              </div>
            </div>
          </div>
        </div>
        <div class="modal fade" id="forgotModal" tabindex="-1" role="dialog" aria-hidden="false">
          <div class="modal-dialog modal-register">
            <div class="modal-content">
              <div class="modal-header no-border-header">
                <h3 class="modal-title"><?php echo JAK_TITLE;?></h3>
                <p><?php echo $jkl['f'];?></p>
              </div>
              <div class="modal-body">
                <form class="signup-form" method="post" action="<?php echo JAK_rewrite::jakParseurl(JAK_CLIENT_URL);?>">
                  <div class="form-group">
                    <div class="input-group">
                      <div class="input-group-prepend">
                        <span class="input-group-text">
                          <i class="fa fa-at"></i>
                        </span>
                      </div>
                      <input type="text" name="lsE" class="form-control" id="lsEM" placeholder="<?php echo $jkl["g5"];?>">
                    </div>
                  </div>
                  <?php if (!empty(JAK_RECAP_CLIENT)) { ?>
                    <div class="g-recaptcha my-3 ml-3" data-sitekey="<?php echo JAK_RECAP_CLIENT;?>"></div>
                  <?php } ?>

                  <input type="hidden" name="action" value="forgot-password">

                  <button type="submit" name="forgotP" class="btn btn-success btn-block btn-round"><?php echo $jkl["hd22"];?></button>
                </form>
              </div>
              <div class="modal-footer no-border-footer">
                <span class="text-center">
                  <a href="javascript:void(0)" class="btn btn-sm btn-info" data-toggle="modal" data-target="#loginModal" data-dismiss="modal"><?php echo $jkl['hd18'];?></a>
                  <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal"><?php echo $jkl['hd162'];?></button>
                </span>
              </div>
            </div>
          </div>
        </div>
        <?php if (JAK_REGISTER) { ?>
          <button class="btn btn-danger btn-round" data-toggle="modal" data-target="#RegisterModal"><i class="fa fa-user-plus"></i>
            <?php echo $jkl["hd24"];?>
          </button>
          <div class="modal fade" id="RegisterModal" tabindex="-1" role="dialog" aria-hidden="false">
            <div class="modal-dialog modal-register">
              <div class="modal-content">
                <div class="modal-header no-border-header text-center">
                  <h3 class="modal-title"><?php echo JAK_TITLE;?></h3>
                  <p><?php echo $jkl['hd160'];?></p>
                </div>
                <div class="modal-body">
                  <form method="post" action="<?php echo JAK_rewrite::jakParseurl(JAK_CLIENT_URL);?>">
                    <div class="form-group">
                      <div class="input-group">
                        <div class="input-group-prepend">
                          <span class="input-group-text">
                            <i class="fas fa-signature"></i>
                          </span>
                        </div>
                        <input type="text" name="reg_name" class="form-control" id="reg_name" placeholder="<?php echo $jkl["g4"];?>">
                      </div>
                    </div>
                    <div class="form-group">
                      <div class="input-group">
                        <div class="input-group-prepend">
                          <span class="input-group-text">
                            <i class="fa fa-at"></i>
                          </span>
                        </div>
                        <input type="text" name="reg_email" class="form-control" id="reg_email" placeholder="<?php echo $jkl["g5"];?>">
                      </div>

                      <?php if (isset($custom_fields_register_modal) && !empty($custom_fields_register_modal)) echo $custom_fields_register_modal;?>

                      <?php if (!empty(JAK_RECAP_CLIENT)) { ?>
                        <div class="g-recaptcha my-3 ml-3" data-sitekey="<?php echo JAK_RECAP_CLIENT;?>"></div>
                      <?php } ?>
                      <input type="hidden" name="action" value="register">
                    </div>
                    <button type="submit" name="registerID" class="btn btn-success btn-block btn-round"><?php echo $jkl["hd30"];?></button>
                  </form>
                </div>
                <div class="modal-footer no-border-footer">
                  <span class="text-center">
                    <a href="javascript:void(0)" class="btn btn-sm btn-info" data-toggle="modal" data-target="#loginModal" data-dismiss="modal"><?php echo $jkl['hd18'];?></a>
                    <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal"><?php echo $jkl['hd162'];?></button>
                  </span>
                </div>

              </div>
            </div>
          </div>

        <?php } } else { ?>
          <?php if (JAK_CLIENTID) { ?>
            <div class="dropdown" id="notifcation-alarm-business" style="display:none;">
              <button class="btn btn-warning btn-just-icon btn-round" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="far fa-bells" aria-hidden="true"></i></button>

              <ul class="dropdown-menu dropdown-menu-right dropdown-wide dropdown-notification" aria-labelledby="dropdownMenuButton">
                <li class="dropdown-header" id="notification-count-business">
                  
                </li>
                <li>
                  <ul class="dropdown-notification-list scroll-area">
                    <li id="notification-list-business">

                    </li>
                  </ul>
                </li>
                <!-- end scroll area -->
                <li class="dropdown-footer">
                  <ul class="dropdown-footer-menu">
                    <li>
                      
                    </li>
                  </ul>
                </li>
              </ul>

            </div>
          <?php } ?>

          <div class="nav-item dropdown">
            <a href="javascript:;" class="nav-link navbar-brand" data-toggle="dropdown" width="30" height="30" aria-expanded="false">
              <div class="profile-photo-small">
                <img src="<?php echo $avatar_img;?>" alt="Circle Image" class="img-circle img-responsive img-no-padding">
              </div>
            </a>
            <ul class="dropdown-menu dropdown-menu-right dropdown-danger">
              <div class="dropdown-header"><?php echo $jkl['hd155'];?></div>
              <?php if (JAK_CLIENTID) { ?>
                <a class="dropdown-item" href="<?php echo JAK_rewrite::jakParseurl(JAK_CLIENT_URL);?>"><?php echo $jkl['g89'];?></a>
                <a class="dropdown-item" href="<?php echo JAK_rewrite::jakParseurl(JAK_CLIENT_URL, 'edit');?>"><?php echo $jkl['g85'];?></a>
                <?php if (JAK_BILLING_MODE == 3) { ?>
                  <a class="dropdown-item" href="<?php echo JAK_rewrite::jakParseurl(JAK_CLIENT_URL, 'envato');?>"><?php echo $jkl['hd144'];?></a>
                <?php } } else { ?>
                  <a class="dropdown-item" href="<?php echo JAK_rewrite::jakParseurl(JAK_OPERATOR_LOC, 'users', 'edit', JAK_USERID);?>"><?php echo $jkl['g85'];?></a>
                <?php } ?>
                <div class="dropdown-divider"></div>
                <?php if (JAK_BLOG_A) { ?>
                  <a class="dropdown-item" href="<?php echo JAK_rewrite::jakParseurl(JAK_SUPPORT_URL);?>">Support</a>
                <?php } if (JAK_FAQ_A) { ?>
                  <a class="dropdown-item" href="<?php echo JAK_rewrite::jakParseurl(JAK_FAQ_URL, 'edit');?>">FAQ</a>
                <?php } ?>
                <div class="dropdown-divider"></div>
                <a class="dropdown-item" href="<?php echo JAK_rewrite::jakParseurl('logout');?>"><?php echo $jkl['g26'];?></a>
              </ul>
            </div>
          <?php } ?>
        </div>
      </div>
    </nav>
