<?php
	require("__define_common.php");
	require("include-common-all.php");
	my_session_start();
	require("../account/__logincheck.php");
	if ($_SESSION['システム管理者'] <> "YES") {
		exit;
	}

	if (file_exists(_MY_DEFINE_COMMON)) {				// 実運用モードの__define_common.php
		rename(_MY_DEFINE_COMMON, _MY_DEFINE_COMMON_SAVE);
	} elseif (file_exists(_MY_DEFINE_COMMON_SAVE)) {		// 運用モード変更時のセーブファイル名
		rename(_MY_DEFINE_COMMON_SAVE, _MY_DEFINE_COMMON);
	}

	$_SESSION['logincheck'] = "";
	$_SESSION['login_id'] = "";
	$_SESSION['login_account'] = "";
	$_SESSION['login_handle'] = "";
	$_SESSION['システム管理者'] = "";
	$_SESSION['current_id'] = "";
	$_SESSION['current_handle'] = "";
	$_SESSION['login_friends_number'] = 0;

	$contents_path = get_contents_path();
	foreach ($contents_path as $contents) {
		$_SESSION['current_id'.$contents] = "";
		$_SESSION['current_handle'.$contents] = "";
	}

	header("Location: ../index/index.php");
?>
