<% Response.contenttype = "text/xml" Set Connect = Server.CreateObject("ADODB.Connection") Connect.open="DRIVER={MySQL ODBC 5.1 Driver};SERVER=ord-103381.mysql.binero.se;Option=3;UID=103381_pj57581;PWD=dhs&35dyWu6;DATABASE=103381-ord" 'Connect.Open = "DRIVER=SQL Server;SERVER=83.168.227.35;UID=u1029146_smexit2;PWD=lamfz^4dfnlok@fudse;DATABASE=db1029146_smexit2;Address=83.168.227.35,1433" 'Connect.Open "DRIVER=SQL Server;SERVER=mssql.webbhotellsgruppen.se;UID=56dsajDs;PWD=5DjsajkDs3;DATABASE=56dsajDs;Address=194.18.12.196,1433" id = request("id") sql = "SELECT orddata.ordid, orddata.rubrik, orddata.datum, orddata.text, users.namn, users.slug FROM orddata left join users on users.id = orddata.id WHERE (orddata.id = '" & id & "') ORDER BY orddata.datum DESC" Set rs = Server.CreateObject("ADODB.Recordset") rs.maxrecords = 11 rs.open sql, connect, 1, 3 %> Ord - <%=rs("namn") %> http://smexit.se/ord/o-<%=replace(rs("slug"), " ", "+") %> Dagbokskollektiv / blogg http://smexit.se/ord/img/rss_88x31.gif Smexit.se/ORD 88 http://smexit.se/ord/ 31 <% do while not rs.eof response.write("" & Server.HTMLEncode(rs("rubrik")) & "") response.write("http://smexit.se/ord/o-" & replace(rs("slug"), " ", "+") & "/" & rs("ordid") & "") response.write("" & return_RFC822_Date(rs("datum"),"GMT") & "") response.write("" & Server.HTMLEncode(rs("namn")) & " <ord@smexit.se>") response.write("Ord - "&rs("namn")&"") response.write("http://smexit.se/ord/o-" & replace(rs("slug"), " ", "+") & "/" & rs("ordid") & "") response.write("<a href=http://smexit.se/ord/o-" & replace(rs("slug"), " ", "+") & "/" & rs("ordid") & ">" & Server.HTMLEncode(left(rs("text"),200)) & "</a>") response.write("") rs.movenext loop rs.close Connect.close %> <% Function return_RFC822_Date(myDate, offset) Dim myDay, myDays, myMonth, myYear Dim myHours, myMonths, mySeconds myDate = CDate(myDate) myDay = WeekdayName(Weekday(myDate),true) myDays = Day(myDate) myMonth = MonthName(Month(myDate), true) myYear = Year(myDate) myHours = zeroPad(Hour(myDate), 2) myMinutes = zeroPad(Minute(myDate), 2) mySeconds = zeroPad(Second(myDate), 2) return_RFC822_Date = dagnamn(myDay)&", "& _ myDays&" "& _ monadnamn(myMonth)&" "& _ myYear&" "& _ myHours&":"& _ myMinutes&":"& _ mySeconds&" "& _ offset End Function Function zeroPad(m, t) zeroPad = String(t-Len(m),"0")&m End Function Function dagnamn(myDay) if myDay = "må" then dagnamn = "Mon" elseif myDay = "ti" then dagnamn = "Tue" elseif myDay = "on" then dagnamn = "Wed" elseif myDay = "to" then dagnamn = "Thu" elseif myDay = "fr" then dagnamn = "Fri" elseif myDay = "lö" then dagnamn = "Sat" elseif myDay = "sö" then dagnamn = "Sun" else dagnamn = myDay end if end function Function monadnamn(myMonth) if myMonth = "jan" then monadnamn = "Jan" elseif myMonth = "feb" then monadnamn = "Feb" elseif myMonth = "mar" then monadnamn = "Mar" elseif myMonth = "apr" then monadnamn = "Apr" elseif myMonth = "maj" then monadnamn = "May" elseif myMonth = "jun" then monadnamn = "Jun" elseif myMonth = "jul" then monadnamn = "Jul" elseif myMonth = "aug" then monadnamn = "Aug" elseif myMonth = "sep" then monadnamn = "Sep" elseif myMonth = "okt" then monadnamn = "Oct" elseif myMonth = "nov" then monadnamn = "Nov" elseif myMonth = "dec" then monadnamn = "Dec" else monadnamn = myMonth end if end function %>