<?php
	require("../__common__/__define_common.php");
	require("../__common__/include-common-all.php");
	require("__include-common-code-file.php");
	require("__include-file-cipher.php");
	if (!defined("FILE_MANAGER_CIPHER_SEED")) {
		exit;
	}
	if (FILE_MANAGER_CIPHER_SEED == '') {
		exit;
	}
	my_session_start();
	require("../account/__logincheck.php");
	if ($_SESSION['システム管理者'] <> "YES") {
		exit;
	}
	if ($_GET['path'].'' == '') {
		error_simple_html('エラー', 'パス指定がありません。');
	}
	$path = $_GET['path'];
	$_SESSION['file_manager_encode_mode'] = $_GET['mode'];
	if (($errmsg = @file_cipher($path, FILE_MANAGER_CIPHER_SEED, $_SESSION['file_manager_encode_mode'])) <> '') {
		error_simple_html('暗号化/復号化エラー', $errmsg);
	}
	header("Location: file-manager.php?path=".urlencode(up_folder_path($path)));
?>
