<?php
	require("../__common__/__define_mobile.php");
	if ($_POST) {
		post_done_proc();
	} else {
		form_proc();
	}
	exit();
function form_proc() {
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<?php
	mobile_common_head('O2Portal ログアウト');
?>
</head>
<body>
<div data-role="page" data-url="<?= $_SERVER['REQUEST_URI'] ?>" id="sample_button">
	<div data-role="header">
		<a href="../index" data-icon="home" rel="external">Home</a>
		<h1>O2Portal ログイン</h1>
	</div>
	<div data-role="content">
		<div data-role="fieldcontain">
			<form method="post" action="">
				<input type="hidden" name="logout" value="logout">
			<div data-inline="true">
				<input type="submit" value="ログアウト" data-theme="b" data-inline="true">
				<a href="../index" data-icon="back" rel="external" style="margin-left:20px;">キャンセル</a>
			</div>
			</form>
		</div>
	</div>
</div>
</body>
</html>
<?php
}
function post_done_proc() {
	mobile_logout();
	redirect('../index');
}
?>
