<!--#include file="asp/processpage.asp"-->
<!--#include file="asp/header.asp"-->
<% encodeTable 'run function to build IP encode table %>
<!--- page title graphic in here --->
	<td width="100%" colspan="2" background="skinz/images<%=customcolours%>/top_bg2.gif" align="right" valign="top"><img src="skinz/images<%=customcolours%>/t_comments.gif" width="194" height="46" alt="[ comments ]"></td>
<!--#include file="asp/navbar.asp"-->
<!--- page content goes in here --->		
	<td width="100%" valign="top">
<%
	dim id, score
	
	id = Request.QueryString("id")
	
	'quick check on the QString
	if not isNumeric(id) then
		'damaged QString :[
		id = 0	
	end if
	
	id = fix(id)
		'this one makes sure they have not tried to enter a decmial point (ie, 89.23)
	
	dim sub_mit_but
	
	if switch = 0 then
		sub_mit_but = "Make me famous!"
	elseif switch = 1 then
		sub_mit_but = "Can I really post this comment?"
	elseif switch = 2 then
		sub_mit_but = "Go on, post something good"
	elseif switch = 3 then
		sub_mit_but = "Submit it all ready!"
	elseif switch = 4 then
		sub_mit_but = "Go on, you can do it - HIT ME!"
	elseif switch = 5 then
		sub_mit_but = "Stick in the post"
	elseif switch = 6 then
		sub_mit_but = "You call that a comment?"
	elseif switch = 7 then
		sub_mit_but = "Did you check for dumb typo's?"
	else
		sub_mit_but = "Post it babe!"
	end if

		dim real_level
		'use real_level as a safty check down lower
		
		'grab the level info
		set tigCON = Server.CreateObject("ADODB.Connection")
	
			tigCON.Open(DSN)
			
				' set up the query to list the news by date Desc
				query = "SELECT str_type, str_filename, id, ranking, votes," & _
						"str_author, str_author_email, str_title, datestamp, wwwsite, txt_review " & _
						"FROM q3a_levels (nolock) " & _
						"WHERE id = " & id
			
			'Response.Write("Query = [" & query & "]<br>")
			set tigRS = tigCON.Execute(query)
																										
			' make sure we have see if there is no records 
			if (tigRS.EOF) Then
				%>
				<span class="main">There is no level information to list for this request atm, sorry :[	</span>
				<%
			else
				
				dim filename, da_review
				dim str_title, str_author, str_author_email
				dim tmp_rank, tmp_votes
				
				real_level = true
				filename = tigRS("str_filename")

				'========
				'work out if there is a non english version of the review
			
				if Request.Cookies("lvl")("language") <> "" then
					
					if LanguageFileCHK(current_ROOT & "translation\" &  Request.Cookies("lvl")("language") & "\" & id & ".txt") then
					
						da_review = LanguageFileREAD(current_ROOT & "translation\" &  Request.Cookies("lvl")("language") & "\" & id & ".txt")						

					else
					
						da_review = tigRS("txt_review")
					
					end if
			
				else
			
					da_review = tigRS("txt_review")
			
				end if
			
				str_title = tigRS("str_title")
				str_author = tigRS("str_author")
				str_author_email = tigRS("str_author_email")

				tmp_rank = tigRS("ranking")
				tmp_votes = tigRS("votes")
									
				if not IsNull(tmp_rank) or not IsNull(tmp_votes) then
					score = Cint(tmp_rank) / Cint(tmp_votes)
				else
					score = 0
					tmp_votes = "no"
				end if

			%>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
	<td width="100%" colspan="4" bgcolor="#696969"><img src="images/clear.gif" width="1" height="1" alt="+---------------------"></td>
</tr>
<tr>
	<td width="1" bgcolor="#696969"><img src="images/clear.gif" width="1" height="1" alt="|"></td>
	<td colspan="3" background="skinz/images<%=customcolours%>/sub_bg1.gif">
		<span class="sub"><b>&nbsp;<a href="download.asp?ftp=fplanet&id=<%=id%>&zip=<%=filename%>" target="_blank"><%=str_title%></a> by <a href="mailto:<%=str_author_email%>"><%=str_author%></a> </span>
		<span class="subsm">(<%=tigRS("str_type")%>, <nobr><%=dloadcounter(id)%> d/loads</nobr>)</b></span></td>
</tr>
<tr>
	<td colspan="2" bgcolor="#696969"><img src="images/clear.gif" width="1" height="1" alt="+---------------------"></td>
	<td><img src="images/clear.gif" width="25" height="1" alt=" "></td>
	<td></td>
</tr>
<tr>
	<td></td>
	<td valign="top"><table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="right" class="main">
	<a href="download.asp?ftp=fplanet&id=<%=id%>&zip=<%=filename%>" target="_blank">download</a> |
	<a href="download.asp?ftp=au&id=<%=id%>&zip=<%=filename%>">.au mirror								
	<%=FileSize2(cdrom_dir & file_dir(filename) & "\" & filename & ".zip")%></a>
	- <a href="readme.asp?txt=<%=filename%>">readme.txt</a>
	<span class="subsm">- <%=realdateshort(tigRS("datestamp"))%></span></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" class="main">
<%=da_review%><br><br>
</td>
</tr></table>
<!-- the votes are here -->
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<form action="do_ranking.asp?level_id=<%=id%>" method="post" id=form1 name=form1>
<tr>
	<td width="100%" colspan="2" bgcolor="#696969"><img src="images/clear.gif" width="1" height="1" alt=" "></td>
</tr>
<tr>
	<td colspan="2" class="main" valign="top">Currently <b><%=str_title%></b> has a score of <b><%=Round(score,2)%></b> after <b><%=tmp_votes%></b> votes</td>
</tr>
<tr>
	<td colspan="2" class="main" valign="top">Rank this level(s) out of 10:&nbsp;<span class="subsm"><select size="1" name="ranking">
	<% 

	i = 0
	do until i = 11 
		%>
		<option value="<%=i%>"><%=i%></option>	
		<%
		i = i + 1	
	loop
	%>
	</select>
		&nbsp;<input type="submit" value="Your Score"></span>
	</td>
</tr>
</form>
</table>
<td></td><%
					
				if (isnull(tigRS("wwwsite"))) or (tigRS("wwwsite") = "") then
					'does the author(s)have a web site?						
					%>
	<td width="160" valign="top"><a href="screen_shot.asp?shot=<%=filename%>" target="_top" ><img src="levels/<%=filename%>/<%=filename%>sm.jpg" width="160" height="120" alt="<%=filename%>" border="0"></a></td>
					<%
				
				else
				
					%>
	<td width="160" valign="top" align="center"><a href="screen_shot.asp?shot=<%=filename%>" target="_top" ><img src="levels/<%=filename%>/<%=filename%>sm.jpg" width="160" height="120" alt="<%=filename%>" border="0"></a><br />
	<span class="main"><a href="http://<%=tigRS("wwwsite")%>" target="_blank">Authors www site</a></span>
	</td>
				<%
				
				end if
				
					%>
</tr>
<tr>
	<td colspan="4"><br><br></td>
</tr>
</table>
			<%
		
			tigRS.close		
	
			if real_level then
			'don't give them a chance if they shouldn't be here
				%>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
	<td width="100%" colspan="2" bgcolor="#696969"><img src="images/clear.gif" width="1" height="1" alt="+---------------------"></td>
</tr>
<tr>
	<td width="100%" colspan="2" align="left" class="main"><b>Any comments on <%=str_title%> by <a href="mailto:<%=str_author_email%>"><%=str_author%></a>?</b>
		<p>
		<table cellpadding="0" cellspacing="0" border="0">
			<form action="do_comments.asp?level_id=<%=id%>" method="post">
				<tr>
					<td class="main" valign="top">Your name (optional):</td>
					<td class="main" valign="top"><input type="text" size="32" maxlength="24" name="str_posters_name" value="<%=Request.Cookies("lvl")("forumuser_name")%>"></td>
				</tr>
				<tr>
					<td class="main" valign="top">Comments? (required):</td>
					<td class="main" valign="top"><textarea cols="32" rows="6" name="txt_comment" wrap="virtual"></textarea></td>
				</tr>
				<tr>
					<td></td>
					<td class="main" valign="top" align="center"><input type="submit" value="<%=sub_mit_but%>" id=submit1 name=submit1><br><br></td>
				</tr>
			</form>
		</table>
	</td>
</tr>
<tr>
	<td width="100%" colspan="2" bgcolor="#696969"><img src="images/clear.gif" width="1" height="1" alt="+---------------------"></td>
</tr>
</table>
<table width="100%" cellpadding="4" cellspacing="2" border="0">
				<%
				'grab the comments to date that are safe to print
				query = "SELECT bit_dont_show, str_posters_name, str_posters_ip, datestamp, txt_comment, level_id " & _
						"FROM q3a_comments (nolock) " & _
						"where ((level_id = " & id & ") and (bit_dont_show = 0)) " & _
						"order by datestamp desc"
			
				'Response.Write("query = [" & query & "]<br>")
			
				set tigRS = tigCON.Execute(query)

	
					i = 0
					do while not tigRS.EOF 
				
						if i mod 2 then
							bgcolor = ""
						else
							bgcolor = " bgcolor=" & bgcolourCustom & ""
						end if

						Response.Write("<tr>" & vbcrlf &"	<td" & bgcolor & " valign=""top""><span class=""main""><b>"& tigRS("str_posters_name") & "</b></span><br>" & vbcrlf)
						Response.Write("	<span class=""subsm"">" & funkydate(tigRS("datestamp")) & "</span>" & vbcrlf)
						if cdate(tigRS("datestamp")) > cdate("16 jun 2000") then 
							Response.Write("	<br><span class=""subsm""><nobr>" & ipmask(trim(replace(tigRS("str_posters_ip"),"unknown,",""))) & "</nobr></span>" & vbcrlf)
						end if
						Response.Write("	</td>" & vbcrlf & "	<td" & bgcolor & " valign=""top"" class=""main"">" & tigRS("txt_comment") & "<br><br></td>" & vbcrlf & "</tr>")

						i = i + 1
						tigRS.MoveNext
				
					loop
								
				end if
			%>
</table>
			<%
			end if
			
				tigRS.close		
			tigCON.close
		%>
<table width="100%" cellpadding="4" cellspacing="2" border="0">
<tr>
	<td valign="top" class="subsm"><nobr>about the reviews</nobr></td>
	<td valign="top" class="subsm">
		maps are co-reviewed by <a href="mailto:mandog@ebom.org" class="footer">Mandog</a> & <a href="mailto:<%=tig_mail%>" class="footer">Tigger-oN</a> unless stated otherwise.<br />
	</td>
</tr>
<tr>
	<td valign="top" class="subsm"><nobr>about the ranking</nobr></td>
	<td valign="top" class="subsm">
		highest possible score is 10<br>
		for each map you can only vote once per week, up to a total of 3 times
	</td>
</tr>
<tr>
	<td valign="top" class="subsm"><nobr>supported html</nobr></td>
	<td class="subsm">
		URL links are automatic, just type the <b>full URL</b>, including http:// or ftp://<br>
		paragraphs are automatic, based on line returns<br>
		&lt;b&gt;<b>some bold text</b>&lt;/b&gt;<br>
		&lt;i&gt;<i>wow italics!</i>&lt;/i&gt;<br>
		<b>All other html tags are stripped out of comments posted</b> - 
		Remeber to close &lt;b&gt; and &lt;i&gt; tags with &lt;/b&gt; and &lt;/i&gt; 
		otherwise everything will be <b>bold</b> or <i>italic</i> :]<br>
	</td>
</tr>
</table>
<br><br><br>
</td>
<!--- end page content --->
<!--#include file="asp/footer1.asp"-->