<?php if(!defined('master_script')) die();

/**
 * Load stylesheet
 *
 * @category   Extension (widgets)
 * @author     Nico Wenig <nico.wenig@yellowgreen.de>
 * @version	   2009-07-11
 */

	$system_data['backend']['header'] .= '
		<link rel="MoreCSS" href="' . $system_data['folder']['extensions'] . 'widgets/MoreCSS.css">
		<link rel="stylesheet" type="text/css" media="all" href="' . $system_data['folder']['extensions'] . 'widgets/index.css">
	';

/**
 * Get widgets
 *
 * @category   Extension (widgets)
 * @author     Nico Wenig <nico.wenig@yellowgreen.de>
 * @version	   2009-12-21
 */

	$widgets = array();
	$open_widgets_folder = opendir($system_data['folder']['widgets']);
	
	while($entry = readdir($open_widgets_folder)) {
		if(is_dir($system_data['folder']['widgets'] . $entry) && $entry != "." && $entry != "..")
			if(!is_file($system_data['folder']['settings'] . 'widgets/' . $entry . '/DISABLED')) $widgets[] = $entry;
	}
	
	closedir($open_widgets_folder);

?>