%
Dim f, n, n1, ref
f = Request.ServerVariables("URL")
n = InStr(f, "rating_")
f = Right(f, Len(f) - n - 6)
f = Replace(f, ".asp", "")
f = Trim(Replace(f, "_", " "))
Dim o, i
i = "c:\Qweas-Imp\ratings.ini"
Set o = Server.CreateObject("qwRate.cRate")
Dim ver, scr, scr160, d1, d2, d3, buy, pri, size, code, web, d80, app, lic, os
ver = o.GetKeyValue(f, "version", i)
scr = o.GetKeyValue(f, "screen", i)
scr160 = o.GetKeyValue(f, "screen160", i)
d1 = o.GetKeyValue(f, "down1", i)
d2 = o.GetKeyValue(f, "down2", i)
d3 = o.GetKeyValue(f, "down3", i)
buy = o.GetKeyValue(f, "order", i)
pri = o.GetKeyValue(f, "price", i)
size = o.GetKeyValue(f, "size", i)
code = o.GetKeyValue(f, "code", i)
web = o.GetKeyValue(f, "website", i)
d80 = o.GetKeyValue(f, "desc80", i)
app = o.GetKeyValue(f, "appinfo", i)
lic = o.GetKeyValue(f, "license", i)
os = o.GetKeyValue(f, "os", i)
n = o.getScoreByCode(code)
s = o.getDetailsHTML(code, 1)
Set o = Nothing
ref = "unrated.png"
n1 = 0
If Len(code) = 36 Then
Set o = Nothing
If n>80 Then n1 = 5
If n<81 And n>60 Then n1 = 4
If n<61 And n>40 Then n1 = 3
If n<41 And n>20 Then n1 = 2
If n<21 Then n1 = 1
End If
If n1>0 Then ref = n1 & "stars.gif"
ref = "/rate/images/" & ref
Dim title, down, fver
title = f & " " & ver & " by " & web & " was rated " & n1 & " stars "
fver = f & " " & ver
down = " "
If Len(d1) > 10 Then down = down & "Download 1" & ""
If Len(d2) > 10 Then down = down & " - Download 2" & ""
If Len(d3) > 10 Then down = down & " - Download 3" & ""
down = down & " "
pri = pri & " "
If Len(buy) > 10 Then pri = pri & "Buy Now" & ""
%>