<?php
if (isset($_POST['実行'])) {
	setcookie('isnow_bg', $_POST['bg'], time() + (3600 * 24 * 365), "/");
	setcookie('isnow_num', $_POST['num'], time() + (3600 * 24 * 365), "/");
	setcookie('isnow_fnum', $_POST['fnum'], time() + (3600 * 24 * 365), "/");
	setcookie('isnow_size', $_POST['size'], time() + (3600 * 24 * 365), "/");
	setcookie('isnow_speed', $_POST['speed'], time() + (3600 * 24 * 365), "/");
	setcookie('isnow_flake', $_POST['flake'], time() + (3600 * 24 * 365), "/");
	setcookie('isnow_cl', $_POST['cl'], time() + (3600 * 24 * 365), "/");
	setcookie('isnow_ch', $_POST['ch'], time() + (3600 * 24 * 365), "/");
	header('Location: opt.php?bg='.$_POST['bg'].'&num='.$_POST['num'].'&fnum='.$_POST['fnum'].'&size='.$_POST['size'].'&speed='.$_POST['speed'].'&flake='.urlencode($_POST['flake']).'&cl='.$_POST['cl'].'&ch='.$_POST['ch']);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<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 name="author" content="ok.2nd">
<style type="text/css">
<!--
* {margin: 0px; padding: 0px; }
form { margin: 0px; }
img { border: 0px; }
body {
	background-color: #ffffff;
	margin: 10px 20px;
	padding: 0px;
	text-align: left;
}
body {
	font-size: 84%;
	font-family: "ＭＳ Ｐゴシック",arial,helvetica,clean,sans-serif;
}
h1 { font-size: 130%; }
h2 { font-size: 120%; }
h3 { font-size: 108%; }
h4 { font-size: 100%; }
td { text-align: left; vertical-align: top; }
a { text-decoration: underline; font-weight: normal; }
a:link { color: #0000ff; font-weight: normal; }
a:visited { color: #0000ff; font-weight: normal; }
a:hover { color: #ff0000; font-weight: normal; }
a:active { color: #ff0000; font-weight: normal; }
.alarm_text { color: red; margin: 0; padding: 0 0 0 5px; }
.normal_text { color: black; }
.error_msg { color: red; margin: 20px; padding: 0; }
.noramal_msg { color: #000000; margin: 20px; padding: 0; }
a.return_index { text-decoration: none; font-weight: normal; }
a.return_index:link { color: #e0e0e0; }
a.return_index:visited { color: #e0e0e0; }
a.return_index:hover { color: #ffc080; }
a.return_index:active { color: #ffc080; }
.exp {color: #008080;}
-->
</style>
<title>jSnow: お好み</title>
</head>
<body>
<p>
<a href="../../tools/" class="return_index">■</a>
<span id="tool_title"><font color="#1e90ff"><b>jSnow: お好み</b></font></span>
</p>
<br><br>
<form method="POST" action="<?= $_SERVER['SCRIPT_NAME'] ?>" target="_blank">
<table>
<tr>
	<td>背景色：</td>
	<td><p class="exp">#なし16進形式で（例： f0f0f0 ）&nbsp;&nbsp;
	<a href="http://localhost/_myhome/__common__/color-chart.php" target="_blank">HTML カラーチャート</a></p>
	#<input type="text" name="bg" size=10 value="<?= $_COOKIE['isnow_bg'] ?>">
	</td>
</tr>
<tr>
	<td>薄片文字：</td>
	<td><p class="exp">カンマ(,)で結んで（例： *,&hearts;,♪,★ ）</p>
	<input type="text" name="flake" size=40 value="<?= $_COOKIE['isnow_flake'] ?>">
	</td>
</tr>
<tr>
	<td>薄片文字色数：</td>
	<td><p class="exp">省略値：5</p>
	<input type="text" name="fnum" size=10 value="<?= $_COOKIE['isnow_fnum'] ?>">
	</td>
</tr>
<tr>
	<td>薄片の色の最小値：</td>
	<td><p class="exp">省略値：0&nbsp;（0～255）大きくすると明るい色に</p>
	<input type="text" name="cl" size=10 value="<?= $_COOKIE['isnow_cl'] ?>">
	</td>
</tr>
<tr>
	<td>薄片の色の最大値：</td>
	<td><p class="exp">省略値：255&nbsp;（0～255）小さくすると暗い色に</p>
	<input type="text" name="ch" size=10 value="<?= $_COOKIE['isnow_ch'] ?>">
	</td>
</tr>
<tr>
	<td>薄片の数：</td>
	<td><p class="exp">省略値：30</p>
	<input type="text" name="num" size=10 value="<?= $_COOKIE['isnow_num'] ?>">
	</td>
</tr>
<tr>
	<td>薄片の大きさ：</td>
	<td><p class="exp">省略値：20</p>
	<input type="text" name="size" size=10 value="<?= $_COOKIE['isnow_size'] ?>">
	</td>
</tr>
<tr>
	<td>薄片が落ちる速度：</td>
	<td><p class="exp">省略値：3</p>
	<input type="text" name="speed" size=10 value="<?= $_COOKIE['isnow_speed'] ?>">
	</td>
</tr>
</table>
<input type="submit" name="実行" value="実行">
</form>
</body>
</html>
