<!--#include file="Include/Const.asp" -->
<!--#include file="Include/NoHackSql.Asp" -->
<!--#include file="Include/ConnSiteData.asp" -->
<%
call SiteInfo
if ISHTML = 1 then
Response.expires = 0
Response.expiresabsolute = Now() - 1
Response.addHeader "pragma", "no-cache"
Response.addHeader "cache-control", "private"
Response.CacheControl = "no-cache"
End If
if request.QueryString("ID")="" then
SeoTitle="团购流程"
elseif not IsNumeric(request.QueryString("ID")) Then

SeoTitle="参数错误"
elseif conn.execute("select * from LiangJing_About Where ViewFlag and  ID="&request.QueryString("ID")).eof then
SeoTitle="参数错误"
else
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJing_About where ViewFlag and ID="&request.QueryString("ID")
rs.open sql,conn,1,1
SeoTitle=rs("AboutName")
rs.close
set rs=nothing
end If
if request.QueryString("ID")="" Then
headid=2
Else 
If request.QueryString("ID")=7 Then 
headid=5
End If 
End If 
%>
<!--#include file="Head.Asp" -->
<div id='index_wrapper'>
<div style="clear:both;background-image:url('images/mybuzhou.jpg');width:800px;height:85px;margin-bottom:10px;" id="mySitep">
<div style="height:20px;margin-bottom:26px;text-align:right;" ><div onclick="stepcoclose()" style="width:20px;height:20px;cursor:pointer;float:right">&nbsp;</div></div>
<div style="clear:both;font-size:14px;font-weight:bold;color:#5A552B;">
<div style="width:100px;float:left;">&nbsp;</div>
<div style="width:200px;float:left;">查看今日团购价</div>
<div style="width:36px;float:left;">&nbsp;</div>
<div style="width:200px;float:left;">付款并获得优惠凭证码</div>
<div style="width:66px;float:left;">&nbsp;</div>
<div style="width:180px;float:left;">凭优惠凭证码享受超级折扣</div>
</div>
</div>
<div id=best-r class="best" style="width:586px;float:left">
<div id=best-sc>
<div class=best-tb>
<a style="width:80px;">当前位置：</a>
<a style="width:100px;"><%=SeoTitle%></a>
</div>
</div>
<div id=bests>

<%set rs = server.createobject("adodb.recordset")
if request.QueryString("ID")="" or not IsNumeric(request.QueryString("ID")) then
sql="select top 1 * from LiangJing_About where ViewFlag and not ChildFlag order by Sequence asc"
else
sql="select * from LiangJing_About where ViewFlag"&Language&" and ID="&request.QueryString("ID")
end if
rs.open sql,conn,1,3
if rs.eof Then
Response.Write "<span>暂无相关信息</span>"   
Else
if ViewNoRight(rs("GroupID"),rs("Exclusive")) Then
end If
end if%>	
<div style="padding:10px;">
<%=rs("Content"&Language)%>
</div>
</div>
</div>

<div style="width:200px; float:right;">
<div id=best-r class="best" style="width:200px; float:right;">
<div id=best-sc>
<div class=best-tb>
<a style="width:80px;font-size:14px;font-weight:bold;">团购资讯</a>  
<span id="sishowsitep" onclick="stepcoclose1()" style="display:none;padding-top:7px;padding-left:6px;"><font style="color:red;">查看步骤</font></span>
</div>
</div>
<div id=bests>
<table cellpadding="0" cellspacing="0" width="100%px">
<tr><td>
<%Call News("0,1,",6)%>
</td></tr>
</table>
</div>
</div>
<div id=best-r class="best" style="width:200px; float:right;margin-top:10px;">
<div id=best-sc>
<div class=best-tb>
<a style="width:80px;font-size:14px;font-weight:bold;">信息订阅</a>       
</div>
</div>

<div id=bests>
<table cellpadding="0" cellspacing="0" width="100%px" style="padding:6px;">
<tr><td align="center">
<% Call LiangjingCMSEMail() %>
</td></tr>
</table>

</div>
</div>
</div>
<div style="clear:both;;*display:inline;overflow:;hidden;">
</div>
<div style="float:none;height:10px;"></div>
</div></div>
</div></div>
<!--#include file="Foot.Asp"-->
<%
function News(SortPath,number)
  dim rs,sql,NewsName,NewFlag
  set rs = server.createobject("adodb.recordset")
  sql="select top "&number&" * from LiangJing_News where ViewFlag"&" and Instr(SortPath,'"&SortPath&"')>0 order by id desc"
  rs.open sql,conn,1,1
  if rs.eof then
 Response.Write"<li class=""newslist"">暂无相关信息</li>"
  Else
Dim i
i=1
Response.Write "<ul style=""width:180px;"">"
 do while not rs.eof
	  if now()-rs("AddTime")<=2 then 
	    NewsName=StrLeft(rs("NewsName"),20)
	    NewFlag=" <img src=""Images/new.gif"" align=""absmiddle"">"
	  else
	    NewsName=StrLeft(rs("NewsName"),20)
	    NewFlag=""
	  end If
		If ISHTML = 1 Then
			AutoLink = ""&NewName&""&Separated&""&rs("ID")&"."&HTMLName&""
		Else
			AutoLink = "NewsView.asp?ID="&rs("id")&""
		End If
  Response.Write"<li style=""font-size:14px;text-align:left;width:160px;height:18px""><img src='images/"&i&".jpg'/><a href="""&AutoLink&""" target=""_self"" style=""font-size:13px"">"&NewsName&"</a></li>"
      rs.movenext
	  i=i+1
    loop 
  end If
  Response.Write "</ul>"
  rs.close
  set rs=nothing
end Function

function LiangjingCMSEMail()

       Response.Write "         <form action="""" method=""post"" name=""LiangjingCMSEmail"">"&VbCrLf
       Response.Write "      <div class=""mail_list_box_input_position"">"&VbCrLf
       Response.Write "          <input type=""text"" name=""LiangjingCMSSubscribe"" class=""mail_list_input"" onblur=""this.className='LiangjingCMSSubscribe';if(this.value==''){this.value='请输入您的Email地址';}"" onfocus=""this.className='LiangjingCMSSubscribe';this.focus();if(this.value=='请输入您的Email地址'){this.value='';}"" value=""请输入您的Email地址"" />"&VbCrLf
       Response.Write "        </div>"&VbCrLf
       Response.Write "        <div class=""mail_list_box_bt_position""><br /><span>"&VbCrLf
       Response.Write "   <input type=""image"" name=""Subscribe"" src=""images/bt_mail_list_01.png"" onclick=""document.LiangjingCMSEmail.action='Subscribe.Asp?Action=Add'"" />"&VbCrLf
       Response.Write "          </span>"&VbCrLf
       Response.Write "<span><input type=""image"" name=""Unsubscribe"" src=""images/tuiding_mail_list_01.png""  value=""退订"" onclick=""document.LiangjingCMSEmail.action='Subscribe.Asp?Action=Del'"" />"&VbCrLf
       Response.Write "          </span>"&VbCrLf
	   Response.Write "  	<div style=""height:6px;""></div> </div>"&VbCrLf
       Response.Write "       <div class=""clear""></div>"&VbCrLf
       Response.Write "      </form>"&VbCrLf
end Function

'最近一周团购
Function ListProducts(SortPath,trs,tds,PicW,PicH,Oderder)
  dim rs,sql,tr,td,ProductName,SmallPicPath
  set rs = server.createobject("adodb.recordset")
  If Oderder="Products" Then
  sql="select top "&trs*tds&" * from liangjing_Products where Instr(SortPath,'"&SortPath&"')>0 and [AddTime] between dateadd('ww',-1,now()) and now() order by AddTime desc"
  Else 
  sql="select top "&trs*tds&" * from liangjing_Products where NewFlag  and Instr(SortPath,'"&SortPath&"')>0 order by "&Oderder&" desc,id desc"
  End If 
  rs.open sql,conn,1,1
  if rs.eof then
    response.write "暂无相关信息"
  Else
	for tr=1 to trs
        for td=1 to tds
	      if StrLen(rs("ProductName"))<=18 then
            ProductName=rs("ProductName")
	      else
	        ProductName=rs("ProductName")
	      end If
			If ISHTML = 1 Then
				AutoLink = ""&ProName&""&Separated&""&rs("ID")&"."&HTMLName&""
			Else
				AutoLink = "ProductView.asp?ID="&rs("id")&""
			End If
			SmallPicPath=HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))
		ChildCount=conn.execute("select count(*) from liangjing_Order where IsokMoney=true and ProductNo='"&rs("ProductNo")&"'")(0)
Response.Write "<tr><td align=""center"">"
Response.Write " <div id=""mian_border"">"
Response.Write "<div id=""mian_border_title""><a href="""&AutoLink&""">"&ProductName&"</a></div>"
Response.Write "<div id=""mian_border_1""><a href="""&AutoLink&""" target=""_blank"">"
Response.Write "<img src="""&SmallPicPath&""" alt="""" width="""&PicW&""" height="""&PicH&""" border=""0""></a></div>"
Response.Write "<div class=""Pricelist"">现价:<font style=""color:red;"">￥"&rs("N_Price")-rs("P_Price")&"</font>原价:￥"&rs("N_Price")&" <br/>节省:￥"&rs("P_Price")&"</div>"
Response.Write "<div><font style=""color:red;font-size:16px;"">"&ChildCount&"</font>人已订购 <a href="""&AutoLink&"""><img src=""images/dinggou.jpg"" width=""75px"" height=""25px""></a></div>"
Response.Write "</div>"
Response.Write " </td></tr>"
	      rs.movenext
		  if rs.eof then exit for
		next
		if rs.eof then exit for
	Next
  end if
  rs.close
  set rs=nothing
End Function

%>