<!--#include virtual = "/common/lib/dbcon.asp" -->
<!--#include virtual = "/common/lib/func.asp" -->

<link rel="Stylesheet" type="text/css" href="/content/member/css/member.css" />

<table>
<tr>
	<td>


<%if request("mode")="" then%>

<!-- 검색전 : 시작 -->

<form id="idSearchFrm" name="idSearchFrm" method="post" action="<%=Request.ServerVariables("SCRIPT_NAME")%>" onsubmit="return sendit();">
<div>
	<input type="hidden" name="mode" value="proc">
</div>


		<table>
			<tr>
				<td>
					<table>
					<tr>
						<td>이름</td>
						<td><input name="m_name" id="m_name" type="text"></td>
					</tr>
					<tr>
						<td height="25" align="left">이메일</td>
						<td><input name="m_email" id="m_email" type="text"></td>
					</tr>
					</table>
				</td>
				<td>
					<input type="image" src="/content/member/img/btn_search3.gif"/>		
				</td>
			</tr>
		</table>

</form>
<script type="text/javascript">
<!--
	function sendit(){
		var eForm = document.getElementById("idSearchFrm");
		if(!valueChk(eForm.m_name, "이름")){return false;}
		if(!valueChk(eForm.m_email, "회원가입시 입력하신 이메일")){return false;}
		
	}
	function valueChk(obj, objName){//text필드
		if(obj.value.split(" ").join("") == ""){
			alert(objName+"을(를) 입력하세요");
			try{
				obj.focus();
			}catch(e){
			}
			return false;
		}else{
			return true;
		}
	}
//-->
</script>



<!-- 검색전 : 끝 -->


<%else%>


<%
m_name	= inputValue(request("m_name"))
m_email	= inputValue(request("m_email"))

sql = "SELECT m_id, m_pwd FROM member WHERE m_name = '"&m_name&"' and m_email = '"&m_email&"' and m_level<>'2'"
Set Rs = Dbcon.Execute (sql)
If Not Rs.eof Then
	search_id = Rs("m_id")
	search_pwd = Rs("m_pwd")
Else
	search_id = ""
	search_pwd = ""
End If
rs.close : Set rs = Nothing


Function strSec(str, cnt)
	strCnt = len(str) - CInt(cnt)
	sec = ""

	For i=1 To strCnt
		Sec = Sec & "*"
	Next

	strSec = Left(str,cnt)&sec
End function

%>

										
<!-- 검색 결과 : 시작 -->


			<table>
			<tr>
				<td style="line-height:20px;">


						<% If search_pwd = "" then
							urlvalue = Request.ServerVariables("SCRIPT_NAME") 
						%>

							<%=m_name%>님의 회원 정보가 없습니다. 다시 확인하세요.<br/>


						<% else
							urlvalue = LOGIN_URL
						%>

							<strong><%=m_name%></strong>님의 아이디는 <strong><%=search_id%></strong>
							<br/>비밀번호는 [<strong><%=strSec(search_pwd, 3)%></strong>]입니다.	
							<br />개인정보보호를 위해 비밀번호의 일부분을 *처리 하였습니다.<br/>


						<%End if %>

						<p style="padding-top: 10px;"><a href="<%=urlvalue%>"><img src="/content/member/img/find_btn.gif" border="0" alt="확인"/></a></p>


				</td>
			</tr>
			</table>

<!-- 검색 결과 : 끝 -->


<%End if%>




	</td>
</tr>
</table>
