<?php
	require("__include-common.php");
	require("../account/__logincheck.php");
	require("__include-im-login.php");
	require("im-logincheck.php");
	require("_include_idpass.php");
	html_header(HTML_TITLE);
?>
<script src="../scripts/zeroclipboard/ZeroClipboard-ok2nd.js"></script>
<script>
function clipSetBtn(id, text) {
	var clip = new ZeroClipboard.Client();
	clip.setText(text);
	clip.glue('button'+id);
}
</script>
<?php
	$con = my_mysqli_connect(_DB_SCHEMA);
	$sql = "select * from v_pass where id_pass = '" . $_GET['id'] . "'";
	$sql .= " and id_account = '" . $_SESSION['current_id'] . "'";
	$sql .= " and c_delete = 0 ";
	if ($_SESSION['current_id'] != $_SESSION['login_id']) {
		$sql .= " and c_privacy = 0";
	}
	$rs = my_mysqli_query($sql);
	$row = mysqli_num_rows($rs);
	if ($row == 0) {
		echo "レコードがみつかりません。";
		exit;
	}
	if ($rec = mysqli_fetch_array($rs)) {
		id_pass_view($rec, $ix);
	}
	mysqli_close($con);
	html_footer();
?>
