<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/NoHackSql.Asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<%call SiteInfo%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>Shopping Cart - <% =SiteTitle %></title>
<meta name="keywords" content="<% =Keywords %>" />
<meta name="description" content="<% =Descriptions %>" />
<link href="newimages/default_style.css" rel="stylesheet" type="text/css"/>
<script src="../Script/AC_RunActiveContent.js" type="text/javascript"></script>
<script language="javascript" src="../Script/Html.js"></script>
<script type="text/javascript">
//分类节点展开和折叠-------------------------------------------------------------------
function EndSortChange(a,b)
{
	if(eval(a).style.display=='')
	{
		eval(a).style.display='none';
		eval(b).className='SortEndFolderOpen';
	}
	else
	{
		eval(a).style.display='';
		eval(b).className='SortEndFolderClose';
		
	}
}
function SortChange(a,b)
{
	if(eval(a).style.display=='')
	{
		eval(a).style.display='none';
		eval(b).className='SortFolderOpen';
	}
	else
	{
		eval(a).style.display='';
		eval(b).className='SortFolderClose';
	}
}</script>
</head>
<!--#include file="Head.Asp" -->
<%
dim Products
dim mMemID,mRealName,mSex,mCompany,mAddress,mZipCode,mTelephone,mFax,mMobile,mEmail
if session("MemName")<>"" and session("MemLogin")="Succeed" then
  call MemInfo()
else
  mSex="先生"
  mMemID=0
end if
%>
<DIV class=f_r><IMG 
            src="newimages/nav-right.jpg"></DIV>
            <DIV style="CLEAR: both"></DIV></DIV></DIV>
            <DIV class=wraper>
            <DIV class=sidebar>
            <DIV><IMG 
            src="newimages/sidebar-top.jpg"></DIV>
            <DIV 
            style="PADDING-RIGHT: 9px; PADDING-LEFT: 9px; PADDING-BOTTOM: 0px; WIDTH: 217px; PADDING-TOP: 0px">
            <DIV id=UserLogin1_RegisterDIV><A 
            href="MemberRegister.asp"><IMG height=60 
            src="newimages/reg.jpg" width=216 
            border=0></A> </DIV><!--登录窗口-->
         <Iframe src="login.asp" frameborder="0" width="100%"></Iframe>
		   <DIV class=news align=left>
            <H2>Product List&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</H2></DIV><DIV class=newsb align=left style="line-height:25px">
              <div class="modulebody_center">
<ul>
<%call CallFolderView()%>
</Ul>
 
</div>
           
          </DIV>
		  
            <DIV class=news align=left>
            <H2>Hot Product&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</H2></DIV><DIV class=newsb align=left style="list-style-type:none">
                <UL style="list-style-type:none">
              
									<%call Producthot(10)%></UL>
           
          </DIV>
           
            
			</DIV>
            <DIV><IMG height=6 
            src="../newimages/sidebar-bottom.jpg" 
            width=236></DIV></DIV>
            <DIV class=content>
            <DIV><IMG height=7 
            src="../newimages/content-top.jpg" 
            width=758></DIV>
      
           
            <DIV style="CLEAR: both"></DIV>
           
           <DIV class=incontent>
            <DIV 
style="BACKGROUND: url(../newimages/content-titile-bg.jpg) repeat-x">
            <DIV class=f_l><IMG 
            src="../newimages/content-titile.jpg"></DIV>
            <H2><%=WebLocation()%></H2>
            <DIV class=f_r><IMG 
            src="../newimages/content-titile-r.jpg"></DIV>
            <DIV style="CLEAR: both"></DIV>
            <DIV 
            style="BORDER-RIGHT: #b1d3ee 1px solid; PADDING-RIGHT: 5px; PADDING-LEFT: 5px; BACKGROUND: #fff; PADDING-BOTTOM: 5px; BORDER-LEFT: #b1d3ee 1px solid; WIDTH: 734px; PADDING-TOP: 5px; " 
            align=left>

          
 <DIV class="DivBorder OrderDiv1">          
<DIV class=Fs_All_Bottom1>
 
		<table border="0" cellpadding="0" cellspacing="0" width="100%">

			<tbody>
				<tr>
					<td width="26"> </td>
					<td>
					<p>
<table cellspacing="0" cellpadding="0" width="100%" bgcolor="#ffffff" border="0" heihgt="">
    <tbody>
        <tr>
          <td height="18">&nbsp;</td>
        </tr>
        <tr>
          <td><% call ProductList() %></td>
        </tr>
        <tr>
          <td><table width="95%" border="0" align="center" cellpadding="3" cellspacing="5">
              <form action="ProductBuySave.asp?MemberID=<%=mMemID%>" method="post" name="formBuy" id="formBuy">
                <tr>
                  <td width="200" align="right">Title:</td>
                  <td><input name="OrderName" type="text" id="OrderName" value="Order" size="40" maxlength="100" />
                    <font color="red">*</font></td>
                </tr>
                <tr>
                  <td align="right">Comments:</td>
                  <td><input type="hidden" name="Products" value="<%=Products%>" />
                    <textarea name="Remark" cols="80" rows="8" id="Remark"></textarea></td>
                </tr>
                <tr>
                  <td align="right">Name:</td>
                  <td><input name="RealName" type="text" id="RealName" value="<%=mRealName%>" size="20" maxlength="50" />
                    <font color="red">*</font></td>
                </tr>
                <tr>
                  <td align="right">Sex:</td>
                  <td><input name="Sex" type="radio" value="先生" class="inputnoborder" <%if mSex="先生" then response.write ("checked")%> />
                    Male
                    <input type="radio" name="Sex" value="女士" class="inputnoborder" <%if mSex="女士" then response.write ("checked")%> />
                    Female <font color="red">*</font></td>
                </tr>
                <tr>
                  <td align="right">Company/Name:</td>
                  <td><input name="Company" type="text" id="Company" value="<%=mCompany%>" size="40" maxlength="100" />
                    <font color="red">*</font></td>
                </tr>
                <tr>
                  <td align="right">Address:</td>
                  <td><input name="Address" type="text" id="Address" value="<%=mAddress%>" size="40" maxlength="100" />
                    <font color="red">*</font></td>
                </tr>
                <tr>
                  <td align="right">Postal Code:</td>
                  <td><input name="ZipCode" type="text" id="ZipCode" value="<%=mZipCode%>" size="20" maxlength="20" />
                    <font color="red">*</font></td>
                </tr>
                <tr>
                  <td align="right">Tel:</td>
                  <td><input name="Telephone" type="text" id="Telephone" value="<%=mTelephone%>" size="20" maxlength="50" />
                    <font color="red">*</font></td>
                </tr>
                <tr>
                  <td align="right">Fax:</td>
                  <td><input name="Fax" type="text" id="Fax" value="<%=mFax%>" size="20" maxlength="50" />
                  <font color="red">*</font></td>
                </tr>
                <tr>
                  <td align="right">Mobile:</td>
                  <td><input name="Mobile" type="text" id="Mobile" value="<%=mMobile%>" size="20" maxlength="50" />
                  <font color="red">*</font></td>
                </tr>
                <tr>
                  <td align="right">Email:</td>
                  <td><input name="Email" type="text" id="Email" value="<%=mEmail%>" size="30" maxlength="50" />
                    <font color="red">*</font></td>
                </tr>
                <tr>
                  <td align="right">Number:</td>
                  <td><input name="CheckCode" type="text" size="6" maxlength="6" />
                    <a href="javascript:refreshimg()" title="Can not see clearly, change a picture."><img src="../Include/CheckCode/CheckCode.asp" name="checkcode" align="absmiddle" id="checkcode" style="border: 1px solid #ffffff" /></a> <font color="red">*</font></td>
                </tr>
                <tr>
                  <td align="right">&nbsp;</td>
                  <td><input name="Submit" type="submit" value="Save" /></td>
                </tr>
              </form>
           </table></td>
        </tr>
        <tr>
          <td height="20">&nbsp;</td>
        </tr>
      </table></p>
					</td>
					<td width="26"> </td>

				</tr>
				<tr>
					<td> </td>
				</tr>
			</tbody>
		</table><DIV class=Fs_C_Center></DIV>
</DIV></DIV>
           
      
           
            <DIV style="CLEAR: both"></DIV></DIV>           
            <DIV 
style="BACKGROUND: url(../newimages/content-bottom-bg.jpg) repeat-x">
            <DIV class=f_l><IMG 
            src="../newimages/content-bottom-l.jpg"></DIV>
            <DIV class=f_r><IMG 
            src="../newimages/content-bottom-r.jpg"></DIV>
            <DIV style="CLEAR: both"></DIV></DIV></DIV>
            <DIV style="CLEAR: both"></DIV>
            <DIV style="HEIGHT: 6px"><IMG 
            src="../newimages/hr.jpg"></DIV></DIV>
            <DIV><IMG 
            src="../newimages/content-bottom.jpg"></DIV>
            <DIV style="CLEAR: both"></DIV></DIV></DIV>
            <DIV style="CLEAR: both"></DIV>
<!--#include file="Foot.Asp"-->
<%
'调用显示节点------------------------------
Function CallFolderView()
%>
<% Folder(0) %>
<%
End Function
'列出所有节点------------------------------
Function Folder(id)
  Dim rs,sql,i,ChildCount,FolderType,FolderName,onMouseUp,ListType,ViewFlag
  Set rs=server.CreateObject("adodb.recordset")
  sql="Select * From wygkcndiv_ProductSort where ViewFlag"&Language&" and ParentID="&id&" order by id"
  rs.open sql,conn,1,1
  if id=0 and rs.recordcount=0 then
    response.write ("No Information!")
    response.end
  end if  
  i=1
  response.write("<table border='0' cellspacing='0' cellpadding='0'>")
  while not rs.eof
    ChildCount=conn.execute("select count(*) from wygkcndiv_ProductSort where ParentID="&rs("id"))(0)
    if ChildCount=0 then
	  if i=rs.recordcount then
	    FolderType="SortFileEnd"
	  else
	    FolderType="SortFile"
	  end if
	  FolderName=rs("SortNameen")&"&nbsp;"&ViewFlag
	  onMouseUp=""
    else
	  if i=rs.recordcount then
	 	FolderType="SortEndFolderOpen"
		ListType="SortEndListline"
		onMouseUp="EndSortChange('a"&rs("id")&"','b"&rs("id")&"');"
	  else
		FolderType="SortFolderOpen"
		ListType="SortListline"
		onMouseUp="SortChange('a"&rs("id")&"','b"&rs("id")&"');"
	  end if
	  FolderName=rs("SortNameen")&"&nbsp;"&ViewFlag
    end if
    response.write("<tr>")
    response.write("<td nowrap id='b"&rs("id")&"' class='"&FolderType&"' onMouseUp="&onMouseUp&"></td><td nowrap><a href=""ProductClass-"&rs("ID")&"-1.html"">"&FolderName&"</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;")	
    response.write("</td></tr>")
    if ChildCount>0 then
%>
      <tr id="a<%= rs("id")%>" style="display:none"><td class="<%= ListType%>" nowrap></td><td ><% Folder(rs("id")) %></td></tr>
<%
    end if
    rs.movenext
    i=i+1
  wend
  response.write("</table>")
  rs.close
  set rs=nothing
end function

function WebMenu(ParentID,i,level)
  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  sql="select * from wygkcndiv_ProductSort where ViewFlag"&Language&" and ParentID="&ParentID&" order by ID asc"
  rs.open sql,conn,1,1
  if conn.execute("select ID from wygkcndiv_ProductSort Where ViewFlag"&Language&" and ParentID=0").eof then
    response.write "No Information"
  end if
  do while not rs.eof
  	If ISHTML = 1 Then
		AutoLink = ""&ProSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
	Else
		AutoLink = "ProductClass-"&rs("ID")&"-1.html"
	End If
	if ParentID=0 then
	  response.write "<Li>  <img src=""image/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href="""&AutoLink&""" target=""_blank"" style=""margin-left:5px;"">"&rs("SortName"&Language)&"</a></li>"
	else
	  response.write string(i,"　")&"<Li>  <img src=""image/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href="""&AutoLink&""" target=""_blank"" style=""margin-left:5px;"">"&rs("SortName"&Language)&"</a></li>"
	end if
    i=i+1
	if i<level then call WebMenu(rs("ID"),i,level)
	i=i-1
	rs.movenext
  loop 
  rs.close
  set rs=nothing
end function


function WebLocation()
  WebLocation="&nbsp;Current Location：<a href=""index.asp"" class=""agray"">Home</a> - <a href=""ProductList.asp"" class=""agray"">Products</a> - order"&VbCrLf
end Function

function NoList()
  if request("UpdateOrder")="Up_date" then
    Session("NoList")=""
  end if
  dim ProductNo,NoArray,i
  if trim(request("ProductNo"))<>"" then ProductNo=trim(request("ProductNo"))&","
  if session("NoList")="" and trim(request("ProductNo"))="" then
    NoList=""
    exit function
  end if
  if instr(ProductNo,",")>0 then
  	NoArray=split(ProductNo, ",")
  	for i = 0 to ubound(NoArray)
      if not instr(session("NoList"),NoArray(i)&",")>0 then session("NoList")=session("NoList")&NoArray(i)&","
  	next
  end if
  for i = 0 to ubound(split(session("NoList"), ","))
    NoList=NoList&"'"&trim(split(session("NoList"),",")(i))&"',"
  next
  NoList=left(NoList,len(NoList)-4)
end Function

function ProductList()
	Response.Write "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf
	Response.Write "  <form action=""ProductBuy.asp"" method=""POST"" name=""check"">"&VbCrLf
	Response.Write "    <tr>"&VbCrLf
	Response.Write "      <td height=""28"" colspan=""2"" style=""background:url(Images/bg2.gif) repeat-x left bottom;"">The product that you make choice of purchase：</td>"&VbCrLf
	Response.Write "    </tr>"&VbCrLf
if Nolist()="" then
	Response.Write "    <tr>"&VbCrLf
	Response.Write "      <td height=""28"" colspan=""2"" align=""center"">No Information</td>"&VbCrLf
	Response.Write "    </tr>"&VbCrLf
else
	dim rs,sql
	set rs = server.createobject("adodb.recordset")
	sql="select * from wygkcndiv_Products where ProductNo in ("&NoList()&") order by id"
	rs.open sql,conn,1,1
	while not rs.eof
	If ISHTML = 1 Then
		AutoLink = ""&ProName&""&Separated&""&rs("ID")&"."&HTMLName&""
	Else
		AutoLink = "ProductView.asp?ID="&rs("ID")&""
	End If
	Response.Write "    <tr>"&VbCrLf
	Response.Write "      <td width=""3%"" height=""28"" style=""background:url(Images/bg2.gif) repeat-x left bottom;""><input type=""CheckBox"" name=""ProductNo"" value="""&rs("ProductNo")&""" class=""inputnoborder"" Checked></td>"&VbCrLf
	Response.Write "      <td width=""97%"" style=""background:url(Images/bg2.gif) repeat-x left bottom;""><a href="""&AutoLink&""" title="""&rs("ProductName"&Language)&""">"&rs("ProductName"&Language)&"&nbsp;["&rs("ProductNo")&"]</a></td>"&VbCrLf
	Response.Write "    </tr>"&VbCrLf
	Products=Products&rs("ProductName"&Language)&" Product No："&rs("ProductNo")&"<br />"
	rs.movenext
    wend
	Response.Write "    <tr>"&VbCrLf
	Response.Write "      <td colspan=""2"" height=""35""><input type=""submit"" name=""UpdateOrder"" value=""Up_date""></td>"&VbCrLf
	Response.Write "    </tr>"&VbCrLf
    rs.close
    set rs=nothing
end if
	Response.Write "  </form>"&VbCrLf
	Response.Write "</table>"&VbCrLf
end function

sub MemInfo()
  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  sql="select * from wygkcndiv_Members where MemName='"&session("MemName")&"'"
  rs.open sql,conn,1,1
  if rs.bof and rs.eof then
    response.write "<center>No Information</center>"
  else
    mMemID=rs("ID")
	if not rs("RealName")="" then
	  mRealName=rs("RealName")
	else
	  mRealName=rs("MemName")
	end if
	mSex=rs("Sex")
	mCompany=rs("Company")
	mAddress=rs("Address")
	mZipCode=rs("ZipCode")
	mTelephone=rs("Telephone")
	mFax=rs("Fax")
	mMobile=rs("Mobile")
	mEmail=rs("Email")
  end if
  rs.close
  set rs=nothing
end sub
%>
<script language="javascript">
<!--
function refreshimg(){document.all.checkcode.src="../Include/CheckCode/CheckCode.asp";}
//-->
</script>