<!-- BEGIN HEADER -->
<div id="header">
    <div id="sub_header">
        <a id="logo" href="<?=HOST?>/" title="CumulusClips - Free Video Sharing CMS, Video Sharing Script, YouTube Clone Script">CumulusClips - Free Video Sharing CMS, Video Sharing Script, YouTube Clone Script</a>
        <div id="header_right">

        <?php if ($loggedInUser): ?>

            <a href="<?=HOST?>/logout/" title="<?=Language::GetText('logout')?>"><?=Language::GetText('logout')?></a>
            <a href="<?=HOST?>/account/" title="<?=Language::GetText('account')?>"><?=Language::GetText('account')?></a>
            <a title="<?=Language::GetText('view_my_profile')?>" href="<?=HOST?>/members/<?=$loggedInUser->username?>/"><?=Language::GetText('view_my_profile')?></a>

            <?php if ($this->getService('User')->checkPermissions('admin_panel', $loggedInUser)): ?>
                <a href="<?=HOST?>/cc-admin/" title="<?=Language::GetText('admin_panel')?>"><?=Language::GetText('admin_panel')?></a>
            <?php endif ?>

        <?php else: ?>
            <a href="<?=HOST?>/login/" title="<?=Language::GetText('login')?>"><?=Language::GetText('login')?></a>
            <?php if ($config->enableRegistrations): ?>
                <a href="<?=HOST?>/register/" title="<?=Language::GetText('register')?>"><?=Language::GetText('register')?></a>
            <?php endif; ?>
        <?php endif; ?>

            <form action="<?=HOST?>/search/" method="post">
                <input class="defaultText" title="<?=Language::GetText('search_text')?>" type="text" name="keyword" value="<?=Language::GetText('search_text')?>" />
                <input type="hidden" name="submitted_search" value="TRUE" />
            </form>
        </div>
    </div>
</div>
<!-- END HEADER -->


<!-- BEGIN NAV -->
<div id="nav">
    <div id="sub_nav">
        <nav>
            <a href="<?=HOST?>/browse/"><?=Language::GetText('videos')?></a>
            <a href="<?=HOST?>/members/"><?=Language::GetText('members')?></a>
            <?php if ($config->enableUserUploads): ?>
                <a href="<?=HOST?>/account/upload/video/"><?=Language::GetText('upload')?></a>
            <?php endif; ?>
        </nav>

        <?php $activeLanguages = Language::getActiveLanguages(); ?>
        <?php if (count($activeLanguages) > 1): ?>

            <div id="languages">
                <a class="active-language" href=""><?=Language::getLanguage(true)?></a>
                <ul>
                    <?php foreach ($activeLanguages as $systemName => $language): ?>
                        <li><a href="<?=HOST?>/language/set/<?=$systemName?>/"><?=$language->native_name?></a></li>
                    <?php endforeach; ?>
                </ul>
            </div>

        <?php endif; ?>

    </div>

</div>
<!-- END NAV -->


