<% Response.Buffer = "True" Function FixaTecken(str) FixaTecken = Replace(Trim(str),"'","''") End function ' -- list.asp -- Response.Buffer = True Dim connectionString connectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("news56.mdb") ' ID of the file to retrieve Dim ID '...luke kod start Dim PageID Dim NrOfPages Dim NrOfNews 'antalet nyheter som skall visas varje sida NrOfNews = 10 PageID = Request("PageID") '...luke kod slut ID = Request("ID") If Len(ID) < 1 Then ID = 0 End If If Len(PageID) < 1 Then PageID = 0 End If ' Recordset Object Dim rs, rsSelected Set rs = Server.CreateObject("ADODB.Recordset") Set rsSelected = Server.CreateObject("ADODB.Recordset") Dim rs2 Set rs2 = Server.CreateObject("ADODB.Recordset") ' opening connection rsSelected.Open "select * From Files WHERE ID="& ID &"", connectionString, 3, 4 ' vald nyhet rs.Open "select * From Files order by [news_datetime] desc, ID DESC", connectionString, 3, 4 ' alla nyheter hämtas rs2.Open "SELECT * FROM Skribenter WHERE ID=" & rs("news_writer"), connectionString, 3, 4 dim sida set sida = Request.ServerVariables("HTTP_REFERER") dim rubrik set rubrik = rsSelected("news_headline") %>
 

<% Response.Write Tipsa %>:

"<% Response.Write rubrik %>"

<% Response.Write DittNamn %>:
 
<% Response.Write Den_Email %>:
 
<% Response.Write Rec_Email %>:
 
<% Response.Write Message %>:
 
  
<%If Request.QueryString("do") = "skicka" Then 'Här skickas meddelandet till mailen namn = Request.Form("namn") email = Request.Form("mail") kompis = Request.Form("kompis") artikel = Request.Form("artikel") sida = Request.Form("sida") Msg = Replace(Request.Form("comments"), vbCrLf, "
" & vbCrLf) On error resume next ' Här är mailkontot som skickar mailen. strNoReplyMail = "kansliet@hujada.com" strNoReplyPwd = "720301" Set jmail = Server.CreateObject("JMail.Message") jmail.AddRecipient kompis jmail.From = "info@nanews.net" jmail.Subject = artikel jmail.Body = "" jmail.Body = "
" jmail.appendHTML "Hujådå" jmail.appendHTML "" & Art_skickad & "
" jmail.appendHTML "------------------------------------------
" jmail.appendHTML "" & sent_e & ": " & Now & "
" jmail.appendHTML "" & Namn_e & ": " & namn & "
" jmail.appendHTML "" & Email_e & ": " & email & "
" jmail.appendHTML "" & friend_e & ": " & kompis & "
" jmail.appendHTML "" & mess_e & ":
" & Msg & "
" jmail.appendHTML "" & art_e & ":
" & sida & "
" 'jmail.appendHTML "

IPnr: " & ipnr & "
" jmail.appendHTML "
" jmail.appendHTML "" jmail.MailServerUserName = strNoReplyMail jmail.MailServerPassWord = strNoReplyPwd jmail.Send ("mail.imstorm.com") If Err.Number<>0 then Response.Write "
Nåt blev fel! Försök om en stund igen!" Else Response.Write "
Tack för din ansökan " & namn & "! Den ska besvaras så fort som möjligt!!" End if End if rs.Close rsSelected.Close Set rsSelecte = Nothing Set rs = Nothing %>