<?php
	require("../__common__/__define_common.php");
	require("../__common__/include-common-all.php");
	require("../account/__logincheck.php");
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta http-equiv="Content-Language" content="ja">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta name="author" content="ok.2nd">
<meta name="description" content="">
<meta name="keywords" content="">
<title>テキスト縦書き表示（IEのみ）</title>
<style type="text/css">
body, div, img, ul, ol, li, p, th, td, form, pre, dl, dt, dd, fieldset, blockquote, caption, h1, h2, h3, h4, h5, h6 {
	margin: 0;
	padding: 0;
}
body {margin: 10px; }
input, select, textarea { margin: 0; }
img { border: 0; }
body {
	background-color: #ffffff;
	text-align: left;
	font-family: "MS PGothic","Osaka",Arial,sans-serif;
}
body, input, button, textarea {
	font-size: 12px;
	line-height: 1.2;
}
button, input[type="button"], input[type="submit"], input[type="reset"] {
	overflow: visible;
	margin: 1px 0;
	padding: 1px 3px;
	padding: 0 2px\9;	/* IE8以下 */
}
body:not(:target) {
	padding: 0 2px\9;	/* IE9 */
}
body {
	margin: 5px;
}
label {
	display: block;
	float: left;
}
</style>
</head>
<body>
<form method="POST" action="tategaki.php" target="_blank">
<?php
	if ($_COOKIE['tools_tategaki_url'] <> '') {
		$url = str_replace(DIRECTORY_SEPARATOR, "/", right_slash_strip(form_str_filepath($_COOKIE['tools_tategaki_url'])));
	} else {
		$url = "tategaki-sample/kenjano_okurimono.txt";
	}
	if (!defined("TATEGAKI_FONTSIZE")) {
		define("TATEGAKI_FONTSIZE", "18pt");
		define("TATEGAKI_FONTSIZE_SELECT", "10pt,11pt,12pt,14pt,16pt,18pt,20pt,22pt,24pt");
	}
	if ($_COOKIE['tategaki_fontsize'].'' <> '') {
		$fontsize = $_COOKIE['tategaki_fontsize'];
	} else {
		$fontsize = TATEGAKI_FONTSIZE;
	}
	if (!defined("TATEGAKI_LINEHEIGHT")) {
		define("TATEGAKI_LINEHEIGHT", "1.2");
		define("TATEGAKI_LINEHEIGHT_SELECT", "1.0,1.1,1.2,1.3,1.4,1.5");
	}
	if ($_COOKIE['tategaki_lineheight'].'' <> '') {
		$lineheight = $_COOKIE['tategaki_lineheight'];
	} else {
		$lineheight = TATEGAKI_LINEHEIGHT;
	}
	if (!defined("TATEGAKI_FONTWEIGHT")) {
		define("TATEGAKI_FONTWEIGHT", "normal");
		define("TATEGAKI_FONTWEIGHT_SELECT", "normal,bold");
	}
	if ($_COOKIE['tategaki_fontweight'].'' <> '') {
		$fontweight = $_COOKIE['tategaki_fontweight'];
	} else {
		$fontweight = TATEGAKI_FONTWEIGHT;
	}
	if (!defined("TATEGAKI_HEIGHT")) {
		define("TATEGAKI_HEIGHT", "650");
		define("TATEGAKI_HEIGHT_SELECT", "200,250,300,350,400,450,500,550,600,650,700,750,800");
	}
	if ($_COOKIE['tategaki_height'].'' <> '') {
		$height = $_COOKIE['tategaki_height'];
	} else {
		$height = TATEGAKI_HEIGHT;
	}
?>
	文字サイズ：<select name="fontsize_sel">
	<?php
		$selary = explode(',', TATEGAKI_FONTSIZE_SELECT);
		foreach ($selary as $sel) {
	?>
		<option value="<?= $sel ?>"<?= $sel == $fontsize ? ' selected' : '' ?>><?= $sel ?>
	<?php
		}
	?>
		</select>
	文字タイプ：<select name="fontweight_sel">
	<?php
		$selary = explode(',', TATEGAKI_FONTWEIGHT_SELECT);
		foreach ($selary as $sel) {
	?>
		<option value="<?= $sel ?>"<?= $sel == $fontweight ? ' selected' : '' ?>><?= $sel ?>
	<?php
		}
	?>
		</select>
	文字ファミリー：<select name="fonttype_sel">
		<option value="m"<?= $_COOKIE['tategaki_fonttype'] == 'm' ? ' selected' : '' ?>>ＭＳ 明朝
		<option value="g"<?= $_COOKIE['tategaki_fonttype'] == 'g' ? ' selected' : '' ?>>ＭＳ ゴシック
		</select>
	行間：<select name="lineheight_sel">
	<?php
		$selary = explode(',', TATEGAKI_LINEHEIGHT_SELECT);
		foreach ($selary as $sel) {
	?>
		<option value="<?= $sel ?>"<?= $sel == $lineheight ? ' selected' : '' ?>><?= $sel ?>
	<?php
		}
	?>
		</select>
	高さ：<select name="height_sel">
	<?php
		$selary = explode(',', TATEGAKI_HEIGHT_SELECT);
		foreach ($selary as $sel) {
	?>
		<option value="<?= $sel ?>"<?= $sel == $height ? ' selected' : '' ?>><?= $sel ?>
	<?php
		}
	?>
		</select>
	<br>
	<span style="color: red;">URLまたは本文を入れてください。</span><br>
	<label>URL：</label><input type="text" name="url" style="width:500px;" value=""><br>
	<label>HTMLタイトル：</label><input type="text" name="title" style="width:200px;" value=""><br>
	<label>本文：</label><textarea style="width: 600px; height: 300px;" name="text"></textarea><br>
	<input type="submit" value="縦書き表示">
	<input type="reset" value="リセット">
</form>
</body>
</html>
