<!--#include virtual="inc/General.inc.asp"-->
<%
set rs = server.createobject("adodb.recordset")
username = replace(request("username"),"'","''")
userpass = request("userpass")&""
needpass = ""
redirectcount = request("red")&""
if username&""="" or username&""="输入您的姓名" then ErrorInfo "请输入您的姓名！"
rs.open "select top 1 * from Info where UserName='" & username & "' order by id asc",conn,1,1
if not rs.eof then
	needpass = rs("UserPass")
end if
rs.cancel:rs.close
call showmain
if needpass <> "" then
  if userpass <> needpass then
	if redirectcount = "1" OR userpass="" then
	  call showinputpass
	else
	  response.redirect "info.asp?username=" & username & "&userpass=" & MD5(userpass) & "&red=1"
	  response.end
	end if
  else
	call showlist
  end if
else
  call showlist
end if
call showfooter
Sub showmain
%>
<HTML>

<HEAD>
<TITLE></TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<link href="../css/info.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../js/yzqm.js.asp"></script>
</HEAD>

<BODY BGCOLOR=#600000 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<table width="775" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><!--#include virtual="IncludeFile/Header.inc.html"--></td>
  </tr>
  <tr>
    <td><script language="javascript">ShowMenu("");</script></td>
  </tr>
  <tr>
    <td><!--#include virtual="IncludeFile/AD10.inc.asp"--></td>
  </tr>
  <tr>
    <td>
	  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
		<tr>
		  <td width="5" bgcolor="9E0B0E"><img src="" width="5" height="0"></td>
		  <td>
<%End Sub
Sub showpasserror%>
				  <table border="0" cellpadding="1" cellspacing="1" width="40%" align="center">
			  <tr> 
				<td height="30" align="center"><font color=red>查询密码错误！</font></td>
			  </tr>
			</table>
<%End Sub
Sub showinputpass%>
			<table width="100%" border="0" cellspacing="5" cellpadding="5" bgcolor="F3DDC2">
			  <tr> 
				<td height="340">
				<%if redirectcount = "1" then
					call showpasserror
				end if%>
				  <table border="0" cellpadding="1" cellspacing="1" width="40%" bgcolor="#CBA987" align="center">
				    <form action="info.asp" method="get" onsubmit="if(this.username.value==''){alert('请输入你的姓名！');this.username.focus();return false;}else if(this.username.value==''){alert('请输入查询密码！');this.username.focus();return false;}else{return true;}">
					<tr bgcolor="F3DDC2">
					  <td width="35%" height="30" align="right" nowrap>您的姓名：</td>
					  <td width="65%" nowrap>&nbsp;&nbsp;<input type="text" name="username" value="<%=username%>" onchange="this.value=this.value.replace(/[\']|(^\s*)|(\s*$)/gi,'')" class="inbox" maxlength="20"></td>
					</tr>
					<tr bgcolor="F3DDC2">
					  <td height="50" align="right">查询密码：</td>
					  <td style="line-height: 170%">&nbsp;&nbsp;<input type="password" name="userpass" class="inbox" maxlength="50"><br>&nbsp;&nbsp;注：查询密码为您的手机号码！</td>
					</tr>
					<tr bgcolor="F3DDC2">
					  <td height="40" colspan="2" align="center"><input type="submit" value="查询" class="in3"></td>
					</tr>
					</form>
				  </table>
				</td>
			  </tr>
			</table>
<%End Sub
Sub showlist
p = cint("0"&request("p"))
if p<1 then p=1
pagesize=12
rs.open "select count(id) from Info where UserName='" & username & "'",conn,1,1
totalcount=rs(0)
rs.cancel:rs.close
pagecount=totalcount / pagesize
if totalpage mod pagesize>0 then pagecount=pagecount+1
if p=1 then
strsql = "select top " & pagesize & " * from Info where UserName='" & username & "' order by Code,AddDateTime"
else
strsql = "select top " & pagesize & " * from Info where id not in (select top " & ((p-1)*pagesize) & " id from Info where UserName='" & username & "' order by Code,AddDateTime) and UserName='" & username & "' order by Code,AddDateTime"
end if
rs.open strsql,conn,1,1%>
			<table width="100%" border="0" height="340" cellspacing="5" cellpadding="5" bgcolor="F3DDC2">
			  <%while not rs.eof%>
			  <tr> 
				<td valign="top">
				  <table border="0" cellpadding="1" cellspacing="1" width="98%" bgcolor="#CBA987" align="center">
					<tr bgcolor="F3DDC2">
					  <td width="50%" align="center" rowspan="6"><%=showpicture(rs("picpath"),315,236,"")%></td>
					  <td width="50%" height="30">&nbsp;&nbsp;姓名：<%=rs("username")%></td>
					</tr>
					<tr bgcolor="F3DDC2">
					  <td height="30">&nbsp;&nbsp;编号：<font class="entxt" color=red><%=rs("code")%></font></td>
					</tr>
					<tr bgcolor="F3DDC2">
					  <td height="30">&nbsp;&nbsp;款式：<%=rs("typeone")%></td>
					</tr>
					<tr bgcolor="F3DDC2">
					  <td height="30">&nbsp;&nbsp;风格：<%=rs("typetwo")%></td>
					</tr>
					<tr bgcolor="F3DDC2">
					  <td height="30">&nbsp;&nbsp;备注：<%=rs("info")%></td>
					</tr>
					<tr bgcolor="F3DDC2">
					  <td height="30">&nbsp;&nbsp;时间：<font class="entxt"><%=year(cdate(rs("AddDateTime")))%>-<%=month(cdate(rs("AddDateTime")))%>-<%=day(cdate(rs("AddDateTime")))%>　<%=hour(cdate(rs("AddDateTime")))%>:<%=minute(cdate(rs("AddDateTime")))%>:<%=second(cdate(rs("AddDateTime")))%></font></td>
					</tr>
				  </table>
				</td>
			  </tr>
			  <%rs.movenext
			  wend
			  if pagecount>1 then%>
			  <tr>
				<td height="25" align="right"><%if p>1 then%><a href="Info.asp?p=1&username=<%=username%>">首页</a>　<a href="Info.asp?p=<%=p-1%>&username=<%=username%>">上一页</a>　<%end if%><%if p<pagecount then%><a href="Info.asp?p=<%=p+1%>&username=<%=username%>">下一页</a>　<a href="Info.asp?p=<%=pagecount%>&username=<%=username%>">末页</a><%end if%></td>
			  </tr>
			  <%end if
			  if rs.recordcount <= 0 then%>
			  <tr>
				<td height="330" align="center">很抱歉！没有找到你的签名。如有疑问，请联系我们！</td>
			  </tr>
			  <%end if
			  rs.cancel:rs.close%>
			</table>
<%End Sub

Sub showfooter%>
			<script language="javascript">ShowFooter();</script>
		  </td>
		  <td width="5" bgcolor="9E0B0E"><img src="" width="5" height="0"></td>
        </tr>
	  </table>
	</td>
  </tr>
</table>
</BODY>
</HTML>
<%End Sub
set rs = nothing
CloseConnection()%>