%
Response.Expires= -1
Response.ExpiresAbsolute = Now() - 1
response.CacheControl="no-cache"
server.ScriptTimeout=50000
session.Timeout=60
%>
<%
if session("lesson")="" then session("lesson")="0,0"
if session("Discount")="" then session("Discount")="0,0"
ids = checkstr(request("ids"),2)
DiscountIds = checkstr(request("DiscountIds"),2)
if ids<>"" and instr(session("lesson"),","&ids&",")=0 then session("lesson")=replace(session("lesson"),",0",","&ids&",0")
if checkIdStr(ids)=false then response.write "参数错误":response.End()
'保过班
if DiscountIds<>"" and instr(session("Discount"),","&DiscountIds&",")=0 then session("Discount")=replace(session("Discount"),",0",","&DiscountIds&",0")
if checkIdStr(DiscountIds)=false then response.write "参数错误":response.End()
'response.Write(session("lesson")&"~~~~"&session("Discount")&" ")
'删除已选课程
if checkstr(request("cmd"),2)="del" then
if checkstr(request("did1"),1)>0 then
session("Discount")=replace(session("Discount"),","&checkstr(request("did1"),1)&",",",")
elseif checkstr(request("did"),1)>0 then
session("lesson")=replace(session("lesson"),","&checkstr(request("did"),1)&",",",")
end if
end if
if request("backUrl")<>"" then
backUrl=request("backUrl")
else
backUrl=request.ServerVariables("HTTP_REFERER")
if backUrl="" then backUrl="classlist.asp"
'backUrl=server.URLEncode(backUrl)
end if
'如果未选课程则跳转到选课页面
if session("lesson")="0,0" and checkstr(request("ids"),2)="" and session("Discount")="0,0" and checkstr(request("DiscountIds"),2)="" then response.Redirect backUrl
dim dShowPrice '套餐折扣价
dim ShowPrice '单选课程折扣价
dim dRealPrice '套餐中课程原价
dim RealPrice '课程单选原价
dim RealClassIds '去掉单选课程在套餐中重复出现后的id
Dim DiscountClassIds '套餐中包括的课程id
Dim GoodsAmount '商品总价格
Dim GoodsSaleAmount '商品在套餐中的销售总价格
Dim IsOldUser '是否为老学员
dim ClassSelectNum '单选课程的数量
Dim TotalMoney '销售价格合计
Dim RealMoney '原价合计
Dim OldMoney '老学员价格合计
lesson="0,0"
DiscountIds="0,0"
'获取折扣
call getDiscountPrice(session("m_id"),session("lesson"),session("Discount"))
'生成课程订单号
if session("buynum")="" then
session("buynum")=gen_ordercode(1,conn)
end if
session("lesson")=RealClassIds
if session("lesson")<>"" and session("lesson")<>"0,0" then
lesson=session("lesson")
end if
if DiscountClassIds<>"" and DiscountClassIds<>"0,0" then
lesson=lesson&","&DiscountClassIds
end if
DiscountIds=session("Discount")
buynum=session("buynum")
buyright=0
%>
面授班报名
订单号:<%=buynum%>确认您所报名课程
<%if DiscountIds<>"" and DiscountIds<>"0,0" then%>
已选套餐
说明
价格
取消
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from Edu_discount where Id in ("&DiscountIds&")"
rs.open sql,conn,3
do while not rs.eof
%>
<%=rs("title")%>
<%=rs("content")%>
<%if IsOldUser=1 then response.Write FormatCurrency(rs("OldUserPrice"),0) else response.Write FormatCurrency(rs("NewUserPrice"),0)%> 元(原价:<%=rs("totalPrice")%>)