<?php
global $_,$conf;
switch($_['action']){
	//Reset des paramètres du thème
	case 'customiser_reset_theme':
		global $myUser,$_,$conf;
		User::check_access('customiser','configure');
		if(file_exists(__DIR__.SLASH.'css'.SLASH.'theme.css'))
			unlink(__DIR__.SLASH.'css'.SLASH.'theme.css');
		header('location: setting.php?section=global.customiser');
	break;

	case 'customiser_theme_save':
		Action::write(function(&$response){
			global $myUser,$_,$conf;
			User::check_access('customiser','configure');
			
			$conf->put('core_theme',$_['theme']);
		});
	break;

}
?>