<?php
	require("../__common__/__define_common.php");
	require("__define.php");
	require("../__common__/include-common-all.php");
	require("../__common__/include-common-html.php");
	my_session_start();
	if (isset($_GET['debug'])) {
		$_SESSION['debug'] = $_GET['debug'];
	}
function todo_select_color($current, $id='') {
	if ($id.'' == '') {
		$id_name = 'add_color';
	} else {
		$id_name = 'edit_color';
	}
?>
	<select name="<?= $id_name ?><?= $id ?>" id="<?= $id_name ?><?= $id ?>" style="color: white;<? if ($current <> '') echo ' background-color: '.$current.';'; ?>"<? if ($id.''<>'') echo ' OnChange="edit_color_chg('.$id.')"' ?>>
<?php
	todo_select_color_option('黒', 'black', $current);
	todo_select_color_option('赤', 'red', $current);
	todo_select_color_option('青', 'blue', $current);
	todo_select_color_option('緑', 'green', $current);
	todo_select_color_option('オレンジ', 'darkorange', $current);
	todo_select_color_option('ピンク', 'hotpink', $current);
	todo_select_color_option('水色', 'deepskyblue', $current);
	todo_select_color_option('黄緑', 'limegreen', $current);
	todo_select_color_option('紫', 'darkviolet', $current);
	todo_select_color_option('グレー', 'gray', $current);
?>
	</select>
<?php
}
function todo_select_color_option($color_name, $color, $current) {
?>
	<option value="<?= $color ?>" style="background-color: <?= $color ?>;"<? if ($current == $color) echo ' selected'; ?>><?= $color_name ?>
<?php
}
?>
