<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<?php include_http_metas() ?>
<?php include_metas() ?>

<?php
    //include_title()
    echo content_tag('title', "Thu vien tu lieu - Admin")."\n";
?>
<?php use_helper('I18N') ?>
<?php use_javascript('/js/backend.js');?>

<?php
    $userID = $sf_context->getUser()->getUserId();
    if($userID) {
        $user = TbluserPeer::retrieveByPK($userID);
        if($user)
            $usGroup = $user->getUsAclgroup();
        else
            $usGroup = '';
    }
?>
<link rel="shortcut icon" href="/favicon.ico" />

</head>
<body>
<?php if (sfContext::getInstance()->getModuleName() != 'authenticate'):?>
	<div id="top">
		<div id="top_menu">
			<?php if (sfContext::getInstance()->getModuleName() == 'document'):?>
				<div class="tabSelected" style=" float:left ">
					<?php
						echo link_to(__('Document'), 'document', 'class=otherTabLink')
					?>
				</div>
			<?php else:?>
				<div class="tabUnSelected" style=" float:left ">
					<?php
						echo link_to(__('Document'), 'document', 'class=otherTabLink')
					?>
				</div>
			<?php endif;?>

			<?php if (sfContext::getInstance()->getModuleName() == 'presentation'):?>
				<div class="tabSelected" style=" float:left ">
					<?php
						echo link_to(__('Presentation'), 'presentation', 'class=otherTabLink')
					?>
				</div>
			<?php else:?>
				<div class="tabUnSelected" style=" float:left ">
					<?php
						echo link_to(__('Presentation'), 'presentation', 'class=otherTabLink')
					?>
				</div>
			<?php endif;?>


			<?php if (sfContext::getInstance()->getModuleName()=='category'):?>
				<div class="tabSelected" style=" float:left ">
					<?php
						echo link_to(__('Category'), 'category', 'class=otherTabLink')
					?>
				</div>
			<?php else:?>
				<div class="tabUnSelected" style=" float:left ">
					<?php
						echo link_to(__('Category'), 'category', 'class=otherTabLink')
					?>
				</div>
			<?php endif;?>

			<?php if (sfContext::getInstance()->getModuleName()=='lesson'):?>
				<div class="tabSelected" style=" float:left ">
					<?php
						echo link_to(__('Lesson'), 'lesson', 'class=otherTabLink')
					?>
				</div>
			<?php else:?>
				<div class="tabUnSelected" style=" float:left ">
					<?php
						echo link_to(__('Lesson'), 'lesson', 'class=otherTabLink')
					?>
				</div>
			<?php endif;?>

			<?php if($usGroup == 1):?>
    			<?php if (sfContext::getInstance()->getModuleName() == 'user'):?>
    				<div class="tabSelected" style=" float:left ">
    					<!--<a class="otherTabLink" href="user">User</a>-->
    					<?php
    						echo link_to(__('User'), 'user', 'class=otherTabLink')
    					?>
    				</div>
    			<?php else:?>
    				<div class="tabUnSelected" style=" float:left ">
    					<?php
    						echo link_to(__('User'), 'user', 'class=otherTabLink')
    					?>
    				</div>
    			<?php endif;?>

<!--
    			<?php if (sfContext::getInstance()->getModuleName()=='log'):?>
    				<div class="tabSelected" style=" float:left ">
    					<?php
    						echo link_to(__('Log'), 'log', 'class=otherTabLink')
    					?>
    				</div>
    			<?php else:?>
    				<div class="tabUnSelected" style=" float:left ">
    					<?php
    						echo link_to(__('Log'), 'log', 'class=otherTabLink')
    					?>
    				</div>
    			<?php endif;?>
          <!--
    			<?php if (sfContext::getInstance()->getModuleName()=='system'):?>
    				<div class="tabSelected" style=" float:left ">
    					<?php
    						echo link_to(__('System'), 'system', 'class=otherTabLink')
    					?>
    				</div>
    			<?php else:?>
    				<div class="tabUnSelected" style=" float:left ">
    					<?php
    						echo link_to(__('System'), 'system', 'class=otherTabLink')
    					?>
    				</div>
    			<?php endif;?>
          -->
    			<!--menu quan ly thong tin school-->
          <?php if (sfContext::getInstance()->getModuleName()=='school'):?>
    				<div class="tabSelected" style=" float:left ">
    					<?php
    						echo link_to(__('Schools'), 'school', 'class=otherTabLink')
    					?>
    				</div>
    			<?php else:?>
    				<div class="tabUnSelected" style=" float:left ">
    					<?php
    						echo link_to(__('Schools'), 'school', 'class=otherTabLink')
    					?>
    				</div>
    			<?php endif;?>

<!--
    			<?php if (sfContext::getInstance()->getModuleName()=='violetdealer'):?>
    				<div class="tabSelected" style=" float:left ">
    					<?php
    						echo link_to(__('Violet'), 'violetdealer', 'class=otherTabLink')
    					?>
    				</div>
    			<?php else:?>
    				<div class="tabUnSelected" style=" float:left ">
    					<?php
    						echo link_to(__('Violet'), 'violetdealer', 'class=otherTabLink')
    					?>
    				</div>
    			<?php endif;?>

<!--
    			<?php if (sfContext::getInstance()->getModuleName()=='myaccount'):?>
    				<div class="tabSelected" style=" float:left ">
    					<?php
    						echo link_to(__('My account'), 'myaccount', 'class=otherTabLink')
    					?>
    				</div>
    			<?php else:?>
    				<div class="tabUnSelected" style=" float:left ">
    					<?php
    						echo link_to(__('My account'), 'myaccount', 'class=otherTabLink')
    					?>
    				</div>
    			<?php endif;?>
-->
			<?php endif;?>

			<?php if ($sf_user->isAuthenticated()): ?>
				<div class="tabUnSelected" style=" float:left ">
	  				<?php echo link_to('sign out', 'authenticate/logout', 'class=otherTabLink') ?>
	  			</div>
			<?php endif ?>
		</div>
	</div>
<?php else :?>

<?php endif;?>
<?php echo $sf_data->getRaw('sf_content') ?>
</body>
</html>
