<?php
	require("__include-common.php");
define("LOGINCHECK_SESSION_URL", "NO");		// URLをSESSION変数にセットしない。
	require("../account/__logincheck.php");
	if (is_write_permit() != True) {
		exit;
	}
	if ($_POST["id"].'' == '') {
		exit;
	}
	if ($_POST["todo"].'' == '') {
		exit;
	}
	$con = my_mysql_connect(_DB_SCHEMA);

	$sql = "update m_todo";
	$sql .= " set c_todo = '" . str_for_mysql(form_str_adjust($_POST["todo"])) . "'";
	$sql .= ", c_color = '" . str_for_mysql(form_str_adjust($_POST["color"])) . "'";
	$sql .= ", c_updatetime = '" . date("Y/m/d H:i:s") . "'";
	$sql .= " where id_account = " . $_SESSION['current_id'];
	$sql .= " and id_todo = " . $_POST["id"];
	my_mysql_query($sql);

	$con = mysql_close($con);
?>
