<?
//로그인확인
include_once $_SERVER[DOCUMENT_ROOT] . "/module/member/auth.php";

//DB연결
$dblink = SetConn($_conf_db["main_db"]);

$arrList = getOneToOneList($_SESSION[$_SITE["DOMAIN"]]["MEMBER"]["ID"], $scale, mysql_real_escape_string($_REQUEST[offset]));
?>
	<div class="sub-title">			
		<h2>마이페이지</h2>
	</div>
	<?include $_SERVER[DOCUMENT_ROOT] . "/include/menu_mypage.php"; ?>
	<div class="real-cont">
		
		<!--// content -->
		·  고객님께서 상품에 대해 남기신 질문과 판매자의 답변을 확인하실 수 있습니다. <br>
		<br>	  
			
            <!-- 본문내용 START -->
			<?	$boardid = "shopqna";	$_GET["sw"]="id"; $_GET["sk"]=$_SESSION[$_SITE["DOMAIN"]]["MEMBER"]["ID"];  include $_SITE[BOARD_PATH]."/board.php";	?>
			<!--// content --
			
			·  고객님께서 상품에 대해 남기신 질문과 판매자의 답변을 확인하실 수 있습니다. <br />
			<br />
				  
			<div class="OrderTable">
				<table>
				<colgroup>
					<col width="8%" />
					<col width="30%" />
					<col width="*" />
					<col width="12%" />
					<col width="10%" />
				</colgroup>
				<tr>
					<th>번호</th>
					<th>상품명</th>
					<th>제목</th>
					<th>작성일</th>
					<th>상태</th>
				</tr>
				<?
				if($arrList["total"]>0){
					for($i=0;$i<$arrList["list"]["total"];$i++){
						$arrInfo = getGoodInfo(mysql_real_escape_string($arrList["list"][$i][g_idx]));;
				?>
				<tr>
					<td><?=$arrList["total"]-$i-$_GET[offset]?></td>
					<td><a href="/shop.php?goPage=GoodDetail&idx=<?=$arrList["list"][$i][g_idx]?>"><?=stripslashes($arrInfo["list"][0][g_name])?></a></td>
					<td class="space-left"><a href="/shop.php?goPage=MyQnaView&idx=<?=$arrList["list"][$i][idx]?>"><?=stripslashes($arrList["list"][$i][subject])?></a></td>
					<td><?=substr($arrList["list"][$i][wdate],0,10)?></td>
					<td><?=$arrList["list"][$i][status]=="Y"?"답변완료":"미답변"?></td>
				</tr>
				<?	
					}
				?>
				<?
				}else{
				?>
				<tr height="100">
					<td colspan="5" align="center">문의내역이 없습니다.</td>
				</tr>
				<?}
//DB해제
SetDisConn($dblink);
?>
				</table>
			</div>
			
			<div class="buttons">
				<div class="fr">
					<span class="btn_pack medium"><a href="/shop.php?goPage=MyQnaWrite" >글쓰기</a></span>
				</div>
			</div>

			<div class="paginate">  
				<?=pageNavigation($arrList["total"],$scale,$pagescale,$_GET[offset],"sw=".$_REQUEST[sw]."&sk=".$_REQUEST[sk]."&s_date=".$_REQUEST[s_date]."&e_date=".$_REQUEST[e_date]."&order_state=".$_REQUEST[order_state])?>
			</div> 
			<!-- content //-->

		</div>
	</div>
