<% dim cc, bgColor, frameColor, fontColor, width Lang = "ENG" if request.QueryString("LANG") <> "" then Lang = request.QueryString("LANG") cc = split("USD,GBP,EUR,SEK,NOK,DKK", ",") if request.QueryString("CUR") <> "" then cc = Split(request.QueryString("CUR"), ",") bgColor = &HE0E0FF if request.QueryString("BG") <> "" then bgColor = "&H" &request.QueryString("BG") frameColor = &H000000 if request.QueryString("FRAME") <> "" then frameColor = "&H" &request.QueryString("FRAME") fontColor = &H000000 if request.QueryString("FONTCOLOR") <> "" then fontColor = "&H" &request.QueryString("FONTCOLOR") width = 125 if request.QueryString("WIDTH") <> "" then width = request.QueryString("WIDTH") oddColor = &HFFFFFF if request.QueryString("LINE") <> "" then oddColor = "&H" &request.QueryString("LINE") set Cur = new Exchange Set Jpeg = Server.CreateObject("Persits.Jpeg") Jpeg.Canvas.Font.Color = fontColor Jpeg.Canvas.Font.Family = "Verdana" Jpeg.New width, 12*(UBound(cc)+2)+10+17+12, bgColor Jpeg.Canvas.Pen.Color = frameColor Jpeg.Canvas.Pen.Width = 1 Jpeg.Canvas.Brush.Color = bgColor Jpeg.Canvas.Bar 0, 0, Jpeg.Width, Jpeg.Height Jpeg.Quality = 90 Jpeg.Canvas.Brush.Color = oddColor Jpeg.Canvas.Pen.Color = oddColor y=3 if Lang = "SV" then ExchangeRatesText = "Växlingskurser" else ExchangeRatesText = "Exchange Rates" end if Jpeg.Canvas.Font.Size = 14 Jpeg.Canvas.Font.Bold = true Jpeg.Canvas.Print (width/2)-(JPeg.Canvas.GetTextExtent(ExchangeRatesText)/2), y, ExchangeRatesText y=20 bar = true Jpeg.Canvas.Font.Size = 12 Jpeg.Canvas.Font.Bold = false for i=LBound(cc) to UBound(cc) if bar then Jpeg.Canvas.Bar 1, y, Jpeg.Width-1, y+Jpeg.Canvas.Font.Size Jpeg.Canvas.Print 5, y, cc(i) 'getCurrency(curName, Unit) Jpeg.Canvas.Print width-35, y, replace(FormatNumber(Cur.getCurrency(cc(i), 1), 2), ",", ".") y = y + Jpeg.Canvas.Font.Size bar = not bar next Jpeg.Canvas.Font.Italic = true Jpeg.Canvas.Font.Size = 12 y=y+5 if isArray(cc) then ratesUpdated = Cur.getUpdated if Lang = "SV" then RatesUpdated = "Updaterad " &Day(RatesUpdated) &" " &Session("_shortMonthsSwe")(Month(RatesUpdated)-1) &" " &Year(RatesUpdated) else RatesUpdated = "Updated " &Session("_shortMonths")(Month(RatesUpdated)-1) &" " &Day(RatesUpdated) &", " &Year(RatesUpdated) end if Jpeg.Canvas.Print width-JPeg.Canvas.GetTextExtent(ratesUpdated)-2, y, ratesUpdated y=y+12 end if Jpeg.Canvas.Font.bold = true Jpeg.Canvas.Print width-JPeg.Canvas.GetTextExtent("guide-to-thailand.com")-2, y, "guide-to-thailand.com" Jpeg.SendBinary %>