<% Set databaseConnection = getDatabaseConnection() userID = "2" Set storiesRS = Nothing // get name to prefill if you are logged in If Not isLoggedIn() Or isStillAnonymous() Then usersStatus = 1 Else // get all the stories you have submitted userID = CStr(Request.Cookies("hon")("hon_use_id")) // crude checking for admins If CInt(userID) <= 11 Then usersStatus = 3 Set storiesRS = createRecordSet("SELECT hon_sto_id, hon_sto_title FROM hon_sto_stories ORDER BY hon_sto_id DESC", databaseConnection) Else usersStatus = 2 End If End If %> Admin View of All Scores
All HACK or NOT Scores

<% If usersStatus = 1 Then %> <%= getCPMBanner() %>

You are not currently logged in. <% ElseIf usersStatus = 2 Then %> <%= getCPMBanner() %>

You really shouldn't be here.<%= userID %> <% Else %>
<%= getCPMBanner() %>

All Submissions: <% While Not storiesRS.EOF // get title and set up stats recordset storyID = CStr(storiesRS.Fields("hon_sto_id")) title = CStr(storiesRS.Fields("hon_sto_title")) Set statsRS = getStoryStats(storyID, databaseConnection) averageRating = statsRS.Fields("averageScore") If IsNull(averageRating) Or averageRating = "" Then averageRating = "No Score Yet" Else averageRating = FormatNumber(averageRating, 2, True, False, False) End If %>

<%= safeHTMLEncode(title) %>
Average Rating: <%= safeHTMLEncode(averageRating) %>
Total Votes: <%= safeHTMLEncode(statsRS.Fields("totalVotes")) %>
10's: <%= safeHTMLEncode(getNumberScores("10", storyID, databaseConnection)) %>   5's: <%= safeHTMLEncode(getNumberScores("5", storyID, databaseConnection)) %>  
9's: <%= safeHTMLEncode(getNumberScores("9", storyID, databaseConnection)) %>   4's: <%= safeHTMLEncode(getNumberScores("4", storyID, databaseConnection)) %>  
8's: <%= safeHTMLEncode(getNumberScores("8", storyID, databaseConnection)) %>   3's: <%= safeHTMLEncode(getNumberScores("3", storyID, databaseConnection)) %>  
7's: <%= safeHTMLEncode(getNumberScores("7", storyID, databaseConnection)) %>   2's: <%= safeHTMLEncode(getNumberScores("2", storyID, databaseConnection)) %>  
6's: <%= safeHTMLEncode(getNumberScores("6", storyID, databaseConnection)) %>   1's: <%= safeHTMLEncode(getNumberScores("1", storyID, databaseConnection)) %>  
ID Number: <%= safeHTMLEncode(storyID) %>
<% storiesRS.MoveNext Wend %> <% End If %>
<%= getRightBarAd() %>

HACK or NOT Home
About HACK or NOT | Tell A Friend | How To Link To This Site
Contact Us | Copyright

<% destroyConnection(databaseConnection) %>