<?php
	require("__include-common.php");
	require("../account/__logincheck.php");
	if (is_write_permit() != True) {
		error_exit('書き込み権限がありません。');
	}
	if ($_GET['ids'].'' == '') {
		return;
	}
	$con = my_mysqli_connect(_DB_SCHEMA);
	$ids = explode(',', $_GET['ids']);
	$order = 100;
	foreach ($ids as $id) {
		$sql = "update m_todo set";
		$sql .= " c_priority = '".$order."'";
		$sql .= " where id_todo = ".intval($id);
		$sql .= " and id_account = ".$_SESSION['current_id'];
		$ret = my_mysqli_query($sql, "修正できませんでした。");
		$order -= 10;
	}
	mysqli_close($con);
?>
