<?php
	require("__include-common.php");
	require("../account/__logincheck.php");

	$user_id = $_SESSION['login_id'];
	if ($_GET['id'].'' == '' or $_GET['id'] == '0') {
		exit;
	}
	$id = intval($_GET['id']);
	$con = my_mysql_connect(_DB_SCHEMA);

	$sql = "update m_psketch set";
	$sql .= " c_delete = 999";
	$sql .= ", c_updatetime = '". date("Y/m/d H:i:s") . "'";
	$sql .= " where id_psketch = ".$id;
	$sql .= " and id_account = ".$user_id;
	$ret = my_mysql_query($sql, "更新できませんでした。");
	$con = mysql_close($con);

	redirect("list.php?page=".$_GET['page']);
?>
