<ul id="nav_secondary">
<?php if( $this->userData['UMasterAdmin'] == '1') : ?>
<li class="nav-category"><span>Email Services</span></li>

    <?php if($this->global['install_type'] == 'server') { ?>
	<li id="pop3imap_settings"><a href="<?php echo $this->moduleBaseUrl ?>/services/pop3imap" title='POP3/IMAP'><span class="label"><?php print $this->translate('POP3/IMAP')?></span></a></li>
<?php } ?>

    <?php if($this->global['install_type'] == 'server') { ?>
	<li id="smtp_settings"><a href="<?php echo $this->moduleBaseUrl ?>/services/smtp" title='SMTP'><span class="label"><?php print $this->translate('SMTP')?></span></a></li>
<?php } ?>

    <?php if((($this->global['install_type'] == 'server' && file_exists( APP_ROOT . '../spamassassin/bin/spamd')) || $this->global['install_type'] != 'server')) { ?>
	<li id="spam_settings"><a href="<?php echo $this->moduleBaseUrl ?>/services/spam" title='Anti-Spam'><span class="label"><?php print $this->translate('Anti-Spam')?></span></a></li>
<?php } ?>
<?php endif; ?>

<?php if( $this->userData['UMasterAdmin'] == '1') : ?>
<li class="nav-category"><span>Mobility</span></li>

	<li id="activesync_settings"><a href="<?php echo $this->moduleBaseUrl ?>/services/activesync" title='Active Sync'><span class="label"><?php print $this->translate('ActiveSync')?></span></a></li>

	<li id="ios_profiles"><a href="<?php echo $this->moduleBaseUrl ?>/services/ios" title='iOS Profiles'><span class="label"><?php print $this->translate('iOS Profiles')?></span></a></li>

	<li id="mobileui"><a href="<?php echo $this->moduleBaseUrl ?>/services/mobileui" title='Mobile UI'><span class="label"><?php print $this->translate('Mobile UI')?></span></a></li>

<?php endif; ?>

<?php if( $this->userData['UMasterAdmin'] == '1') : ?>
<li class="nav-category"><span>DAV Services</span></li>

	<li id="dav_settings"><a href="<?php echo $this->moduleBaseUrl ?>/services/dav" title='CalDAV/CardDAV'><span class="label"><?php print $this->translate('CalDAV/CardDAV')?></span></a></li>

	<li id="dav_settings"><a href="<?php echo $this->moduleBaseUrl ?>/services/filesstorage" title='WebDAV File Storage'><span class="label"><?php print $this->translate('WebDAV File Storage')?></span></a></li>
<?php endif; ?>

<?php if($this->global['install_type'] == 'server' && ($this->userData['UMasterAdmin'] == '1' || $this->userData['UAlias'] == '1')) : ?>
<li class="nav-category"><span>Email Management</span></li>

	<li id="aliases_settings"><a href="<?php echo $this->moduleBaseUrl ?>/services/aliases" title='Email Aliases'><span class="label"><?php print $this->translate('Email Aliases')?></span></a></li>
        <?php if ( $this->userData['UMasterAdmin'] == '1' ) : ?>

	<li id="relay_settings"><a href="<?php echo $this->moduleBaseUrl ?>/services/mailrelay" title='Mail Relay'><span class="label"><?php print $this->translate('Mail Relay')?></span></a></li>

	<li id="massmail_settings"><a href="<?php echo $this->moduleBaseUrl ?>/services/massmail" title='Mass Mail'><span class="label"><?php print $this->translate('Mass Mail')?></span></a></li>
        <?php endif; ?>
<?php endif ?>

<?php if( $this->userData['UMasterAdmin'] == '1') : ?>
<li class="nav-category"><span>System Services</span></li>

    <?php if($this->global['install_type'] == 'server' && file_exists( APP_ROOT . '../av/sbin/clamd')) { ?>
	<li id="av_settings"><a href="<?php echo $this->moduleBaseUrl ?>/services/av" title='Anti-Virus'><span class="label"><?php print $this->translate('Anti-Virus')?></span></a></li>
<?php } ?>

    <?php if($this->global['install_type'] == 'server') { ?>
	<li id="archivevault_settings"><a href="<?php echo $this->moduleBaseUrl ?>/services/archivevault" title='Archive Vault'><span class="label"><?php print $this->translate('ArchiveVault')?></span></a></li>
<?php } ?>

	<li id="api_settings"><a href="<?php echo $this->moduleBaseUrl ?>/services/api" title='API Access'><span class="label"><?php print $this->translate('API Access')?></span></a></li>

    <?php if($this->global['install_type'] == 'server') { ?>
	<li id="sql_settings"><a href="<?php echo $this->moduleBaseUrl ?>/services/webmail" title='Webmail'><span class="label"><?php print $this->translate('Webmail')?></span></a></li>
	<li id="ios_profiles"><a href="<?php echo $this->moduleBaseUrl ?>/services/serviceproviders" title='serviceproviders'><span class="label"><?php print $this->translate('Service Providers')?></span></a></li>
<?php } ?>
<?php endif; ?>

<?php echo $this->pluginCall("renderServicesTabNav"); ?>

</ul>