File indexing completed on 2024-12-29 05:24:44
0001 <?php 0002 /** 0003 * ocs-webserver 0004 * 0005 * Copyright 2016 by pling GmbH. 0006 * 0007 * This file is part of ocs-webserver. 0008 * 0009 * This program is free software: you can redistribute it and/or modify 0010 * it under the terms of the GNU Affero General Public License as 0011 * published by the Free Software Foundation, either version 3 of the 0012 * License, or (at your option) any later version. 0013 * 0014 * This program is distributed in the hope that it will be useful, 0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0017 * GNU Affero General Public License for more details. 0018 * 0019 * You should have received a copy of the GNU Affero General Public License 0020 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0021 **/ 0022 0023 $helperBuildBaseUrl = new Default_View_Helper_BuildBaseUrl(); 0024 $baseurl = Zend_Registry::get('config')->settings->client->default->baseurl; 0025 //$baseurl = $helperBuildBaseUrl->buildBaserUrl(); 0026 // $baseurl = Zend_Registry::get('config')->settings->client->default->baseurl_meta; 0027 $sname = Zend_Registry::get('store_host'); 0028 $store_config = Zend_Registry::get('store_config'); 0029 0030 $getAuthUser = new Default_View_Helper_GetAuthUser(); 0031 $helperBuildMemberUrl = new Default_View_Helper_BuildMemberUrl(); 0032 0033 $helperImage = new Default_View_Helper_Image(); 0034 $auth = Zend_Auth::getInstance(); 0035 $member = $getAuthUser->getAuthUser(); 0036 $serverUrl = $this->serverUrl(); 0037 0038 $store_order = $store_config->order; 0039 $store_name = $store_config->name; 0040 $is_show_title = $store_config->is_show_title; 0041 $last_char_store_order = substr($store_order, -1); 0042 0043 $helperFetchCategory = new Default_View_Helper_CatTitle(); 0044 $cat_title = $helperFetchCategory->catTitle($this->cat_id); 0045 $cat_title_length = strlen($cat_title); 0046 //check logo-width: 0047 $logoWidth = (int)$this->template['header-logo']['width']; 0048 $cat_title_left = $logoWidth+60; 0049 $tabs_left = (int)$this->template['header-nav-tabs']['absolute-left']; 0050 $tabs_left += $cat_title_length*10; 0051 0052 $filter = new Local_Filter_Url_Encrypt(); 0053 //$thisurl = $helperBuildBaseUrl->buildBaserUrl(); 0054 $thisurl = "/"; 0055 if(isset($_GET['url'])) { 0056 $thisurl = $_GET['url']; 0057 } 0058 $url_logout = "/logout?redirect=".$filter->filter($thisurl); 0059 0060 0061 ?> 0062 <?php 0063 echo $this->render('partials/header/metaheader_react.phtml'); 0064 ?> 0065 0066 <style> 0067 0068 header a { 0069 color: <?=$this->template['header-nav-tabs']['link']['color']?>; 0070 } 0071 0072 header div.container.header { 0073 background-image: <?=$this->template['header']['background-image']?>; 0074 background-color: <?=$this->template['header']['background-color']?>; 0075 color: <?=$this->template['header']['color']?>; 0076 height: <?=$this->template['header']['height']?>; 0077 } 0078 0079 header .logo-header { 0080 background-image: <?=$this->template['header-logo']['background-image']?>; 0081 display: block; 0082 height: <?=$this->template['header-logo']['height']?>; 0083 left: <?=$this->template['header-logo']['left']?>; 0084 position: absolute; 0085 top: <?=$this->template['header-logo']['top']?>; 0086 width: <?=$this->template['header-logo']['width']?>; 0087 z-index: 999; 0088 overflow: hidden; 0089 } 0090 0091 header ul li:active { 0092 background: <?=$this->template['header-nav-tabs']['background-color-active']?> none repeat scroll 0 0; 0093 } 0094 header ul li:hover { 0095 background: <?=$this->template['header-nav-tabs']['background-color-hover']?> none repeat scroll 0 0; 0096 } 0097 0098 header ul li ul li:active { 0099 background: <?=$this->template['header-nav-tabs']['background-color-active']?> none repeat scroll 0 0; 0100 } 0101 0102 header ul li ul li:hover { 0103 background: <?=$this->template['header-nav-tabs']['background-color-hover']?> none repeat scroll 0 0; 0104 } 0105 header ul li:active > a { 0106 color: <?=$this->template['header-nav-tabs']['link']['color-active']?>; 0107 } 0108 header ul li:hover > a { 0109 color: <?=$this->template['header-nav-tabs']['link']['color-hover']?>; 0110 } 0111 header ul li ul li:hover a { 0112 color: <?=$this->template['header-nav-tabs']['link']['color-hover']?>; 0113 } 0114 0115 ul.menu-nav-tabs li { 0116 background-color: <?=$this->template['header-nav-tabs']['background-color']?>; 0117 border-color: <?=$this->template['header-nav-tabs']['border-color']?>; 0118 border-image: none; 0119 border-radius: <?=$this->template['header-nav-tabs']['border-radius']?>; 0120 border-style: <?=$this->template['header-nav-tabs']['border-style']?>; 0121 border-width: <?=$this->template['header-nav-tabs']['border-with']?>; 0122 height: <?=$this->template['header-nav-tabs']['height']?>; 0123 line-height: 24px; 0124 margin-right: <?=$this->template['header-nav-tabs']['margin-right']?>; 0125 } 0126 0127 0128 ul.menu-nav-tabs li.active { 0129 background: <?=$this->template['header-nav-tabs']['background-color-active']?> none repeat scroll 0 0; 0130 } 0131 0132 0133 0134 0135 #category-tree-container ul li.active > a { 0136 background-color: <?=$this->template['header-nav-tabs']['background-color-hover']?> !important; 0137 color: #ffffff !important; 0138 } 0139 0140 #category-tree-container ul li a:hover { 0141 background-color: <?=$this->template['header-nav-tabs']['background-color-hover']?> !important; 0142 color: #ffffff !important; 0143 } 0144 0145 #category-tree-container ul li a { 0146 display: block; 0147 width: 100%; 0148 float: left; 0149 background-color: transparent !important; 0150 color: <?=$this->template['header-nav-tabs']['background-color-active']?> !important; 0151 padding-left: 3px; 0152 padding-right: 40px; 0153 position: relative; 0154 -webkit-transition: all .2s ease-out; 0155 -moz-transition: all .2s ease-out; 0156 -o-transition: all .2s ease-out; 0157 transition: all .2s ease-out; 0158 } 0159 0160 0161 0162 .absolute-left { 0163 left: <?=$tabs_left?>px; 0164 } 0165 0166 .absolute-right { 0167 right: <?=$this->template['header-nav-tabs']['absolute-right']?>; 0168 } 0169 0170 .header_cat_link { 0171 bottom: 0; position: absolute; color: blue; font-size: 18pt; left: <?= $cat_title_left ?>px; 0172 } 0173 0174 0175 </style> 0176 0177 <header id="main-header" xmlns="http://www.w3.org/1999/html"> 0178 0179 0180 <?php if (false === $auth->hasIdentity() && empty($member->username)) { 0181 $helperEncryptUrl = new Default_View_Helper_EncryptUrl(); 0182 $redirectString = '/redirect/' . $helperEncryptUrl->EncryptUrl(Zend_Controller_Front::getInstance()->getRequest()->getScheme() . '://' . Zend_Controller_Front::getInstance()->getRequest()->getHttpHost().$_SERVER["REQUEST_URI"]); 0183 ?> 0184 <div class="user-menu-container"> 0185 <ul> 0186 <li role="presentation" 0187 class="<?php echo(strpos($_SERVER["REQUEST_URI"], 'register') ? 'active' : '') ?>"> 0188 <a href="<?=$baseurl?>register" rel="nofollow">Register</a></li> 0189 <li role="presentation" 0190 class="<?php echo(strpos($_SERVER["REQUEST_URI"], 'login') ? 'active' : '') ?>"> 0191 <a href="<?=$baseurl?>login<?php echo strpos($_SERVER["REQUEST_URI"], 'login') ? '' : $redirectString ?>" rel="nofollow">Login</a> 0192 </li> 0193 </ul> 0194 </div> 0195 <?php } ?> 0196 <?php 0197 $storeUrl = $last_char_store_order=='1'?$sname:$baseurl.'/s/'.$store_name; 0198 if (strpos($storeUrl, 'http') === false) { 0199 // It starts not with 'http' 0200 $storeUrl = 'https://' . $storeUrl; 0201 } 0202 ?> 0203 <figure class="logo-header"> 0204 <a href="<?php echo $storeUrl ?>"> 0205 <img width="<?= $this->template['header-logo']['width'] ?>" border="0" 0206 src="<?= $this->template['header-logo']['image-src'] ?>"> 0207 </a> 0208 </figure> 0209 <nav id="nav-top"> 0210 <div class="pull-left col-lg-5 col-md-5 col-sm-5 col-xs-5"> 0211 </div> 0212 <div id="nav-left" class="pull-right col-lg-7 col-md-7 col-sm-7 col-xs-7"> 0213 <?php if ($auth->hasIdentity() && !empty($member->username)) { ?> 0214 <ul class="menu pull-right"> 0215 <li class="link relative profile-menu-container"> 0216 <a rel="profile-menu" class="menu-trigger"> 0217 <div class="absolute header-profile-image"> 0218 <img 0219 src="<?= $helperImage->Image($member->profile_image_url, 0220 array('width' => 30, 'height' => 30)) ?>"/> 0221 0222 </div> 0223 <span><?= $member->username ?></span> 0224 </a> 0225 <ul class="profile-menu menu-dropdown"> 0226 <div class="dropdown-header"></div> 0227 <li class="link first"> 0228 <a href="<?= $helperBuildBaseUrl->buildBaseUrl('product/add') ?>"><?= $this->translate('Add Product') ?></a> 0229 </li> 0230 <li class="link"> 0231 <a href="<?= $helperBuildMemberUrl->buildMemberUrl($member->username, 'products') ?>"><?= $this->translate('Products') ?></a> 0232 </li> 0233 <li class="link"> 0234 <a href="<?= $helperBuildMemberUrl->buildMemberUrl($member->username, 'plings') ?>"><?= $this->translate('Payout') ?></a> 0235 </li> 0236 <li class="link"> 0237 <a href="<?= $helperBuildBaseUrl->buildBaseUrl('settings') ?>"><?= $this->translate('Settings') ?></a> 0238 </li> 0239 <li class="link"> 0240 <a href="<?= $url_logout ?>"><?= $this->translate('Logout') ?></a> 0241 </li> 0242 </ul> 0243 </li> 0244 </ul> 0245 <?php } else { ?> 0246 <?php } ?> 0247 <form id="search" class="pull-right" action="/search"> 0248 <input type="text" name="projectSearchText" class="content-search"> 0249 0250 <div class="icon-search-input absolute cursor-hand" 0251 onclick="$('#search').submit()"></div> 0252 </form> 0253 </div> 0254 </nav> 0255 0256 <?php if($is_show_title==1): ?> 0257 0258 <section class="container"> 0259 <section class="wrapper"> 0260 <span class="header_cat_link" id="header_cat_link"> 0261 <?php /* <a href="/browse/cat/<?= isset($this->cat_id) ? $this->cat_id : 'all' ?>/order/latest"> */?> 0262 <a href="http://<?php echo $last_char_store_order=='1'?$sname:$baseurl.'/s/'.$store_name ?>"> 0263 <?=$store_name?> 0264 </a> 0265 </span> 0266 </section> 0267 </section> 0268 0269 <?php endif; ?> 0270 </header> 0271 <?php $this->inlineScript()->appendScript( 0272 ' $(document).ready(function(){ 0273 MenuHover.setup(); 0274 Popuppanel.setup(); 0275 LoginContainer.update(); 0276 PlingsRedirect.setup(); 0277 }); 0278 ');