<?php
/**
* @version $Id: mod_quickicon.php 4806 2006-08-28 17:17:08Z stingrey $
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );

if (!defined( '_JOS_QUICKICON_MODULE' )) {
	/** ensure that functions are declared only once */
	define( '_JOS_QUICKICON_MODULE', 1 );	
global $adminLanguage;
	function quickiconButton( $link, $image, $text ) {
		?>
		<div style="float:left;">
			<div class="icon">
				<a href="<?php echo $link; ?>">
					<?php echo mosAdminMenus::imageCheckAdmin( $image, '/administrator/images/', NULL, NULL, $text ); ?>
					<span><?php echo $text; ?></span>
				</a>
			</div>
		</div>
		<?php
	}
	
	$securitycheck 	= intval( $params->get( 'securitycheck', 1 ) );
	$versioncheck 	= intval( $params->get( 'versioncheck', 1 ) );
	
	?>
	<div id="cpanel">
		<?php
		$link = 'index2.php?option=com_content&amp;sectionid=0&amp;task=new';
		quickiconButton( $link, 'module.png', $adminLanguage->A_QUICK_ADD_NEW );
	
		$link = 'index2.php?option=com_content&sectionid=0';
		quickiconButton( $link, 'addedit.png',  $adminLanguage->A_QUICK_CONTENT );
	
		$link = 'index2.php?option=com_typedcontent';
		quickiconButton( $link, 'addedit.png',$adminLanguage->A_QUICK_STATIC );
	
		$link = 'index2.php?option=com_frontpage';
		quickiconButton( $link, 'frontpage.png', $adminLanguage->A_QUICK_FRONTPAGE );
	
		$link = 'index2.php?option=com_sections&amp;scope=content';
		quickiconButton( $link, 'sections.png', $adminLanguage->A_QUICK_SECTION );
	
		$link = 'index2.php?option=com_categories&amp;section=content';
		quickiconButton( $link, 'categories.png', $adminLanguage->A_QUICK_CATEGORY );
	
		$link = 'index2.php?option=com_media';
		quickiconButton( $link, 'mediamanager.png', $adminLanguage->A_QUICK_MEDIA );
	
		if ( $my->gid > 23 ) {
			$link = 'index2.php?option=com_trash';
			quickiconButton( $link, 'trash.png', $adminLanguage->A_QUICK_TRASH );
		}
	
		if ( $my->gid > 23 ) {
			$link = 'index2.php?option=com_menumanager';
			quickiconButton( $link, 'menu.png', $adminLanguage->A_QUICK_MENU );
		}
	
		if ( $my->gid > 24 ) {
			$link = 'index2.php?option=com_languages';
			quickiconButton( $link, 'langmanager.png', $adminLanguage->A_QUICK_LANGUAGE );
		}
	
		if ( $my->gid > 23 ) {
			$link = 'index2.php?option=com_users';
			quickiconButton( $link, 'user.png',  $adminLanguage->A_QUICK_USER );
		}
	
		if ( $my->gid > 24 ) {
			$link = 'index2.php?option=com_config&hidemainmenu=1';
			quickiconButton( $link, 'config.png', $adminLanguage->A_QUICK_GLOBAL );
		}
		/*
		$link = 'index2.php?option=com_admin&task=versioncheck';
		quickiconButton( $link, 'version_check.png', 'Version Check' );
		*/
		
		if ($versioncheck) {
		// show version check
			josVersionCheck('88%',0);
		}
		
		if ($securitycheck) {
		// show security setting check
			josSecurityCheck('88%');
		}
		?>
	</div>
	<div style="clear:both;"> </div>	
	<?php
}
?>