layout.php 2.86 KB
Newer Older
Игорь's avatar
init    
Игорь 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
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
<?php include(sfConfig::get('sf_app_template_dir') . '/header.php'); ?>
<?php include(sfConfig::get('sf_app_template_dir') . '/_popup.php');?>
    <div class="body_wrapper_wrapper">
        <table class="body_wrapper" width="100%" cellspacing="0" cellpadding="0" height="100%">
            <tr>
                <td height="100%" align="center">
                    <table class="root_table" width="100%" cellspacing="0" cellpadding="0" height="100%">
                        <?php
                        if($sf_user->isAuthenticated() || (!$sf_user->isAuthenticated() && $sf_request->getPathInfo() == '/')){
                            ?>
                            <tr valign="top">
                                <td class="root_table__top" style="border-bottom: 1px solid #C5CBD6;" align="center" valign="top">
                                    <div class="max_width" style="padding-top: 10px;padding-bottom: 10px;">
                                        <a class="logo" href="<?php echo url_for('@homepage');?>"><img src="/i/logo.svg" width="140" height="50" /></a>
                                        <?php
                                        include_component('main', 'mainMenu', array('template' => 'mainMenu'));
                                        if($sf_user->isAuthenticated()){
                                            ?>

                                            <div class="profile">
                                                <b><?php echo $sf_user->getAccount()->getName(); ?></b><i class="br10"></i>
                                                <a href="<?php echo url_for('@signout');?>">Выйти</a>
                                            </div>
                                        <?php
                                        } else {
                                            ?>
                                            <div class="no_profile">
                                                <a href="#" onclick="popup.open('signin_form');return false;">Войти</a>
                                            </div>
                                            <?php
                                        }
                                        ?>
                                    </div>
                                </td>
                            </tr>
                            <?php
                        }
                        ?>
                        <tr valign="top">
                            <td class="root_table__middle" align="center" valign="top" height="100%">
                                <?php
                                echo $sf_content;
                                ?>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
<?php include(sfConfig::get('sf_app_template_dir') . '/footer.php'); ?>