<% If Trim(flag) <> "edit" And Trim(flag) <> "sample" Then if step="1" then file_product_num = "10903" '----> elseif step="2" then file_product_num = "10904" '----> end if strSQL = "Select cast(product_num as varchar(100)) From b2c_pay_package_product Where userid in ("&fnCdbValue(Trim(Session("loginid")))&") and product_num in ("&fncdbvalue(file_product_num)&")" strSQL = strSQL & " Union All " strSQL = strSQL & "Select product_list From b2c_cart Where userid in ("&fnCdbValue(Trim(Session("loginid")))&") and sell_info ='o' and send_product not in ('f','c','v') and (product_list like "&fnCdbValue2(file_product_num)&")" Set tRs = classcon.Execute(strSQL) If tRs.BOF And tRs.EOF Then mp3_file_Str = "" Else strSQL = "Select bonus_sound From lecture_handout Where intro_idx in (Select idx From lecture_intro Where course = "&fncdbvalue(course)&" and lev = "&fncdbvalue(lev)&" and step = "&fncdbvalue(step)&" and sec = "&fncdbvalue(sec)&")" Set dRs = cybercon.Execute(strSQL) If dRs.BOF And dRs.EOF Then mp3_file_Str = "" Else If Trim(dRs(0)) <> "" Then mp3_file_Str = "javascript:location.href='download.asp?filename="&Trim(dRs(0))&"&"&pub&"';" Else mp3_file_Str = "" End If End If dRs.Close Set dRs = Nothing End If Else strSQL = "Select bonus_sound From lecture_handout Where intro_idx in (Select idx From lecture_intro Where course = "&fncdbvalue(course)&" and lev = "&fncdbvalue(lev)&" and step = "&fncdbvalue(step)&" and sec = "&fncdbvalue(sec)&")" Set dRs = cybercon.Execute(strSQL) If dRs.BOF And dRs.EOF Then mp3_file_Str = "" Else If Trim(dRs(0)) <> "" Then mp3_file_Str = "javascript:location.href='download.asp?filename="&Trim(dRs(0))&"&"&pub&"';" Else mp3_file_Str = "" End If End If dRs.Close Set dRs = Nothing End If %>