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

/**
 * Toggle status for Widget, Module, Extension or Plugin
 *
 * @category   Backend (actions)
 * @author     Nico Wenig <nico.wenig@yellowgreen.de>
 * @version	   2009-12-21
 */
 	
 	if(isset($_GET['mode']) && isset($_GET['name']) && isset($_GET['status'])) {
 		$status_folder = $system_data['folder']['settings'] . $_GET['mode'] . '/' . $_GET['name'] . '/';
 		$status_file = $system_data['folder']['settings'] . $_GET['mode'] . '/' . $_GET['name'] . '/DISABLED';
 		
 		rmkdir($status_folder);
 		is_file($status_file) ? unlink($status_file) : file_put_contents($status_file, 'Delete this file to enable the item.');
	}

?>