|
电 影
|
<%
pStr = "private, no-cache, must-revalidate"
Response.ExpiresAbsolute = #2000-01-01#
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", pStr
x = ClientIPAuth()
szPath = "../"
dim szUserName, iUserType, iUserLevel, iDiscount, iAccount, iPurchase_Mode, WBuser,WBuserIPClass,WBuserTTime,LookTime,CanLookTime
LookTime=hour(now())
if(LookTime < 6 ) then
CanLookTime=1
else
CanLookTime=0
end if
szClientIP = Request.ServerVariables("REMOTE_ADDR")
szSQL = "SELECT * FROM WBIP"
rsData.Open szSQL,con,1,1
do while not rsData.EOF
if IPAddrToInt(szClientIP) >= IPAddrToInt(rsData("WBIP_ID0")) and IPAddrToInt(szClientIP) <= IPAddrToInt(rsData("WBIP_ID1")) then
WBuser=rsData("NDID")
WBuserIPClass=rsData("IP_CLASS")
WBuserTTime=rsData("TTime")
if DateDiff("d",now(),WBuserTTime) < 0 then
Response.Write "-1004"
Response.End
end if
exit do
end if
rsData.MoveNext
loop
rsData.Close
function GetUserInfo(iUserID)
if Len(iUserID) = 0 and WBuser="" then
Response.Write "-1001"
Response.End
end if
iUnit = Clng(Session("Option_Unit_Point"))
szSQL = "SELECT UserName,Status,PayMode,Discount,Account,Purchase_Mode,Account_UseMode,LastCheckDate FROM CusTomer WHERE CusTomer_ID=" & iUserID
rsData.Open szSQL,con,1,3
if not rsData.EOF then
if rsData("Status") = 0 then
Response.Write "-1008"
Response.End
end if
szUserName = rsData("UserName")
iUserType = rsData("PayMode")
iDiscount = rsData("Discount")
iAccount = rsData("Account")
iPurchase_Mode = rsData("Purchase_Mode")
iUseMode = rsData("Account_UseMode")
iLastCheckDate = rsData("LastCheckDate")
if IsNull(iLastCheckDate) then
iLastCheckDate=now()
end if
else
Response.Write "-1006"
Response.End
end if
rsData.Close
if iPlayerType = 1 then
szSQL = "SELECT CusTomer_Group.CusTomer_ID, Channel_Group.UserType "
szSQL = szSQL & "FROM (CusTomer_Group LEFT JOIN Channel_Group ON CusTomer_Group.Group_ID=Channel_Group.Group_ID) "
szSQL = szSQL & "INNER JOIN GroupInfo ON CusTomer_Group.Group_ID=GroupInfo.Group_ID "
szSQL = szSQL & "WHERE CusTomer_Group.CusTomer_ID=" & iUserID & " AND Channel_Group.UserType=2 AND GroupInfo.AdminType=0"
rsData.Open szSQL,con,1,3
if rsData.EOF then
Response.Write "-1007"
Response.End
end if
rsData.Close
end if
szSQL = "SELECT MAX(GroupInfo.Level_ID) AS Level_ID "
szSQL = szSQL & "FROM CusTomer_Group,GroupInfo "
szSQL = szSQL & "WHERE CusTomer_Group.Group_ID=GroupInfo.Group_ID "
szSQL = szSQL & "AND CusTomer_Group.CusTomer_ID=" & iUserID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iUserLevel = rsData("Level_ID")
if IsNull(iUserLevel) or iUserLevel = "" then iUserLevel = 1
rsData.Close
szSQL = "SELECT ConSume_Time,Prog_ID,ConSume_Date FROM ConSume WHERE CusTomer_ID=" & iUserID & " ORDER By ConSume_ID Desc"
rsData.Open szSQL,con,1,3
if not rsData.EOF then
iConSume_Date=rsData("ConSume_Date")
if DateDiff("s",iLastCheckDate,iConSume_Date) <> 0 then
iGame= rsData("Prog_ID")
iConSume_Time=rsData("ConSume_Time")
iConSume_Date=rsData("ConSume_Date")
rsData.Close
szSQL = "SELECT Price FROM GamePrice WHERE Prog_ID=" & iGame & " ORDER By Price_ID Desc"
rsData.Open szSQL,con,1,3
if not rsData.EOF then
iGamePrice = rsData("Price")
end if
rsData.Close
szSQL = "SELECT PlayTime FROM ProgInfo WHERE Prog_ID=" & iGame
rsData.Open szSQL,con,1,3
if not rsData.EOF then
szPlayTime = rsData("PlayTime")
iTimeHour = Mid(szPlayTime, 1, 2)
iTimeMin = Mid(szPlayTime, 3, 2)
iTimeSec = Mid(szPlayTime, 5, 2)
if rsData("PlayTime") <> "000000" then
iGameTime = Clng(iTimeHour * 3600 + iTimeMin * 60 + iTimeSec)
end if
end if
rsData.Close
szSQL = "SELECT Account,LastCheckDate FROM CusTomer WHERE CusTomer_ID=" & iUserID
rsData.Open szSQL,con,1,3
if not rsData.EOF and iGameTime>0 then
if iUserType = 0 then
NowCount = (iDiscount*iGamePrice/100)*(iConSume_Time/iGameTime)
rsData("LastCheckDate")= iConSume_Date
rsData("Account")=iAccount-(NowCount/iUnit)
rsData.Update
end if
end if
rsData.Close
else
rsData.Close
end if
else
rsData.Close
end if
end function
function CheckRight(iGameID)
szSQL = "SELECT IDN FROM CusTomer_Group WHERE Group_ID>0 AND CusTomer_ID=" & iUserID
rsData.Open szSQL,con,1,3
if rsData.EOF then
Response.Write "-1003"
Response.End
end if
rsData.Close
szSQL = "SELECT ProgLevel FROM v_proginfo WHERE Prog_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iGameLevel = rsData("ProgLevel")
rsData.Close
if iGameLevel > iUserLevel then
Response.Write "-1007"
Response.End
end if
if WBuser<>"" and iGameLevel > WBuserIPClass and CanLookTime=0 then
Response.Write "-1005"
Response.End
end if
end function
function CheckPoint(iGameID, iCurrentPoint)
szSQL = "SELECT Price FROM v_pro_price WHERE Prog_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iGamePrice = rsData("Price")
rsData.Close
if iGamePrice * iDiscount / 100 > iCurrentPoint then
Response.Write "-1002"
Response.End
end if
end function
function CheckMonth(iGameID, iUserID, iUnitValue)
szSQL = "SELECT Price FROM v_pro_price WHERE Prog_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iGamePrice = rsData("Price")
rsData.Close
if iGamePrice * iDiscount / 100 > iCurrentPoint then
szSQL = "SELECT Account,LastCheckDate FROM CusTomer WHERE CusTomer_ID=" & iUserID
rsData.Open szSQL,con,1,3
if not rsData.EOF then
iAccount = rsData("Account")
szCheckDate = rsData("LastCheckDate")
if DateDiff("d", szCheckDate, now) >= 30 or szCheckDate = "" or IsNull(szCheckDate) then
if iAccount < iUnitValue then
Response.Write "-1002"
Response.End
else
if IsNull(szCheckDate) then
szCheckDate = now
elseif szCheckDate = "" then
szCheckDate = now
else
szCheckDate = DateAdd("d", 30, szCheckDate)
end if
rsData("account") = iAccount - iUnitValue
rsData("LastCheckDate") = szCheckDate
rsData.Update
end if
end if
end if
rsData.Close
end if
end function
function CheckFlux(iGameID, iCurrentFlux)
szSQL = "SELECT FileLen FROM v_proginfo WHERE Prog_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iGameLen = rsData("FileLen")
rsData.Close
szSQL = "SELECT Price FROM v_pro_price WHERE Prog_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iGamePrice = rsData("Price")
rsData.Close
if iGameLen * iGamePrice > iCurrentFlux * 1024 * 1024 / 8 then
Response.Write "-1002"
Response.End
end if
end function
function CheckHour(iGameID, iCurrentHour)
szSQL = "SELECT PlayTime FROM v_proginfo WHERE Prog_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then
szPlayTime = rsData("PlayTime")
iTimeHour = Mid(szPlayTime, 1, 2)
iTimeMin = Mid(szPlayTime, 3, 2)
iTimeSec = Mid(szPlayTime, 5, 2)
if rsData("PlayTime") <> "000000" then iGameTime = Clng(iTimeHour * 3600 + iTimeMin * 60 + iTimeSec)
end if
rsData.Close
szSQL = "SELECT Price FROM v_pro_price WHERE Prog_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iGamePrice = rsData("Price")
rsData.Close
if (iGameTime / 3600) * iGamePrice > iCurrentHour then
Response.Write "-1002"
Response.End
end if
end function
//////////////////////////////////////////////////////////////
iGameID = Encode(Request.QueryString("id"))
bRefresh = Encode(Request.QueryString("rf"))
iPlayerType = Encode(Request.QueryString("PlayerType")) '区分LIVE和VOD
iUserID = Session("CusTomer_ID")
iEmbedMode = Encode(Request.QueryString("EmbedMode"))
iSendType = Encode(Request.QueryString("SendType"))
'if Len(iSendType) = 0 then iSendType = 1
if Len(iEmbedMode) = 0 then iEmbedMode = 1
if Len(iPlayerType) = 0 then iPlayerType = 2
if Session("Option_RegMode") = 2 and Len(iUserID) = 0 or WBuser<>"" then
iUserID = 2
szSQL = "SELECT CusTomer_ID FROM CusTomer WHERE UserName='" & WBuser & "'"
rsData.Open szSQL,con,1,3
if not rsData.EOF then iUserID = rsData("CusTomer_ID")
rsData.Close
end if
x = GetUserInfo(iUserID)
if iPurchase_Mode = 0 then
if iPlayerType = 1 then
iChannelPrice = 0
szSQL = "SELECT Price FROM Channel WHERE Channel_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iChannelPrice = rsData("Price")
rsData.Close
if iChannelPrice > 0 then
if iUserType = 1 then
iUnitValue = Clng(Session("Option_Unit_Month"))
x = CheckMonth(iGameID, iUserID, iUnitValue)
else
if iAccount <= 0 then
Response.Write "-1002"
Response.End
end if
end if
end if
end if
if iPlayerType = 2 then
if iUserType = 0 then
szPayFlag = "按点次付费"
iUnitValue = Clng(Session("Option_Unit_Point"))
iCurrentPoint = iAccount * iUnitValue
x = CheckPoint(iGameID, iCurrentPoint)
elseif iUserType = 1 then
szPayFlag = "按整月付费"
iUnitValue = Clng(Session("Option_Unit_Month"))
x = CheckMonth(iGameID, iUserID, iUnitValue)
elseif iUserType = 2 then
szPayFlag = "按流量付费"
iUnitValue = Clng(Session("Option_Unit_MB"))
iCurrentFlux = iAccount * iUnitValue
x = CheckFlux(iGameID, iCurrentFlux)
elseif iUserType = 3 then
szPayFlag = "按时间付费"
iUnitValue = Clng(Session("Option_Unit_Hour"))
iCurrentHour = iAccount * iUnitValue
x = CheckHour(iGameID, iCurrentHour)
end if
end if
end if
if iPlayerType = 2 then
x = CheckRight(iGameID) '检查节目级别
szSQL = "SELECT ProgName,FileName,FileType,PlayTime,Type_ID FROM v_proginfo WHERE Prog_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then
szProgName = rsData("ProgName")
szUrl = rsData("FileName")
szFileType = rsData("FileType")
szPlayTime = rsData("PlayTime")
iTypeID = rsData("Type_ID")
end if
rsData.Close
if szPlayTime <> "000000" or szFileType = "asf" or szFileType = "wmv" or szFileType = "wma" then
if bRefresh = "1" then szErrorMsg = "onLoad='window.opener.window.location.reload();'"
else
Response.Redirect "consume.asp?ProgID=" & iGameID & "&TypeID=" & iTypeID & "&CusTomerID=" & iUserID & "&UserName=" & szUserName & "&URL=" & URLEncode(szUrl)
end if
szProg_GUID = GetProgramGUID(iGameID)
szSQL = "SELECT Part_No,Prog_ID FROM v_proginfo WHERE Prog_GUID='" & szProg_GUID & "' ORDER BY Part_No ASC"
rsData.Open szSQL,con,1,3
szParmProgName = szProgName
if not rsData.EOF then
if rsData.RecordCount = 1 then
szParmProgName = szParmProgName
elseif rsData.RecordCount = 2 then
do while not rsData.EOF
if rsData("Prog_ID") = Clng(iGameID) then
if rsData("Part_No") = 1 then szParmProgName = szParmProgName & " - 上集"
if rsData("Part_No") = 2 then szParmProgName = szParmProgName & " - 下集"
exit do
end if
rsData.MoveNext
loop
elseif rsData.RecordCount = 3 then
do while not rsData.EOF
if rsData("Prog_ID") = Clng(iGameID) then
if rsData("Part_No") = 1 then szParmProgName = szParmProgName & " - 上集"
if rsData("Part_No") = 2 then szParmProgName = szParmProgName & " - 中集"
if rsData("Part_No") = 3 then szParmProgName = szParmProgName & " - 下集"
exit do
end if
rsData.MoveNext
loop
else
do while not rsData.EOF
if rsData("Prog_ID") = Clng(iGameID) then
szParmProgName = szParmProgName & " - 第 " & rsData("Part_No") & " 集"
exit do
end if
rsData.MoveNext
loop
end if
end if
rsData.Close
szParmPlayMode = "1"
szParmPlayModeValue = iGameID
szServerAddr = "1.1.1.1"
end if
if iPlayerType = 1 then
szServerAddr = Request.ServerVariables("SERVER_NAME")
szSQL = "SELECT Channel_IPAddr.MultiIP_Addr "
szSQL = szSQL & "FROM Channel_IPAddr "
szSQL = szSQL & "INNER JOIN HostIPList ON Channel_IPAddr.HostIP_ID=HostIPList.HostIP_ID "
szSQL = szSQL & "WHERE HostIPList.IpAddr='" & szServerAddr & "' AND Channel_IPAddr.Channel_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then szMultiIPAddr = rsData("MultiIP_Addr")
rsData.Close
if Len(iSendType) = 0 then
szSQL = "SELECT SendType FROM Channel WHERE Channel_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iSendType = rsData("SendType")
rsData.Close
if iSendType = 0 then iSendType = 1 '如果为组+单就选择单播
end if
szParmPlayMode = iSendType
if iSendType < 2 then szParmPlayModeValue = szMultiIPAddr
end if
Response.Write ""
%><%
pStr = "private, no-cache, must-revalidate"
Response.ExpiresAbsolute = #2000-01-01#
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", pStr
x = ClientIPAuth()
szPath = "../"
dim szUserName, iUserType, iUserLevel, iDiscount, iAccount, iPurchase_Mode, WBuser,WBuserIPClass,WBuserTTime,LookTime,CanLookTime
LookTime=hour(now())
if(LookTime < 6 ) then
CanLookTime=1
else
CanLookTime=0
end if
szClientIP = Request.ServerVariables("REMOTE_ADDR")
szSQL = "SELECT * FROM WBIP"
rsData.Open szSQL,con,1,1
do while not rsData.EOF
if IPAddrToInt(szClientIP) >= IPAddrToInt(rsData("WBIP_ID0")) and IPAddrToInt(szClientIP) <= IPAddrToInt(rsData("WBIP_ID1")) then
WBuser=rsData("NDID")
WBuserIPClass=rsData("IP_CLASS")
WBuserTTime=rsData("TTime")
if DateDiff("d",now(),WBuserTTime) < 0 then
Response.Write "-1004"
Response.End
end if
exit do
end if
rsData.MoveNext
loop
rsData.Close
function GetUserInfo(iUserID)
if Len(iUserID) = 0 and WBuser="" then
Response.Write "-1001"
Response.End
end if
iUnit = Clng(Session("Option_Unit_Point"))
szSQL = "SELECT UserName,Status,PayMode,Discount,Account,Purchase_Mode,Account_UseMode,LastCheckDate FROM CusTomer WHERE CusTomer_ID=" & iUserID
rsData.Open szSQL,con,1,3
if not rsData.EOF then
if rsData("Status") = 0 then
Response.Write "-1008"
Response.End
end if
szUserName = rsData("UserName")
iUserType = rsData("PayMode")
iDiscount = rsData("Discount")
iAccount = rsData("Account")
iPurchase_Mode = rsData("Purchase_Mode")
iUseMode = rsData("Account_UseMode")
iLastCheckDate = rsData("LastCheckDate")
if IsNull(iLastCheckDate) then
iLastCheckDate=now()
end if
else
Response.Write "-1006"
Response.End
end if
rsData.Close
if iPlayerType = 1 then
szSQL = "SELECT CusTomer_Group.CusTomer_ID, Channel_Group.UserType "
szSQL = szSQL & "FROM (CusTomer_Group LEFT JOIN Channel_Group ON CusTomer_Group.Group_ID=Channel_Group.Group_ID) "
szSQL = szSQL & "INNER JOIN GroupInfo ON CusTomer_Group.Group_ID=GroupInfo.Group_ID "
szSQL = szSQL & "WHERE CusTomer_Group.CusTomer_ID=" & iUserID & " AND Channel_Group.UserType=2 AND GroupInfo.AdminType=0"
rsData.Open szSQL,con,1,3
if rsData.EOF then
Response.Write "-1007"
Response.End
end if
rsData.Close
end if
szSQL = "SELECT MAX(GroupInfo.Level_ID) AS Level_ID "
szSQL = szSQL & "FROM CusTomer_Group,GroupInfo "
szSQL = szSQL & "WHERE CusTomer_Group.Group_ID=GroupInfo.Group_ID "
szSQL = szSQL & "AND CusTomer_Group.CusTomer_ID=" & iUserID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iUserLevel = rsData("Level_ID")
if IsNull(iUserLevel) or iUserLevel = "" then iUserLevel = 1
rsData.Close
szSQL = "SELECT ConSume_Time,Prog_ID,ConSume_Date FROM ConSume WHERE CusTomer_ID=" & iUserID & " ORDER By ConSume_ID Desc"
rsData.Open szSQL,con,1,3
if not rsData.EOF then
iConSume_Date=rsData("ConSume_Date")
if DateDiff("s",iLastCheckDate,iConSume_Date) <> 0 then
iGame= rsData("Prog_ID")
iConSume_Time=rsData("ConSume_Time")
iConSume_Date=rsData("ConSume_Date")
rsData.Close
szSQL = "SELECT Price FROM GamePrice WHERE Prog_ID=" & iGame & " ORDER By Price_ID Desc"
rsData.Open szSQL,con,1,3
if not rsData.EOF then
iGamePrice = rsData("Price")
end if
rsData.Close
szSQL = "SELECT PlayTime FROM ProgInfo WHERE Prog_ID=" & iGame
rsData.Open szSQL,con,1,3
if not rsData.EOF then
szPlayTime = rsData("PlayTime")
iTimeHour = Mid(szPlayTime, 1, 2)
iTimeMin = Mid(szPlayTime, 3, 2)
iTimeSec = Mid(szPlayTime, 5, 2)
if rsData("PlayTime") <> "000000" then
iGameTime = Clng(iTimeHour * 3600 + iTimeMin * 60 + iTimeSec)
end if
end if
rsData.Close
szSQL = "SELECT Account,LastCheckDate FROM CusTomer WHERE CusTomer_ID=" & iUserID
rsData.Open szSQL,con,1,3
if not rsData.EOF and iGameTime>0 then
if iUserType = 0 then
NowCount = (iDiscount*iGamePrice/100)*(iConSume_Time/iGameTime)
rsData("LastCheckDate")= iConSume_Date
rsData("Account")=iAccount-(NowCount/iUnit)
rsData.Update
end if
end if
rsData.Close
else
rsData.Close
end if
else
rsData.Close
end if
end function
function CheckRight(iGameID)
szSQL = "SELECT IDN FROM CusTomer_Group WHERE Group_ID>0 AND CusTomer_ID=" & iUserID
rsData.Open szSQL,con,1,3
if rsData.EOF then
Response.Write "-1003"
Response.End
end if
rsData.Close
szSQL = "SELECT ProgLevel FROM v_proginfo WHERE Prog_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iGameLevel = rsData("ProgLevel")
rsData.Close
if iGameLevel > iUserLevel then
Response.Write "-1007"
Response.End
end if
if WBuser<>"" and iGameLevel > WBuserIPClass and CanLookTime=0 then
Response.Write "-1005"
Response.End
end if
end function
function CheckPoint(iGameID, iCurrentPoint)
szSQL = "SELECT Price FROM v_pro_price WHERE Prog_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iGamePrice = rsData("Price")
rsData.Close
if iGamePrice * iDiscount / 100 > iCurrentPoint then
Response.Write "-1002"
Response.End
end if
end function
function CheckMonth(iGameID, iUserID, iUnitValue)
szSQL = "SELECT Price FROM v_pro_price WHERE Prog_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iGamePrice = rsData("Price")
rsData.Close
if iGamePrice * iDiscount / 100 > iCurrentPoint then
szSQL = "SELECT Account,LastCheckDate FROM CusTomer WHERE CusTomer_ID=" & iUserID
rsData.Open szSQL,con,1,3
if not rsData.EOF then
iAccount = rsData("Account")
szCheckDate = rsData("LastCheckDate")
if DateDiff("d", szCheckDate, now) >= 30 or szCheckDate = "" or IsNull(szCheckDate) then
if iAccount < iUnitValue then
Response.Write "-1002"
Response.End
else
if IsNull(szCheckDate) then
szCheckDate = now
elseif szCheckDate = "" then
szCheckDate = now
else
szCheckDate = DateAdd("d", 30, szCheckDate)
end if
rsData("account") = iAccount - iUnitValue
rsData("LastCheckDate") = szCheckDate
rsData.Update
end if
end if
end if
rsData.Close
end if
end function
function CheckFlux(iGameID, iCurrentFlux)
szSQL = "SELECT FileLen FROM v_proginfo WHERE Prog_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iGameLen = rsData("FileLen")
rsData.Close
szSQL = "SELECT Price FROM v_pro_price WHERE Prog_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iGamePrice = rsData("Price")
rsData.Close
if iGameLen * iGamePrice > iCurrentFlux * 1024 * 1024 / 8 then
Response.Write "-1002"
Response.End
end if
end function
function CheckHour(iGameID, iCurrentHour)
szSQL = "SELECT PlayTime FROM v_proginfo WHERE Prog_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then
szPlayTime = rsData("PlayTime")
iTimeHour = Mid(szPlayTime, 1, 2)
iTimeMin = Mid(szPlayTime, 3, 2)
iTimeSec = Mid(szPlayTime, 5, 2)
if rsData("PlayTime") <> "000000" then iGameTime = Clng(iTimeHour * 3600 + iTimeMin * 60 + iTimeSec)
end if
rsData.Close
szSQL = "SELECT Price FROM v_pro_price WHERE Prog_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iGamePrice = rsData("Price")
rsData.Close
if (iGameTime / 3600) * iGamePrice > iCurrentHour then
Response.Write "-1002"
Response.End
end if
end function
//////////////////////////////////////////////////////////////
iGameID = Encode(Request.QueryString("id"))
bRefresh = Encode(Request.QueryString("rf"))
iPlayerType = Encode(Request.QueryString("PlayerType")) '区分LIVE和VOD
iUserID = Session("CusTomer_ID")
iEmbedMode = Encode(Request.QueryString("EmbedMode"))
iSendType = Encode(Request.QueryString("SendType"))
'if Len(iSendType) = 0 then iSendType = 1
if Len(iEmbedMode) = 0 then iEmbedMode = 1
if Len(iPlayerType) = 0 then iPlayerType = 2
if Session("Option_RegMode") = 2 and Len(iUserID) = 0 or WBuser<>"" then
iUserID = 2
szSQL = "SELECT CusTomer_ID FROM CusTomer WHERE UserName='" & WBuser & "'"
rsData.Open szSQL,con,1,3
if not rsData.EOF then iUserID = rsData("CusTomer_ID")
rsData.Close
end if
x = GetUserInfo(iUserID)
if iPurchase_Mode = 0 then
if iPlayerType = 1 then
iChannelPrice = 0
szSQL = "SELECT Price FROM Channel WHERE Channel_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iChannelPrice = rsData("Price")
rsData.Close
if iChannelPrice > 0 then
if iUserType = 1 then
iUnitValue = Clng(Session("Option_Unit_Month"))
x = CheckMonth(iGameID, iUserID, iUnitValue)
else
if iAccount <= 0 then
Response.Write "-1002"
Response.End
end if
end if
end if
end if
if iPlayerType = 2 then
if iUserType = 0 then
szPayFlag = "按点次付费"
iUnitValue = Clng(Session("Option_Unit_Point"))
iCurrentPoint = iAccount * iUnitValue
x = CheckPoint(iGameID, iCurrentPoint)
elseif iUserType = 1 then
szPayFlag = "按整月付费"
iUnitValue = Clng(Session("Option_Unit_Month"))
x = CheckMonth(iGameID, iUserID, iUnitValue)
elseif iUserType = 2 then
szPayFlag = "按流量付费"
iUnitValue = Clng(Session("Option_Unit_MB"))
iCurrentFlux = iAccount * iUnitValue
x = CheckFlux(iGameID, iCurrentFlux)
elseif iUserType = 3 then
szPayFlag = "按时间付费"
iUnitValue = Clng(Session("Option_Unit_Hour"))
iCurrentHour = iAccount * iUnitValue
x = CheckHour(iGameID, iCurrentHour)
end if
end if
end if
if iPlayerType = 2 then
x = CheckRight(iGameID) '检查节目级别
szSQL = "SELECT ProgName,FileName,FileType,PlayTime,Type_ID FROM v_proginfo WHERE Prog_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then
szProgName = rsData("ProgName")
szUrl = rsData("FileName")
szFileType = rsData("FileType")
szPlayTime = rsData("PlayTime")
iTypeID = rsData("Type_ID")
end if
rsData.Close
if szPlayTime <> "000000" or szFileType = "asf" or szFileType = "wmv" or szFileType = "wma" then
if bRefresh = "1" then szErrorMsg = "onLoad='window.opener.window.location.reload();'"
else
Response.Redirect "consume.asp?ProgID=" & iGameID & "&TypeID=" & iTypeID & "&CusTomerID=" & iUserID & "&UserName=" & szUserName & "&URL=" & URLEncode(szUrl)
end if
szProg_GUID = GetProgramGUID(iGameID)
szSQL = "SELECT Part_No,Prog_ID FROM v_proginfo WHERE Prog_GUID='" & szProg_GUID & "' ORDER BY Part_No ASC"
rsData.Open szSQL,con,1,3
szParmProgName = szProgName
if not rsData.EOF then
if rsData.RecordCount = 1 then
szParmProgName = szParmProgName
elseif rsData.RecordCount = 2 then
do while not rsData.EOF
if rsData("Prog_ID") = Clng(iGameID) then
if rsData("Part_No") = 1 then szParmProgName = szParmProgName & " - 上集"
if rsData("Part_No") = 2 then szParmProgName = szParmProgName & " - 下集"
exit do
end if
rsData.MoveNext
loop
elseif rsData.RecordCount = 3 then
do while not rsData.EOF
if rsData("Prog_ID") = Clng(iGameID) then
if rsData("Part_No") = 1 then szParmProgName = szParmProgName & " - 上集"
if rsData("Part_No") = 2 then szParmProgName = szParmProgName & " - 中集"
if rsData("Part_No") = 3 then szParmProgName = szParmProgName & " - 下集"
exit do
end if
rsData.MoveNext
loop
else
do while not rsData.EOF
if rsData("Prog_ID") = Clng(iGameID) then
szParmProgName = szParmProgName & " - 第 " & rsData("Part_No") & " 集"
exit do
end if
rsData.MoveNext
loop
end if
end if
rsData.Close
szParmPlayMode = "1"
szParmPlayModeValue = iGameID
szServerAddr = "1.1.1.1"
end if
if iPlayerType = 1 then
szServerAddr = Request.ServerVariables("SERVER_NAME")
szSQL = "SELECT Channel_IPAddr.MultiIP_Addr "
szSQL = szSQL & "FROM Channel_IPAddr "
szSQL = szSQL & "INNER JOIN HostIPList ON Channel_IPAddr.HostIP_ID=HostIPList.HostIP_ID "
szSQL = szSQL & "WHERE HostIPList.IpAddr='" & szServerAddr & "' AND Channel_IPAddr.Channel_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then szMultiIPAddr = rsData("MultiIP_Addr")
rsData.Close
if Len(iSendType) = 0 then
szSQL = "SELECT SendType FROM Channel WHERE Channel_ID=" & iGameID
rsData.Open szSQL,con,1,3
if not rsData.EOF then iSendType = rsData("SendType")
rsData.Close
if iSendType = 0 then iSendType = 1 '如果为组+单就选择单播
end if
szParmPlayMode = iSendType
if iSendType < 2 then szParmPlayModeValue = szMultiIPAddr
end if
Response.Write ""
%>独播剧场
3GP电影下载网 |
|