<commit_before><?php
/**
 *  ocs-webserver
 *
 *  Copyright 2016 by pling GmbH.
 *
 *    This file is part of ocs-webserver.
 *
 *    This program is free software: you can redistribute it and/or modify
 *    it under the terms of the GNU Affero General Public License as
 *    published by the Free Software Foundation, either version 3 of the
 *    License, or (at your option) any later version.
 *
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU Affero General Public License for more details.
 *
 *    You should have received a copy of the GNU Affero General Public License
 *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 **/

$helperFetchCategory = new Default_View_Helper_CatTitle();
$helperFetchCatParent = new Default_View_Helper_CatParent();
$getAuthUser = new Default_View_Helper_GetAuthUser();
$helperBuildMemberUrl = new Default_View_Helper_BuildMemberUrl();
$helperImage = new Default_View_Helper_Image();

$auth = Zend_Auth::getInstance();
$member = $getAuthUser->getAuthUser();

echo $this->render('partials/header/metaheader.phtml'); ?>
    <header id="page_header" xmlns="http://www.w3.org/1999/html">
        <div class="container header" style="position: relative;">

            <?php if (false === $auth->hasIdentity() && empty($member->username)) {
                $helperEncryptUrl = new Default_View_Helper_EncryptUrl();
                $redirectString = '/redirect/' . $helperEncryptUrl->EncryptUrl(Zend_Controller_Front::getInstance()->getRequest()->getScheme() . '://' . Zend_Controller_Front::getInstance()->getRequest()->getHttpHost().$_SERVER["REQUEST_URI"]);
                ?>
                <ul class="menu-nav-tabs absolute-right" style="position: absolute;bottom: 0px;">
                    <li role="presentation"
                        class="<?php echo(strpos($_SERVER["REQUEST_URI"], 'register') ? 'active' : '') ?>">
                        <a href="/register">Register</a></li>
                    <li role="presentation"
                        class="<?php echo(strpos($_SERVER["REQUEST_URI"], 'login') ? 'active' : '') ?>">
                        <a href="/login<?php echo strpos($_SERVER["REQUEST_URI"], 'login') ? '' : $redirectString ?>">Login</a>
                    </li>
                </ul>
            <?php } ?>

            <section class="container">
            <section class="wrapper">

                    <section>

                        <figure class="logo-header">
                            <a href="/">
                                <img width="<?= $this->template['header-logo']['width'] ?>" border="0"
                                     src="<?= $this->template['header-logo']['image-src'] ?>">
                            </a>
                        </figure>

                        <nav id="nav-top">
                            <div class="pull-left col-lg-5 col-md-5 col-sm-5 col-xs-5">
                            </div>

                            <div class="pull-right col-lg-7 col-md-7 col-sm-7 col-xs-7">
                                <?php if ($auth->hasIdentity() && !empty($member->username)) { ?>
                                    <ul class="menu pull-right">
                                        <li class="link relative profile-menu-container">
                                            <a rel="profile-menu" class="menu-trigger">
                                                <div class="absolute header-profile-image"><img
                                                            src="<?= $helperImage->Image($member->profile_image_url,
                                                                array('width' => 30, 'height' => 30)) ?>"/>
                                                </div>
                                                <span><?= $member->username ?></span>
                                            </a>
                                            <ul class="profile-menu menu-dropdown">
                                                <div class="dropdown-header"></div>
                                                <li class="link first"><a
                                                            href="/product/add/"><?= $this->translate('Add Product') ?></a>
                                                </li>
                                                <li class="link first"><a
                                                            href="<?= $helperBuildMemberUrl->buildExternalUrl($member->member_id,
                                                                'products') ?>"><?= $this->translate('My Products') ?></a>
                                                </li>
                                                <li class="link"><a
                                                            href="/settings/"><?= $this->translate('My Settings') ?></a>
                                                </li>
                                                <li class="link"><a
                                                            href="/logout/"><?= $this->translate('Logout') ?></a>
                                                </li>
                                            </ul>
                                        </li>
                                    </ul>
                                <?php } else { ?>
                                <?php } ?>
                                <form id="search" class="pull-right" action="/search">
                                    <input type="text" name="projectSearchText" class="content-search">

                                    <div class="icon-search-input absolute cursor-hand"
                                         onclick="$('#search').submit()"></div>
                                </form>
                            </div>
                        </nav>
                    </section>

                </section>
            </section>

            <section class="container">
                <section class="wrapper">
                    <?php /*
                        if(strpos($_SERVER['REQUEST_URI'], 'p/') != FALSE || strpos($_SERVER['REQUEST_URI'], 'browse/') != FALSE) {
                    ?>
                    <span class="header_cat_link" id="header_cat_link"><a href="/browse/cat/<?= isset($this->cat_id)?$this->cat_id:'all' ?>/order/latest">/<?= $helperFetchCategory->catTitle($this->cat_id) ?></a></span>
                    <?php } else { ?>
                    <span class="header_cat_link" id="header_cat_link"><a href="/community">/Community</a></span><commit_msg>point member pages to new url (pling.me)<commit_after><?php
/**
 *  ocs-webserver
 *
 *  Copyright 2016 by pling GmbH.
 *
 *    This file is part of ocs-webserver.
 *
 *    This program is free software: you can redistribute it and/or modify
 *    it under the terms of the GNU Affero General Public License as
 *    published by the Free Software Foundation, either version 3 of the
 *    License, or (at your option) any later version.
 *
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU Affero General Public License for more details.
 *
 *    You should have received a copy of the GNU Affero General Public License
 *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 **/

$helperFetchCategory = new Default_View_Helper_CatTitle();
$helperFetchCatParent = new Default_View_Helper_CatParent();
$getAuthUser = new Default_View_Helper_GetAuthUser();
$helperBuildMemberUrl = new Default_View_Helper_BuildMemberUrl();
$helperImage = new Default_View_Helper_Image();

$auth = Zend_Auth::getInstance();
$member = $getAuthUser->getAuthUser();

echo $this->render('partials/header/metaheader.phtml'); ?>
    <header id="page_header" xmlns="http://www.w3.org/1999/html">
        <div class="container header" style="position: relative;">

            <?php if (false === $auth->hasIdentity() && empty($member->username)) {
                $helperEncryptUrl = new Default_View_Helper_EncryptUrl();
                $redirectString = '/redirect/' . $helperEncryptUrl->EncryptUrl(Zend_Controller_Front::getInstance()->getRequest()->getScheme() . '://' . Zend_Controller_Front::getInstance()->getRequest()->getHttpHost().$_SERVER["REQUEST_URI"]);
                ?>
                <ul class="menu-nav-tabs absolute-right" style="position: absolute;bottom: 0px;">
                    <li role="presentation"
                        class="<?php echo(strpos($_SERVER["REQUEST_URI"], 'register') ? 'active' : '') ?>">
                        <a href="/register">Register</a></li>
                    <li role="presentation"
                        class="<?php echo(strpos($_SERVER["REQUEST_URI"], 'login') ? 'active' : '') ?>">
                        <a href="/login<?php echo strpos($_SERVER["REQUEST_URI"], 'login') ? '' : $redirectString ?>">Login</a>
                    </li>
                </ul>
            <?php } ?>

            <section class="container">
            <section class="wrapper">

                    <section>

                        <figure class="logo-header">
                            <a href="/">
                                <img width="<?= $this->template['header-logo']['width'] ?>" border="0"
                                     src="<?= $this->template['header-logo']['image-src'] ?>">
                            </a>
                        </figure>

                        <nav id="nav-top">
                            <div class="pull-left col-lg-5 col-md-5 col-sm-5 col-xs-5">
                            </div>

                            <div class="pull-right col-lg-7 col-md-7 col-sm-7 col-xs-7">
                                <?php if ($auth->hasIdentity() && !empty($member->username)) { ?>
                                    <ul class="menu pull-right">
                                        <li class="link relative profile-menu-container">
                                            <a rel="profile-menu" class="menu-trigger">
                                                <div class="absolute header-profile-image"><img
                                                            src="<?= $helperImage->Image($member->profile_image_url,
                                                                array('width' => 30, 'height' => 30)) ?>"/>
                                                </div>
                                                <span><?= $member->username ?></span>
                                            </a>
                                            <ul class="profile-menu menu-dropdown">
                                                <div class="dropdown-header"></div>
                                                <li class="link first">
                                                    <a href="/product/add/"><?= $this->translate('Add Product') ?></a>
                                                </li>
                                                <li class="link first">
                                                    <a href="<?= $helperBuildMemberUrl->buildMemberUrl($member->member_id, 'products') ?>"><?= $this->translate('My Products') ?></a>
                                                </li>
                                                <li class="link">
                                                    <a href="/settings/"><?= $this->translate('My Settings') ?></a>
                                                </li>
                                                <li class="link">
                                                    <a href="/logout/"><?= $this->translate('Logout') ?></a>
                                                </li>
                                            </ul>
                                        </li>
                                    </ul>
                                <?php } else { ?>
                                <?php } ?>
                                <form id="search" class="pull-right" action="/search">
                                    <input type="text" name="projectSearchText" class="content-search">

                                    <div class="icon-search-input absolute cursor-hand"
                                         onclick="$('#search').submit()"></div>
                                </form>
                            </div>
                        </nav>
                    </section>

                </section>
            </section>

            <section class="container">
                <section class="wrapper">
                    <?php /*
                        if(strpos($_SERVER['REQUEST_URI'], 'p/') != FALSE || strpos($_SERVER['REQUEST_URI'], 'browse/') != FALSE) {
                    ?>
                    <span class="header_cat_link" id="header_cat_link"><a href="/browse/cat/<?= isset($this->cat_id)?$this->cat_id:'all' ?>/order/latest">/<?= $helperFetchCategory->catTitle($this->cat_id) ?></a></span>
                    <?php } else { ?>
                    <span class="header_cat_link" id="header_cat_link"><a href="/community">/Community</a></span>
{'fraction_non_alphanumeric': 0.136481963555225, 'fraction_numerical': 0.0035701004090740052, 'mean_word_length': 1.2078817733990148, 'pattern_counts': {'":': 0, '<': 199, '<?xml version=': 0, '>': 255, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 112, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2771135', 'n_tokens_mistral': 3017, 'n_tokens_neox': 2907, 'n_words': 673}