<?php
	require("__include-common.php");
	require("../account/__logincheck.php");
	$GLOBALS['URL_2_ATAG_SHORT_LEN'] = 16;

	$con = my_mysql_connect(_DB_SCHEMA);
	$query = mysql_query("select * from m_notes where id = ".$_GET['id']);
	if (!($rec=mysql_fetch_assoc($query))) exit;
?>
<h3 class="popupTitle">編集</h3>
<div id="previewNote" class="note <?= $rec['c_color'] ?>" style="left:0;top:65px;z-index:1">
	<div class="body"><?= ins_atag_br_short($rec['c_text']) ?></div>
	<span class="data"></span>
</div>
<div id="noteData">
<form action="" method="post" class="note-form">
<label for="note-body">Text of the note</label>
<textarea name="note-body" id="note-body" class="pr-body" cols="40" rows="8"><?= $rec['c_text'] ?></textarea>
<label>Color</label>
<div class="color yellow"></div>
<div class="color blue"></div>
<div class="color green"></div>
<div class="color pink"></div>
<div class="color orange"></div>
	<input class="id" type="hidden" value="<?= $rec['id'] ?>">
<br><br><br>
<a id="note-submit-update" href="" class="green-button">修正</a>
<a id="note-submit-delete" href="" class="green-button">削除</a>
</form>
</div>