tack så mycket för svaret undrar bara om det är i admin_questions.asp
<!--#include file="includelogin.asp"-->
<!--#include file="menu.inc"-->
<!--#include file="incfaq.asp"-->
<%
Dim oConn
Set oConn = FAQ_GetDatabaseConn()
Dim oRS
If Request.QueryString("save")="yes" Then
Set oRS = Server.CreateObject("ADODB.Recordset")
'Change ordering...
Dim sID, nFldAuto
sID = Request.QueryString("chapter_fldAuto")
sID = CInt( sID)
oRS.Open "select * from " & FAQ_GetTablePrefix() & "question where chapter_fldAuto = " & sID, oConn, 1, 3
While Not oRS.EOF
nFldAuto = oRS("fldAuto")
oRS("orderingfield") = Request.Form("order" & nFldAuto)
oRS.Update
oRS.MoveNext
Wend
oRS.Close
Set oRS = Nothing
'oConn.Close
'Set oConn = Nothing
'Response.Redirect "default.asp"
End If
%>
<html>
<head>
<%
''''''''''' (C) Stefan Holmberg 1999
''''''''''' Free to use if these sourcecode lines is not deleted
''''''''''' Contact me at webmaster@sqlexperts.com
''''''''''' [url="http://www.sqlexperts.com"]http://www.sqlexperts.com[/url]
''''''''''' AdMentor homepage at [url="http://www.create-a-webshop.com"]http://www.create-a-webshop.com[/url]
Dim name, descr
Dim oRSQuestions
Set oRSQuestions = oConn.Execute("select * from " & FAQ_GetTablePrefix() & "question where chapter_fldAuto=" & Request.QueryString("chapter_fldAuto") & " order by orderingfield" )
Dim oRSChapter, sFAQName, nFaqID
Set oRSChapter = oConn.Execute ("select * from " & FAQ_GetTablePrefix() & "chapter where fldAuto = " & Request.QueryString("chapter_fldAuto") )
sFAQName = oRSChapter("name")
nFaqID = oRSChapter("faq_fldAuto")
oRSChapter.Close
Set oRSChapter = Nothing
'Get some info on current FAQ
%>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>PostcardMentor - Admin interface</title>
<style type="text/css">
<!--
body { font-family: Arial, Geneva, Helvetica, Verdana; font-size: smaller; color: #000000}
td { font-family: Arial, Geneva, Helvetica, Verdana; font-size: smaller; color: #000000}
th { font-family: Arial, Geneva, Helvetica, Verdana; font-size: smaller; color: #000000}
A:link {text-decoration: none;}
A:visited {text-decoration: none;}
A:hover {text-decoration: underline;}
-->
</style>
</head>
<body>
<table align="center" bgColor="#ECECD9" border="0" cellPadding="3" cellSpacing="0" height="100%" width="100%">
<tbody>
<tr>
<td vAlign="top" width="50%" height="60">
<b><a href="http://www.aspcode.net"><font face="verdana,arial,helvetica" size="1">http://www.aspcode.net</font></a></b>
</td>
<td vAlign="top" width="468" height="60">
<b><font face="verdana,arial,helvetica" size="+2">Admin
interface</font></b>
<table border="0" width="100%">
<tr>
<td width="50%">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="100%" vAlign="top" width="100%" colspan="2">
<table align="center" bgColor="#ffffff" border="0" cellPadding="0" cellSpacing="0" height="100%" width="100%">
<tbody>
<tr>
<td height="100%" vAlign="top" width="85%">
<table bgColor="#ffffff" border="0" cellPadding="10" cellSpacing="0" height="100%" width="100%">
<tbody>
<tr>
<td align="left" height="100%" vAlign="top" width="65%">
<table border="0" width="100%">
<tr>
<td width="50%"><b><font color="#aa3333" face="verdana,arial,helvetica" size="4">ArticleMentor <%=Session("fullname")%></font></b>
</td>
<td width="50%">
<%=FAQ_GetAd(1)%>
</td>
</tr>
</table>
<hr color="#000066" noShade SIZE="1">
<p><font size="+1"><%=sFAQName%></font></p>
<table border="0" width="100%">
<tr>
<td width="70%">
<%
Dim sURL
sURL = "admin_questions.asp?chapter_fldAuto=" & Request.QueryString("chapter_fldAuto") & "&save=yes"
%>
<form method="POST" action="<%=sURL%>" name="FrontPage_Form1">
<table border="0" width="100%">
<tr>
<td bgcolor="#ECECD9"><b>Header</b></td>
<td bgcolor="#ECECD9"><b>Ordernumber</b></td>
<td bgcolor="#ECECD9"><b>Actions</b></td>
</tr>
<%
Dim nVal
nVal = 1
While Not oRSQuestions.EOF
Dim sName
sName = "order" & oRSQuestions("fldAuto").Value
%>
<tr>
<td ><%=oRSQuestions("question")%></td>
<td >
<input type="text" name="<%=sName%>" size="7" value="<%=nVal%>"></td>
<td ><a href="admin_question.asp?action=edit&fldAuto=<%=oRSQuestions("fldAuto")%>&chapter_fldAuto=<%=Request.QueryString("chapter_fldAuto")%>">Modify</a> -<a href="admin_question.asp?save=yes&action=del&fldAuto=<%=oRSQuestions("fldAuto")%>&chapter_fldAuto=<%=Request.QueryString("chapter_fldAuto")%>"> Delete</a></td>
</tr>
<%
nVal = nVal + 1
oRSQuestions.MoveNext
Wend
oRSQuestions.Close
Set oRSQuestions = Nothing
%>
</table>
<p align="left">
<p align="left"><input type="submit" value="Change article ordering" name="B1">
<a href="admin_question.asp?action=new&chapter_fldAuto=<%=Request.QueryString("chapter_fldAuto")%>">Add new
article</a></p>
</form>
<%
Set oRSFAQ = oConn.Execute ("select * from " & FAQ_GetTablePrefix() & "faq where fldAuto = " & nFaqID )
sFAQName = oRSFAQ("name")
oRSFAQ.Close
Set oRSFAQ = Nothing
%>
<p><a href="admin_chapters.asp?faq_fldAuto=<%=nFaqId%>">Back to current category
( <%=sFAQName%> ) </a>
<%
Set oRSFAQ = oConn.Execute ("select * from " & FAQ_GetTablePrefix() & "faq where fldAuto = " & nFaqID )
sFAQName = oRSFAQ("name")
oRSFAQ.Close
Set oRSFAQ = Nothing
oConn.Close
Set oConn = Nothing
%>
<p><a href="admin_default.asp">Back
to home </a></p><p><font face="helvetica, arial" size="2">ArticleMentor is
developed by <a href="http://www.aspcode.net">ASPCode.net</a>. Usage of it is totally free.</font></p>
<table border="0" width="100%">
<tr>
<td width="50%">
<%=FAQ_GetAd(3)%>
</td>
<td width="50%">
<%=FAQ_GetAd(2)%>
</td>
</tr>
</table>
</tr>
<tr>
<td width="70%">
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>
eller i showquestion.asp
<%
OPTION EXPLICIT
Response.Buffer = True
%>
<!--#include file="incfaq.asp"-->
<%
Function FixText( sText )
Dim sRet
sRet = Replace(sText, vbCrLf, "<br>")
FixText = sRet
End Function
Public Function IsValidWebSite(ByRef Value)
Dim MaxLength, IsRequired
MaxLength = 255
IsRequired = True
IsValidWebSite = True
Value = Trim(Value)
If IsRequired And Len(Value) = 0 Then
IsValidWebSite = False
End If
If Len(Value) > MaxLength Then
IsValidWebSite = False
End If
If Len(Value) > 0 Then
If Left(Value, 4) <> "http" Then
IsValidWebSite = False
End If
End If
End Function
Dim nQuestionId
nQuestionId = Request.QueryString("fldAuto")
If nQuestionId = "" Then
Response.Redirect "."
End If
Dim oFAQConn, oFAQ
Set oFAQConn = FAQ_GetDatabaseConn()
Set oFAQ = oFAQConn.Execute("select question, answer from " & FAQ_GetTablePrefix() & "question where fldAuto=" & nQuestionId )
Dim nfaq_fldAuto
nfaq_fldAuto = Request.QueryString("faq")
Dim oRS2
Set oRS2 = oFAQConn.Execute("select name from " & FAQ_GetTablePrefix() & "faq where fldAuto=" & nfaq_fldAuto )
Dim sFaqName
sFaqName = oRS2("name").Value
oRS2.Close
Set oRS2 = Nothing
Dim vPages
Dim sHeader
'Dim sGuestRes
Dim sTextToShow
sHeader = oFAQ("question")
vPages = Split(oFAQ("answer"),"<NEWPAGE>")
Dim nTotalPages
Dim nCurPage
nTotalPages = UBound(vPages ) + 1
If nTotalPages=1 And IsValidWebSite(vPages(0)) Then
oFAQ.Close
Set oFAQ = Nothing
oFAQConn.Close
Set oFAQConn = Nothing
Response.Redirect vPages(0)
Response.Flush
Response.End
End If
nCurPage = Request.QueryString("page")
If nCurPage = "" Or CInt(nCurPage) > CInt(nTotalPages) or CInt(nCurPage)< 1 Then
nCurPage = 1
End If
sTextToShow = FixText(vPages(nCurPage-1))
Sub WritePrev()
If CInt(nCurPage)<> 1 Then
Response.Write "<a href='showquestion.asp?faq=" & nfaq_fldAuto & "&fldAuto=" & nQuestionId & "&page=" & nCurPage-1 & "'>" & "<img src='previous.gif'>" & "</a>"
End If
End Sub
Sub WriteNext()
If CInt(nCurPage)< CInt(nTotalPages) Then
Response.Write "<a href='showquestion.asp?faq=" & nfaq_fldAuto & "&fldAuto=" & nQuestionId & "&page=" & nCurPage+1 & "'>" & "<img src='next.gif'>" & "</a>"
End If
End Sub
%>
<html>
<head>
<meta http-equiv="Content-Language" content="en">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Free asp applications</title>
<style type="text/css">
<!--
body { font-family: Verdana,Arial,Helvetica; font-size: smaller; color: #000000}
td { font-family: Verdana,Arial,Helvetica; font-size: smaller; color: #000000}
th { font-family: Verdana,Arial,Helvetica; font-size: smaller; color: #000000}
A:link {text-decoration: none;}
A:visited {text-decoration: none;}
A:hover {text-decoration: underline;}
-->
</style>
</head>
<body>
<table border="0" width="100%">
<tr>
<td width="50%"><FONT color=#660000 face=Tahoma,Verdana,Arial
size=+3><B>ASPCode.net</B></FONT><BR><b><font size="3">The place to find
free ASP code</font></b></td>
<td width="50%"><%=FAQ_GetAd( 1 )%></td>
</tr>
</table>
<table border="0" width="100%">
<tr>
<td valign="top">
<br>
<font size="4"><%=sHeader%></font><br><br><br>
<table border="0" width="100%">
<tr>
<td width="50%"><%WritePrev%></td>
<td width="50%">
<p align="right"><%WriteNext%></td>
</tr>
</table>
<hr>
<%=sTextToShow%>
</td>
</tr>
</table>
<%
oFAQ.Close
Set oFAQ = Nothing
oFAQConn.Close
Set oFAQConn = Nothing
%>
<p><a href="showfaq.asp?fldAuto=<%=nfaq_fldAuto%>"><--- Back to category</a>
<p>
<p>These articles are maintained with ArticleMentor - a totally free product
available for download <a href="http://www.aspcode.net/products/articlementor">here</a>.<p>
<table border="0" width="100%">
<tr>
<td width="50%"><FONT face="Arial,sans serif" size=2>© </FONT> <font size="1" face="Arial,sans serif">2000
Stefan Holmberg <a href="http://www.aspcode.net">http://www.aspcode.net</a></font></td>
<td width="50%"><%=FAQ_GetAd( 2 )%></td>
</tr>
</table>
<%=FAQ_GetAd( 3 )%>
</body>
</html>
och God Jul
------------------
Mvh Martin Persson
www.Costodia.com