keysersoze --- Nu er der Intern HTTP-500 Serverfejl.. Filen ovenover er config.inc, som bliver included i default.asp den får du lige her:
<%Option Explicit%>
<!--#include file=\"config.inc\" -->
<!--#include file=\"utilities.inc\" -->
<%
\'declare and set variables
\'arrays used to display proper sorting method
\'also sets column widths
Dim fieldDescriptions, fieldNames, fieldWidths
fieldDescriptions = Array(\"Topic\", \"Author\", \"Date\", \"Replies\")
fieldNames = Array(\"topic\", \"author\", \"date_posted\", \"replies\")
fieldWidths = Array(\"320\", \"145\", \"120\", \"65\")
Dim curPage, pageCount, topicCount
Dim sortBy, sortDir, sortDirOpp
Dim strSearch
Dim strSQL
Dim dbRS
Dim stateQS
Dim i, x, c
x = 0
\'get the new current page if available - otherwise set to 1
curPage = CInt(Request(\"curPage\"))
If curPage = \"\" Or IsNumeric(curPage) = False Then
curPage = 1
Else
If curPage < 1 Then
curPage = 1
End If
End If
\'get sort settings
If Request(\"sortBy\") = \"\" Then
sortBy = Session(\"sortBy\")
Else
sortBy = Request(\"sortBy\")
End If
If Request(\"sortDir\") = \"\" Then
sortDir = Session(\"sortDir\")
Else
sortDir = Request(\"sortDir\")
End If
If sortBy = \"\" Then
sortBy = \"date_posted\"
End If
If sortDir = \"\" Then
sortDir = \"DESC\"
End If
\'get the opposite of the current sort direction in case of change
If sortDir = \"DESC\" Then
sortDirOpp = \"ASC\"
ElseIf sortDir = \"ASC\" Then
sortDirOpp = \"DESC\"
End If
\'get the search string and build the SQL statement
strSearch = Request(\"search\")
strSQL = \"SELECT ID,parentID,topic,author,date_posted,replies FROM board1 \"
If Not strSearch = \"\" Then
strSQL = strSQL & \"WHERE (topic LIKE \'%\" & web2db(strSearch) & \"%\' OR\"
strSQL = strSQL & \" body LIKE \'%\" & web2db(strSearch) & \"%\' OR\"
strSQL = strSQL & \" author LIKE \'%\" & web2db(strSearch) & \"%\') \"
Else
strSQL = strSQL & \"WHERE parentID = 0 \"
End If
strSQL = strSQL & \"ORDER BY \" & sortBy & \" \" & sortDir
\'connect to the database
Set dbRS = Server.CreateObject(\"ADODB.Recordset\")
With dbRS
.CursorLocation = 3
.CacheSize = C_dbPageSize
.Open strSQL, C_dbConnect
End With
If dbRS.EOF = False Then
With dbRS
.MoveFirst
topicCount = CInt(.RecordCount)
.PageSize = C_dbPageSize
pageCount = CInt(.PageCount)
.AbsolutePage = curPage
End With
Else
topicCount = 0
pageCount = 1
End If
\'preconstruct query strings to keep things simple
stateQS = \"curPage=\" & curPage & \"&\"
stateQS = stateQS & \"search=\" & Server.URLEncode(strSearch)
%>
<html>
<head>
<title><%=C_PageTitle%> :: Topics</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<!--#include file=\"javascript.inc\" -->
<!--#include file=\"style.inc\" -->
</head>
<%=C_PageBody%>
<%=C_PageLogo%><br>
<br>
<br>
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td><a href=\"java script:NewTopic(0,\'\');\">Add New Topic</a></td>
<td> | </td>
<%If Not strSearch = \"\" Then%>
<td>Search results for <b><%=strSearch%></b> (<a href=\"default.asp\">Show All Topics or New Search</a>)</td>
<%Else%>
<form name=\"frmSearch\" method=\"post\" action=\"default.asp\">
<td>
<input type=\"text\" name=\"search\" maxlength=\"75\" size=\"15\">
<input type=\"submit\" name=\"action\" value=\"Search\">
</td>
</form>
<%End If%>
</tr>
</table>
<br>
<br>
<table width=\"650\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\" bgcolor=\"<%=C_PageTableBG%>\">
<tr bgcolor=\"#FFFFFF\">
<%For c = 0 To UBound(fieldNames)%>
<%If LCase(fieldNames(c)) = sortBy Then%>
<td width=\"<%=fieldWidths(c)%>\" bgcolor=\"#CCCCCC\">
<a class=\"fieldName\" href=\"default.asp?sortBy=<%=fieldNames(c)%>&sortDir=<%=sortDirOpp%>&<%=stateQS%>\"><%=fieldDescriptions(c)%><img src=\"images/<%=sortDir%>.gif\" width=\"15\" height=\"7\" border=\"0\"></a>
</td>
<%Else%>
<td width=\"<%=fieldWidths(c)%>\">
<a class=\"fieldName\" href=\"default.asp?sortBy=<%=fieldNames(c)%>&sortDir=DESC&<%=stateQS%>\"><%=fieldDescriptions(c)%></a>
</td>
<%End If%>
<%Next%>
</tr>
</table>
<table width=\"650\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\">
<%
If dbRS.EOF Then
%>
<tr>
<td><i>No Topics Found</i></td>
</tr>
<%
Else
Do Until dbRS.EOF Or x >= C_dbPageSize
%>
<tr>
<td width=\"<%=fieldWidths(0)%>\" valign=\"top\"><a href=\"read.asp?ID=<%
If dbRS(\"parentID\") = 0 Then
Response.Write dbRS(\"ID\")
Else
Response.Write dbRS(\"parentID\")
End If
%>&<%=stateQS%>\"><%=db2web(dbRS(\"topic\"))%></a></td>
<td width=\"<%=fieldWidths(1)%>\" valign=\"top\"><%=db2web(dbRS(\"author\"))%></td>
<td width=\"<%=fieldWidths(2)%>\" valign=\"top\"><%=FormatDateTime(dbRS(\"date_posted\"),2)%></td>
<td width=\"<%=fieldWidths(3)%>\" valign=\"top\"><%
If dbRS(\"parentID\") = 0 Then
Response.Write dbRS(\"replies\")
Else
Response.Write \"-\"
End If
%></td>
</tr>
<%
x = x + 1
dbRS.MoveNext
Loop
End If
%>
</table>
<br>
<table width=\"650\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">
<tr>
<td colspan=\"3\" height=\"1\" bgcolor=\"<%=C_PageTableBG%>\"></td>
</tr>
<tr>
<td width=\"220\" align=\"left\"><font size=\"1\"><a href=\"#top\">top of the page</a></font></td>
<td width=\"210\" align=\"center\"><b><%=topicCount%></b> Topic(s) Found</td>
<form name=\"frmPage\">
<td width=\"220\" align=\"right\"> Page
<select name=\"page\" onChange=\"goPage(this);\">
<%For i = 1 To pageCount%>
<option value=<%=i%><%If i=curPage Then Response.Write(\" selected\")%>><%=i%></option>
<%Next%>
</select>
of <%=pageCount%></td>
</form>
</tr>
</table>
<br>
<table width=\"650\" border=\"0\" cellspacing=\"1\" cellpadding=\"2\">
<tr>
<!-- Please do not remove this link //-->
<td align=\"right\"><font size=\"1\">Asp BoardX Created by <a href=\"
http://www.mainstreamdesign.com\">Mainstream Design</a></font></td>
</tr>
</table>
</body>
</html>
<%
\'clear recordset from memory
Set dbRS = Nothing
\'store sort settings in session variables
Session(\"sortBy\") = sortBy
Session(\"sortDir\") = sortDir
%>
----------------------
Hvis du (eller en anden) finder fejlen og får scriptet til at køre, er der udlovet 60 point..
</RealOne>