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

	html_header(HTML_TITLE);
?>
<?php
	$con = my_mysql_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_mysql_query($sql);
	$row = mysql_num_rows($rs);
	if ($row == 0) {
		echo "レコードがみつかりません。";
		exit;
	}
	if ($rec = mysql_fetch_array($rs)) {
		for ($ix = 1; $ix <= 6; $ix++) {
			if ($rec['c_item'.$ix]<>"" or $rec['c_val'.$ix]<>"") {
				$val = ang2str($rec['c_val'.$ix], $rec['c_updatetime']);
?>
		<table class="id_manager_id_box" cellspacing=0<?= $oncopy ?>>
		<tr>
		<td class="id_item_name"><?= my_htmlspecialchars($rec['c_item'.$ix]) ?>：<br /></td>
			<td class="id_item_val_data"><?= $val ?><br /></td>
<?php
				if (strpos($val, '-') !== False or strpos($val, ' ') !== False) {
					$sep_ary = preg_split("[\x20|\x2d]", $val);
					$sepchr = ' ';
					foreach ($sep_ary as $sep) {
?>
				<td class="id_item_space"><?= $sepchr ?><br /></td>
				<td class="id_item_val_data_sep"><?= $sep ?><br /></td>
<?php
						$sepchr = '-';
					}
?>
				<td class="id_item_space"><br /></td>
<?php
					$sep_cat = '';
					foreach ($sep_ary as $sep) {
						$sep_cat .= $sep;
					}
?>
				<td class="id_item_val_data"><?= $sep_cat ?><br /></td><td><br /></td>
<?php
				}
?>
		</tr>
		</table>
<?php
			}
		}
	}
	$con = mysql_close($con);
	html_footer();
?>
