<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<!--#include file="fuction.asp"-->
<style type="text/css">
<!--
.style1 {	color: #FF6600;
	font-weight: bold;
}
-->
</style>
<!--#include file="webtop.asp"-->
<table width="1000" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
  <tr>
    <td width="20"></td>
    <td valign="bottom"><img src="<%=weburl%>images/arrow01.gif" width="11" height="11" /> Your present position: <a href="<%=weburl%>"><%=webname%></a> ->
 Feedback</td>
    <td valign="bottom"> 
       
    </td>
  </tr>
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
</table>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
   <td width="205" valign="top">
	<!--#include file="index_login.asp"--><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="5"><img src="images/ge.gif" width="1" height="5"></td>
  </tr>
</table>
	<!--#include file="rexiao.asp"--><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="5"><img src="images/ge.gif" width="1" height="5"></td>
  </tr>
</table>
    <%if session("username")<>"" then%>
	<table width="200" border="0" align="center" cellpadding="1" cellspacing="1" background="<%=weburl%>images/skin<%=cssid%>/z02.jpg">
              <tr>
                <td width="200" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="30" background="<%=weburl%>images/skin<%=cssid%>/z01.jpg"><div align="center"><span style="font-weight: bold; color: #000000">Your Recent History</span></div></td>
                    </tr>
       
          <td valign="top"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <%set rsl=server.createobject("adodb.recordset")
		    rsl.open "select * from shop_his where username='"&session("username")&"' and lx=1 order by ltime desc",conn,1,1
			while not rsl.eof%>
                  <tr>
                    <td height="22"><img src="<%=weburl%>images/arrow03.gif" width="4" height="6" /> <a href='list.asp?id=<%=rsl("shopid")%>' target=_blank>
                      <%if len(trim(rsl("shopname")))>14 then
	response.write left(trim(rsl("shopname")),14)&".."
	else
	response.write trim(rsl("shopname"))
	end if%>
                      </a></td>
              </tr>
                       <tr>
                <td><img src="<%=weburl%>images/xuxian.gif" width="163" height="1" /></td>
              </tr>
                    
                  <%rsl.movenext
		    wend
		    rsl.close
		  %>
                  </table></td>
       
                </table></td>
              </tr>
          </table><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="5"><img src="images/ge.gif" width="1" height="5"></td>
  </tr>
</table>
	  <table width="200" border="0" align="center" cellpadding="1" cellspacing="1" background="<%=weburl%>images/skin<%=cssid%>/z02.jpg">
              <tr>
                <td width="200" bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="30" background="<%=weburl%>images/skin<%=cssid%>/z01.jpg"><div align="center"><span style="font-weight: bold; color: #000000">Search History</span></div></td>
                    </tr>
   <td valign="top"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <%set rss=server.createobject("adodb.recordset")
		    rss.open "select * from shop_his where username='"&nosql(session("username"))&"' and lx=2 order by ltime desc",conn,1,1
			while not rss.eof%>
                  <tr>
                    <td height="22"><img src="<%=weburl%>images/arrow03.gif" width="4" height="6" /> <%if len(trim(rss("shopname")))>14 then
	response.write left(trim(rss("shopname")),14)&".."
	else
	response.write trim(rss("shopname"))
	end if%>
                      </a></td>
              </tr>
                       <tr>
                <td><img src="<%=weburl%>images/xuxian.gif" width="163" height="1" /></td>
              </tr>
                    
                  <%rss.movenext
		    wend
		    rss.close
			set rss=nothing%>
                  </table></td>
        </tr>
                </table></td>
              </tr>
          </table>
        <%end if%>
    </td>
    <td valign="top"> <table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="<%=weburl%>images/lyfk.jpg" width="780" height="33"></td>
      </tr>
    </table>
      <table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td valign="top"> 
            <%if ly="0" then%><TABLE width="90%" border=0 align="center" cellPadding=0 cellSpacing=1>
              <FORM action=fksave.asp method=post name="form" id="form">  <TBODY>
                  <TR> 
                    <TD height="30">&nbsp;&nbsp; Name： 
                      <input name=name class="wenbenkuang" id="name">
                      OICQ：
                      <input name=qq class="wenbenkuang" id="qq2">
<label>
<input name="sex" type="radio" value="boy" checked> 
Sir
</label>
<label>
<input type="radio" name="sex" value="girl">
Miss/Lady</label></TD>
                  </TR>
                  <TR> 
                    <TD height="30">&nbsp;&nbsp; URL： 
                      <input name=url class="wenbenkuang" id="url" value="http://">
                      E-mail： 
                      <input  name=email class="wenbenkuang" id="email"> </TD>
                  </TR>
                  <TR> 
                    <TD height="130" noWrap> &nbsp;&nbsp; <textarea name=content cols=80 rows=8 id="content" class="wenbenkuang">Content：</textarea> 
                    </TD>
                  <TR> 
                    <TD height="30" colspan="2"> &nbsp;&nbsp; <input name="submit2" type=submit class="go-wenbenkuang" id="submit4" value=Submit> 
                      &nbsp;&nbsp; <input name="submit32" type=reset class="go-wenbenkuang" id="submit32" value=Reset> 
<%
Randomize '初始代随机数种子
num1 = rnd() '产生随机数num1
num1 = int(26 * num1) + 65 '修改num1的范围以使其是A-Z范围的Ascii码，以防表单名出错
session("antry") = "test" & chr(num1) '产生随机字符串
%>
                      <input name="temp" type="hidden" id="temp" value="<%=session("antry")%>"> 
                    </TD>
                  </TR>
                </TBODY></FORM>
              </TABLE>
            <%else%>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td><table width="100%" border="0" align="center">
                    <tr> 
                      <td align="center"> 
                              <%
Function unHtml(content)
	ON ERROR RESUME NEXT
	unHtml = content
	IF content <> "" Then
		unHtml = Server.HTMLEncode(unHtml)
		unHtml = Replace(unHtml,vbcrlf,"<br>")
		unHtml = Replace(unHtml,chr(9),"&nbsp;&nbsp;&nbsp;&nbsp;")
		unHtml = Replace(unHtml," ","&nbsp;")
	End IF
	IF Err.Number <>0 Then
		unHtml = "HTML转换中出错请联系管理员<br>"
		Err.Clear
	End IF
End Function

set rs=server.createobject("adodb.recordset")
sql = "select * from shop_guestshop order by id desc"
rs.open sql,conn,3,2
%>
<SCRIPT language=JavaScript>

function is_number(str)
{
	exp=/[^0-9()-]/g;
	if(str.search(exp) != -1)
	{
		return false;
	}
	return true;
}

function CheckInput(){

	if(form.name.value==''){
		alert("您没有填写昵称！");
		form.name.focus();
		return false;
	}
	if(form.name.value.length>20){
		alert("昵称不能超过20个字符！");
		form.name.focus();
		return false;
	}

	if(!is_number(document.form.qq.value)){
		alert("QQ号必须是数字！");
		form.qq.focus();
		return false;
	}

	if(form.content.value==''){
		alert("您没有填写留言内容！");
		form.content.focus();
		return false;
	}
	if(form.content.value.length>255){
		alert("留言内容不能超过255个字符！");
		form.content.focus();
		return false;
	}
	
	return true;
}
</SCRIPT>
<%
if rs.eof and rs.bof then
%>
                        <table width="380" border="0" align="center" cellpadding="4" >
                          <tr> 
                            <td height="40" align="center"> <p>No Content ！</p></td>
                          </tr>
                        </table>
                        <%else%>
                              <%
	  	rs.PageSize  = 5 '每页记录条数
		iCount = rs.RecordCount '记录总数
		iPageSize = rs.PageSize
    	maxpage = rs.PageCount 
    	page = request("page")
    	per_page = rs.PageSize
    
    if Not IsNumeric(page) or page = "" then
        page = 1
    else
        page = cint(page)
    end if
    
    if page < 1 then
        page = 1
    elseif  page > maxpage then
        page = maxpage
    end if
    
    rs.AbsolutePage = Page

	if page = maxpage then
		x = iCount - (maxpage - 1) * iPageSize
	else
		x = iPageSize
	end if
%>
<%
For i = 1 To x
%>
                        <TABLE width=100% border=0 align="center" cellPadding=0 cellSpacing=1>
                          <TBODY><tr>
    <td height="1" background="img/xian_001.gif"></td>
  </tr>
                            <TR> 
                              <TD><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" class="sm_debrown">
                                  <tr>
                                    <td colspan="3" height="4" bgcolor="ffffff"></td>
                                  </tr>
                                  <tr>
                                    <td width="7" height="24"><img src="<%=weburl%>images/skin<%=cssid%>/bott_nav_lf.gif" width="7" height="24"></td>
                                    <td width="926" align="center" valign="middle" background="<%=weburl%>images/skin<%=cssid%>/bott_nav_bj.gif"  class="sm_debrown"><TABLE width="100%" border=0 cellpadding="0" cellspacing="0">
                                      <TBODY>
                                        <TR>
                                          <TD width="68" height="23" align="center"><font color="#FF0000">ID:<%=rs("id")%></font></TD>
                                          <TD width="332"><strong><font color="<%=flzhbt%>">Name：</font></strong><font color="<%=flzhzt%>"><%=rs("name")%></font> 
                                                <%if rs("sex")="boy" then%>
                                                Sir 
                                                <%else%>
                                                Miss/Lady 
                                                <%end if%></TD>
                                          <TD width="333"><div align="right">
                                            <%if rs("email")<>"" then%>
                                            Email：<a href="mailto:<%=rs("email")%>" target="_blank" title=Email：<%=rs("email")%>><%=rs("email")%></a>
                                            <%end if%>
                                            Time： <%=rs("time")%></div></TD>
                                        </TR>
                                      </TBODY>
                                    </TABLE></td>
                                    <td width="7"><img src="<%=weburl%>images/skin<%=cssid%>/bott_nav_rg.gif" width="7" height="24"></td>
                                  </tr>
                                </table></TD>
                            </TR><tr>
    <td height="1" background="img/xian_001.gif"></td>
  </tr>
                            <TR> 
                              <TD><TABLE width="98%" border=0 align="center" cellPadding=0 cellSpacing=0>
                                  <TBODY>
                                    <TR> 
                                      <TD bgcolor="#FFFFFF"> <TABLE width="100%" border=0 style="table-layout:fixed;word-break:break-all">
                                          <TBODY>
                                            <TR> 
                                              <TD> 
                                               
                                                <strong><font color="<%=flzhbt%>">Content：<br>
                                                </font></strong><font color="<%=flzhzt%>"><%=unHtml(rs("content"))%></font></TD>
                                            </TR>
                                          </TBODY>
                                        </TABLE></TD>
                                    </TR>
                                  </TBODY>
                                </TABLE></TD>
                            </TR><tr>
    <td height="1" background="img/xian_001.gif"></td>
  </tr>
                            <%if rs("reply")<>"" then%>
                            <TR> 
                              <TD bgColor=#f2f2f2> <table width="100%" border="0" style="table-layout:fixed;word-break:break-all">
                                  <tr> 
                                    <td width="10">&nbsp;</td>
                                    <td width="567"><font color="#FF0000">Reply：</font><br> 
                                    <%=unHtml(rs("reply"))%></td>
                                  </tr>
                                </table></TD>
                            </TR><tr>
    <td height="1" background="img/xian_001.gif"></td>
  </tr>
                            <%end if%>
                          </TBODY>
                        </TABLE>
                        <br> 
                        <%
		RS.MoveNext
next
%>
                        <table width="100%" border="0">
                          <tr> 
                            <td> 
                  <%
					call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>",per_page)
				  %>
                            </td>
                          </tr>
                        </table>
                        <%
rs.close
set rs=nothing
end if
%>
                      </td>
                    </tr>
                    <tr> 
                      <td align="center"><FORM action=fksave.asp method=post name="form" id="form">
                          <table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                              <td height="8"></td>
                            </tr>
                          </table>
                          <TABLE width="100%" border=0 cellPadding=0 cellSpacing=1>
                            <TBODY>
                            <tr>
                              <TD height="25" bgcolor="#CCCCCC"><div align="center">Leave Your Message </div></TD>
                            </TR>
                              <TD height="30">&nbsp;&nbsp; <a name="a"></a>Name： 
                                  <input name=name class="wenbenkuang" id="name">
                                OICQ： 
                                <input name=qq2 class="wenbenkuang" id="qq3">
                                <label></label>                                <label>
<input name="sex" type="radio" value="boy" checked> 
Sir
</label>
                                <label>
                                <input type="radio" name="sex" value="girl"> 
                                Miss/Lady
</label></TD>
                            </TR>
                            <TR> 
                              <TD height="30">&nbsp;&nbsp; URL： 
                                <input name=url class="wenbenkuang" id="url" value="http://">
                                E-mail： 
                                <input  name=email class="wenbenkuang" id="email3">                              </TD>
                            </TR>
                            <TR> 
                              <TD height="130" noWrap> &nbsp;&nbsp; <textarea name=content cols=80 rows=8 id="content" class="wenbenkuang"></textarea>                              </TD>
                            <TR> 
                              <TD height="30" colspan="2"> &nbsp;&nbsp; <input name="submit" type=submit class="go-wenbenkuang" id="submit" value=Submit> 
                                &nbsp;&nbsp; <input name="submit3" type=reset class="go-wenbenkuang" id="submit3" value=Reset> 
                                <%
Randomize '初始代随机数种子
num1 = rnd() '产生随机数num1
num1 = int(26 * num1) + 65 '修改num1的范围以使其是A-Z范围的Ascii码，以防表单名出错
session("antry") = "test"&chr(num1) '产生随机字符串
%>
                                <input name="temp" type="hidden" id="temp" value="<%=session("antry")%>">                              </TD>
                            </TR>
                          </TABLE>
                        </FORM></td>
                    </tr>
                  </table></td>
              </tr>
            </table>
            <%end if%>
          </td>
        </tr>
    </table></td>
  </tr>
</table>
<!--#include file="copyright.asp"-->

<%
Sub PageControl(iCount,pagecount,page,table_style,font_style,per_page)
'生成上一页下一页链接
    Dim query, a, x, temp
    action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
    temp=""
    pstr = "<table " & Table_style & ">" & vbCrLf         
    pstr = pstr & "<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf 
    pstr = pstr & "<TD align=right>" & vbCrLf
	pstr = pstr & font_style & vbCrLf
        
    if page<=1 then
        pstr = pstr & "First " & vbCrLf        
        pstr = pstr & "Pre " & vbCrLf
    else        
        pstr = pstr & "<A HREF=" & action & "?" & temp & "Page=1>First</A> " & vbCrLf
        pstr = pstr & "<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">Pre</A> " & vbCrLf
    end if

    if page>=pagecount then
        pstr = pstr & "Next " & vbCrLf
        pstr = pstr & "Last " & vbCrLf            
    else
        pstr = pstr & "<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">Next</A> " & vbCrLf
        pstr = pstr & "<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">Last</A> " & vbCrLf            
    end if

    pstr = pstr & " Page:" & page & "/" & pageCount & "" &  vbCrLf
    pstr = pstr & " Total:" & iCount & ""&per_page&"" &  vbCrLf
    pstr = pstr & " Goto: " & "<INPUT TYEP=TEXT NAME=page SIZE=4 Maxlength=8 VALUE=" & page & " class=wenbenkuang>" & " "  & vbCrLf & "<input name=go type=image  src="&weburl&"img/butn_go.gif alt=GO align=absMiddle  border=0>"
    pstr = pstr & "</TD>" & vbCrLf                 
    pstr = pstr & "</TR></form>" & vbCrLf         
    pstr = pstr & "</table>" & vbCrLf      
	Response.Write(pstr)    
End Sub
%> <td></td>
  </tr>
</table></body>
</html>