<?php
	require("../__common__/__define_common.php");
	require("../__common__/include-common-all.php");
	my_session_start();
	require("../account/__logincheck.php");
	if ($_SESSION['システム管理者'] <> "YES") {
		exit;
	}
	if (FILE_MANAGER_ID_PASSWORD_USE == 'YES') {
		if ($_SESSION['_id_mgr_logincheck'] <> "OK") {
			exit;
		}
	}
	if (($path = my_GET('path').'') == '') {
		exit;
	}
	if ($_FILES['filename']['size'] > 0) {
		$storeFile = $path . '/' . basename($_FILES['filename']['name']);
		move_uploaded_file($_FILES['filename']['tmp_name'], myfile_ENCODE($storeFile));
	}
	header("Location: file-manager.php?path=".urlencode($path)."#file");
?>