<% fiska = 0 hej = request.form("txtLosen") if hej = "wendybabe" then fiska = 1 end if set fso = CreateObject("Scripting.FileSystemObject") set cFile = fso.OpenTextFile("d:\clients\wendyjames.nu\wwwroot\hitcount.idx") count = cFile.ReadLine cfile.close count = count + 1 set nFile = fso.CreateTextFile("d:\clients\wendyjames.nu\wwwroot\hitcount.idx",true) nfile.write(count) nfile.close Randomize DispNumber = Int(Rnd*13) Set FileObject = Server.CreateObject("Scripting.FileSystemObject") Set Instream = FileObject.OpenTextFile ("d:\clients\wendyjames.nu\wwwroot\randompic.idx", 1, FALSE, FALSE) For i = 1 to DispNumber -1 InStream.SkipLine() Next RandomDispItem = Instream.ReadLine Set cnnPoll = Server.CreateObject("ADODB.Connection") Set rsPoll = Server.CreateObject("ADODB.Recordset") Session("ConnectionString") = "DSN=wendypoll" Dim SCRIPT_NAME ' Script name so we can make it location independent SCRIPT_NAME = Request.ServerVariables("SCRIPT_NAME") Dim strAction ' Variable to determine what we need to do Dim iPoll ' Poll ID number to perform current action on Dim iVote ' In the case that a vote is being cast this is the vote Dim iTotalVotes ' Total votes in DB - used to figure out %s on results page Dim strSQL ' Our SQL string for getting to the DB Dim I ' A standard looping variable strAction = LCase(CStr(Request.QueryString("action"))) If strAction <> "results" Then strAction = "question" iPoll = Request.QueryString("pid") If IsNumeric(iPoll) Then If iPoll > 0 Then iPoll = CInt(iPoll) Else iPoll = 1 End If Else If LCase(iPoll) = "all" And strAction = "results" Then iPoll = "all" Else strAction = "Error: Invalid Poll Id!" End If End If cnnPoll.Open Session("ConnectionString") strSQL = "SELECT * FROM polls WHERE id=" & iPoll & ";" %> Wendy James & Transvision vamp FAN site
wendy james logo
transvision vamp top
N E W S

2000-09-10 The FAQ page is released, get in there and ask questions! ;)

2000-09-08 15 new pictures added ... Also, coming this sunday (sept10) the grand opening of the FAQ page, with our own TVV expert Charm Pinkerton.

2000-09-04 17 new pictures added .. and more on the way.

2000-08-30 13 new pictures added to the pics section, check out the uploads page for more great files.

2000-08-29 Two new articles added (one really special)

2000-08-23 GREAT NEWS!!! Wendy is alive .. she was seen at the sSs gig at the borderline (london?) read more.

Optimized for Internet
explorer in 1280x1024
L I N K S

-Tex Axile
-Diary of a genius Review
-Little monsters Review
-We are Transvision Vamp
-Transvideos
-The dancerama club

P O L L

Click your fav song to vote!!
<% Select Case strAction Case "question" rsPoll.Open strSQL, cnnPoll, adOpenStatic, adLockReadOnly, adCmdText If Not rsPoll.EOF Then 'Loop 1 to 5 since there are only 5 possible choices set up in the DB For I = 1 to 5 If Not IsNull(rsPoll.Fields("choice" & I).Value) Then ' Some spacing if needed If I <> 1 Then Response.Write "" ' Show choices hyperlinked to the vote portion of the script. %> <%= rsPoll.Fields("choice" & I).Value %>
<% End If Next 'I Else Response.Write "Error: Invalid Poll Id!" End If rsPoll.Close Case "results" iVote = Request.QueryString("vote") If IsNumeric(iVote) Then iVote = CInt(iVote) If Not(1 <= iVote And iVote <= 5) Then iVote = 0 End If Else iVote = 0 End If If iVote <> 0 And iPoll <> "all" Then rsPoll.Open strSQL, cnnPoll, adOpenKeyset, adLockPessimistic, adCmdText If Not rsPoll.EOF Then ' Check to be sure they haven't already voted in this session ' This prevents the refresh button from resubmitting the info ' You could make this a lot more sophisticated and useful if ' you had some reason to. I just don't really care and do it ' mainly for the refresh button issue If Session("AlreadyVoted") <> 1 Then rsPoll.Fields("votes" & iVote).Value = rsPoll.Fields("votes" & iVote).Value + 1 rsPoll.Update ' Set Flag to prevent revoting Session("AlreadyVoted") = 1 End If Else Response.Write "Error: Invalid Poll Id!" End If rsPoll.Close Else If iPoll = "all" Then ' Override our standard SQL string to show all otherwise it'll work fine. strSQL = "SELECT * FROM polls ORDER BY id;" End If End If ' I've already processed any entry we needed to and set up for all condition. ' Time to show the results! ' Open recordset to show results. rsPoll.Open strSQL, cnnPoll, adOpenKeyset, adLockPessimistic, adCmdText If Not rsPoll.EOF Then ' For each poll show results. ' Normally just one, but I built it so it'd work for "all" too. Do While Not rsPoll.EOF ' Tally the total votes and store it iTotalVotes = rsPoll.Fields("votes1").Value + _ rsPoll.Fields("votes2").Value + _ rsPoll.Fields("votes3").Value + _ rsPoll.Fields("votes4").Value + _ rsPoll.Fields("votes5").Value ' Show Results - Format to your liking! 'Loop over choices For I = 1 to 5 If Not IsNull(rsPoll.Fields("choice" & I).Value) Then ' The math was giving me trouble when I divided 0 by 1 so I avoided the situation If rsPoll.Fields("votes" & I).Value = 0 Then %> <%= rsPoll.Fields("choice" & I).Value %>:<%= FormatPercent(0, 1) %>
<% Else %> <%= rsPoll.Fields("choice" & I).Value %>:<%= FormatPercent((rsPoll.Fields("votes" & I).Value / iTotalVotes), 1) %>
<% End If End If Next 'I rsPoll.MoveNext Loop Else Response.Write "Error: Invalid Poll Id!" End If %> (based on <%= iTotalVotes %> votes) <% rsPoll.Close Case Else ' "error" ' OK so this is pretty lame error handling, but it ' catches most stupid things and warns the user. Response.Write strAction End Select cnnPoll.Close %>
Join the mailinglist!
Email:
Name:

If you want to contribute to the site in any way, mail me at sweda@wendyjames.nu

<%= count %> hits since 1998-05-21

INDEX FAQ PICTURES AUDIO ARTICLES COLLECTION UPLOAD RARE ITEMS
<% ' Either Create or Get the lastTen Application Array Application.Lock IF NOT isArray( Application( "lastTen" ) ) THEN DIM dummy( 10, 3 ) Application( "lastTen" ) = dummy END IF lastTen = Application( "lastTen" ) Application.UnLock ' Move Every Visitor Down in the Array IF lastTen( 9, 0 ) <> "" THEN FOR i = 0 TO 9 lastTen( i, 0 ) = lastTen( i + 1, 0 ) lastTen( i, 1 ) = lastTen( i + 1, 1 ) lastTen( i, 2 ) = lastTen( i + 1, 2 ) NEXT END IF ' Add New Entry FOR i = 0 TO 9 IF lastTen( i, 0 ) = "" THEN lastTen( i, 0 ) = Request.ServerVariables( "REMOTE_ADDR" ) lastTen( i, 1 ) = Request.ServerVariables( "HTTP_USER_AGENT" ) lastTen( i, 2 ) = NOW() EXIT FOR END IF NEXT Application.Lock Application( "lastTen" ) = lastTen Application.UnLock ' Display Last Ten Visitors %> <% if fiska = 1 then %>
<% FOR i = 0 TO 9 IF lastTen( i, 0 ) <> "" THEN %> <% END IF NEXT end if %>
Visitor IP Address Browser Visit Time
<%=i + 1%> <%=lastTen( i, 0 )%> <%=lastTen( i, 1 )%> <%=lastTen( i, 2 )%>