<?php
if (pjObject::getPlugin('pjOneAdmin') !== NULL)
{
	$controller->requestAction(array('controller' => 'pjOneAdmin', 'action' => 'pjActionMenu'));
}
?>

<div class="leftmenu-top"></div>
<div class="leftmenu-middle">
	<ul class="menu">
		<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdmin&amp;action=pjActionIndex" class="<?php echo $_GET['controller'] == 'pjAdmin' && $_GET['action'] == 'pjActionIndex' ? 'menu-focus' : NULL; ?>"><span class="menu-dashboard">&nbsp;</span><?php __('menuDashboard'); ?></a></li>
		<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminListings&amp;action=pjActionIndex" class="<?php echo in_array($_GET['controller'], array('pjAdminListings', 'pjGallery')) ? 'menu-focus' : NULL; ?>"><span class="menu-packages">&nbsp;</span><?php __('menuPackages'); ?></a></li>
		<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminEnquiries&amp;action=pjActionIndex" class="<?php echo $_GET['controller'] == 'pjAdminEnquiries' ? 'menu-focus' : NULL; ?>"><span class="menu-enquiries">&nbsp;</span><?php __('menuEnquiries'); ?></a></li>
		<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminComments&amp;action=pjActionIndex" class="<?php echo $_GET['controller'] == 'pjAdminComments' ? 'menu-focus' : NULL; ?>"><span class="menu-comments">&nbsp;</span><?php __('menuComments'); ?></a></li>
		<?php
		if ($controller->isAdmin() || $controller->isEditor())
		{
			if($controller->isAdmin())
			{
				?>
				<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminSubscriptions&amp;action=pjActionIndex" class="<?php echo $_GET['controller'] == 'pjAdminSubscriptions' ? 'menu-focus' : NULL; ?>"><span class="menu-subscriptions">&nbsp;</span><?php __('menuSubscriptions'); ?></a></li>
				<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminDestinations&amp;action=pjActionIndex" class="<?php echo in_array($_GET['controller'], array('pjAdminDestinations', 'pjAdminPages', 'pjAdminSlides', 'pjAdminBanners', 'pjAdminLogos')) ? 'menu-focus' : NULL; ?>"><span class="menu-pages">&nbsp;</span><?php __('menuContent'); ?></a></li>
				<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminOptions&amp;action=pjActionIndex" class="<?php echo ($_GET['controller'] == 'pjAdminOptions' && in_array($_GET['action'], array('pjActionIndex', 'pjActionSubmissions', 'pjActionEmails', 'pjActionSeo'))) || in_array($_GET['controller'], array('pjAdminLocales', 'pjBackup', 'pjLocale', 'pjAdminCountries', 'pjAdminTypes', 'pjAdminFeatures', 'pjCountry')) ? 'menu-focus' : NULL; ?>"><span class="menu-options">&nbsp;</span><?php __('menuOptions'); ?></a></li>
				<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminUsers&amp;action=pjActionIndex" class="<?php echo $_GET['controller'] == 'pjAdminUsers' ? 'menu-focus' : NULL; ?>"><span class="menu-users">&nbsp;</span><?php __('menuUsers'); ?></a></li>
				<li><a href="<?php echo PJ_INSTALL_URL; ?>" target="_blank"><span class="menu-preview">&nbsp;</span><?php __('menuPreview'); ?></a></li>
				<?php
			}else{
				?>
				<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminUsers&amp;action=pjActionIndex" class="<?php echo $_GET['controller'] == 'pjAdminUsers' ? 'menu-focus' : NULL; ?>"><span class="menu-users">&nbsp;</span><?php __('menuUsers'); ?></a></li>
				<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdminOptions&amp;action=pjActionEmails" class="<?php echo ($_GET['controller'] == 'pjAdminOptions' && in_array($_GET['action'], array('pjActionIndex', 'pjActionSubmissions', 'pjActionEmails'))) || in_array($_GET['controller'], array('pjAdminLocales', 'pjBackup', 'pjLocale', 'pjAdminCountries', 'pjAdminTypes', 'pjAdminFeatures')) ? 'menu-focus' : NULL; ?>"><span class="menu-options">&nbsp;</span><?php __('menuOptions'); ?></a></li>
				<li><a href="<?php echo PJ_INSTALL_URL; ?>" target="_blank"><span class="menu-preview">&nbsp;</span><?php __('menuPreview'); ?></a></li>
				<?php
			}
		}
		if ($controller->isOwner() || $controller->isEditor())
		{
			?><li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdmin&amp;action=pjActionProfile" class="<?php echo $_GET['controller'] == 'pjAdmin' && $_GET['action'] == 'pjActionProfile' ? 'menu-focus' : NULL; ?>"><span class="menu-users">&nbsp;</span><?php __('menuProfile'); ?></a></li><?php
		}
		?>
		<li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?controller=pjAdmin&amp;action=pjActionLogout"><span class="menu-logout">&nbsp;</span><?php __('menuLogout'); ?></a></li>
	</ul>
</div>
<div class="leftmenu-bottom"></div>