% option explicit
response.buffer = true
Session.LCID = 1041
%>
<% dim thePageTitle, thePageName, thePageNameLinks
thePageTitle = "SKAPA KUPONG"
thePageName = "tips_showTipsKupong.asp"
thePageNameLinks = "tips_showTipsKupong.asp"
' 60 = tips_showTipsKupong.asp
call countClickPage(60, strUserID_donRollo)
dim intActualSessionUserID
intActualSessionUserID = int(session("userID"))
'response.write "intActualSessionUserID = " &intActualSessionUserID& "
"
dim dtmActualYear
dtmActualYear = Year(now)
'response.write "dtmActualYear = " &dtmActualYear& "
"
dim dtmActualWeek
dtmActualWeek = DatePart("ww", Now())-1
'response.write "dtmActualWeek = " &dtmActualWeek& "
"
'*************** OPEN THE DATABASE
dim conn
set conn = Server.CreateObject ("ADODB.Connection")
conn.Open "Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=191516-poker;User=191516_vt67146;Password=DBpoker0;Option=3;"
' XX = tips_showTipsKupong.asp
'call countClickPage(XX, strUserID_donRollo)
dim sql, rs
sql = "SELECT COUNT(*) AS antal "
sql = sql & "FROM tbl_tipsOmgang "
sql = sql & "WHERE "
sql = sql & "userID = "& intActualSessionUserID &" "
sql = sql & "AND "
sql = sql & "hasBeenDeleted = 0 "
set rs = conn.execute(sql)
dim intAntalOmgangar
intAntalOmgangar = cint(rs("antal"))
'response.write "intAntalOmgangar = " &intAntalOmgangar& "
"
if intAntalOmgangar <> 0 then
sql = "SELECT tipsOmgangID "
sql = sql & "FROM tbl_tipsOmgang "
sql = sql & "WHERE "
sql = sql & "userID = "& intActualSessionUserID &" "
sql = sql & "AND "
sql = sql & "hasBeenDeleted = 0 "
set rs = conn.execute(sql)
dim allTipsOmgangID, arrTipsOmgangID
if not rs.EOF then
allTipsOmgangID = rs.GetString(,,"",",","")
allTipsOmgangID = Left(allTipsOmgangID, Len(allTipsOmgangID)-1)
arrTipsOmgangID = split(allTipsOmgangID,",")
else
allTipsOmgangID = int(0)
end if
end if
dim strOmgangText
select case intAntalOmgangar
case 0
strOmgangText = "Du har inga kuponger registrerade"
case 1
strOmgangText = "Du har 1 registrerad kupong"
case else
strOmgangText = "Du har "&intAntalOmgangar&" registrerade kuponger"
end select
dim intPageSize, intCurrentPage, intUserTypeID
dim strSQL, objRS, arrProducts, intTotalProducts
dim intTotalPages, intStart, intEnd, intCurrentProduct
dim i, intVspace
dim intRequestThisOutput, intSortOrder
intPageSize = int(request("size"))
intCurrentPage = int(request("page"))
intSortOrder = int(request("sortOrder"))
intRequestThisOutput = int(request("showThisOutput"))
session.timeout = 480
' ----- set default values if no querystring has been sent yet -----------------------
if intSortOrder = 0 then
intSortOrder = int(1)
end if
if intPageSize = 0 Then
intPageSize = int(40)
Else
intPageSize = CInt(intPageSize)
End if
if intCurrentPage = 0 Then
intCurrentPage = 1
else
intCurrentPage = CInt(intCurrentPage)
end if
dim sqlLoop1, rsloop1
if intAntalOmgangar <> 0 then
sqlLoop1 = "SELECT "
sqlLoop1 = sqlLoop1 & "O.tipsOmgangID, "
sqlLoop1 = sqlLoop1 & "O.tipsOmgangName, "
sqlLoop1 = sqlLoop1 & "O.createDateDate, "
sqlLoop1 = sqlLoop1 & "S.systemNamn, "
sqlLoop1 = sqlLoop1 & "S.systemInsats, "
sqlLoop1 = sqlLoop1 & "O.lockStatus, "
sqlLoop1 = sqlLoop1 & "V.variant, "
sqlLoop1 = sqlLoop1 & "O.tipsVariantID "
sqlLoop1 = sqlLoop1 & "FROM tbl_tipsOmgang O "
sqlLoop1 = sqlLoop1 & "INNER JOIN tbl_tipsSystem S ON O.tipsSystemID = S.tipsSystemID "
sqlLoop1 = sqlLoop1 & "INNER JOIN tbl_tipsVariant V ON O.tipsVariantID = V.tipsVariantID "
sqlLoop1 = sqlLoop1 & "WHERE "
sqlLoop1 = sqlLoop1 & "O.userID = "&intActualSessionUserID&" "
sqlLoop1 = sqlLoop1 & "AND "
sqlLoop1 = sqlLoop1 & "O.hasBeenDeleted = 0 "
sqlLoop1 = sqlLoop1 & "ORDER BY O.createDateNow DESC"
set rsLoop1 = conn.execute(sqlLoop1)
dim arrMallar
If NOT rsLoop1.EOF Then
arrMallar = rsLoop1.GetRows()
Else
ReDim arrMallar(0,-1)
End if
dim intTotalMallar
intTotalMallar = UBound(arrMallar,2)+1
If intTotalMallar > 0 Then
' ----- calculate total pages --------------------
intTotalPages = Int(intTotalMallar/intPageSize)
If NOT intTotalMallar mod intPageSize = 0 Then
intTotalPages = intTotalPages + 1
End if
' ------------------------------------------------
intStart = (intPageSize * intCurrentPage) - intPageSize
intEnd = intStart + intPageSize
intCurrentProduct = intStart
i = 0
end if
end if
dim xCopy
%>
www.donRollo.se
|
<% call showLogin() %>
|
|
|
|
|
<% call showMenu() %> |
|
<% call mainPage() %> |
|
|
<% call showBottom() %> |
<% sub mainPage() %>
|
|
|
|
|
|
|
|
Skapa en kupong eller hantera gamla kuponger. Kom ihåg - en kupong = ett system. Men du kan kopiera en befintlig kupong via C så du inte behöver skriva in matcherna mer än en gång. |
|
|
|
|
|
Ge din kupong ett relevant namn, ex "chanstips vecka 14 2010" så blir det lättare att hålla ordning på dina kuponger. Den senast skapade kupongen ligger alltid HÖGST upp. Klicka på pilen längt till höger för att gå vidare och skapa textfiler, rätta m.m. |
|
|
|
|
<% if intAntalOmgangar <> 0 then %>
|
<%=strOmgangText%> |
|
|
|
|
|
|
|
|
|
|
|
|
Kupong |
Typ |
Skapad |
System |
Kostnad |
|
|
|
|
|
<% dim sqlLoop2, rsloop2
dim intTipsOmgangID_loop1
dim strTipsOmgangName_loop1, dtmCreateDateDate_loop1
dim strSystemNamn_loop1, intSystemInsats_loop1
dim intLockStatus_loop1
dim strVariant_loop1
dim intTipsVariantID_loop1
dim countLoop : countLoop = 1
Do
intTipsOmgangID_loop1 = int(arrMallar(0,intCurrentProduct))
strTipsOmgangName_loop1 = trim(arrMallar(1,intCurrentProduct))
dtmCreateDateDate_loop1 = arrMallar(2,intCurrentProduct)
dtmCreateDateDate_loop1 = replace(dtmCreateDateDate_loop1,"/","-")
strSystemNamn_loop1 = trim(arrMallar(3,intCurrentProduct))
intSystemInsats_loop1 = int(arrMallar(4,intCurrentProduct))
intLockStatus_loop1 = int(arrMallar(5,intCurrentProduct))
strVariant_loop1 = trim(arrMallar(6,intCurrentProduct))
intTipsVariantID_loop1 = int(arrMallar(7,intCurrentProduct))
sqlLoop2 = "SELECT matchNr, hemmaLag, bortalag FROM tbl_tipsMatcher WHERE tipsOmgangID = "&intTipsOmgangID_loop1&" ORDER BY matchNr"
set rsLoop2 = conn.execute(sqlLoop2)
%>
<% select case intLockStatus_loop1
case 1
%>
|
<% case else %>
|
<% end select %>
<%=strTipsOmgangName_loop1%> |
<%=strVariant_loop1%> |
<%=dtmCreateDateDate_loop1%> |
<%=strSystemNamn_loop1%> |
<%=intSystemInsats_loop1%> kr |
|
|
|
|
|
|
|
|
<% countLoop = countLoop + 1
intCurrentProduct = intCurrentProduct + 1
If intCurrentProduct >= intTotalMallar Then Exit Do
Loop While intCurrentProduct <= intEnd - 1
%>
|
|
|
|
|
<< |
|
< |
|
<% dim intMin, intMax, tempLink
intMin = max(intCurrentPage-4, 1) 'get the first number
intMax = min(intMin+9, intTotalPages) 'get the last number
If cint(intCurrentPage) > cint(intTotalPages)-10 then
intMin = max(intMax-9,1)
End if
For i = intMin To intMax
If i = cint(intCurrentPage) then
tempLink = "_"
Else
tempLink = "_"
End if
%>
<%=replace(tempLink,"_",i)%> |
|
<% Next %>
> |
|
>> |
|
|
|
|
|
|
<% else %>
|
Du har inga registrerade kuponger |
|
<% end if %>
|
|
|
|
<% end sub %>