<?php
defined('IN_HS') or exit('Access Denied');
if($dosubmit)
{
	$olddir = HS_ROOT.'/data/'.$old_dir.'/';
	if(!is_dir($olddir))
	{
		dir_create($olddir);
		file_put_contents($olddir.'index.html', ' ');
	}
	$newdir = HS_ROOT.'/data/'.$setting['storage_dir'].'/';
	if($olddir != $newdir) rename($olddir, $newdir);
	module_setting($mod, $setting);
	showmessage($LANG['save_setting_success'],$PHP_REFERER);
}
else
{
	@extract(new_htmlspecialchars($MOD));	
    include admintpl('setting');
}
?>