<commit_before><?php
$scripts = array();
if (!isset($username)) {
  array_push($scripts, '/assets/js/facebook.js');
}
?>
<!DOCTYPE html>
<!-- HEADER -->
<html lang="<?= lang('lang_code') ?>">
  <head>
    <meta charset="utf-8">
    <meta name="description" content="Browse spiciest memes here.">
    <meta name="keywords" content="Spicy Memes, memes, spicymemes, veebirakendus, spice, meme, spicymemes.cs.ut.ee">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?php echo $title; ?> - <?= lang('title_spicymemes') ?></title>
    <link href="/assets/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="/assets/css/headerstyle.css" rel="stylesheet">
    <link href="/assets/css/footerstyle.css" rel="stylesheet">
    <link href="/assets/css/allpagesstyle.css" rel="stylesheet">
    <link href="/assets/css/commentspagestyle.css" rel="stylesheet">
    <link href="/assets/css/frontpagebodystyle.css" rel="stylesheet">
    <link href="/assets/css/userpagestyle.css" rel="stylesheet">
    <link href="/assets/css/editprofilestyle.css" rel="stylesheet">
    <link href="/assets/css/aboutpagestyle.css" rel="stylesheet">
    <link href="/assets/css/font-awesome.min.css" rel="stylesheet">
    <link href="/assets/css/offline-theme-dark-indicator.css" rel="stylesheet">
    <link href="/assets/css/offline-language-english-indicator.css" rel="stylesheet">
  </head>
  <body>

    <nav class="navbar navbar-default navbar-fixed-top">
      <div class="container-fluid">

        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#burger-material">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="<?php echo site_url() ?>"><?= lang('header_spicymemes') ?></a>
        </div>

        <div class="collapse navbar-collapse" id="burger-material">

          <ul class="nav navbar-nav">
            <li <?php if($selection==='hot') {echo 'class="active"';} ?> ><a href="<?php echo site_url('hot') ?>" class="hot"><?= lang('header_hot') ?></a></li>
            <li <?php if($selection==='top') {echo 'class="active"';} ?> ><a href="<?php echo site_url('top') ?>" class="top"><?= lang('header_top') ?></a></li>
            <li <?php if($selection==='new') {echo 'class="active"';} ?> ><a href="<?php echo site_url('new') ?>" class="new"><?= lang('header_new') ?></a></li>
          </ul>

          <form class="navbar-form navbar-left">
            <div class="input-group">
              <label for="srch" class="hidden-label"><?= lang('header_search') ?>: </label>
              <input type="search" class="form-control" placeholder="<?= lang('header_search') ?>" id="srch">
              <div class="input-group-btn">
                <button class="btn btn-default" type="submit">
                  <span class="glyphicon glyphicon-search"></span>
                </button>
              </div>
            </div>
          </form>

          <ul class="nav navbar-nav navbar-right loginsignup">
            <?php if (isset($username)) { ?>
              <?php if ($_SESSION['user_type'] > 0) : ?>
                <li <?php if($selection==='report') {echo 'class="active"';} ?>><a href="<?php echo site_url('report/view') ?>"><?= lang('report') ?></a></li>
              <?php endif; ?>
              <li <?php if($selection==='profile') {echo 'class="active"';} ?> ><a href="<?php echo site_url("profile/".$username) ?>" id="username"><span class="glyphicon glyphicon-user"></span> <?= $username ?></a></li>
              <li><a href="<?= site_url("logout") ?>" id="logout"><span class="glyphicon glyphicon-log-out"></span> <?= lang('header_logout') ?></a></li>
            <?php } else { ?>
              <li><a href="<?= site_url("login") ?>" role="button" class="btn-login" data-toggle="modal" data-target="#signuploginmodal" data-remote="false"><span class="glyphicon glyphicon-log-in"></span> <?= lang('header_login') ?></a></li>
              <li><a href="<?= site_url("register") ?>" role="button" class="btn-signup" data-toggle="modal" data-target="#signuploginmodal" data-remote="false"><span class="glyphicon glyphicon-user"></span> <?= lang('header_signup') ?></a></li>
            <?php } ?>
          </ul>

        </div><!-- /.navbar-collapse -->
      </div><!-- /.container-fluid -->
    </nav>

   <div class="container-fluid"><div class="break"></div></div>
   <div class="container-fluid"><div class="break"></div></div>


    <!-- ADD SOME SPICE BODY  -->
    <div class="container-fluid">
      <div class="row">
        <div class="changelanguage">
            <p>
                <a href="<?= site_url(strtok($_SERVER["REQUEST_URI"],'?') . '?language=english') ?>">ENG</a> |
                <a href="<?= site_url(strtok($_SERVER["REQUEST_URI"],'?') . '?language=estonian') ?>">EST</a>
            </p>
        </div>
        <?php if($selection !== 'addmeme') : ?>
        <div class="addsomespice">
            <a role="button" class="btn btn-lg addsomespice-button" href="<?php echo site_url("meme/add"); ?>" <?php if (!isset($_SESSION['logged_in']) || $_SESSION['logged_in']===FALSE) {echo 'data-toggle="modal" data-remote="false" data-target="#signuploginmodal"';} ?>><?= lang('addsomespice') ?></a>
        </div>
       <?php endif; ?>
      </div>
    </div><commit_msg>made it possible to use nav bar log in and sign up buttons on /login and /register urls<commit_after><?php
$scripts = array();
if (!isset($username)) {
  array_push($scripts, '/assets/js/facebook.js');
}
?>
<!DOCTYPE html>
<!-- HEADER -->
<html lang="<?= lang('lang_code') ?>">
  <head>
    <meta charset="utf-8">
    <meta name="description" content="Browse spiciest memes here.">
    <meta name="keywords" content="Spicy Memes, memes, spicymemes, veebirakendus, spice, meme, spicymemes.cs.ut.ee">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?php echo $title; ?> - <?= lang('title_spicymemes') ?></title>
    <link href="/assets/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="/assets/css/headerstyle.css" rel="stylesheet">
    <link href="/assets/css/footerstyle.css" rel="stylesheet">
    <link href="/assets/css/allpagesstyle.css" rel="stylesheet">
    <link href="/assets/css/commentspagestyle.css" rel="stylesheet">
    <link href="/assets/css/frontpagebodystyle.css" rel="stylesheet">
    <link href="/assets/css/userpagestyle.css" rel="stylesheet">
    <link href="/assets/css/editprofilestyle.css" rel="stylesheet">
    <link href="/assets/css/aboutpagestyle.css" rel="stylesheet">
    <link href="/assets/css/font-awesome.min.css" rel="stylesheet">
    <link href="/assets/css/offline-theme-dark-indicator.css" rel="stylesheet">
    <link href="/assets/css/offline-language-english-indicator.css" rel="stylesheet">
  </head>
  <body>

    <nav class="navbar navbar-default navbar-fixed-top">
      <div class="container-fluid">

        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#burger-material">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="<?php echo site_url() ?>"><?= lang('header_spicymemes') ?></a>
        </div>

        <div class="collapse navbar-collapse" id="burger-material">

          <ul class="nav navbar-nav">
            <li <?php if($selection==='hot') {echo 'class="active"';} ?> ><a href="<?php echo site_url('hot') ?>" class="hot"><?= lang('header_hot') ?></a></li>
            <li <?php if($selection==='top') {echo 'class="active"';} ?> ><a href="<?php echo site_url('top') ?>" class="top"><?= lang('header_top') ?></a></li>
            <li <?php if($selection==='new') {echo 'class="active"';} ?> ><a href="<?php echo site_url('new') ?>" class="new"><?= lang('header_new') ?></a></li>
          </ul>

          <form class="navbar-form navbar-left">
            <div class="input-group">
              <label for="srch" class="hidden-label"><?= lang('header_search') ?>: </label>
              <input type="search" class="form-control" placeholder="<?= lang('header_search') ?>" id="srch">
              <div class="input-group-btn">
                <button class="btn btn-default" type="submit">
                  <span class="glyphicon glyphicon-search"></span>
                </button>
              </div>
            </div>
          </form>

          <ul class="nav navbar-nav navbar-right loginsignup">
            <?php if (isset($username)) { ?>
              <?php if ($_SESSION['user_type'] > 0) : ?>
                <li <?php if($selection==='report') {echo 'class="active"';} ?>><a href="<?php echo site_url('report/view') ?>"><?= lang('report') ?></a></li>
              <?php endif; ?>
              <li <?php if($selection==='profile') {echo 'class="active"';} ?> ><a href="<?php echo site_url("profile/".$username) ?>" id="username"><span class="glyphicon glyphicon-user"></span> <?= $username ?></a></li>
              <li><a href="<?= site_url("logout") ?>" id="logout"><span class="glyphicon glyphicon-log-out"></span> <?= lang('header_logout') ?></a></li>
            <?php } else { ?>
              <li><a href="<?= site_url("login") ?>" role="button" class="btn-login" <?php if (!in_array($selection, array('login', 'register'))) echo 'data-toggle="modal" data-target="#signuploginmodal" data-remote="false"' ?>><span class="glyphicon glyphicon-log-in"></span> <?= lang('header_login') ?></a></li>
              <li><a href="<?= site_url("register") ?>" role="button" class="btn-signup" <?php if (!in_array($selection, array('login', 'register'))) echo 'data-toggle="modal" data-target="#signuploginmodal" data-remote="false"' ?>><span class="glyphicon glyphicon-user"></span> <?= lang('header_signup') ?></a></li>
            <?php } ?>
          </ul>

        </div><!-- /.navbar-collapse -->
      </div><!-- /.container-fluid -->
    </nav>

   <div class="container-fluid"><div class="break"></div></div>
   <div class="container-fluid"><div class="break"></div></div>


    <!-- ADD SOME SPICE BODY  -->
    <div class="container-fluid">
      <div class="row">
        <div class="changelanguage">
            <p>
                <a href="<?= site_url(strtok($_SERVER["REQUEST_URI"],'?') . '?language=english') ?>">ENG</a> |
                <a href="<?= site_url(strtok($_SERVER["REQUEST_URI"],'?') . '?language=estonian') ?>">EST</a>
            </p>
        </div>
        <?php if($selection !== 'addmeme') : ?>
        <div class="addsomespice">
            <a role="button" class="btn btn-lg addsomespice-button" href="<?php echo site_url("meme/add"); ?>" <?php if (!isset($_SESSION['logged_in']) || $_SESSION['logged_in']===FALSE) {echo 'data-toggle="modal" data-remote="false" data-target="#signuploginmodal"';} ?>><?= lang('addsomespice') ?></a>
        </div>
       <?php endif; ?>
      </div>
    </div>
{'fraction_non_alphanumeric': 0.2279581337590917, 'fraction_numerical': 0.0010643959552953698, 'mean_word_length': 3.296875, 'pattern_counts': {'":': 0, '<': 341, '<?xml version=': 0, '>': 343, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4492926', 'n_tokens_mistral': 3632, 'n_tokens_neox': 3593, 'n_words': 672}