top_desktop.php 5.2 KB
Newer Older
Яков's avatar
first  
Яков committed
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
<table class="header mobile_hide" cellpadding="0" cellspacing="0" width="100%">
    <tbody>
    <tr>
        <td>
            <div class="max_width">
                <table class="root_table__top__wrap" width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td class="top_left">
                            <div class="top_left__switcher">
                                <?php
                                $culture = $this->context->getUser()->getCulture();
                                ?>
                                <table class="swicher_table" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td valign="bottom">RU</td>
                                        <td valign="bottom">
                                            <a class="btn_all" style="border-bottom: none;" href="<?php echo LangHelper::urlOtherLang($culture); ?>">
                                                <div class="swicher_lang swicher_sprite_<?php echo $culture ?>"></div>
                                            </a></td>
                                        <td valign="bottom">EN</td>
                                    </tr>
                                </table>
                            </div>
                            <?php
                            /*<div class="region"><a href="" class="green_link bbs_d">Уфа, Респ. Башкортостан</a></div>*/
                            if (csSettings::get('phone')) {
Яков's avatar
test    
Яков committed
27
                                echo '<div class="header__phone">' . __('Телефон') . ':&nbsp;<a href="tel:' . preg_replace('/[^+0-9]/', '', csSettings::get('phone')) . '">' . csSettings::get('phone') . '</a></div>';
Яков's avatar
first  
Яков committed
28
29
                            }
                            if (csSettings::get('email')) {
Яков's avatar
test    
Яков committed
30
                                echo '<div><nobr>' . __('Эл. почта') . '</nobr>:&nbsp;<a href="mailto:' . csSettings::get('email') . '">' . csSettings::get('email') . '</a></div>';
Яков's avatar
first  
Яков committed
31
32
33
34
                            }
                            ?>
                        </td>
                        <td class="top_right">
Яков's avatar
test    
Яков committed
35
                            <a href="" class="callback_open_link green_link bbs_d" onclick="callback.open();return false;"><?php echo __('Заказать звонок');?></a>
Яков's avatar
first  
Яков committed
36
37
38
39
40
41
42
43
44
45
46
47
                        </td>
                    </tr>
                </table>
            </div>
        </td>
    </tr>
    <tr>
        <td>
            <div class="max_width header__main" style="height: 100%;">
                <table class="second_floor__table" style="width: 100%; height: 100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <?php
Яков's avatar
test    
Яков committed
48
49
50
                        if ($sf_user->hasAttribute('active_discount') && $sf_user->getAttribute('active_discount') != false) {
                            $active_discount = $sf_user->getAttribute('active_discount');
                        }
Яков's avatar
first  
Яков committed
51
52
53
54
55
56
57
58
59
                        $module_action = $sf_request->getParameter('module') . '_' . $sf_request->getParameter('action');
                        echo '<td width="100' . ($module_action == 'basket_complete' ? '%' : '') . '" align="center">';
                        $logo = '<img width="100" height="51" src="/i/logo.svg" />';
                        echo (in_array($sf_request->getPathInfo(), array('/ru/', '/en/')) ? $logo : '<a style="border: none" href="' . url_for('@homepage') . '">' . $logo . '</a>');
                        echo '</td>';
                        if($module_action != 'basket_complete'){
                            echo '<td class="top_menu">';
                            include_component('main', 'menu');
                            echo '</td>';
Яков's avatar
test    
Яков committed
60
                            echo '<td style="position: relative;" class="top_right ' . ($module_action == 'basket_index' ? (isset($active_discount) ? 'discount_basket' : '') : (isset($active_discount) ? 'discount d' . $active_discount : '') )  . '">';
Яков's avatar
first  
Яков committed
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
                            if($module_action != 'search_search'){
                                echo '<div class="search_btn" onclick="search._show();"></div>';
                            }
                            $basket_page = ($module_action == 'basket_index');
                            $basket_info = $sf_user->getBasketInfo();
                            echo '<' . ($basket_page ? 'span' : 'a href="' . url_for('@basket') . '"') . ' class="btn white_b_btn basket_btn' . ($basket_info['offerCount'] > 0 ? ' basket_btn_full' : '') . ' ' . ($basket_page ? 'basket_btn_disabled' : '') . '">';
                            echo '<div class="basket_btn__empty">' . __('Корзина') . '</div>';
                            echo '<div class="basket_btn__product_count">' . $basket_info['offerCountText'] . '</div>';
                            echo '<div class="basket_btn__price"><span class="basket_btn__price__val">' . $basket_info['priceText'] . '</span>&nbsp;<span class="rub">i</span></div>';
                            echo '</' . ($basket_page ? 'span' : 'a') . '>';
                            echo '</td>';
                        }
                        ?>
                    </tr>
                </table>
            </div>
        </td>
    </tr>
    </tbody>
</table>