<SCRIPT language="JavaScript">
<!--
function openwin(url, id) {
	w1 = window.open('view-idpass.php?id='+id, 'im_w1', 'left=<?=POP_WIN1_LEFT?>,top=<?=POP_WIN1_TOP?>,width=<?=POP_WIN1_WIDTH?>,height=<?=POP_WIN1_HEIGHT?>,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
	w2 = window.open(url, 'im_w2', 'left=<?=POP_WIN2_LEFT?>,top=<?=POP_WIN2_TOP?>,width=<?=POP_WIN2_WIDTH?>,height=<?=POP_WIN2_HEIGHT?>,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
}
// -->
</script>
<script type="text/javascript">
// by BLUEPIXY
function copy(e){
	var text = window.getSelection()+"";
	text=text.replace(/(.+)\s*/,"$1");
	input = document.createElement("input");
	input.hidden = true;
	input.value = text;
	document.body.appendChild(input);
	input.select();
	try {
		success = document.execCommand("copy", false, null);
	} catch (ex) {
		success = false;
	} finally {
		document.body.removeChild(input);
	}
	return false;
};
</script>
<table id="id_manager_table">
<?php
	mysql_data_seek($rs, $startline);			//テーブル内の指定行に移動
	$line = $startline;					//$lineに$startlineを代入
	while ($rec=mysql_fetch_array($rs) and $line<=$endline) {
		if ($rec['c_privacy'] == 444) {
			$view_class_privacy = 'id_manager_privacy';
		} else {
			$view_class_privacy = '';
		}
?>
	<tr>
	<td class="id_manager_td id_manager_category <?= $view_class_privacy ?>"><?= my_htmlspecialchars($rec['c_categoryName']) ?></td>
	<td class="id_manager_td <?= $view_class_privacy ?>">
	<p>	<span class="id_manager_subject">
	<?php if ($rec['c_homepageUrl'] <> "") { ?>
		<a href="<?= $rec['c_homepageUrl'] ?>" target="_blank"><?= my_htmlspecialchars($rec['c_subject']) ?></a>
		</span>
		<span class="id_manager_wpop">
		<a href="javascript:openwin('<?= $rec['c_homepageUrl'] ?>', '<?= $rec['id_pass'] ?>')">W↑</a>
		</span>
	<?php } else { ?>
		<?= my_htmlspecialchars($rec['c_subject']) ?>
		</span>
	<?php } ?>
<?
// ***************************************
//				↓↓↓↓　　　& query_from_http_arg_pool($http_arg)
// ***************************************
?>
	<? if (is_write_permit() == True) { ?>
	<a class="a_edit_buton" href='input.php?id=<?= $rec['id_pass'] ?>&page=<?= $page ?>&<?= query_from_http_arg_pool($http_arg) ?>'>[修正]</a>
	<? } ?>
	</p>
	<?php
		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']);
				if (strstr($_SERVER['HTTP_USER_AGENT'], "Chrome")) {
					$oncopy = ' oncopy="copy(event);return false"';
				}
?>
		<table class="id_manager_id_box" cellspacing=0<?= $oncopy ?>>
		<tr>
		<td class="id_item_name"><?= my_htmlspecialchars($rec['c_item'.$ix]) ?>：<br /></td></td>
			<td class="id_item_val_data"><?= $val ?><br /></td></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>
				<td class="id_item_val_data_sep"><?= $sep ?><br /></td></td>
<?php
						$sepchr = '-';
					}
?>
				<td class="id_item_space"><br /></td></td>
<?php
					$sep_cat = '';
					foreach ($sep_ary as $sep) {
						$sep_cat .= $sep;
					}
?>
				<td class="id_item_val_data"><?= $sep_cat ?><br /></td></td><td><br /></td></td>
<?php
				}
?>
		</tr>
		</table>
<?php
			}
		}
	?>
	<p class="id_manager_body"><?= ins_atag_br_keystr($rec['c_body'], keystr_and_or($keystring)) ?></p>
	</td>
	</tr>
<?php
		$line++;
	}
?>
	</table>
