index.php 23 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <?php
    if (preg_match("/page/i", $_SERVER['REQUEST_URI']) && !preg_match("/prof_tips/i", $_SERVER['REQUEST_URI'])) {
        echo "<link rel='canonical' href='http://".$_SERVER['HTTP_HOST'].$this->seoUrl->setUrl($this->url->get($page_url_for_sort['3']))."?all=1'>";
    }
    if (preg_match("/sort-/i", $_SERVER['REQUEST_URI'])) {
        echo "<meta name=\"robots\" content=\"noindex, follow\"/>";
    }
    if(preg_match("/customer_login/i", $_SERVER['REQUEST_URI'])){
        echo "<meta name=\"robots\" content=\"noindex, nofollow\"/>";
    }
    ?>
    <title><?= !empty( $meta_title ) ? $meta_title : \config::get( 'global#title' ) ?></title>
    <?= !empty( $meta_link_next ) ? $meta_link_next : '' ?>
    <?= !empty( $meta_link_prev ) ? $meta_link_prev : '' ?>
    <meta name="keywords" content="<?= !empty( $meta_keywords ) ? $meta_keywords : \config::get( 'global#title' ) ?>">
    <meta name="description" content="<?= !empty( $meta_description ) ? $meta_description : \config::get( 'global#title' ) ?>">
    <?php $this->assets->outputCss() ?>
    <?php
    if (!empty($lang)):
    if ($lang[count($lang)-1] == 'ru'): ?>
        <link rel="alternate" hreflang="uk" href="http://<?=$_SERVER['HTTP_HOST']?><?= isset($change_lang_url['1']) && !empty($change_lang_url['1']) ? $change_lang_url['1'] : '/' ?>"/>
        <?php else: ?>
        <link rel="alternate" hreflang="ru" href="http://<?=$_SERVER['HTTP_HOST']?><?= isset($change_lang_url['2']) && !empty($change_lang_url['2']) ? $change_lang_url['2'] : '/ru' ?>"/>
    <?php endif; ?>
    <?php endif; ?>

    <?= ( isset( $no_robots ) && !empty( $no_robots ) ? isset($utm) &&  $utm == 0 ? '<meta name="robots" content="noindex, follow"/>' : '' : '' ) ?>

    <?= $this->partial('partial/header', ['lang' => $lang]) ?>

    <?php if(!empty($css)): ?>
        <?= $this->partial('partial/cssAsset', ['css' => $css]) ?>
    <?php endif; ?>
</head>

<?php
$lang_id        = $this->seoUrl->getLangId();
$in_cart        = $this->session->get('in_cart', []);

$pages          = $this->models->getPages()->getPages( $lang_id );

$main_menu     = $this->models->getNavigation()->getActiveData($lang_id );

$params         = $this->dispatcher->getParams();

$page_title = isset( $page_title ) && !empty( $page_title ) ? $page_title : '';

?>

<body class="skin-blue sidebar-mini fixed sidebar-collapse clearfix">

<?= $this->partial('partial/popupCart') ?>
<?php if($this->session->get('special_users_id') != null): ?>
    <?php $this->partial('partial/dealer', ['customer'=> $customer]) ?>
<?php endif; ?>
<div id="wrapper" class="clearfix">
    <div id="header" class="clearfix">
        <div style="display: none" itemscope itemtype="http://schema.org/LocalBusiness">
            <meta itemprop="name" content="Semena.in.ua - інтернет-магазин. ТМ «Професійне насіння»">
            <meta itemprop="logo" content="http://semena.in.ua/images/logo.png">
            <img itemprop="image" src="http://semena.in.ua/images/logo.png" alt="Semena.in.ua - інтернет-магазин. ТМ «Професійне насіння»">
            <span itemprop="priceRange">UAH</span>
            <span style="display: none">
            <link itemprop="url" href="http://semena.in.ua/ru">
            <a itemprop="sameAs" href="https://www.facebook.com/Professionalseeds">FB</a>
            </span>
            <meta itemprop="telephone" content="+38 (044) 392 43 17 ">
            <meta itemprop="telephone" content="+38 (093) 026 86 64">
            <meta itemprop="telephone" content="+38 (067) 464 48 59">
            <meta itemprop="telephone" content="+38 (050) 464 48 59">
            <meta itemprop="telephone" content="+38 (093) 170 18 29">
            <span itemprop="email">info@hs.kiev.ua</span>
            <div style="display: none" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
                <span itemprop="streetAddress">вул. Садова 95</span>
                <span itemprop="addressLocality">м. Київ</span>
                <span itemprop="postalCode">02002 а/с 115</span>
            </div>
        </div>
        <div style="display: none" itemscope itemtype="http://schema.org/WebSite">
            <meta itemprop="url" content="http://semena.in.ua/ru"/>
            <form itemprop="potentialAction" itemscope itemtype="http://schema.org/SearchAction">
                <meta itemprop="target" content="http://semena.in.ua/search?search={search}"/>
                <input itemprop="query-input" type="text" name="search" required/>
                <input type="submit"/>
            </form>
        </div>
        <div class="inner">
            <div class="clearfix">
                <div class="float columns3 first_column">
                    <div class="switch_lang clearfix">
                        <div class="float"><?php if($lang_id==1):?>Українською<?php else: ?><a href="<?= isset($change_lang_url['1']) && !empty($change_lang_url['1']) ? $change_lang_url['1'] : '/' ?>" title="" <?php if($lang_id==1):?>class="active"<?php endif; ?>>Українською</a><?php endif; ?></div>
                        <div class="float"><?php if($lang_id==2):?>По-русски<?php else: ?><a href="<?= isset($change_lang_url['2']) && !empty($change_lang_url['2']) ? $change_lang_url['2'] : '/ru' ?>" title="" <?php if($lang_id==2):?>class="active"<?php endif; ?>>По-русски</a><?php endif; ?></div>
                    </div>
                    <div class="contact_phones">
                        <span class="small_digits">(044)</span><span> 392-43-17</span>
                        <span class="small_digits">(093)</span><span> 170-18-29</span>
                    </div>
                    <div class="contact_mob_phones">
                        <span class="small_digits">(050)</span><span> 464-48-59</span>
                        <span class="small_digits">(067)</span><span> 464-48-59</span>
                    </div>
                    <div class="contact_mob_phones">
                        <span class="small_digits">(093)</span><span> 026-86-64</span>
                    <div style="float:right;font-size:12px;margin-right:65px;" class="contact_callback_phones">
                        <a href="#" class="callback" title="<?= $t->_("Feedback")?>" id="ajax_simple" data-options="width: 940, height: 400" target="<?= $this->seoUrl->setUrl( $this->url->get([ 'for' => 'callback' ])) ?>" data-type="ajax"><?= $t->_("Feedback")?></a>
                    </div>
					</div>
                </div>
                <div class="float columns3 second_column">
                    <div class="logo">
                        <a href="<?= $this->seoUrl->setUrl('/') ?>" title=""><img alt="Інтернет-магазин насіння" title="Магазин насіння Semena.in.ua" src="/images/logo.png" width="314" height="76" /></a>
                    </div>
                </div>
	          	<div class="float columns3 third_column last">
                    <div class="clearfix">
                        <div class="float basket_number float_right last"><a href="<?= $this->seoUrl->setUrl('/basket') ?>" title="<?= $t->_("cart")?>"><?= !empty( $in_cart ) ? count( $in_cart ) : '0' ?></a></div>

                        <div class="float basket float_right"><a href="<?= $this->seoUrl->setUrl('/basket') ?>" title="<?= $t->_("cart")?>" class="<?= (!empty( $static_page_alias ) && $static_page_alias == '/basket' ? ' active' : '') ?>"><?= $t->_("your_cart")?></a></div>
                        <?php echo '<div class="float menu_cabinet float_right">
                            <a href="'.$this->seoUrl->setUrl('/cabinet').'" title="'.(!empty( $customer['name'] ) ? $customer['name'] : $t->_("personal_account")).'" class="'.(!empty( $static_page_alias ) && $static_page_alias == '/cabinet' ? ' active' : '').'">'.(!empty( $customer['name'] ) ? $customer['name'] : $t->_("personal_account")).'</a>
                        </div>';

                       if(!$this->getDi()->get('request')->get('_url') || $this->getDi()->get('request')->get('_url')=="/ru" ){?>
                           <div class="file_download_link_">
                               <a href="http://storage.semena.in.ua/temp/catalog.pdf" target="_blank"><?= $t->_("file_download_link")?></a>
                           </div>
                       <?php }?>

                        <div class="float faq float_right">
                            <a href="<?= $this->seoUrl->setUrl('/faq') ?>">FAQ</a>
                        </div>

                    </div>

                    <div class="clearfix compare_wrapper">
                        <?= !empty( $compare ) ? '<div class="compare"><a href="#" title="'.$t->_("comparison_list").'">'.$t->_("comparison_list").' '.$count.'</a></div>' : '' ?>

                        <?php

                        if( !empty( $compare_ ) )
                        {
                            $data_compare =
                                '<div class="compare_list">'.
                                    '<div class="compare"><a href="#" title="'.$t->_("comparison_list").'">'.$t->_("comparison_list").' '.$count.'</a></div>'.
                                        '<ul>';
                            foreach( $compare_ as $comp )
                            {
                                foreach( $comp as $k => $c )
                                {
                                    $data_compare .= '<li class="clearfix"><a href="'.$this->seoUrl->setUrl($c['url']).'" title="" class="float">'.$c['title'].' '.$c['count'].'</a><a href="'.$this->seoUrl->setUrl($c['url_del']).'" title="" class="float"><img src="/images/compare_del.jpg" alt="" height="8" width="8" /></a></li>';
                                }
                            }

                            $data_compare .= '</ul></div>';

                            echo( $data_compare );
                        }

                        ?>

                    </div>
                    <div class="site_search">
                        <form action="<?= $this->url->get([ 'for' => 'search_items' ]) ?>" method="get">
                            <div class="search_result_wrapper">
                                <input type="text" name="search" id="search_item" value="<?= isset($search) && !empty($search) ? $search : '' ?>" />
                                <label><img src="/images/search.png" alt="search" width="16" height="17" /></label>
                                <div class="search_result_display" id="search_result_display">
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <div id="top_icon_for_phone" style="display:none;">
                	<div class="icon_for_phone icon_search"><a onclick="document.getElementById('search_for_phone').style.display='block'"></a></div>
                	<div class="icon_for_phone icon_basket"><a href="<?= $this->seoUrl->setUrl('/basket') ?>" title="<?= $t->_("cart")?>"><span class="basket_number"><?= !empty( $in_cart ) ? count( $in_cart ) : '0' ?></span></a></div>
                	<div class="icon_for_phone icon_menu"><a onclick="document.getElementById('menu_for_phone').style.display='block'"></a></div>
                </div>
                <div id="search_for_phone" style="display:none">
                	<div class="icon_for_phone icon_exit_white"><a onclick="document.getElementById('search_for_phone').style.display='none'; false"></a></div>
                    <form action="<?= $this->url->get([ 'for' => 'search_items' ]) ?>" method="get">
                        <div class="search_result_wrapper">
                            <input type="text" name="search" id="search_item" placeholder="Что ищем ?" value="<?= isset($search) && !empty($search) ? $search : '' ?>" />
                            <input type="submit" value="Search" id="search_submit_for_phone"/>
                        </div>
                    </form>
                
                </div>
                <div id="menu_for_phone" style="display:none">
                	<div class="icon_for_phone icon_exit"><a onclick="document.getElementById('menu_for_phone').style.display='none'; false"></a></div>
                	<div class="icon_for_phone icon_ua <?php if($lang_id==2):?>activ<?php else: ?>pas<?php endif; ?>">
						<?php if($lang_id==1):?>
                        	<a></a>
                        <?php else: ?>
                            <a href="<?= isset($change_lang_url['1']) && !empty($change_lang_url['1']) ? $change_lang_url['1'] : '/' ?>" title="">
                            </a>
						<?php endif; ?>
                    </div>
                    
                	<div class="icon_for_phone icon_ru <?php if($lang_id==1):?>activ<?php else: ?>pas<?php endif; ?>"><?php if($lang_id==2):?><a></a><?php else: ?><a href="<?= isset($change_lang_url['2']) && !empty($change_lang_url['2']) ? $change_lang_url['2'] : '/ru' ?>" title="" <?php if($lang_id==2):?>class="active"<?php endif; ?>></a><?php endif; ?></div>
                	<ul>
						<?php foreach($main_menu as $menu_item):?>
              		        <li class="<?= ( array_search(trim($menu_item['url'], '/'), $this->seoUrl->getLink(true)) || $menu_item['url']==$this->seoUrl->getLink()  ? ' active' : '' ) ?> header_nav_<?=$menu_item['weight']?>">
          		              	<a href="
                                <?php if($menu_item['name']=='Каталог'):?>
									<?php if($lang_id==1):?>/<?php else: ?>/ru<?php endif; ?>
								<?php else: ?>
									<?=$menu_item['url'];?>
								<?php endif;?>
                                " title="<?=$menu_item['name']?>"><?=$menu_item['name'];?>
                            	</a>
                        	</li>
                   		<?php endforeach ?>  
						<?php echo '<li class=" header_nav_8">
                            <a href="'.$this->seoUrl->setUrl('/cabinet').'" title="'.(!empty( $customer['name'] ) ? $customer['name'] : $t->_("personal_account")).'" class="'.(!empty( $static_page_alias ) && $static_page_alias == '/cabinet' ? ' active' : '').'">'.(!empty( $customer['name'] ) ? $customer['name'] ."&nbsp;&nbsp;(". $t->_("personal_account").")" : $t->_("personal_account")).'</a>
                        </li>';
						?>
                     
                    </ul>
                </div>                
            </div>
            <div id="header_nav" class="clearfix">

               <ul class="nav_menu_main">
                   <?php foreach($main_menu as $menu_item):?>
                        <li class="<?= ( array_search(trim($menu_item['url'], '/'), $this->seoUrl->getLink(true)) || $menu_item['url']==$this->seoUrl->getLink()  ? ' active' : '' ) ?> header_nav_<?=$menu_item['weight']?>"><a href="<?=$menu_item['url']?>" title="<?=$menu_item['name']?>"><?=($menu_item['name']=='Головна' || $menu_item['name']=='Главная')?'<img src="/images/ico_home.png" />':$menu_item['name'];?></a></li>
                   <?php endforeach ?>
               </ul>
            </div>
            <div id="flash_output"><?= $this->flash->output(); ?></div>
        </div>
    </div>

    <?= $this->getContent(); ?>

</div>
<div id="footer">
    <div class="up inner">
        <a href="#"><img src="/images/up.png" alt="Вгору" width="36" height="36" /></a>
    </div>

    <div class="copyright">
        <div class="inner clearfix">
            <p class="float"><?= $t->_("tm")?></p>
            <p class="float float_right copyright_logo_margin">
                <a href="http://artweb.ua/" title=""><img src="/images/art_web_logo.png" alt="" width="58" height="17" /></a>
            </p>
            <p class="float float_right">
                <a href="#" title=""><?= $t->_("website_design")?></a>
            </p>
        </div>
    </div>
</div>

<div class="delivery-form-par">
    <div class="close-white"></div>
    <div class="popup-main-delivery">
        <div class="content-popup">
            <div class="close-popup"></div>
            <div class="text-up">
                <p style="padding-bottom: 9px;font-size: 18px;"><?= $t->_("popup-main1")?></p>
            </div>
            <div class="text-down">
                <p class="up-text"><?= $t->_("popup-main2")?></p>
                <form method="post" class="deliver-form" action="./popup/">
                    <input type="text" name="username" placeholder="<?= $t->_("popup-main3")?>">
                    <input type="email" name="email" required placeholder="Email">
                    <button type="submit" class="submit-delivery-but"><?= $t->_("popup-main4")?></button>
                </form>
                <p class="footer-text"><?= $t->_("popup-main5")?></p>
            </div>
        </div>
    </div>
</div>

<script>
    $(document).ready(function(){
        function getCookie(a) {
            var b = new RegExp(a+'=([^;]){1,}');
            var c = b.exec(document.cookie);
            if(c) c = c[0].split('=');
            else return false;
            return c[1] ? c[1] : false;
        }
        var cookie = getCookie('popup');
        if (cookie !== '1') {
            setTimeout(function(){$(".open-delivery-modal").show();},1000);
        }
        else {
            $(".open-delivery-modal").hide();
        }
    });
    $(".open-delivery-modal div img").click(function(){
        $(".delivery-form-par").show();
        $(".delivery-form-par").animate({opacity: "1"}, 500, function() {});
        $(".delivery-form-par .popup-main-delivery").animate({opacity: "1",top: "15%"}, 300, function() {});
    });
    $(".delivery-form-par .close-white").click(function(){
        $(".delivery-form-par .popup-main-delivery").animate({opacity: "0",top: "-50%"}, 300, function() {});
        $(".delivery-form-par").animate({opacity: "0"}, 500, function() {});
        setTimeout(function(){$(".delivery-form-par").hide();}, 600);
    });
    $(".modal_close").click(function(){
        $(".open-delivery-modal").hide();
    });
</script>
<?php
    if( !IS_PRODUCTION )
{

    echo('<div id="profiler">');

    $info = $this->profiler->getInfoStatistics();

    echo
    (
        '<div id="profiler-general">'.
        '<span'.( $info['exec']>=50 ? ' class="warning"' : '' ).'>time total:&nbsp;'.$info['exec'].'&nbsp;ms</span> | '.
        '<span class="'.( $info['db']['time']>=20 ? 'warning ' : '' ).'profiler-sql-show">db time&nbsp;('.$info['db']['count'].'):&nbsp;'.$info['db']['time'].'&nbsp;ms</span> | '.
        '<span'.( $info['memory']>=800 ? ' class="warning"' : '' ).'>memory:&nbsp;'.$info['memory'].'&nbsp;KB</span>'.
        '</div>'
    );

    $info = $this->profiler->getAllStatistics();

    if( !empty($info) && isset($info['sql']) && !empty($info['sql']) )
    {

        $html   = '<div id="profiler-sql">';
        $c      = 1;

        foreach( $info['sql'] as $d )
        {
            $html .=
                '<div class="profiler-sql-item clearfix">'.
                '<div class="num">'.$c.'</div>'.
                '<div class="query">'.trim($d['sql']).'</div>'.
                '<div class="time '.( round( $d['time'] * 1000, 0 )>=5 ? 'warning' : '' ).'">'.round( $d['time'] * 1000, 3 ).'&nbsp;ms</div>'.
                '</div>';

            $c++;
        }

        $html .= '</div>';

        echo( $html );

        echo('</div>');
    }
}
?>

<?= $this->partial('partial/footer', ['lang', $lang]); ?>

<?php if(!empty($js)): ?>
    <?= $this->partial('partial/jsAsset', ['css' => $js]) ?>
<?php endif; ?>
<!--float block-->
<?php if(!$this->session->has('id')):
    $modal = $this->getDi()->get('models')->getModal()->getModalLike();
    ?>
<!--<div class="subscription-wr-all">-->
<!--    <div class="subscription-wr">-->
<!--        <div class="subscription-text">-->
<!--            <p>-->
<!--                --><?//= isset($modal['text']) ? $modal['text'] : 'Залиште свій email і отримайте приємний бонус разом з Вашою посилкою.' ?>
<!--            </p>-->
<!--        </div>-->
<!--        <div class="subscription-sale-wr">-->
<!--            <div class="subscription-sale-blocks">-->
<!--                <div class="sub-sale-blocks-img">-->
<!--                    <img src="/images/ico-sale-1.jpg"/>-->
<!--                </div>-->
<!--                <div class="sub-sale-blocks-text">-->
<!--                    <p>Акции</p>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="subscription-sale-blocks">-->
<!--                <div class="sub-sale-blocks-img">-->
<!--                    <img src="/images/ico-sale-2.jpg"/>-->
<!--                </div>-->
<!--                <div class="sub-sale-blocks-text">-->
<!--                    <p>Новинки</p>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="subscription-sale-blocks">-->
<!--                <div class="sub-sale-blocks-img">-->
<!--                    <img src="/images/ico-sale-3.jpg"/>-->
<!--                </div>-->
<!--                <div class="sub-sale-blocks-text">-->
<!--                    <p>Советы специалиста</p>-->
<!--                </div>-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="sub-sale-forma-wr">-->
<!--            <form method="POST" id="jform">-->
<!--                <div class="sub-sale-forma-blocks-l">-->
<!--                    <div class="sub-sale-forma-blocks-name-first">Имя</div>-->
<!--                    <input type="text" name="fullname" id="fullname"/>-->
<!--                </div>-->
<!--                <div class="sub-sale-forma-blocks-c"></div>-->
<!--                <div class="sub-sale-forma-blocks-r">-->
<!--                    <div class="sub-sale-forma-blocks-name">Электроная почта</div>-->
<!--                    <input type="text" name="email" id="email"/>-->
<!--                </div>-->
<!--                <div class="sub-submit">-->
<!--                    <input type="submit" id="send" value="ПОДПИСАТЬСЯ"/>-->
<!--                </div>-->
<!--            </form>-->
<!--        </div>-->
<!--        <div class="sub-text-footer">-->
<!--            <p>5000 человек уже подписаны на нашу рассылку</p>-->
<!--        </div>-->
<!--        <div class="sub-closed"><img src="/images/sub_closed.png" alt=""/></div>-->
<!--    </div>-->
<!--</div>-->
<?php endif; ?>
<!--end float block-->
</body>
</html>