<div class="vk-user">
    <table border="0" cellspacing="0" cellpadding="0">
        <tr>
            <?php if (!$vk_is_logged_in && !$fb_is_logged_in): ?>
            <td align="left" valign="top" class="vk-user-text">
                Войти:
            </td>
            <td align="left" valign="top" class="vk-user-icon">
                <a href="<?php echo htmlspecialchars($vk_login_link) ?>" title="VKontakte">
                    <img src="<?php echo $view['assets']->getUrl('images/vkontakte_16.png') ?>" width="16" height="16" border="0" alt="VKontakte" />
                </a>
            </td>
            <td align="left" valign="top" class="fb-user-icon">
                <a href="<?php echo htmlspecialchars($fb_login_link) ?>" title="Facebook">
                    <img src="<?php echo $view['assets']->getUrl('images/facebook_16.png') ?>" width="16" height="16" border="0" alt="Facebook" />
                </a>
            </td>
            <?php else: ?>
                <?php if ($vk_is_logged_in): ?>
                <td align="left" valign="top" class="vk-user-icon">
                    <a href="http://vk.com/id<?php echo $vk_user_id ?>" title="VKontakte">
                        <img src="<?php echo $view['assets']->getUrl('images/vkontakte_16.png') ?>" width="16" height="16" border="0" alt="VKontakte" />
                    </a>
                </td>
                <td align="left" valign="top" class="vk-user-text">
                    <a href="http://vk.com/id<?php echo $vk_user_id ?>"><?php echo $first_name.' '.$last_name ?></a>
                </td>
                <td align="left" valign="top" class="vk-user-logout">
                    (<a href="<?php echo htmlspecialchars($vk_logout_link) ?>">выйти</a>)
                </td>
                <?php elseif ($fb_is_logged_in): ?>
                <td align="left" valign="top" class="vk-user-icon">
                    <a href="http://www.facebook.com/profile.php?id=<?php echo $fb_user_id ?>" title="Facebook">
                        <img src="<?php echo $view['assets']->getUrl('images/facebook_16.png') ?>" width="16" height="16" border="0" alt="Facebook" />
                    </a>
                </td>
                <td align="left" valign="top" class="vk-user-text">
                    <a href="http://www.facebook.com/profile.php?id=<?php echo $fb_user_id ?>"><?php echo $name ?></a>
                </td>
                <td align="left" valign="top" class="vk-user-logout">
                    (<a href="<?php echo htmlspecialchars($fb_logout_link) ?>">выйти</a>)
                </td>
                <?php endif; ?>
            <?php endif; ?>
        </tr>
    </table>
</div>